From report at bugs.python.org Sun Jul 1 01:16:49 2018 From: report at bugs.python.org (Bumsik Kim) Date: Sun, 01 Jul 2018 05:16:49 +0000 Subject: [issue33986] asyncio: Typo in documentation: BaseSubprocessTransport -> SubprocessTransport In-Reply-To: <1530139574.74.0.56676864532.issue33986@psf.upfronthosting.co.za> Message-ID: <1530422209.01.0.56676864532.issue33986@psf.upfronthosting.co.za> Bumsik Kim added the comment: As a note, BaseSubprocessTransport is used for implementation of SubprocessTransport. BaseSubprocessTransport is not exposed outside of the module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 02:24:57 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 01 Jul 2018 06:24:57 +0000 Subject: [issue34013] Inconsistent SyntaxError for print In-Reply-To: <1530380578.04.0.56676864532.issue34013@psf.upfronthosting.co.za> Message-ID: <1530426297.91.0.56676864532.issue34013@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Related issue that introduced the error message if you would like to take a look at the implementation : https://bugs.python.org/issue30597 Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 03:01:48 2018 From: report at bugs.python.org (INADA Naoki) Date: Sun, 01 Jul 2018 07:01:48 +0000 Subject: [issue34006] Windows HTML Help (chm) has fixed line length In-Reply-To: <1530313481.18.0.56676864532.issue34006@psf.upfronthosting.co.za> Message-ID: <1530428508.57.0.56676864532.issue34006@psf.upfronthosting.co.za> INADA Naoki added the comment: I prefer limiting width on browser, but I'm OK to remove limitation from chm files. Rational: Changing window size to control line width for readable length is bad UX because all modern browsers are tabbed. Or it may be impossible on iPad. On the other hand, chm is file format only on Windows. And window is dedicated to Python doc. User can control width easily than browser. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 03:02:55 2018 From: report at bugs.python.org (INADA Naoki) Date: Sun, 01 Jul 2018 07:02:55 +0000 Subject: [issue30660] Lossless Optimization of PNG files In-Reply-To: <1497395488.74.0.644428672228.issue30660@psf.upfronthosting.co.za> Message-ID: <1530428575.1.0.56676864532.issue30660@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset c6cd164cffedb306a4c6644d9d03072f24da246d by INADA Naoki in branch 'master': bpo-30660: Doc: Optimize PNG files by optipng (GH-8032) https://github.com/python/cpython/commit/c6cd164cffedb306a4c6644d9d03072f24da246d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 03:03:26 2018 From: report at bugs.python.org (INADA Naoki) Date: Sun, 01 Jul 2018 07:03:26 +0000 Subject: [issue30660] Lossless Optimization of PNG files In-Reply-To: <1497395488.74.0.644428672228.issue30660@psf.upfronthosting.co.za> Message-ID: <1530428606.1.0.56676864532.issue30660@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 03:32:54 2018 From: report at bugs.python.org (INADA Naoki) Date: Sun, 01 Jul 2018 07:32:54 +0000 Subject: [issue34006] Windows HTML Help (chm) has fixed line length In-Reply-To: <1530313481.18.0.56676864532.issue34006@psf.upfronthosting.co.za> Message-ID: <1530430374.75.0.56676864532.issue34006@psf.upfronthosting.co.za> INADA Naoki added the comment: http://www.sphinx-doc.org/en/master/theming.html#builtin-themes > body_max_width (int or str): Maximal width of the document body. This can be an int, which is interpreted as pixels or a valid CSS dimension string such as ?70em? or ?50%?. Use ?none? if you don?t want a width limit. Defaults may depend on the theme (often 800px). Maybe, all you we need to do is adding "-D html_theme_options.body_max_width=none" option to sphinx-build when building html for htmlhelp, in Doc/make.bat. I confirmed this option works with "make html", but I don't have environment for building htmlhelp for now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 04:03:04 2018 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 01 Jul 2018 08:03:04 +0000 Subject: [issue34013] Inconsistent SyntaxError for print In-Reply-To: <1530380578.04.0.56676864532.issue34013@psf.upfronthosting.co.za> Message-ID: <1530432184.75.0.56676864532.issue34013@psf.upfronthosting.co.za> Dong-hee Na added the comment: @xtreak Thanks, I have interest with this issue :) I will take a look at the implementation Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 04:03:12 2018 From: report at bugs.python.org (INADA Naoki) Date: Sun, 01 Jul 2018 08:03:12 +0000 Subject: [issue34015] doc Add link to Descriptor HowTo Guide in Data Model In-Reply-To: <1530408862.0.0.56676864532.issue34015@psf.upfronthosting.co.za> Message-ID: <1530432192.94.0.56676864532.issue34015@psf.upfronthosting.co.za> INADA Naoki added the comment: I think "See also" is better than sidebar. Many other sections in data-model chapter have it. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 04:17:13 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 01 Jul 2018 08:17:13 +0000 Subject: [issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files In-Reply-To: <1389140162.94.0.578256004005.issue20180@psf.upfronthosting.co.za> Message-ID: <1530433033.7.0.56676864532.issue20180@psf.upfronthosting.co.za> Change by Tal Einat : ---------- pull_requests: +7648 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 04:24:22 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 01 Jul 2018 08:24:22 +0000 Subject: [issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files In-Reply-To: <1389140162.94.0.578256004005.issue20180@psf.upfronthosting.co.za> Message-ID: <1530433462.97.0.56676864532.issue20180@psf.upfronthosting.co.za> Tal Einat added the comment: See updated PR for Objects/stringlib/transmogrify.h in GH-8039. ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 04:27:55 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 01 Jul 2018 08:27:55 +0000 Subject: [issue20304] Argument Clinic: char convertor should use default values of type bytes In-Reply-To: <1390146665.62.0.375243979235.issue20304@psf.upfronthosting.co.za> Message-ID: <1530433675.35.0.56676864532.issue20304@psf.upfronthosting.co.za> Tal Einat added the comment: See PR GH-8039, which fixes this in order to AC convert Objects/stringlib/transmogrify.h. ---------- versions: +Python 3.8 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 04:32:12 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Sun, 01 Jul 2018 08:32:12 +0000 Subject: [issue33996] Crash in gen_send_ex(): _PyErr_GetTopmostException() returns freed memory In-Reply-To: <1530275751.35.0.56676864532.issue33996@psf.upfronthosting.co.za> Message-ID: <1530433932.53.0.56676864532.issue33996@psf.upfronthosting.co.za> Change by Miro Hron?ok : ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 04:39:43 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 01 Jul 2018 08:39:43 +0000 Subject: [issue20304] Argument Clinic: char convertor should use default values of type bytes In-Reply-To: <1390146665.62.0.375243979235.issue20304@psf.upfronthosting.co.za> Message-ID: <1530434383.32.0.56676864532.issue20304@psf.upfronthosting.co.za> Change by Tal Einat : ---------- keywords: +patch pull_requests: +7649 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 04:44:06 2018 From: report at bugs.python.org (Mark Shannon) Date: Sun, 01 Jul 2018 08:44:06 +0000 Subject: [issue33996] Crash in gen_send_ex(): _PyErr_GetTopmostException() returns freed memory In-Reply-To: <1530275751.35.0.56676864532.issue33996@psf.upfronthosting.co.za> Message-ID: <1530434646.81.0.56676864532.issue33996@psf.upfronthosting.co.za> Mark Shannon added the comment: Strange. I could only reproduce this intermittently with 3.7 build. But with a debug build, I cannot reproduce this at all. Rebuilding Python (optimised, but without PGO) I cannot reproduce at all now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 05:04:37 2018 From: report at bugs.python.org (Mark Shannon) Date: Sun, 01 Jul 2018 09:04:37 +0000 Subject: [issue33996] Crash in gen_send_ex(): _PyErr_GetTopmostException() returns freed memory In-Reply-To: <1530275751.35.0.56676864532.issue33996@psf.upfronthosting.co.za> Message-ID: <1530435877.59.0.56676864532.issue33996@psf.upfronthosting.co.za> Mark Shannon added the comment: This looks like a Greenlet bug to me. Possibly https://github.com/python-greenlet/greenlet/commit/780a12b51fcef9adcc4f2c9a4cc5b05c2d652ba4 is incomplete. It is not clear to me why greenlets hold their own exception state, but I suspect that if they didn't then this issue might go away. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 07:24:22 2018 From: report at bugs.python.org (Piyush Hajare) Date: Sun, 01 Jul 2018 11:24:22 +0000 Subject: [issue34013] Inconsistent SyntaxError for print In-Reply-To: <1530380578.04.0.56676864532.issue34013@psf.upfronthosting.co.za> Message-ID: <1530444262.48.0.56676864532.issue34013@psf.upfronthosting.co.za> Piyush Hajare <4piyushhajare at gmail.com> added the comment: I'm interested to solve this issue ---------- nosy: +piyushhajare _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 07:53:34 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Sun, 01 Jul 2018 11:53:34 +0000 Subject: [issue34015] doc Add link to Descriptor HowTo Guide in Data Model In-Reply-To: <1530408862.0.0.56676864532.issue34015@psf.upfronthosting.co.za> Message-ID: <1530446014.32.0.56676864532.issue34015@psf.upfronthosting.co.za> Andr?s Delfino added the comment: ok :) I have just updated the PR following your comment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 09:33:43 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 01 Jul 2018 13:33:43 +0000 Subject: [issue34013] Inconsistent SyntaxError for print In-Reply-To: <1530380578.04.0.56676864532.issue34013@psf.upfronthosting.co.za> Message-ID: <1530452023.4.0.56676864532.issue34013@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I took an initial stab at this and there is a comment where if there is an open paren then to use the normal error message. Additional context on the issue which lists false positive cases where the change was introduced https://bugs.python.org/issue21669. I removed the check where the left paren count is not -1 in case of a function call and it seems to work. Of course, there are cases to handle as mentioned in the linked issue and I tried some of the cases like "foo".toupper().tolower() and the results as below : Patch : diff --git a/Objects/exceptions.c b/Objects/exceptions.c index bb50c1c..7e616cf 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -2966,10 +2966,7 @@ _report_missing_parentheses(PySyntaxErrorObject *self) if (left_paren_index < -1) { return -1; } - if (left_paren_index != -1) { - /* Use default error message for any line with an opening paren */ - return 0; - } + /* Handle the simple statement case */ legacy_check_result = _check_for_legacy_statements(self, 0); if (legacy_check_result < 0) { Cases : ? cpython git:(master) ? cat foo_print.py class Foo: pass print Foo().header(a=foo(1)) ? cpython git:(master) ? ./python foo_print.py File "foo_print.py", line 4 print Foo().header(a=foo(1)) ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(Foo().header(a=foo(1)))? ? cpython git:(master) ? cat foo_print.py print "a".toupper().tolower() ? cpython git:(master) ? ./python foo_print.py File "foo_print.py", line 1 print "a".toupper().tolower() ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("a".toupper().tolower())? Linked cases in the patch : ? cpython git:(master) ? cat foo_print.py print (foo.) ? cpython git:(master) ? ./python foo_print.py File "foo_print.py", line 1 print (foo.) ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print((foo.))? Would like to link to https://hackmd.io/s/ByMHBMjFe#08-Debugging-Python-Objects . As a beginner the tutorial was helpful and I had to set a break point on Objects/exceptions.c:1323 where SyntaxError_init is called and then execute line by line where the current code returns the left_paren_index which you can set as `set left_paren_index = -1` to skip the branch and then continue the program to print the above error messages. IMO I think it was an explicit decision with this change being done 4 years ago with the false positive cases and tests listed but I am curious if there are any improvements in this area to be done. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 09:45:28 2018 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 01 Jul 2018 13:45:28 +0000 Subject: [issue33660] pathlib.Path.resolve() returns path with double slash when resolving a relative path in root directory In-Reply-To: <1527418713.03.0.682650639539.issue33660@psf.upfronthosting.co.za> Message-ID: <1530452728.11.0.56676864532.issue33660@psf.upfronthosting.co.za> Dong-hee Na added the comment: Please review my pull request. This PR is pending for 19 days. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 09:55:45 2018 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 01 Jul 2018 13:55:45 +0000 Subject: [issue34013] Inconsistent SyntaxError for print In-Reply-To: <1530380578.04.0.56676864532.issue34013@psf.upfronthosting.co.za> Message-ID: <1530453345.03.0.56676864532.issue34013@psf.upfronthosting.co.za> Dong-hee Na added the comment: Thanks, my easy patch is worked by pre-checking left paren index. but some edge case which I don't expect should be considered. if (left_paren_index != -1) { - /* Use default error message for any line with an opening paren */ - return 0; + int found_white_space = 0; + int found_other_char = 0; + Py_ssize_t pos = 0; + while(pos != left_paren_index) { + int kind = PyUnicode_KIND(self->text); + void *data = PyUnicode_DATA(self->text); + Py_UCS4 ch = PyUnicode_READ(kind, data, pos); + if (Py_UNICODE_ISSPACE(ch)) { + found_white_space = 1; + } + if (!Py_UNICODE_ISSPACE(ch) && found_white_space == 1) { + found_other_char = 1; + } + pos++; + } + + if (found_other_char == 0) { + return 0; + } } Type "help", "copyright", "credits" or "license" for more information. >>> print (foo.) File "", line 1 print (foo.) ^ SyntaxError: invalid syntax >>> print "a".toupper().tolower() File "", line 1 print "a".toupper().tolower() ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("a".toupper().tolower())? SyntaxError: Missing parentheses in call to 'print'. Did you mean print(Foo().header(a=foo(1)))? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 09:56:12 2018 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 01 Jul 2018 13:56:12 +0000 Subject: [issue34013] Inconsistent SyntaxError for print In-Reply-To: <1530380578.04.0.56676864532.issue34013@psf.upfronthosting.co.za> Message-ID: <1530453372.86.0.56676864532.issue34013@psf.upfronthosting.co.za> Dong-hee Na added the comment: >>> class Foo: ... pass ... >>> print Foo().header(a=foo(1)) File "", line 1 print Foo().header(a=foo(1)) ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(Foo().header(a=foo(1)))? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 10:04:41 2018 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 01 Jul 2018 14:04:41 +0000 Subject: [issue34013] Inconsistent SyntaxError for print In-Reply-To: <1530380578.04.0.56676864532.issue34013@psf.upfronthosting.co.za> Message-ID: <1530453881.87.0.56676864532.issue34013@psf.upfronthosting.co.za> Dong-hee Na added the comment: And here's my work in progress patch. https://github.com/corona10/cpython/commit/133825346fd60e518e9ab5830a0755250c8c3e79 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 10:40:22 2018 From: report at bugs.python.org (=?utf-8?q?Nico_Schl=C3=B6mer?=) Date: Sun, 01 Jul 2018 14:40:22 +0000 Subject: [issue31415] Add -X option to show import time In-Reply-To: <1505107635.07.0.844960422859.issue31415@psf.upfronthosting.co.za> Message-ID: <1530456022.38.0.56676864532.issue31415@psf.upfronthosting.co.za> Nico Schl?mer added the comment: I just updated tuna [1] to support import time profiles as well. Install with ``` pip install tuna ``` and use with ``` python -X importprofile yourfile.py 2> import.log tuna import.log ``` See screenshot for example output. Cheers, Nico [1] https://github.com/nschloe/tuna ---------- nosy: +nschloe Added file: https://bugs.python.org/file47663/sc.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 14:57:48 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 01 Jul 2018 18:57:48 +0000 Subject: [issue33955] Implement PyOS_CheckStack on macOS using pthread_get_stack*_np In-Reply-To: <1529925495.69.0.56676864532.issue33955@psf.upfronthosting.co.za> Message-ID: <1530471468.41.0.56676864532.issue33955@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Sure. I'm not working on this at the moment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 15:28:46 2018 From: report at bugs.python.org (Lucas Sampaio) Date: Sun, 01 Jul 2018 19:28:46 +0000 Subject: [issue34016] Bug in sort() Message-ID: <1530473326.57.0.56676864532.issue34016@psf.upfronthosting.co.za> New submission from Lucas Sampaio : lista4 = input().split() print(lista4) lista4.sort() print(lista4) Input = 6 8 10 Output: 6 8 10 ['6', '8', '10'] ['10', '6', '8'] a bug occurs when setting the 10 ---------- messages: 320843 nosy: lucassdssampaio priority: normal severity: normal status: open title: Bug in sort() type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 16:06:35 2018 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 01 Jul 2018 20:06:35 +0000 Subject: [issue34016] Bug in sort() In-Reply-To: <1530473326.57.0.56676864532.issue34016@psf.upfronthosting.co.za> Message-ID: <1530475595.37.0.56676864532.issue34016@psf.upfronthosting.co.za> Mark Dickinson added the comment: This isn't a bug: I'm guessing that you expected an output of `['6', '8', '10']`, but in the example you give you're sorting strings rather than numbers, and those strings are sorted lexicographically (i.e., using "dictionary order") as normal. If you want to do a numeric sort, convert your inputs to numbers first. >>> lista4 = ['6', '8', '10'] >>> lista4_numbers = [int(s) for s in lista4] >>> lista4_numbers.sort() >>> lista4_numbers [6, 8, 10] ---------- nosy: +mark.dickinson resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 17:00:13 2018 From: report at bugs.python.org (Lucas Sampaio) Date: Sun, 01 Jul 2018 21:00:13 +0000 Subject: [issue34016] Bug in sort() In-Reply-To: <1530473326.57.0.56676864532.issue34016@psf.upfronthosting.co.za> Message-ID: <1530478813.19.0.56676864532.issue34016@psf.upfronthosting.co.za> Lucas Sampaio added the comment: same code with another input type is list lista4 = input().split() print(lista4) lista4.sort() print(lista4) 6 8 9 ['6', '8', '9'] ['6', '8', '9'] lista4 = input().split() print(lista4) lista4.sort() print(lista4) 10 11 12 ['10', '11', '12'] ['10', '11', '12'] but if you put a 9 _______________________________________ From report at bugs.python.org Sun Jul 1 17:05:09 2018 From: report at bugs.python.org (Tim Peters) Date: Sun, 01 Jul 2018 21:05:09 +0000 Subject: [issue34016] Bug in sort() In-Reply-To: <1530473326.57.0.56676864532.issue34016@psf.upfronthosting.co.za> Message-ID: <1530479109.2.0.56676864532.issue34016@psf.upfronthosting.co.za> Tim Peters added the comment: Lucas, as Mark said you're sorting _strings_ here, not sorting integers. Please study his reply. As strings, "10" is less than "9", because "1" is less than "9". >>> "10" < "9" True >>> 10 < 9 False ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 17:12:21 2018 From: report at bugs.python.org (Lucas Sampaio) Date: Sun, 01 Jul 2018 21:12:21 +0000 Subject: [issue34016] Bug in sort() In-Reply-To: <1530479109.2.0.56676864532.issue34016@psf.upfronthosting.co.za> Message-ID: Lucas Sampaio added the comment: ok, I got it lista4 = input().split() print(lista4) lista4.sort() print(lista4) print(type(lista4[2])) 6 8 10['6', '8', '10'] ['10', '6', '8'] ok, I got it 2018-07-01 18:05 GMT-03:00 Tim Peters : > > Tim Peters added the comment: > > Lucas, as Mark said you're sorting _strings_ here, not sorting integers. > Please study his reply. As strings, "10" is less than "9", because "1" is > less than "9". > > >>> "10" < "9" > True > >>> 10 < 9 > False > > ---------- > nosy: +tim.peters > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 18:23:04 2018 From: report at bugs.python.org (Alan Huang) Date: Sun, 01 Jul 2018 22:23:04 +0000 Subject: [issue33995] test_min_max_version in test_ssl.py fails when Python is built against LibreSSL; {min,max}imum_version behavior differs from OpenSSL In-Reply-To: <1530250345.83.0.56676864532.issue33995@psf.upfronthosting.co.za> Message-ID: <1530483784.65.0.56676864532.issue33995@psf.upfronthosting.co.za> Change by Alan Huang : ---------- components: -Documentation versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 19:30:23 2018 From: report at bugs.python.org (INADA Naoki) Date: Sun, 01 Jul 2018 23:30:23 +0000 Subject: [issue34010] tarfile stream read performance In-Reply-To: <1530350820.63.0.56676864532.issue34010@psf.upfronthosting.co.za> Message-ID: <1530487823.39.0.56676864532.issue34010@psf.upfronthosting.co.za> INADA Naoki added the comment: Nice catch. I confirmed this is a hard regression of performance. Decompressing a file must be O(n) when n=filesize, but O(n^2) now. While we live with this regression for a long time, I feel it's worth enough to backport. This can be DoS vulnerability. Can you write NEWS entry for it? ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 20:52:44 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 02 Jul 2018 00:52:44 +0000 Subject: [issue28657] cmd.Cmd.get_help() implementation can't see do_*() methods added dynamically by setattr() In-Reply-To: <1478776450.68.0.870801686772.issue28657@psf.upfronthosting.co.za> Message-ID: <1530492764.75.0.56676864532.issue28657@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Okay, I'll mark this as on-hold until you find the relevant code. I'm not sure why you think modifying the class definition would look weird. That is the normal and intended place to put methods. Likely, the only reason that you had any success at all when attaching a function to an instance was that it didn't need access to either "self" or "class". ---------- resolution: -> later versions: +Python 3.8 -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 1 21:33:06 2018 From: report at bugs.python.org (Mark Hammond) Date: Mon, 02 Jul 2018 01:33:06 +0000 Subject: [issue33944] Deprecate and remove pth files In-Reply-To: <1529688140.44.0.56676864532.issue33944@psf.upfronthosting.co.za> Message-ID: <1530495186.74.0.56676864532.issue33944@psf.upfronthosting.co.za> Mark Hammond added the comment: pywin32, up until recently, just listed 3 directories in its .pth file - these were for directories which pre-dated packages and were never converted. Eg, "import win32api" actually loads win32api.pyd from the "site-packages/win32" directory. Earlier this year, via https://github.com/mhammond/pywin32/issues/1151, I also added the line: import os;os.environ["PATH"]+=(';'+os.path.join(sitedir,"pywin32_system32")) which is to support pywin32 being installed from wheels - this is due to pywin32 shipping with various shared DLLs which implement many pywin32 types - eg, pywintypesXX.dll is used by (almost) every single .pyd shipped with pywin32, and disutils doesn't offer any way of copying files as part of a post-install script or any other way of ensuring these .dll files are on the PATH or otherwise next to pythonXX.dll/.exe I'm happy to replace both of these with alternatives when they exist. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 00:49:41 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 02 Jul 2018 04:49:41 +0000 Subject: [issue34013] Inconsistent SyntaxError for print In-Reply-To: <1530380578.04.0.56676864532.issue34013@psf.upfronthosting.co.za> Message-ID: <1530506981.6.0.56676864532.issue34013@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: @corona10 You might want to discuss this at https://mail.python.org/pipermail/python-ideas/ so that you get some initial feedback on the work and it's acceptance to the core. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 01:35:21 2018 From: report at bugs.python.org (Roundup Robot) Date: Mon, 02 Jul 2018 05:35:21 +0000 Subject: [issue33972] AttributeError in email.message.iter_attachments() In-Reply-To: <1530024211.47.0.56676864532.issue33972@psf.upfronthosting.co.za> Message-ID: <1530509721.87.0.56676864532.issue33972@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +7650 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 01:39:42 2018 From: report at bugs.python.org (Bradley Laney) Date: Mon, 02 Jul 2018 05:39:42 +0000 Subject: [issue33972] AttributeError in email.message.iter_attachments() In-Reply-To: <1530024211.47.0.56676864532.issue33972@psf.upfronthosting.co.za> Message-ID: <1530509982.32.0.56676864532.issue33972@psf.upfronthosting.co.za> Bradley Laney added the comment: Hey Sven, New here, decided to try a bit at an issue. According to the email.message docs, "the payload is either a string or bytes object, in the case of simple message objects, or a list of EmailMessage objects, for MIME container documents such as multipart/* and message/rfc822 message objects." Like you said, this error happens if the email.message.EmailMessage object is bad, i.e. the payload is a string or bytes but the content-type is marked as multipart/*. After reading online, it seems like an error is necessary. I've proposed a small change in a pull request to make this situation raise a more useful error. It doesn't blow up any earlier but it at least says something more useful. The function could return instead of throwing an error, just providing an empty iterator, but that seems even less useful. I fixed it on master (3.8 dev or whatever). Best, Brad ---------- nosy: +Bradley Laney versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 03:26:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Jul 2018 07:26:07 +0000 Subject: [issue20304] Argument Clinic: char convertor should use default values of type bytes In-Reply-To: <1390146665.62.0.375243979235.issue20304@psf.upfronthosting.co.za> Message-ID: <1530516367.86.0.56676864532.issue20304@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 03:57:21 2018 From: report at bugs.python.org (elfantroussi) Date: Mon, 02 Jul 2018 07:57:21 +0000 Subject: [issue34017] Tkinter CheckButton not working in EXE Message-ID: <1530518241.17.0.56676864532.issue34017@psf.upfronthosting.co.za> New submission from elfantroussi : I work with Tkinter on spyder python3.6. In my program I use Tkinter CheckButtons with a command. When I execute my program in Spyder, It works well. But when I generate the EXE using cx Freeze, I'm not able to check the checkbuttons on my interface, like if they pass to Disable state. I write this code to illustrate my situation. ---------- components: Tkinter files: debug.py messages: 320853 nosy: elfantroussi priority: normal severity: normal status: open title: Tkinter CheckButton not working in EXE type: performance versions: Python 3.6 Added file: https://bugs.python.org/file47664/debug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 04:21:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Jul 2018 08:21:50 +0000 Subject: [issue33996] Crash in gen_send_ex(): _PyErr_GetTopmostException() returns freed memory In-Reply-To: <1530275751.35.0.56676864532.issue33996@psf.upfronthosting.co.za> Message-ID: <1530519710.52.0.56676864532.issue33996@psf.upfronthosting.co.za> STINNER Victor added the comment: > I could only reproduce this intermittently with 3.7 build. Oh, I forgot to mention that I have to run the test many times to reproduce the crash. Between 1 and 10 times. I used the master branch compiled in debug mode to report this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 04:23:53 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Mon, 02 Jul 2018 08:23:53 +0000 Subject: [issue34018] SQLite converters are documented to be sensitive to the case of type names, but they're not Message-ID: <1530519833.89.0.56676864532.issue34018@psf.upfronthosting.co.za> New submission from Sergey Fedoseev : SQLite converters are documented to be sensitive to the case of type names, but they're not. In [50]: import sqlite3 ...: ...: sqlite3.converters.clear() ...: sqlite3.register_converter('T', lambda x: 'UPPER') ...: sqlite3.register_converter('t', lambda x: 'lower') ...: ...: con = sqlite3.connect(':memory:', detect_types=sqlite3.PARSE_DECLTYPES) ...: cur = con.cursor() ...: cur.execute('create table test(upper T, lower t)') ...: cur.execute('insert into test values (?, ?)', ('X', 'x')) ...: cur.execute('select * from test') ...: cur.fetchone() ...: Out[50]: ('lower', 'lower') In [51]: sqlite3.converters Out[51]: {'T': >} Original commit in pysqlite that makes converters case insensitive: https://github.com/ghaering/pysqlite/commit/1e8bd36be93b7d7425910642b72e4152c77b0dfd ---------- assignee: docs at python components: Documentation messages: 320855 nosy: docs at python, sir-sigurd priority: normal severity: normal status: open title: SQLite converters are documented to be sensitive to the case of type names, but they're not _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 04:47:08 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Mon, 02 Jul 2018 08:47:08 +0000 Subject: [issue34018] SQLite converters are documented to be sensitive to the case of type names, but they're not In-Reply-To: <1530519833.89.0.56676864532.issue34018@psf.upfronthosting.co.za> Message-ID: <1530521228.96.0.56676864532.issue34018@psf.upfronthosting.co.za> Change by Sergey Fedoseev : ---------- keywords: +patch pull_requests: +7651 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 04:57:53 2018 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 02 Jul 2018 08:57:53 +0000 Subject: [issue33978] logging.config.dictConfig with file handler leaks resources In-Reply-To: <1530091756.08.0.56676864532.issue33978@psf.upfronthosting.co.za> Message-ID: <1530521873.43.0.56676864532.issue33978@psf.upfronthosting.co.za> Vinay Sajip added the comment: New changeset 087570af6d5d39b51bdd5e660a53903960e58678 by Vinay Sajip (Xtreak) in branch 'master': bpo-33978: Close existing handlers before logging (re-)configuration. (GH-8008) https://github.com/python/cpython/commit/087570af6d5d39b51bdd5e660a53903960e58678 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 04:58:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Jul 2018 08:58:56 +0000 Subject: [issue34008] Do we support calling Py_Main() after Py_Initialize()? In-Reply-To: <1530341921.37.0.56676864532.issue34008@psf.upfronthosting.co.za> Message-ID: <1530521936.65.0.56676864532.issue34008@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +7652 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 05:01:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Jul 2018 09:01:54 +0000 Subject: [issue34008] Do we support calling Py_Main() after Py_Initialize()? In-Reply-To: <1530341921.37.0.56676864532.issue34008@psf.upfronthosting.co.za> Message-ID: <1530522114.88.0.56676864532.issue34008@psf.upfronthosting.co.za> STINNER Victor added the comment: My PR 8043 fix the Python 3.7 regression: allow again to call Py_Main() after Py_Initialize(). Nick: if you want to raise an error on that case, I would prefer to see a deprecation warning emitted in version N before raising an error in version N+1. Technically, it seems possible to allow calling Py_Main() after Py_Initialize(). It's "just" a matter of fixing Py_Main() to apply properly the new configuration. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 05:02:32 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 02 Jul 2018 09:02:32 +0000 Subject: [issue33978] logging.config.dictConfig with file handler leaks resources In-Reply-To: <1530091756.08.0.56676864532.issue33978@psf.upfronthosting.co.za> Message-ID: <1530522152.67.0.56676864532.issue33978@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7653 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 05:07:50 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 02 Jul 2018 09:07:50 +0000 Subject: [issue33978] logging.config.dictConfig with file handler leaks resources In-Reply-To: <1530091756.08.0.56676864532.issue33978@psf.upfronthosting.co.za> Message-ID: <1530522470.35.0.56676864532.issue33978@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- pull_requests: +7654 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 05:33:06 2018 From: report at bugs.python.org (Bumsik Kim) Date: Mon, 02 Jul 2018 09:33:06 +0000 Subject: [issue33986] asyncio: Typo in documentation: BaseSubprocessTransport -> SubprocessTransport In-Reply-To: <1530139574.74.0.56676864532.issue33986@psf.upfronthosting.co.za> Message-ID: <1530523986.53.0.56676864532.issue33986@psf.upfronthosting.co.za> Bumsik Kim added the comment: I also found that SubprocessTransport.close() does not reflect the changes done in #23347. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 05:35:12 2018 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 02 Jul 2018 09:35:12 +0000 Subject: [issue33978] logging.config.dictConfig with file handler leaks resources In-Reply-To: <1530091756.08.0.56676864532.issue33978@psf.upfronthosting.co.za> Message-ID: <1530524112.98.0.56676864532.issue33978@psf.upfronthosting.co.za> Vinay Sajip added the comment: New changeset 6f49afc3d983350f4f04d221a26573721f23c475 by Vinay Sajip (Miss Islington (bot)) in branch '3.7': bpo-33978: Close existing handlers before logging (re-)configuration. (GH-8008) (GH-8044) https://github.com/python/cpython/commit/6f49afc3d983350f4f04d221a26573721f23c475 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 05:35:54 2018 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 02 Jul 2018 09:35:54 +0000 Subject: [issue33978] logging.config.dictConfig with file handler leaks resources In-Reply-To: <1530091756.08.0.56676864532.issue33978@psf.upfronthosting.co.za> Message-ID: <1530524154.61.0.56676864532.issue33978@psf.upfronthosting.co.za> Vinay Sajip added the comment: New changeset b6c1989168efeb8b6320bec958e7e339270ac0ce by Vinay Sajip (Xtreak) in branch '3.6': [3.6] bpo-33978: Close existing handlers before logging (re-)configuration. (GH-8008). (GH-8045) https://github.com/python/cpython/commit/b6c1989168efeb8b6320bec958e7e339270ac0ce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 05:36:28 2018 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 02 Jul 2018 09:36:28 +0000 Subject: [issue33978] logging.config.dictConfig with file handler leaks resources In-Reply-To: <1530091756.08.0.56676864532.issue33978@psf.upfronthosting.co.za> Message-ID: <1530524188.08.0.56676864532.issue33978@psf.upfronthosting.co.za> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 05:45:45 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 02 Jul 2018 09:45:45 +0000 Subject: [issue33978] logging.config.dictConfig with file handler leaks resources In-Reply-To: <1530091756.08.0.56676864532.issue33978@psf.upfronthosting.co.za> Message-ID: <1530524745.54.0.56676864532.issue33978@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks much @maggyero for the original report and sample test case this was my first non-easy bug fix. Thanks @vinay.sajip for the guidance on logging module implementation. Thanks ---------- versions: -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 05:50:30 2018 From: report at bugs.python.org (David MacIver) Date: Mon, 02 Jul 2018 09:50:30 +0000 Subject: [issue34009] Document Travis CI / Ubuntu 14.04 OpenSSL compatibility issues In-Reply-To: <1530350802.86.0.56676864532.issue34009@psf.upfronthosting.co.za> Message-ID: <1530525029.99.0.56676864532.issue34009@psf.upfronthosting.co.za> David MacIver added the comment: Anthony Sottile has pointed out to me that I'm wrong about the xenial thing, and that actually it does work it's just that you need to get multiple things right in order for it to do so. https://github.com/deadsnakes/travis-ci-python3.7-example is a good example of making it work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 05:51:20 2018 From: report at bugs.python.org (Bumsik Kim) Date: Mon, 02 Jul 2018 09:51:20 +0000 Subject: [issue34019] webbrowser: wrong arguments for Opera browser. Message-ID: <1530525080.65.0.56676864532.issue34019@psf.upfronthosting.co.za> New submission from Bumsik Kim : webbrowser module currently opens Opera Browser using the following command: opera -remote "openURL(https://google.com,new-window)" While this follows Opera's documentation (https://www.opera.com/docs/switches/#remote), this is broken since Opera switched from its own engine to Chromium. The working command is exactly the same as Chrome: opera --new-window https://google.com ---------- components: Library (Lib) messages: 320863 nosy: kbumsik priority: normal severity: normal status: open title: webbrowser: wrong arguments for Opera browser. versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 05:54:38 2018 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 02 Jul 2018 09:54:38 +0000 Subject: [issue33955] Implement PyOS_CheckStack on macOS using pthread_get_stack*_np In-Reply-To: <1529925495.69.0.56676864532.issue33955@psf.upfronthosting.co.za> Message-ID: <1530525278.66.0.56676864532.issue33955@psf.upfronthosting.co.za> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +7655 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 05:56:12 2018 From: report at bugs.python.org (Bumsik Kim) Date: Mon, 02 Jul 2018 09:56:12 +0000 Subject: [issue34019] webbrowser: wrong arguments for Opera browser. In-Reply-To: <1530525080.65.0.56676864532.issue34019@psf.upfronthosting.co.za> Message-ID: <1530525372.02.0.56676864532.issue34019@psf.upfronthosting.co.za> Change by Bumsik Kim : ---------- keywords: +patch pull_requests: +7656 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 06:04:44 2018 From: report at bugs.python.org (Leon H.) Date: Mon, 02 Jul 2018 10:04:44 +0000 Subject: [issue34020] Add '%(asctime)s' into default BASIC_FORMAT in logging module Message-ID: <1530525884.27.0.56676864532.issue34020@psf.upfronthosting.co.za> New submission from Leon H. : Current BASIC_FORMAT: BASIC_FORMAT = "%(levelname)s:%(name)s:%(message)s" The first thing people do is set the format to '%(asctime)s:%(levelname)s:%(name)s:%(message)s' or like after importing logging module. Could we put the '%(asctime)s' into the default BASIC_FORMAT setting and save everyone's time? ---------- components: Library (Lib) messages: 320864 nosy: Leon H. priority: normal severity: normal status: open title: Add '%(asctime)s' into default BASIC_FORMAT in logging module type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 06:05:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Jul 2018 10:05:38 +0000 Subject: [issue34021] test_regrtest: test_env_changed() fails on x86 Windows XP VS9.0 2.7 Message-ID: <1530525938.11.0.56676864532.issue34021@psf.upfronthosting.co.za> New submission from STINNER Victor : http://buildbot.python.org/all/#/builders/105/builds/182 d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build>"d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\PC\VS9.0\\python_d" -Wd -3 -E -tt "d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\PC\VS9.0\\..\..\Lib\test\regrtest.py" -uall -rwW --slowest -j2 == CPython 2.7.15+ (default, Jun 30 2018, 07:15:20) [MSC v.1500 32 bit (Intel)] == Windows-XP-5.1.2600-SP3 little-endian == d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\build\test_python_3044 == CPU count: 1 Using random seed 5527885 Run tests in parallel using 2 child processes ... 0:11:15 [256/403/1] test_regrtest failed d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\support\__init__.py:808: RuntimeWarning: tests may fail, unable to create temp dir: d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\build\test_python_2228 with temp_dir(path=name, quiet=quiet) as temp_path: test test_regrtest failed -- Traceback (most recent call last): File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\test_regrtest.py", line 662, in test_env_changed self.check_executed_tests(output, [testname], env_changed=testname) File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\test_regrtest.py", line 140, in check_executed_tests self.check_line(output, regex) File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\test_regrtest.py", line 87, in check_line self.assertRegexpMatches(output, regex) AssertionError: Regexp didn't match: '^1 test altered the execution environment:\\n test_regrtest_noop33$' not found in 'Run tests sequentially\n0:00:00 [1/1] test_regrtest_noop33\n\n== Tests result: SUCCESS ==\n\n1 test OK.\n\nTotal duration: 131 ms\nTests result: SUCCESS\n' ... Re-running failed tests in verbose mode Re-running test 'test_regrtest' in verbose mode d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\support\__init__.py:808: RuntimeWarning: tests may fail, unable to create temp dir: d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\build\test_python_2336 with temp_dir(path=name, quiet=quiet) as temp_path: test_module_autotest (test.test_regrtest.ProgramsTestCase) ... ok test_module_from_test_autotest (test.test_regrtest.ProgramsTestCase) ... ok test_module_regrtest (test.test_regrtest.ProgramsTestCase) ... ok test_module_test (test.test_regrtest.ProgramsTestCase) ... ok test_pcbuild_rt (test.test_regrtest.ProgramsTestCase) ... skipped 'Tools/buildbot/test.bat requires PCbuild build, found PC' test_script_autotest (test.test_regrtest.ProgramsTestCase) ... ok test_script_regrtest (test.test_regrtest.ProgramsTestCase) ... ok test_tools_buildbot_test (test.test_regrtest.ProgramsTestCase) ... skipped 'Tools/buildbot/test.bat requires PCbuild build, found PC' test_coverage (test.test_regrtest.ArgsTestCase) ... ok test_crashed (test.test_regrtest.ArgsTestCase) ... ok test_env_changed (test.test_regrtest.ArgsTestCase) ... FAIL test_failing_test (test.test_regrtest.ArgsTestCase) ... ok test_forever (test.test_regrtest.ArgsTestCase) ... ok test_fromfile (test.test_regrtest.ArgsTestCase) ... ok test_huntrleaks (test.test_regrtest.ArgsTestCase) ... ok test_huntrleaks_fd_leak (test.test_regrtest.ArgsTestCase) ... ok test_interrupted (test.test_regrtest.ArgsTestCase) ... ok test_list_cases (test.test_regrtest.ArgsTestCase) ... ok test_list_tests (test.test_regrtest.ArgsTestCase) ... ok test_matchfile (test.test_regrtest.ArgsTestCase) ... ok test_random (test.test_regrtest.ArgsTestCase) ... ok test_rerun_fail (test.test_regrtest.ArgsTestCase) ... ok test_resources (test.test_regrtest.ArgsTestCase) ... ok test_slow_interrupted (test.test_regrtest.ArgsTestCase) ... ok test_slowest (test.test_regrtest.ArgsTestCase) ... ok test_format_duration (test.test_regrtest.TestUtils) ... ok ====================================================================== FAIL: test_env_changed (test.test_regrtest.ArgsTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\test_regrtest.py", line 665, in test_env_changed output = self.run_tests("--fail-env-changed", testname, exitcode=3) File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\test_regrtest.py", line 335, in run_tests return self.run_python(cmdargs, **kw) File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\test_regrtest.py", line 216, in run_python proc = self.run_command(args, **kw) File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\test_regrtest.py", line 211, in run_command self.fail(msg) AssertionError: Command ['d:\\cygwin\\home\\db3l\\buildarea\\2.7.bolen-windowsvs9\\build\\PC\\VS9.0\\python_d.exe', '-m', 'test', '--testdir=c:\\docume~1\\db3l\\locals~1\\temp\\tmpvaq672', '--fail-env-changed', 'test_regrtest_noop33'] failed with exit code 0 stdout: --- Run tests sequentially 0:00:00 [1/1] test_regrtest_noop33 == Tests result: SUCCESS == 1 test OK. Total duration: 10 ms Tests result: SUCCESS --- stderr: --- d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\support\__init__.py:808: RuntimeWarning: tests may fail, unable to create temp dir: d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\build\test_python_3992 with temp_dir(path=name, quiet=quiet) as temp_path: --- ---------------------------------------------------------------------- Ran 26 tests in 16.384s FAILED (failures=1, skipped=2) 1 test failed again: test_regrtest == Tests result: FAILURE then FAILURE == 359 tests OK. 10 slowest tests: - test_mmap: 357.3s - test_largefile: 277.8s - test_io: 275.1s - test_multiprocessing: 194.6s - test_decimal: 57.8s - test_lib2to3: 45.3s - test_tokenize: 42.2s - test_subprocess: 36.7s - test_file2k: 36.7s - test_ssl: 30.9s 1 test failed: test_regrtest 43 tests skipped: test_aepack test_al test_applesingle test_bsddb185 test_bsddb3 test_cd test_cl test_commands test_crypt test_curses test_dbm test_dl test_epoll test_fcntl test_fork1 test_gdb test_gdbm test_gl test_grp test_imgfile test_ioctl test_kqueue test_linuxaudiodev test_macos test_macostools test_mhlib test_nis test_openpty test_ossaudiodev test_pipes test_poll test_posix test_pty test_pwd test_readline test_resource test_scriptpackages test_spwd test_sunaudiodev test_threadsignals test_wait3 test_wait4 test_zipfile64 2 skips unexpected on win32: test_gdb test_readline 1 re-run test: test_regrtest Total duration: 24 min 6 sec Tests result: FAILURE then FAILURE test test_regrtest failed -- Traceback (most recent call last): File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\test_regrtest.py", line 665, in test_env_changed output = self.run_tests("--fail-env-changed", testname, exitcode=3) File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\test_regrtest.py", line 335, in run_tests return self.run_python(cmdargs, **kw) File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\test_regrtest.py", line 216, in run_python proc = self.run_command(args, **kw) File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\test_regrtest.py", line 211, in run_command self.fail(msg) AssertionError: Command ['d:\\cygwin\\home\\db3l\\buildarea\\2.7.bolen-windowsvs9\\build\\PC\\VS9.0\\python_d.exe', '-m', 'test', '--testdir=c:\\docume~1\\db3l\\locals~1\\temp\\tmpvaq672', '--fail-env-changed', 'test_regrtest_noop33'] failed with exit code 0 stdout: --- Run tests sequentially 0:00:00 [1/1] test_regrtest_noop33 == Tests result: SUCCESS == 1 test OK. Total duration: 10 ms Tests result: SUCCESS --- stderr: --- d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\support\__init__.py:808: RuntimeWarning: tests may fail, unable to create temp dir: d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\build\test_python_3992 with temp_dir(path=name, quiet=quiet) as temp_path: --- program finished with exit code 2 elapsedTime=1447.752000 ---------- components: Windows messages: 320865 nosy: paul.moore, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal status: open title: test_regrtest: test_env_changed() fails on x86 Windows XP VS9.0 2.7 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 06:05:46 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Jul 2018 10:05:46 +0000 Subject: [issue34021] [2.7] test_regrtest: test_env_changed() fails on x86 Windows XP VS9.0 2.7 In-Reply-To: <1530525938.11.0.56676864532.issue34021@psf.upfronthosting.co.za> Message-ID: <1530525946.88.0.56676864532.issue34021@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: test_regrtest: test_env_changed() fails on x86 Windows XP VS9.0 2.7 -> [2.7] test_regrtest: test_env_changed() fails on x86 Windows XP VS9.0 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 06:05:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Jul 2018 10:05:51 +0000 Subject: [issue34021] [2.7] test_regrtest: test_env_changed() fails on x86 Windows XP VS9.0 2.7 In-Reply-To: <1530525938.11.0.56676864532.issue34021@psf.upfronthosting.co.za> Message-ID: <1530525951.26.0.56676864532.issue34021@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- components: +Tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 06:06:16 2018 From: report at bugs.python.org (Bumsik Kim) Date: Mon, 02 Jul 2018 10:06:16 +0000 Subject: [issue34019] webbrowser: wrong arguments for Opera browser. In-Reply-To: <1530525080.65.0.56676864532.issue34019@psf.upfronthosting.co.za> Message-ID: <1530525976.17.0.56676864532.issue34019@psf.upfronthosting.co.za> Change by Bumsik Kim : ---------- versions: +Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 06:17:32 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 02 Jul 2018 10:17:32 +0000 Subject: [issue34020] Add '%(asctime)s' into default BASIC_FORMAT in logging module In-Reply-To: <1530525884.27.0.56676864532.issue34020@psf.upfronthosting.co.za> Message-ID: <1530526652.59.0.56676864532.issue34020@psf.upfronthosting.co.za> Eric V. Smith added the comment: Unfortunately, I don't see how we can do this without breaking code that assumes the default log format doesn't have the timestamp in it. In particular, I'm thinking of external log file parsers. ---------- nosy: +eric.smith, vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 06:22:01 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 02 Jul 2018 10:22:01 +0000 Subject: [issue33961] Inconsistency in exceptions for dataclasses.dataclass documentation In-Reply-To: <1529963695.74.0.56676864532.issue33961@psf.upfronthosting.co.za> Message-ID: <1530526921.35.0.56676864532.issue33961@psf.upfronthosting.co.za> Eric V. Smith added the comment: New changeset 24d74bd8377d38528566437e70fcd72229695ac7 by Eric V. Smith (Chris Cogdon) in branch '3.7': bpo-33961: Adjusted dataclasses docs to correct exceptions raised. (GH-7917) https://github.com/python/cpython/commit/24d74bd8377d38528566437e70fcd72229695ac7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 06:47:08 2018 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 02 Jul 2018 10:47:08 +0000 Subject: [issue33955] Implement PyOS_CheckStack on macOS using pthread_get_stack*_np In-Reply-To: <1529925495.69.0.56676864532.issue33955@psf.upfronthosting.co.za> Message-ID: <1530528428.69.0.56676864532.issue33955@psf.upfronthosting.co.za> Dong-hee Na added the comment: @ronaldoussoren I wrote a first proto type PR and it works well on my MacBook Pro. As you commented, there is a issue with pthread_get_stacksize_np when pthread_main_np() == 1 on some old mac system. I will take a look more deeply at this issue. If you have any feedback for my first PR please left it. Thanks, Dong-hee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 06:55:47 2018 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 02 Jul 2018 10:55:47 +0000 Subject: [issue34020] Add '%(asctime)s' into default BASIC_FORMAT in logging module In-Reply-To: <1530525884.27.0.56676864532.issue34020@psf.upfronthosting.co.za> Message-ID: <1530528947.81.0.56676864532.issue34020@psf.upfronthosting.co.za> Vinay Sajip added the comment: > The first thing people do is set the format to '%(asctime)s:%(levelname)s:%(name)s:%(message)s' or like after importing logging module. "People" - you don't claim to speak for *everyone*, right? basicConfig() takes a format= keyword argument that you can use to specify your required format string. Since you have to call basicConfig() anyway, it seems little hardship to specify the format you want in your call. Closing as "not a bug", which here is to be interpreted as "not an enhancement that's needed". ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 07:23:43 2018 From: report at bugs.python.org (Julien Palard) Date: Mon, 02 Jul 2018 11:23:43 +0000 Subject: [issue34006] Windows HTML Help (chm) has fixed line length In-Reply-To: <1530313481.18.0.56676864532.issue34006@psf.upfronthosting.co.za> Message-ID: <1530530623.01.0.56676864532.issue34006@psf.upfronthosting.co.za> Julien Palard added the comment: > Maybe, all you we need to do is adding "-D html_theme_options.body_max_width=none" option to sphinx-build when building html for htmlhelp, in Doc/make.bat. As far as I can see, it's the right solution, but I have no windows machine to test it. I checked in PEP 101, and they're using `make.bat htmlhelp` on windows to build the chm files. Can someone test it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 07:24:44 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 02 Jul 2018 11:24:44 +0000 Subject: [issue34009] Document Travis CI / Ubuntu 14.04 OpenSSL compatibility issues In-Reply-To: <1530350802.86.0.56676864532.issue34009@psf.upfronthosting.co.za> Message-ID: <1530530684.65.0.56676864532.issue34009@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Why should we mention Travis-CI at all? It's Travis-CI's job to document the binaries and runtimes they provide on each of their build environments. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 07:30:10 2018 From: report at bugs.python.org (gladman) Date: Mon, 02 Jul 2018 11:30:10 +0000 Subject: [issue34006] Windows HTML Help (chm) has fixed line length In-Reply-To: <1530313481.18.0.56676864532.issue34006@psf.upfronthosting.co.za> Message-ID: <1530531010.16.0.56676864532.issue34006@psf.upfronthosting.co.za> gladman added the comment: I cannot build the Windows chm file but I am happy to test any versions that others can produce. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 07:36:33 2018 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Mon, 02 Jul 2018 11:36:33 +0000 Subject: [issue33978] logging.config.dictConfig with file handler leaks resources In-Reply-To: <1530091756.08.0.56676864532.issue33978@psf.upfronthosting.co.za> Message-ID: <1530531393.23.0.56676864532.issue33978@psf.upfronthosting.co.za> G?ry added the comment: Thanks @xtreak and @vinay.sajip for the fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 08:02:53 2018 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 02 Jul 2018 12:02:53 +0000 Subject: [issue30256] Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception In-Reply-To: <1493812414.86.0.361870744934.issue30256@psf.upfronthosting.co.za> Message-ID: <1530532973.98.0.56676864532.issue30256@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- nosy: +davin, pitrou, xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 08:08:40 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 02 Jul 2018 12:08:40 +0000 Subject: [issue33955] Implement PyOS_CheckStack on macOS using pthread_get_stack*_np In-Reply-To: <1529925495.69.0.56676864532.issue33955@psf.upfronthosting.co.za> Message-ID: <1530533320.86.0.56676864532.issue33955@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Have you looked at benchmark results for this patch? In particular, PyOS_CheckStack is called quite often and I wonder how those calls affect performance. If there is a clear performance impact it would be useful to store some information in the python thread state. In what versions of macOS are there problems with pthread_get_stacksize_np() on the main thread? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 08:18:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Jul 2018 12:18:35 +0000 Subject: [issue34022] Python 3.7: 6 tests failed on OpenSUSE Message-ID: <1530533915.92.0.56676864532.issue34022@psf.upfronthosting.co.za> New submission from STINNER Victor : https://build.opensuse.org/package/show/home:mcepl:work/python3 6 tests failed: test_cmd_line_script test_compileall test_importlib test_multiprocessing_main_handling test_py_compile test_runpy ====================================================================== ERROR: test_zipfile_compiled (test.test_runpy.RunPathTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/runpy.py", line 153, in _get_module_details code = loader.get_code(mod_name) zipimport.ZipImportError: can't find module '__main__' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/runpy.py", line 219, in _get_main_module_details return _get_module_details(main_name) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/runpy.py", line 155, in _get_module_details raise error(format(e)) from e ImportError: can't find module '__main__' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_runpy.py", line 715, in test_zipfile_compiled mod_name=mod_name, check_loader=False) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_runpy.py", line 631, in _check_script self.check_code_execution(create_ns, expected_ns) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_runpy.py", line 130, in check_code_execution result_ns = create_namespace(None) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_runpy.py", line 606, in create_ns return run_path(script_name, init_globals) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/runpy.py", line 275, in run_path mod_name, mod_spec, code = _get_main_module_details() File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/runpy.py", line 223, in _get_main_module_details (main_name, sys.path[0])) from exc ImportError: can't find '__main__' module in '/tmp/tmp40k8q99u/test_zip.zip' ====================================================================== FAIL: test_zipfile_compiled (test.test_cmd_line_script.CmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_cmd_line_script.py", line 268, in test_zipfile_compiled zipimport.zipimporter) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_cmd_line_script.py", line 129, in _check_script *run_args, __isolated=False, __cwd=cwd, **env_vars File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/support/script_helper.py", line 157, in assert_python_ok return _assert_python(True, *args, **env_vars) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/support/script_helper.py", line 143, in _assert_python res.fail(cmd_line) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/support/script_helper.py", line 84, in fail err)) AssertionError: Process return code is 1 command line: ['/home/abuild/rpmbuild/BUILD/Python-3.7.0/python', '-X', 'faulthandler', '-E', '/tmp/tmpwlsj3czm/test_zip.zip', 'test1', 'test2', 'test3'] stdout: --- --- stderr: --- /home/abuild/rpmbuild/BUILD/Python-3.7.0/python: can't find '__main__' module in '/tmp/tmpwlsj3czm/test_zip.zip' --- ====================================================================== FAIL: test_overiden_unchecked_hash_based_pyc (test.test_importlib.source.test_file_loader.Frozen_SimpleTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_importlib/util.py", line 303, in wrapper to_return = fxn(*args, **kwargs) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_importlib/source/test_file_loader.py", line 349, in test_overiden_unchecked_hash_based_pyc self.assertEqual(int.from_bytes(data[4:8], 'little'), 0b1) AssertionError: 3 != 1 ====================================================================== FAIL: test_unchecked_hash_based_pyc (test.test_importlib.source.test_file_loader.Frozen_SimpleTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_importlib/util.py", line 303, in wrapper to_return = fxn(*args, **kwargs) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_importlib/source/test_file_loader.py", line 315, in test_unchecked_hash_based_pyc self.assertEqual(mod.state, 'old') AssertionError: 'new' != 'old' - new + old ====================================================================== FAIL: test_old_timestamp (test.test_importlib.source.test_file_loader.Frozen_SourceLoaderBadBytecodeTestPEP302) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_importlib/util.py", line 303, in wrapper to_return = fxn(*args, **kwargs) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_importlib/source/test_file_loader.py", line 635, in test_old_timestamp self.assertEqual(bytecode_file.read(4), source_timestamp) AssertionError: b'\xf0%\x1e8' != b'\xe2L6[' ====================================================================== FAIL: test_old_timestamp (test.test_importlib.source.test_file_loader.Frozen_SourceLoaderBadBytecodeTestPEP451) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_importlib/util.py", line 303, in wrapper to_return = fxn(*args, **kwargs) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_importlib/source/test_file_loader.py", line 635, in test_old_timestamp self.assertEqual(bytecode_file.read(4), source_timestamp) AssertionError: b'\xf0%\x1e8' != b'\xe2L6[' ====================================================================== FAIL: test_overiden_unchecked_hash_based_pyc (test.test_importlib.source.test_file_loader.Source_SimpleTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_importlib/util.py", line 303, in wrapper to_return = fxn(*args, **kwargs) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_importlib/source/test_file_loader.py", line 349, in test_overiden_unchecked_hash_based_pyc self.assertEqual(int.from_bytes(data[4:8], 'little'), 0b1) AssertionError: 3 != 1 ====================================================================== FAIL: test_unchecked_hash_based_pyc (test.test_importlib.source.test_file_loader.Source_SimpleTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_importlib/util.py", line 303, in wrapper to_return = fxn(*args, **kwargs) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_importlib/source/test_file_loader.py", line 315, in test_unchecked_hash_based_pyc self.assertEqual(mod.state, 'old') AssertionError: 'new' != 'old' - new + old ====================================================================== FAIL: test_old_timestamp (test.test_importlib.source.test_file_loader.Source_SourceLoaderBadBytecodeTestPEP302) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_importlib/util.py", line 303, in wrapper to_return = fxn(*args, **kwargs) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_importlib/source/test_file_loader.py", line 635, in test_old_timestamp self.assertEqual(bytecode_file.read(4), source_timestamp) AssertionError: b'\xf0%\x1e8' != b'\xe2L6[' ====================================================================== FAIL: test_old_timestamp (test.test_importlib.source.test_file_loader.Source_SourceLoaderBadBytecodeTestPEP451) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_importlib/util.py", line 303, in wrapper to_return = fxn(*args, **kwargs) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_importlib/source/test_file_loader.py", line 635, in test_old_timestamp self.assertEqual(bytecode_file.read(4), source_timestamp) AssertionError: b'\xf0%\x1e8' != b'\xe2L6[' ====================================================================== FAIL: test_zipfile_compiled (test.test_multiprocessing_main_handling.ForkCmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_multiprocessing_main_handling.py", line 225, in test_zipfile_compiled self._check_script(zip_name) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_multiprocessing_main_handling.py", line 156, in _check_script rc, out, err = assert_python_ok(*run_args, __isolated=False) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/support/script_helper.py", line 157, in assert_python_ok return _assert_python(True, *args, **env_vars) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/support/script_helper.py", line 143, in _assert_python res.fail(cmd_line) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/support/script_helper.py", line 84, in fail err)) AssertionError: Process return code is 1 command line: ['/home/abuild/rpmbuild/BUILD/Python-3.7.0/python', '-X', 'faulthandler', '-E', '/tmp/tmpjsax7ksh/test_zip.zip', 'fork'] stdout: --- --- stderr: --- /home/abuild/rpmbuild/BUILD/Python-3.7.0/python: can't find '__main__' module in '/tmp/tmpjsax7ksh/test_zip.zip' --- ====================================================================== FAIL: test_zipfile_compiled (test.test_multiprocessing_main_handling.ForkServerCmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_multiprocessing_main_handling.py", line 225, in test_zipfile_compiled self._check_script(zip_name) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_multiprocessing_main_handling.py", line 156, in _check_script rc, out, err = assert_python_ok(*run_args, __isolated=False) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/support/script_helper.py", line 157, in assert_python_ok return _assert_python(True, *args, **env_vars) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/support/script_helper.py", line 143, in _assert_python res.fail(cmd_line) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/support/script_helper.py", line 84, in fail err)) AssertionError: Process return code is 1 command line: ['/home/abuild/rpmbuild/BUILD/Python-3.7.0/python', '-X', 'faulthandler', '-E', '/tmp/tmp50n_prgl/test_zip.zip', 'forkserver'] stdout: --- --- stderr: --- /home/abuild/rpmbuild/BUILD/Python-3.7.0/python: can't find '__main__' module in '/tmp/tmp50n_prgl/test_zip.zip' --- ====================================================================== FAIL: test_zipfile_compiled (test.test_multiprocessing_main_handling.SpawnCmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_multiprocessing_main_handling.py", line 225, in test_zipfile_compiled self._check_script(zip_name) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_multiprocessing_main_handling.py", line 156, in _check_script rc, out, err = assert_python_ok(*run_args, __isolated=False) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/support/script_helper.py", line 157, in assert_python_ok return _assert_python(True, *args, **env_vars) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/support/script_helper.py", line 143, in _assert_python res.fail(cmd_line) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/support/script_helper.py", line 84, in fail err)) AssertionError: Process return code is 1 command line: ['/home/abuild/rpmbuild/BUILD/Python-3.7.0/python', '-X', 'faulthandler', '-E', '/tmp/tmp1npoq9bq/test_zip.zip', 'spawn'] stdout: --- --- stderr: --- /home/abuild/rpmbuild/BUILD/Python-3.7.0/python: can't find '__main__' module in '/tmp/tmp1npoq9bq/test_zip.zip' --- ====================================================================== FAIL: test_invalidation_mode (test.test_py_compile.PyCompileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_py_compile.py", line 153, in test_invalidation_mode self.assertEqual(flags, 0b1) AssertionError: 3 != 1 ---------------------------------------------------------------------- ====================================================================== FAIL: test_force (test.test_compileall.CommandLineTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_compileall.py", line 365, in test_force self.assertEqual(mtime, mtime2) AssertionError: 1530285241.0427392 != 1530285301.18 ====================================================================== FAIL: test_no_args_respects_force_flag (test.test_compileall.CommandLineTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_compileall.py", line 299, in test_no_args_respects_force_flag self.assertEqual(mtime, mtime2) AssertionError: 1530285243.012693 != 1530285303.168 ====================================================================== FAIL: test_pyc_invalidation_mode (test.test_compileall.CommandLineTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_compileall.py", line 533, in test_pyc_invalidation_mode self.assertEqual(int.from_bytes(data[4:8], 'little'), 0b01) AssertionError: 3 != 1 ====================================================================== FAIL: test_magic_number (test.test_compileall.CompileallTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_compileall.py", line 78, in test_magic_number self.recreation_check(b'\0\0\0\0') File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_compileall.py", line 61, in recreation_check self.assertEqual(*self.data()) AssertionError: b'B\r\r\n\x03\x00\x00\x00\\s\xa0J' != b'B\r\r\n\x00\x00\x00\x00\xfaL6[' ====================================================================== FAIL: test_mtime (test.test_compileall.CompileallTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_compileall.py", line 74, in test_mtime 0, 1)) File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_compileall.py", line 61, in recreation_check self.assertEqual(*self.data()) AssertionError: b'B\r\r\n\x03\x00\x00\x00\\s\xa0J' != b'B\r\r\n\x00\x00\x00\x00\xfaL6[' ---------- components: Tests messages: 320875 nosy: vstinner priority: normal severity: normal status: open title: Python 3.7: 6 tests failed on OpenSUSE versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 08:20:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Jul 2018 12:20:23 +0000 Subject: [issue34022] Python 3.7: 6 tests failed on OpenSUSE In-Reply-To: <1530533915.92.0.56676864532.issue34022@psf.upfronthosting.co.za> Message-ID: <1530534023.86.0.56676864532.issue34022@psf.upfronthosting.co.za> STINNER Victor added the comment: It seems like the same (or similar? I didn't check) tests fail on Debian: https://buildd.debian.org/status/fetch.php?pkg=python3.7&arch=amd64&ver=3.7.0-1&stamp=1530136859&raw=0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 08:21:39 2018 From: report at bugs.python.org (Matej Cepl) Date: Mon, 02 Jul 2018 12:21:39 +0000 Subject: [issue34022] Python 3.7: 6 tests failed on OpenSUSE In-Reply-To: <1530533915.92.0.56676864532.issue34022@psf.upfronthosting.co.za> Message-ID: <1530534099.82.0.56676864532.issue34022@psf.upfronthosting.co.za> Matej Cepl added the comment: I would add that Debian doesn't seem to fare that much better ... https://buildd.debian.org/status/fetch.php?pkg=python3.7&arch=amd64&ver=3.7.0-1&stamp=1530136859&raw=0 ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 08:26:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Jul 2018 12:26:20 +0000 Subject: [issue20760] test_compileall test getting failed on 3.4 RC In-Reply-To: <1393247194.23.0.0410918224117.issue20760@psf.upfronthosting.co.za> Message-ID: <1530534380.21.0.56676864532.issue20760@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue is 4 years old and has not been seen recently on Linux. Sadly, the issue doesn't contain enough information to fix the bug, so I close it. If you see again the bug on Linux, please open a new issue (and maybe add a reference to this old bug). ---------- nosy: +vstinner resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 08:35:44 2018 From: report at bugs.python.org (Matej Cepl) Date: Mon, 02 Jul 2018 12:35:44 +0000 Subject: [issue34008] Do we support calling Py_Main() after Py_Initialize()? In-Reply-To: <1530341921.37.0.56676864532.issue34008@psf.upfronthosting.co.za> Message-ID: <1530534944.38.0.56676864532.issue34008@psf.upfronthosting.co.za> Change by Matej Cepl : ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 09:04:24 2018 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 02 Jul 2018 13:04:24 +0000 Subject: [issue33955] Implement PyOS_CheckStack on macOS using pthread_get_stack*_np In-Reply-To: <1529925495.69.0.56676864532.issue33955@psf.upfronthosting.co.za> Message-ID: <1530536664.69.0.56676864532.issue33955@psf.upfronthosting.co.za> Dong-hee Na added the comment: @ronaldoussoren 1. I will try to run a benchmark is there any good benchmark to try it? 2. As far as I know, OS X 10.9 Mavericks has an issue with pthread_get_stacksize_np, I added a new commit on PR with this issue. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 09:08:29 2018 From: report at bugs.python.org (Julien Palard) Date: Mon, 02 Jul 2018 13:08:29 +0000 Subject: [issue33700] [doc] Old version picker don't understand language tags in URL In-Reply-To: <1527716663.86.0.682650639539.issue33700@psf.upfronthosting.co.za> Message-ID: <1530536909.58.0.56676864532.issue33700@psf.upfronthosting.co.za> Change by Julien Palard : ---------- keywords: +patch pull_requests: +7657 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 09:12:03 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 02 Jul 2018 13:12:03 +0000 Subject: [issue33955] Implement PyOS_CheckStack on macOS using pthread_get_stack*_np In-Reply-To: <1529925495.69.0.56676864532.issue33955@psf.upfronthosting.co.za> Message-ID: <1530537123.58.0.56676864532.issue33955@psf.upfronthosting.co.za> Ronald Oussoren added the comment: W.r.t. benchmarks: The full benchmark suite that's often used to assess the performance impact on real world code is: http://pyperformance.readthedocs.io Running this takes some time, and the interesting bit is comparing the performance with and without your patch. You could also test with a small script that uses the timeit module to run some code that performs a lot of function calls. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 09:32:07 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Jul 2018 13:32:07 +0000 Subject: [issue29272] test_logging hangs if /etc/hosts only aliases "localhost" to ::1 In-Reply-To: <1484357820.6.0.682177445577.issue29272@psf.upfronthosting.co.za> Message-ID: <1530538327.22.0.56676864532.issue29272@psf.upfronthosting.co.za> STINNER Victor added the comment: I confirm the issue. test_logging hangs if the resolution of the hostname fails with a timeout. I worked again the issue by adding my hostname to /etc/hosts. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 09:36:47 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 02 Jul 2018 13:36:47 +0000 Subject: [issue34006] Windows HTML Help (chm) has fixed line length In-Reply-To: <1530313481.18.0.56676864532.issue34006@psf.upfronthosting.co.za> Message-ID: <1530538607.88.0.56676864532.issue34006@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Zach, I believe you helped write make.bat. I can run 'make htmlhelp', but I don't know how to modify make.bat to add option "-D html_theme_options.body_max_width=none" specifically when building htmlhelp. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 09:39:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Jul 2018 13:39:05 +0000 Subject: [issue28874] test_logging fails and freezes In-Reply-To: <1480923682.41.0.106352881958.issue28874@psf.upfronthosting.co.za> Message-ID: <1530538745.84.0.56676864532.issue28874@psf.upfronthosting.co.za> STINNER Victor added the comment: Extract of cpython-testlogging.log: 0:08:58 [198/404] test_logging --- Logging error --- Traceback (most recent call last): File "/mnt/d/Share/source/cpython-master/Lib/logging/handlers.py", line 634, in emit self.send(s) File "/mnt/d/Share/source/cpython-master/Lib/logging/handlers.py", line 692, in send self.sock.sendto(s, self.address) OSError: [Errno 22] Invalid argument Call stack: File "/mnt/d/Share/source/cpython-master/Lib/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/mnt/d/Share/source/cpython-master/Lib/runpy.py", line 85, in _run_code exec(code, run_globals) File "/mnt/d/Share/source/cpython-master/Lib/test/regrtest.py", line 50, in _main() File "/mnt/d/Share/source/cpython-master/Lib/test/regrtest.py", line 46, in _main main() File "/mnt/d/Share/source/cpython-master/Lib/test/libregrtest/main.py", line 532, in main Regrtest().main(tests=tests, **kwargs) File "/mnt/d/Share/source/cpython-master/Lib/test/libregrtest/main.py", line 468, in main self._main(tests, kwargs) File "/mnt/d/Share/source/cpython-master/Lib/test/libregrtest/main.py", line 490, in _main self.run_tests() File "/mnt/d/Share/source/cpython-master/Lib/test/libregrtest/main.py", line 418, in run_tests self.run_tests_sequential() File "/mnt/d/Share/source/cpython-master/Lib/test/libregrtest/main.py", line 343, in run_tests_sequential result = runtest(self.ns, test) File "/mnt/d/Share/source/cpython-master/Lib/test/libregrtest/runtest.py", line 129, in runtest result = runtest_inner(ns, test, display_failure=not ns.verbose) File "/mnt/d/Share/source/cpython-master/Lib/test/libregrtest/runtest.py", line 165, in runtest_inner test_runner() File "/mnt/d/Share/source/cpython-master/Lib/test/support/__init__.py", line 1576, in inner return func(*args, **kwds) File "/mnt/d/Share/source/cpython-master/Lib/test/test_logging.py", line 4334, in test_main support.run_unittest(*tests) File "/mnt/d/Share/source/cpython-master/Lib/test/support/__init__.py", line 1909, in run_unittest _run_suite(suite) File "/mnt/d/Share/source/cpython-master/Lib/test/support/__init__.py", line 1875, in _run_suite result = runner.run(suite) File "/mnt/d/Share/source/cpython-master/Lib/test/support/__init__.py", line 1751, in run test(result) File "/mnt/d/Share/source/cpython-master/Lib/unittest/suite.py", line 84, in __call__ return self.run(*args, **kwds) File "/mnt/d/Share/source/cpython-master/Lib/unittest/suite.py", line 122, in run test(result) File "/mnt/d/Share/source/cpython-master/Lib/unittest/suite.py", line 84, in __call__ return self.run(*args, **kwds) File "/mnt/d/Share/source/cpython-master/Lib/unittest/suite.py", line 122, in run test(result) File "/mnt/d/Share/source/cpython-master/Lib/unittest/case.py", line 649, in __call__ return self.run(*args, **kwds) File "/mnt/d/Share/source/cpython-master/Lib/unittest/case.py", line 601, in run testMethod() File "/mnt/d/Share/source/cpython-master/Lib/test/test_logging.py", line 1580, in test_output logger.error("spam") Message: 'spam' Arguments: () ^C Test suite interrupted by signal SIGINT. I'm watching closely Windows buildbots for 2 years, and I don't recall having seen this error recently. So I close the issue as "out of date". ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 09:43:51 2018 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 02 Jul 2018 13:43:51 +0000 Subject: [issue34023] timedelta(seconds=x) strange results when type(x) == np.int32 Message-ID: <1530539031.68.0.56676864532.issue34023@psf.upfronthosting.co.za> New submission from Mark Dickinson : On Python 2.x on Windows, creating a timedelta with an `np.int32` instance for the number of seconds can (somewhat) silently give wrong results. Enthought Deployment Manager -- https://www.enthought.com Python 2.7.13 |Enthought, Inc. (x86_64)| (default, Mar 2 2017, 16:05:12) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy as np >>> import datetime >>> datetime.timedelta(seconds=np.int32(123456789)) __main__:1: RuntimeWarning: overflow encountered in long_scalars datetime.timedelta(-1, 84354, 76480) There's at least a warning from NumPy there as NumPy attempts to scale the np.int32 by 10**6, but depending on settings and on how the code is invoked, the user may not see that warning. This is not an issue on Python 3.x / Windows or on Python 2.x / Unix; in both those cases, the same code gives a TypeError. This is related to, but not the same as, #5476. This may well count as a "won't fix", but it seemed at least worth reporting. ---------- components: Extension Modules messages: 320884 nosy: mark.dickinson priority: normal severity: normal status: open title: timedelta(seconds=x) strange results when type(x) == np.int32 type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 09:47:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Jul 2018 13:47:08 +0000 Subject: [issue34022] Python 3.7: 6 tests failed on OpenSUSE In-Reply-To: <1530533915.92.0.56676864532.issue34022@psf.upfronthosting.co.za> Message-ID: <1530539228.55.0.56676864532.issue34022@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm unable to reproduce the issue on Fedora using the same configure command: $ ./configure --host=x86_64-suse-linux-gnu --build=x86_64-suse-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/lib --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --disable-dependency-tracking --docdir=/usr/share/doc/packages/python --enable-ipv6 --with-fpectl --enable-shared --with-ensurepip=no --with-system-ffi --with-system-expat --with-lto --enable-loadable-sqlite-extensions $ make $ LD_LIBRARY_PATH=$PWD ./python -m test -j0 test_cmd_line_script test_compileall test_importlib test_multiprocessing_main_handling test_py_compile test_runpy ... All 6 tests OK. ... Tests result: SUCCESS ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 09:52:07 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 02 Jul 2018 13:52:07 +0000 Subject: [issue34022] Python 3.7: 6 tests failed on OpenSUSE In-Reply-To: <1530533915.92.0.56676864532.issue34022@psf.upfronthosting.co.za> Message-ID: <1530539527.12.0.56676864532.issue34022@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 09:57:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Jul 2018 13:57:14 +0000 Subject: [issue34022] Python 3.7: 6 tests failed on OpenSUSE In-Reply-To: <1530533915.92.0.56676864532.issue34022@psf.upfronthosting.co.za> Message-ID: <1530539834.11.0.56676864532.issue34022@psf.upfronthosting.co.za> STINNER Victor added the comment: Thread on python-dev: "[Python-Dev] Failing tests [Was: Re: Python 3.7.0 is now available! (and so is 3.6.6)]" https://mail.python.org/pipermail/python-dev/2018-July/154208.html My reply: https://mail.python.org/pipermail/python-dev/2018-July/154224.html Extract: """ I'm running the Python test suite every day on Fedora and all tests pass. We also run tests multiple times per day on Travis CI (Ubuntu) and buildbots (Debian, Gentoo, RHEL, SLES). Wait, there is a SLES buildbot and all tests pass except of test_gdb.test_threads(). SLES is OpenSUSE no? The Debian buildbot is green on all branches. """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 10:38:32 2018 From: report at bugs.python.org (Alan Huang) Date: Mon, 02 Jul 2018 14:38:32 +0000 Subject: [issue34001] LibreSSL does not tolerate setting minimum_version greater than maximum_version In-Reply-To: <1530288553.74.0.56676864532.issue34001@psf.upfronthosting.co.za> Message-ID: <1530542312.23.0.56676864532.issue34001@psf.upfronthosting.co.za> Alan Huang added the comment: Strangely, LibreSSL's `ssl_clamp_version_range` function is perfectly happy to accept minimum protocol versions lower than the lowest supported protocol version, and likewise is happy to accept maximum protocol versions higher than the highest supported protocol version. In said case, the minimum/maximum protocol version is set to clamp_min/clamp_max (i.e., the minimum/maximum protocol version supported by the internal method). As such, the assertion test `ctx.minimum_version = 42` on line 1127 in test_min_max_version in test_ssl.py fails. A possible fix would be to add another check in `set_min_max_proto_version` _ssl.c that checks if the current set protocol version is equal to the value passed (with exceptions for the magic constants of `MINIMUM_SUPPORTED` and `MAXIMUM_SUPPORTED`), and if not, raise a ValueError as well. One dilemma is whether to reset the respective version back to what it was before the attempt, which I think should be done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 10:51:00 2018 From: report at bugs.python.org (Alan Huang) Date: Mon, 02 Jul 2018 14:51:00 +0000 Subject: [issue33995] test_min_max_version in test_ssl.py fails when Python is built against LibreSSL; {min,max}imum_version behavior differs from OpenSSL In-Reply-To: <1530250345.83.0.56676864532.issue33995@psf.upfronthosting.co.za> Message-ID: <1530543060.25.0.56676864532.issue33995@psf.upfronthosting.co.za> Change by Alan Huang : ---------- keywords: +patch pull_requests: +7658 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 11:03:21 2018 From: report at bugs.python.org (Kay Hayen) Date: Mon, 02 Jul 2018 15:03:21 +0000 Subject: [issue34024] Builtin types take no keyword arguments anymore Message-ID: <1530543801.89.0.56676864532.issue34024@psf.upfronthosting.co.za> New submission from Kay Hayen : Hello, things like list(sequence = something) ought to work in Python 3.6 back to the oldest Python2 I know. However, in 3.7 this raises an exception about not accepting keyword arguments. I noticed the same for tuple, int, float(x=9.0), and probably a lot others. It is not described in the release notes either. I think it's a bug and might affect existing code. Or is this how thing will be from now on? Yours, Kay ---------- components: Interpreter Core messages: 320888 nosy: kayhayen priority: normal severity: normal status: open title: Builtin types take no keyword arguments anymore type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 11:08:49 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 02 Jul 2018 15:08:49 +0000 Subject: [issue34024] Builtin types take no keyword arguments anymore In-Reply-To: <1530543801.89.0.56676864532.issue34024@psf.upfronthosting.co.za> Message-ID: <1530544129.09.0.56676864532.issue34024@psf.upfronthosting.co.za> Ned Deily added the comment: Alas, it's not a bug. That was a deliberate change (see https://bugs.python.org/issue29695 for the discussion leading up to the change) and is documented in the "What's New in 3.7" document here: https://docs.python.org/3.7/whatsnew/3.7.html#api-and-feature-removals ---------- nosy: +ned.deily resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 11:10:31 2018 From: report at bugs.python.org (Alan Huang) Date: Mon, 02 Jul 2018 15:10:31 +0000 Subject: [issue33995] test_min_max_version in test_ssl.py fails when Python is built against LibreSSL; {min,max}imum_version behavior differs from OpenSSL In-Reply-To: <1530250345.83.0.56676864532.issue33995@psf.upfronthosting.co.za> Message-ID: <1530544231.08.0.56676864532.issue33995@psf.upfronthosting.co.za> Alan Huang added the comment: PR 8050 implements option 2a (use PY_PROTO_{MIN,MAX}IMUM_AVAILABLE). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 11:19:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Jul 2018 15:19:43 +0000 Subject: [issue30849] test_stress_delivery_dependent() of test_signal randomly fails on AMD64 Debian root 3.6/3.x In-Reply-To: <1499181411.1.0.541300647507.issue30849@psf.upfronthosting.co.za> Message-ID: <1530544783.55.0.56676864532.issue30849@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I can reproduce the failure on multiple OSes in VirtaulBox when run test_signal in parallel with test_regrtest: ./python -m test -j2 test_signal test_regrtest test_regrtest test_regrtest Run tests in parallel using 2 child processes 0:00:29 load avg: 4.24 [1/4] test_regrtest passed 0:00:58 load avg: 4.96 [2/4] test_regrtest passed -- running: test_signal (58 sec 728 ms) 0:01:00 load avg: 4.96 [3/4/1] test_signal failed test test_signal failed -- Traceback (most recent call last): File "/home/serhiy/py/cpython3.7/Lib/test/test_signal.py", line 1116, in test_stress_delivery_dependent self.assertEqual(len(sigs), N, "Some signals were lost") AssertionError: 5073 != 10000 : Some signals were lost But can't reproduce on hardware. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 11:20:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Jul 2018 15:20:09 +0000 Subject: [issue34022] Python 3.7: 6 tests failed on OpenSUSE In-Reply-To: <1530533915.92.0.56676864532.issue34022@psf.upfronthosting.co.za> Message-ID: <1530544809.95.0.56676864532.issue34022@psf.upfronthosting.co.za> STINNER Victor added the comment: I also ran the Python test suite on Debian sid using the master branch of Python and all tests pass: --- $ ./configure --prefix=/usr --enable-ipv6 --enable-loadable-sqlite-extensions --with-dbmliborder=bdb:gdbm --with-computed-gotos --without-ensurepip --with-system-expat --with-system-libmpdec --with-system-ffi $ make $ LD_LIBRARY_PATH=$PWD ./python -m test -j0 test_cmd_line_script test_compileall test_importlib test_multiprocessing_main_handling test_py_compile test_runpy All 6 tests OK. --- I also ran the full test suite on Debian Stretch: again, all tests passed. Maybe the package builder use a custom configuration or patches? Or issues are specific to Python 3.7? (again, I tested the master branch) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 11:20:16 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Jul 2018 15:20:16 +0000 Subject: [issue34022] Python 3.7: 6 tests failed on OpenSUSE and Debian In-Reply-To: <1530533915.92.0.56676864532.issue34022@psf.upfronthosting.co.za> Message-ID: <1530544816.18.0.56676864532.issue34022@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: Python 3.7: 6 tests failed on OpenSUSE -> Python 3.7: 6 tests failed on OpenSUSE and Debian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 11:26:40 2018 From: report at bugs.python.org (Kay Hayen) Date: Mon, 02 Jul 2018 15:26:40 +0000 Subject: [issue34024] Builtin types take no keyword arguments anymore In-Reply-To: <1530543801.89.0.56676864532.issue34024@psf.upfronthosting.co.za> Message-ID: <1530545200.22.0.56676864532.issue34024@psf.upfronthosting.co.za> Kay Hayen added the comment: Hello Ned, sorry for noise. I checked that, but oversaw it. Maybe I also wasn't expecting this. There has been such a huge trend towards * and ** support for like everything, e.g. class definitions in 3.6, that this felt like a move in the opposite direction. But I got the information I need for Nuitka to follow this. I agree with your close and my apology. Yours, Kay ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 11:46:12 2018 From: report at bugs.python.org (Matej Cepl) Date: Mon, 02 Jul 2018 15:46:12 +0000 Subject: [issue34022] Python 3.7: 6 tests failed on OpenSUSE and Debian In-Reply-To: <1530533915.92.0.56676864532.issue34022@psf.upfronthosting.co.za> Message-ID: <1530546372.44.0.56676864532.issue34022@psf.upfronthosting.co.za> Matej Cepl added the comment: Hmm, what about version of gcc? I suspect some troubles could be caused by gcc version 8 (we have in openSUSE), or LTO option switched on? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 11:46:29 2018 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 02 Jul 2018 15:46:29 +0000 Subject: [issue34023] timedelta(seconds=x) strange results when type(x) == np.int32 In-Reply-To: <1530539031.68.0.56676864532.issue34023@psf.upfronthosting.co.za> Message-ID: <1530546389.37.0.56676864532.issue34023@psf.upfronthosting.co.za> Change by Mark Dickinson : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 11:47:46 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Jul 2018 15:47:46 +0000 Subject: [issue34022] Python 3.7: 6 tests failed on OpenSUSE and Debian In-Reply-To: <1530533915.92.0.56676864532.issue34022@psf.upfronthosting.co.za> Message-ID: <1530546466.2.0.56676864532.issue34022@psf.upfronthosting.co.za> STINNER Victor added the comment: > Hmm, what about version of gcc? I suspect some troubles could be caused by gcc version 8 (we have in openSUSE), or LTO option switched on? For my tests on Fedora, I used gcc 8.1.1. I used the OpenSUSE configure command which includes --with-lto. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 11:48:58 2018 From: report at bugs.python.org (Zachary Ware) Date: Mon, 02 Jul 2018 15:48:58 +0000 Subject: [issue34006] Windows HTML Help (chm) has fixed line length In-Reply-To: <1530313481.18.0.56676864532.issue34006@psf.upfronthosting.co.za> Message-ID: <1530546538.1.0.56676864532.issue34006@psf.upfronthosting.co.za> Change by Zachary Ware : ---------- keywords: +patch pull_requests: +7659 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 11:50:05 2018 From: report at bugs.python.org (Zachary Ware) Date: Mon, 02 Jul 2018 15:50:05 +0000 Subject: [issue34006] Windows HTML Help (chm) has fixed line length In-Reply-To: <1530313481.18.0.56676864532.issue34006@psf.upfronthosting.co.za> Message-ID: <1530546605.89.0.56676864532.issue34006@psf.upfronthosting.co.za> Zachary Ware added the comment: Terry: PR8051 should do that, but I haven't tested it. Would you mind taking over the PR if it does what you want it to? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 12:09:56 2018 From: report at bugs.python.org (ndevenish) Date: Mon, 02 Jul 2018 16:09:56 +0000 Subject: [issue23850] Missing documentation for Py_TPFLAGS_HAVE_NEWBUFFER In-Reply-To: <1427969373.72.0.801261679654.issue23850@psf.upfronthosting.co.za> Message-ID: <1530547796.1.0.56676864532.issue23850@psf.upfronthosting.co.za> ndevenish added the comment: I've just spent some time running around because of this. Are documentation contributions still being accepted for python 2.7 at all? Some of the buffer documentation seems to be confusing as to whether you use new or old API. ---------- nosy: +ndevenish _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 12:18:14 2018 From: report at bugs.python.org (Douglas Thor) Date: Mon, 02 Jul 2018 16:18:14 +0000 Subject: [issue34025] SMTP EmailPolicy not setting max_line_length as expected. RCF 2045 states 76 char, Default policy uses 78 Message-ID: <1530548294.1.0.56676864532.issue34025@psf.upfronthosting.co.za> New submission from Douglas Thor : It appears that the SMTP EmailPolicy object does not correctly set max_line_length. RFC 2045 (https://www.ietf.org/rfc/rfc2045.txt) requires a max_line_length of 76 characters, while email._policybase.Policy sets it to 78 (which typically is correct). This causes email attachments to be truncated/corrupted. While the workaround is quite trivial, debugging the root cause was not as easy. Thus I think this should be fixed in at the std lib level, or at the very least mentioned in the docs. This was tested on Python 3.5.2. I did not test on 3.7, but I did check the source code and it appears that the bug still exists. To reproduce: import smtplib from email.message import EmailMessage from email.policy import SMTP msg = EmailMessage() msg['Subject'] = "Test message" msg['To'] = "to at valid_address.com" msg['From'] = "from at valid_address.com" content = "hello world, I should have an attachment" msg.set_content(content) maintype = 'image' subtype = 'png' test_file = './aaa.png' with open(test_file, 'rb') as fp: data = fp.read() msg.add_attachment(data, maintype=maintype, subtype=subtype, filename='aaa.png') with smtplib.SMTP_SSL('smtp.address.com', port=465) as s: s.ehlo() user = 'smtp_user at valid_address.com' pw = 'smtp_password' s.login(user, pw) s.send_message(msg) Check the raw email message received. You'll see that lines have a length of 78 and are padded with "==" which makes the total length 80 chars: ... MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1585876390557366757==" --===============1585876390557366757== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit hello world, I should have an attachment --===============1585876390557366757== Content-Type: image/png Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="aaa.png" MIME-Version: 1.0 iVBORw0KGgoAAAANSUhEUgAABE0AAALFCAYAAAA2rB2uAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjw== C/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAD/jklEQVR4Xg== 7P1rsHVJWecBvl4RFFAuIpcCEYQuLkUDBcgBoQsULLnJXaoaEApe5FLSTVFUC4JACQ1NiQdsQoFBAQ== iW4aQSWEt4cQwwB6xqC+CPYHqX5jQno+jHyYCCMmZsKJmYjZs3/rnOe8uXNnrpW5LrlzrfVfVSfOeQ== 986Vl/+T678y//nkk9+3OXdu+78uISAEhIAQEAJCQAgIASEgBISAEBACQkAICIEdBBBN9CMM1AfUBw== ... Next, modify the code with: from email.policy import SMTP smtp_pol = SMTP.clone(max_line_length=76) msg = EmailMessage(policy=smtp_pol) msg['Subject'] = ... And check the raw email again. This time, lines are 76 chars long and have no padding. Data is the same, just wrapped differently as expected. ... MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4874323426669347622==" --===============4874323426669347622== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit hello world, I should have an attachment --===============4874323426669347622== Content-Type: image/png Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="aaa.png" MIME-Version: 1.0 iVBORw0KGgoAAAANSUhEUgAABE0AAALFCAYAAAA2rB2uAAAAAXNSR0IArs4c6QAAAARnQU1BAACx jwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAA/45JREFU eF7s/WuwdUlZ5wG+XhEUUC4ilwIRhC4uRQMFyAGhCxQsucldqhoQCl7kUtJNUVQLgkAJDU2JB2xC gUEBiW4aQSWEt4cQwwB6xqC+CPYHqX5jQno+jHyYCCMmZsKJmYjZs3/rnOe8uXNnrpW5LrlzrfVf ... This fix *should* be extremely easy: diff --git "a/policy.py" "b/policy.py" index 6ac64a5..046b788 100644 --- "a/policy.py" +++ "b/policy.py" @@ -209,6 +209,6 @@ default = EmailPolicy() # Make the default policy use the class default header_factory del default.header_factory strict = default.clone(raise_on_defect=True) -SMTP = default.clone(linesep='\r\n') +SMTP = default.clone(linesep='\r\n', max_line_length=76) HTTP = default.clone(linesep='\r\n', max_line_length=None) SMTPUTF8 = SMTP.clone(utf8=True) ---------- components: email messages: 320898 nosy: Douglas Thor, barry, r.david.murray priority: normal severity: normal status: open title: SMTP EmailPolicy not setting max_line_length as expected. RCF 2045 states 76 char, Default policy uses 78 type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 12:22:34 2018 From: report at bugs.python.org (Anthony Sottile) Date: Mon, 02 Jul 2018 16:22:34 +0000 Subject: [issue23835] configparser does not convert defaults to strings In-Reply-To: <1427862188.44.0.00358189102447.issue23835@psf.upfronthosting.co.za> Message-ID: <1530548554.06.0.56676864532.issue23835@psf.upfronthosting.co.za> Anthony Sottile added the comment: Unclear if this regression (from this patch) is intentional or not: ``` $ python3.6 -c 'import configparser; configparser.ConfigParser(defaults={"a": None})' $ python3.7 -c 'import configparser; configparser.ConfigParser(defaults={"a": None})' Traceback (most recent call last): File "", line 1, in File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/configparser.py", line 638, in __init__ self._read_defaults(defaults) File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/configparser.py", line 1216, in _read_defaults self.read_dict({self.default_section: defaults}) File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/configparser.py", line 753, in read_dict self.set(section, key, value) File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/configparser.py", line 1197, in set self._validate_value_types(option=option, value=value) File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/configparser.py", line 1182, in _validate_value_types raise TypeError("option values must be strings") TypeError: option values must be strings ``` ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 12:38:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Jul 2018 16:38:25 +0000 Subject: [issue30849] test_stress_delivery_dependent() of test_signal randomly fails on AMD64 Debian root 3.6/3.x In-Reply-To: <1499181411.1.0.541300647507.issue30849@psf.upfronthosting.co.za> Message-ID: <1530549505.5.0.56676864532.issue30849@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: After increasing the number of CPUs in the virtual machine the failure no longer reproduced. It is reproducible only with a single CPU. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 13:08:44 2018 From: report at bugs.python.org (Emily Morehouse) Date: Mon, 02 Jul 2018 17:08:44 +0000 Subject: [issue33968] os.makedirs and empty string In-Reply-To: <1530014482.98.0.56676864532.issue33968@psf.upfronthosting.co.za> Message-ID: <1530551324.43.0.56676864532.issue33968@psf.upfronthosting.co.za> Change by Emily Morehouse : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 13:20:31 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 02 Jul 2018 17:20:31 +0000 Subject: [issue23850] Missing documentation for Py_TPFLAGS_HAVE_NEWBUFFER In-Reply-To: <1427969373.72.0.801261679654.issue23850@psf.upfronthosting.co.za> Message-ID: <1530552031.17.0.56676864532.issue23850@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Documentation fixes to 2.7 is still accepted. Please create a PR on GitHub. ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 13:34:13 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 02 Jul 2018 17:34:13 +0000 Subject: [issue34006] Windows HTML Help (chm) has fixed line length In-Reply-To: <1530313481.18.0.56676864532.issue34006@psf.upfronthosting.co.za> Message-ID: <1530552853.15.0.56676864532.issue34006@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Yes, I will add a blurb and merge and backport, when the patch is modified to change htmlhelp rather than htmlview. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 13:40:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Jul 2018 17:40:46 +0000 Subject: [issue34022] Python 3.7: 6 tests failed on OpenSUSE and Debian In-Reply-To: <1530533915.92.0.56676864532.issue34022@psf.upfronthosting.co.za> Message-ID: <1530553246.55.0.56676864532.issue34022@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I built and ran these tests using commands from msg320892 on openSUSE Leap 42.3, and all tests are passed. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 14:09:58 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 02 Jul 2018 18:09:58 +0000 Subject: [issue34026] Request for 2 Windows installation changes. Message-ID: <1530554998.5.0.56676864532.issue34026@psf.upfronthosting.co.za> New submission from Terry J. Reedy : 1. On 3.7.0, but not 3.6.6, 'Python 3.7 Module Docs' is listed twice. 2. On both, 'Python x.y Manuals' always opens the .chm full-screen, even after the user closes in part-screen mode. I think part-screen would be better for the initial open. It would definitely be better to remember a user's setting when re-opening. ---------- components: Installation, Windows messages: 320904 nosy: paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Request for 2 Windows installation changes. type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 14:18:12 2018 From: report at bugs.python.org (R. David Murray) Date: Mon, 02 Jul 2018 18:18:12 +0000 Subject: [issue34025] SMTP EmailPolicy not using the correct line length for RCF 2045 encoded data (is 78, should be 76) In-Reply-To: <1530548294.1.0.56676864532.issue34025@psf.upfronthosting.co.za> Message-ID: <1530555492.16.0.56676864532.issue34025@psf.upfronthosting.co.za> R. David Murray added the comment: The default maximum line length is indeed supposed to be 78 (characters..and I can't now remember whether I implemented it in terms of characters or octets), that's per RFC 5322. What is wrong is that content encoded text is supposed to use a max line length of 76. A "simple" fix would be to hardcode the maximum line length at 76 when doing content encoding. An arguably better fix would be a separate policy control for the encoded text line length. The former can be the bug fix, but it would be nice to have the latter as an enhancement. ---------- title: SMTP EmailPolicy not setting max_line_length as expected. RCF 2045 states 76 char, Default policy uses 78 -> SMTP EmailPolicy not using the correct line length for RCF 2045 encoded data (is 78, should be 76) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 14:35:23 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 02 Jul 2018 18:35:23 +0000 Subject: [issue34006] Windows HTML Help (chm) has fixed line length In-Reply-To: <1530313481.18.0.56676864532.issue34006@psf.upfronthosting.co.za> Message-ID: <1530556523.94.0.56676864532.issue34006@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The patch now works for me and can be tested. The blurb is added and can be reviewed. I expect to merge within a day. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 15:00:13 2018 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 02 Jul 2018 19:00:13 +0000 Subject: [issue33955] Implement PyOS_CheckStack on macOS using pthread_get_stack*_np In-Reply-To: <1529925495.69.0.56676864532.issue33955@psf.upfronthosting.co.za> Message-ID: <1530558013.57.0.56676864532.issue33955@psf.upfronthosting.co.za> Dong-hee Na added the comment: @ronaldoussoren I updated the PR and we need some discussion. I benchmarked new patch with Fibonacci codes. baseline(master): 21.330535484 without call sysctlbyname(PR 8046): 22.857963209 secs with call sysctlbyname(PR 8046): 37.125129114 secs So my choice is just believe pthread_get_stacksize_np() like rust do. (https://github.com/rust-lang/rust/blob/master/src/libstd/sys/unix/thread.rs#L246) code: def fib(n): if n == 0: return 0 if n == 1: return 1 return fib(n-2) + fib(n-1) if __name__ == '__main__': import timeit print(timeit.timeit("fib(10)", setup="from __main__ import fib")) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 15:32:34 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 02 Jul 2018 19:32:34 +0000 Subject: [issue34026] Request for 2 Windows installation changes. In-Reply-To: <1530554998.5.0.56676864532.issue34026@psf.upfronthosting.co.za> Message-ID: <1530559954.84.0.56676864532.issue34026@psf.upfronthosting.co.za> Steve Dower added the comment: 1. What do you mean by "listed twice"? I see 32-bit and 64-bit copies, but that's expected as they may show different modules. 2. We don't control HTML Help Reader's memory, so that's not an option unfortunately. We also don't control the initial size when not opening maximised and it has been known to open off-screen, which I'm not all that thrilled about. However, HTML Help Reader does seem to remember the location you left it, if not the maximised state. I'm inclined to see this as a personal preference and would like to wait and see whether this issue gains broader support before making any change. Python 3.5 also opened in full screen, so there have been a few years now without it being raised as a concern. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 15:56:30 2018 From: report at bugs.python.org (Larry Hastings) Date: Mon, 02 Jul 2018 19:56:30 +0000 Subject: [issue33700] [doc] Old version picker don't understand language tags in URL In-Reply-To: <1527716663.86.0.682650639539.issue33700@psf.upfronthosting.co.za> Message-ID: <1530561390.89.0.56676864532.issue33700@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset 1b141b9553424971639bde281feb1d4e4e586dbe by larryhastings (Julien Palard) in branch '3.5': Doc: Backport language switcher (bpo-33700, bpo-31045) (#8048) https://github.com/python/cpython/commit/1b141b9553424971639bde281feb1d4e4e586dbe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 15:56:31 2018 From: report at bugs.python.org (Larry Hastings) Date: Mon, 02 Jul 2018 19:56:31 +0000 Subject: [issue31045] Add a language switch to the Python documentation In-Reply-To: <1501078214.01.0.529111921671.issue31045@psf.upfronthosting.co.za> Message-ID: <1530561391.02.0.902498594338.issue31045@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset 1b141b9553424971639bde281feb1d4e4e586dbe by larryhastings (Julien Palard) in branch '3.5': Doc: Backport language switcher (bpo-33700, bpo-31045) (#8048) https://github.com/python/cpython/commit/1b141b9553424971639bde281feb1d4e4e586dbe ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 15:57:09 2018 From: report at bugs.python.org (Larry Hastings) Date: Mon, 02 Jul 2018 19:57:09 +0000 Subject: [issue33700] [doc] Old version picker don't understand language tags in URL In-Reply-To: <1527716663.86.0.682650639539.issue33700@psf.upfronthosting.co.za> Message-ID: <1530561429.77.0.56676864532.issue33700@psf.upfronthosting.co.za> Change by Larry Hastings : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 16:10:56 2018 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 02 Jul 2018 20:10:56 +0000 Subject: [issue31516] current_thread() becomes "dummy" thread during shutdown In-Reply-To: <1505820834.6.0.00526419251789.issue31516@psf.upfronthosting.co.za> Message-ID: <1530562256.65.0.56676864532.issue31516@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- pull_requests: +7660 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 16:25:13 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 02 Jul 2018 20:25:13 +0000 Subject: [issue34026] Request for 2 Windows installation changes. In-Reply-To: <1530554998.5.0.56676864532.issue34026@psf.upfronthosting.co.za> Message-ID: <1530563113.77.0.56676864532.issue34026@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 1. I saw "Python 3.7 Module Docs (64 bit)" twice. But this seems to be a local issue. When I clicked on each, the second worked, the first brought up something like 'The python.exe this shortcut points to had been deleted [or moved?]. Delete shortcut?'. I clicked yes and everything else remains and works. Perhaps I once installed in the default location, or started to, and canceled, and this one icon got let behind. 2. If there is nothing you can do short of writing a new viewer, we can close this whenever. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 16:26:58 2018 From: report at bugs.python.org (Joseph L. Casale) Date: Mon, 02 Jul 2018 20:26:58 +0000 Subject: [issue34006] Windows HTML Help (chm) has fixed line length In-Reply-To: <1530313481.18.0.56676864532.issue34006@psf.upfronthosting.co.za> Message-ID: <1530563218.55.0.56676864532.issue34006@psf.upfronthosting.co.za> Change by Joseph L. Casale : ---------- nosy: -jcasale _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 16:31:45 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 02 Jul 2018 20:31:45 +0000 Subject: [issue34006] Windows HTML Help (chm) has fixed line length In-Reply-To: <1530313481.18.0.56676864532.issue34006@psf.upfronthosting.co.za> Message-ID: <1530563505.21.0.56676864532.issue34006@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset d824ca7f4df9b5f77cf02490b0e98c2408e21fee by Terry Jan Reedy (Zachary Ware) in branch 'master': bpo-34006: Revert line length limit for Windows help docs (GH-8051) https://github.com/python/cpython/commit/d824ca7f4df9b5f77cf02490b0e98c2408e21fee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 16:32:10 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 02 Jul 2018 20:32:10 +0000 Subject: [issue34006] Windows HTML Help (chm) has fixed line length In-Reply-To: <1530313481.18.0.56676864532.issue34006@psf.upfronthosting.co.za> Message-ID: <1530563530.21.0.56676864532.issue34006@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7661 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 16:32:54 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 02 Jul 2018 20:32:54 +0000 Subject: [issue34006] Windows HTML Help (chm) has fixed line length In-Reply-To: <1530313481.18.0.56676864532.issue34006@psf.upfronthosting.co.za> Message-ID: <1530563574.2.0.56676864532.issue34006@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7662 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 17:04:24 2018 From: report at bugs.python.org (Alan Huang) Date: Mon, 02 Jul 2018 21:04:24 +0000 Subject: [issue34001] LibreSSL does not tolerate setting minimum_version greater than maximum_version In-Reply-To: <1530288553.74.0.56676864532.issue34001@psf.upfronthosting.co.za> Message-ID: <1530565464.63.0.56676864532.issue34001@psf.upfronthosting.co.za> Change by Alan Huang : ---------- keywords: +patch pull_requests: +7663 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 17:31:08 2018 From: report at bugs.python.org (Daiderd Jordan) Date: Mon, 02 Jul 2018 21:31:08 +0000 Subject: [issue34027] python 3.7 openpty/forkpty build failure on macOS Message-ID: <1530567068.14.0.56676864532.issue34027@psf.upfronthosting.co.za> New submission from Daiderd Jordan : I can't really figure out why, but the import in posixmodule.c seems to get skipped since python 3.7. The condition doesn't look entirely correct in case libutil.h is also available on macOS, however this has not changed since 3.6 and it worked fine there while both where available. Part of the configure log: checking pty.h usability... no checking pty.h presence... no checking for pty.h... no checking libutil.h usability... yes checking libutil.h presence... yes checking for libutil.h... yes ... checking util.h usability... yes checking util.h presence... yes checking for util.h... yes Build error: ./Modules/posixmodule.c:5924:9: error: implicit declaration of function 'openpty' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) != 0) ^ ./Modules/posixmodule.c:5924:9: note: did you mean 'openat'? /nix/store/q819d3vjz7vswpvkrfa9gck3ys8rmvcj-Libsystem-osx-10.11.6/include/sys/fcntl.h:480:5: note: 'openat' declared here int openat(int, const char *, int, ...) __DARWIN_NOCANCEL(openat) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); ^ ./Modules/posixmodule.c:5924:9: warning: this function declaration is not a prototype [-Wstrict-prototypes] if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) != 0) ^ ./Modules/posixmodule.c:6018:11: error: implicit declaration of function 'forkpty' is invalid in C99 [-Werror,-Wimplicit-function-declaration] pid = forkpty(&master_fd, NULL, NULL, NULL); ^ ./Modules/posixmodule.c:6018:11: warning: this function declaration is not a prototype [-Wstrict-prototypes] 2 warnings and 2 errors generated. make: *** [Makefile:1793: Modules/posixmodule.o] Error 1 ---------- components: Build messages: 320913 nosy: LnL7 priority: normal severity: normal status: open title: python 3.7 openpty/forkpty build failure on macOS type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 17:33:23 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 02 Jul 2018 21:33:23 +0000 Subject: [issue34027] python 3.7 openpty/forkpty build failure on macOS In-Reply-To: <1530567068.14.0.56676864532.issue34027@psf.upfronthosting.co.za> Message-ID: <1530567203.74.0.56676864532.issue34027@psf.upfronthosting.co.za> Change by Ned Deily : ---------- components: +macOS nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 17:44:39 2018 From: report at bugs.python.org (Daiderd Jordan) Date: Mon, 02 Jul 2018 21:44:39 +0000 Subject: [issue34027] python 3.7 openpty/forkpty build failure on macOS In-Reply-To: <1530567068.14.0.56676864532.issue34027@psf.upfronthosting.co.za> Message-ID: <1530567879.1.0.56676864532.issue34027@psf.upfronthosting.co.za> Change by Daiderd Jordan : ---------- keywords: +patch pull_requests: +7664 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 18:04:46 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 02 Jul 2018 22:04:46 +0000 Subject: [issue34027] python 3.7 openpty/forkpty build failure on macOS In-Reply-To: <1530567068.14.0.56676864532.issue34027@psf.upfronthosting.co.za> Message-ID: <1530569086.71.0.56676864532.issue34027@psf.upfronthosting.co.za> Ned Deily added the comment: I don't see this build failure. Can you say where you find libutil.h installed on macOS and what version of macOS this is? It doesn't seem to be part of the standard Apple-supplied /usr/include header files installed by xcode-select --install for macOS 10.13 at least? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 18:16:35 2018 From: report at bugs.python.org (Daiderd Jordan) Date: Mon, 02 Jul 2018 22:16:35 +0000 Subject: [issue34027] python 3.7 openpty/forkpty build failure on macOS In-Reply-To: <1530567068.14.0.56676864532.issue34027@psf.upfronthosting.co.za> Message-ID: <1530569795.35.0.56676864532.issue34027@psf.upfronthosting.co.za> Daiderd Jordan added the comment: This is a build using the nix package manager, we use all of the opensource components provided by apple instead of relying on xcode. The libutil.h that's found in this case is the one from the 10.11.6 sources. https://opensource.apple.com/source/libutil/libutil-43/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 18:23:30 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 02 Jul 2018 22:23:30 +0000 Subject: [issue34006] Windows HTML Help (chm) has fixed line length In-Reply-To: <1530313481.18.0.56676864532.issue34006@psf.upfronthosting.co.za> Message-ID: <1530570209.99.0.56676864532.issue34006@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 4d02ad856f123d68712f542d55e8ff3393f00a8f by Miss Islington (bot) in branch '3.7': bpo-34006: Revert line length limit for Windows help docs (GH-8051) https://github.com/python/cpython/commit/4d02ad856f123d68712f542d55e8ff3393f00a8f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 18:23:48 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 02 Jul 2018 22:23:48 +0000 Subject: [issue34006] Windows HTML Help (chm) has fixed line length In-Reply-To: <1530313481.18.0.56676864532.issue34006@psf.upfronthosting.co.za> Message-ID: <1530570228.88.0.56676864532.issue34006@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 580c7db172a41d6311c0f3a7aec321597576e214 by Miss Islington (bot) in branch '3.6': bpo-34006: Revert line length limit for Windows help docs (GH-8051) https://github.com/python/cpython/commit/580c7db172a41d6311c0f3a7aec321597576e214 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 18:24:43 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 02 Jul 2018 22:24:43 +0000 Subject: [issue34006] Windows HTML Help (chm) has fixed line length In-Reply-To: <1530313481.18.0.56676864532.issue34006@psf.upfronthosting.co.za> Message-ID: <1530570283.91.0.56676864532.issue34006@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- assignee: -> terry.reedy resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 18:33:45 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 02 Jul 2018 22:33:45 +0000 Subject: [issue34027] python 3.7 openpty/forkpty build failure on macOS In-Reply-To: <1530567068.14.0.56676864532.issue34027@psf.upfronthosting.co.za> Message-ID: <1530570825.33.0.56676864532.issue34027@psf.upfronthosting.co.za> Ned Deily added the comment: Even on macOS 10.11.6, libutil.h is not installed and posixmodule.c builds just fine. So I don't think that the presence of something in opensource.apple.com necessarily means it was installed in place in a standard system. I'm not saying yet that we shouldn't change the tests along the line you suggest in the PR. But I really would like to understand first why we should make a change when as far as I recall this issue has never come up before. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 18:46:41 2018 From: report at bugs.python.org (Matej Cepl) Date: Mon, 02 Jul 2018 22:46:41 +0000 Subject: [issue34022] Python 3.7: 6 tests failed on OpenSUSE and Debian In-Reply-To: <1530533915.92.0.56676864532.issue34022@psf.upfronthosting.co.za> Message-ID: <1530571601.52.0.56676864532.issue34022@psf.upfronthosting.co.za> Matej Cepl added the comment: It's somehow complicated, in the build chroot I can make tests run only with LD_LIBRARY_PATH set to $(readlink -f Python-3.7.0) and PYTHONPATH to Lib directory. However, then the set of failed tests changes. For example test_runpy runs without problems, but other fails: 5 tests failed: test_asyncio test_concurrent_futures test_gdb test_logging test_multiprocessing_main_handling (complete log is attached) ---------- Added file: https://bugs.python.org/file47665/osc-build-log.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 18:49:33 2018 From: report at bugs.python.org (Daiderd Jordan) Date: Mon, 02 Jul 2018 22:49:33 +0000 Subject: [issue34027] python 3.7 openpty/forkpty build failure on macOS In-Reply-To: <1530567068.14.0.56676864532.issue34027@psf.upfronthosting.co.za> Message-ID: <1530571773.39.0.56676864532.issue34027@psf.upfronthosting.co.za> Daiderd Jordan added the comment: The headers end up in the build environment because of Libsystem which is part of our base environment. But yes, this is also the case with 3.6 and that builds just fine so I'm not sure why it's failing now. These are the logs from our build service for reference: python37.x86_64-darwin https://hydra.nixos.org/build/76780195/nixlog/2 python36.x86_64-darwin https://hydra.nixos.org/build/76018915/nixlog/1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 18:56:57 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 02 Jul 2018 22:56:57 +0000 Subject: [issue34027] python 3.7 openpty/forkpty build failure on macOS In-Reply-To: <1530567068.14.0.56676864532.issue34027@psf.upfronthosting.co.za> Message-ID: <1530572217.02.0.56676864532.issue34027@psf.upfronthosting.co.za> Ned Deily added the comment: It's failing in 3.7 because of the change introduced in Issue27659 to prohibit implicit C function declarations by adding the -Werror=implicit-function-declaration to compiles. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 18:59:31 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Jul 2018 22:59:31 +0000 Subject: [issue34019] webbrowser: wrong arguments for Opera browser. In-Reply-To: <1530525080.65.0.56676864532.issue34019@psf.upfronthosting.co.za> Message-ID: <1530572371.97.0.56676864532.issue34019@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: I can use opera -remote "openURL(https://google.com,new-window)" without problems as per the opera documentation with the latest version: $opera --version 53.0.2907.110 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 18:59:47 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Jul 2018 22:59:47 +0000 Subject: [issue34019] webbrowser: wrong arguments for Opera browser. In-Reply-To: <1530525080.65.0.56676864532.issue34019@psf.upfronthosting.co.za> Message-ID: <1530572387.97.0.56676864532.issue34019@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: What error do you get and what opera version are you using? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 19:01:28 2018 From: report at bugs.python.org (Matej Cepl) Date: Mon, 02 Jul 2018 23:01:28 +0000 Subject: [issue34022] Python 3.7: 6 tests failed on OpenSUSE and Debian In-Reply-To: <1530533915.92.0.56676864532.issue34022@psf.upfronthosting.co.za> Message-ID: <1530572488.33.0.56676864532.issue34022@psf.upfronthosting.co.za> Matej Cepl added the comment: Yes, it must be something in the chroot, because when run in the plain command line, all tests as well on openSUSE Tumbleweed (with the latest updates). 393 tests OK. 1 test failed: test_epoll 21 tests skipped: test_ctypes test_devpoll test_idle test_kqueue test_msilib test_nis test_ossaudiodev test_smtpnet test_sqlite test_ssl test_startfile test_tcl test_tix test_tk test_ttk_guionly test_ttk_textonly test_turtle test_winconsoleio test_winreg test_winsound test_zipfile64 Re-running failed tests in verbose mode Re-running test 'test_epoll' in verbose mode test_add (test.test_epoll.TestEPoll) ... ok test_badcreate (test.test_epoll.TestEPoll) ... ok test_close (test.test_epoll.TestEPoll) ... ok test_context_manager (test.test_epoll.TestEPoll) ... ok test_control_and_wait (test.test_epoll.TestEPoll) ... ok test_create (test.test_epoll.TestEPoll) ... ok test_errors (test.test_epoll.TestEPoll) ... ok test_fd_non_inheritable (test.test_epoll.TestEPoll) ... ok test_fromfd (test.test_epoll.TestEPoll) ... ok test_unregister_closed (test.test_epoll.TestEPoll) ... ok ---------------------------------------------------------------------- Ran 10 tests in 2.106s OK == Tests result: FAILURE then SUCCESS == 393 tests OK. 21 tests skipped: test_ctypes test_devpoll test_idle test_kqueue test_msilib test_nis test_ossaudiodev test_smtpnet test_sqlite test_ssl test_startfile test_tcl test_tix test_tk test_ttk_guionly test_ttk_textonly test_turtle test_winconsoleio test_winreg test_winsound test_zipfile64 1 re-run test: test_epoll ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 19:10:23 2018 From: report at bugs.python.org (Daiderd Jordan) Date: Mon, 02 Jul 2018 23:10:23 +0000 Subject: [issue34027] python 3.7 openpty/forkpty build failure on macOS In-Reply-To: <1530567068.14.0.56676864532.issue34027@psf.upfronthosting.co.za> Message-ID: <1530573023.47.0.56676864532.issue34027@psf.upfronthosting.co.za> Daiderd Jordan added the comment: Oh interesting, so it only used to worked by accident. I should have looked at the 3.6 log more closely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 19:10:44 2018 From: report at bugs.python.org (Bumsik Kim) Date: Mon, 02 Jul 2018 23:10:44 +0000 Subject: [issue34019] webbrowser: wrong arguments for Opera browser. In-Reply-To: <1530525080.65.0.56676864532.issue34019@psf.upfronthosting.co.za> Message-ID: <1530573044.11.0.56676864532.issue34019@psf.upfronthosting.co.za> Bumsik Kim added the comment: $opera --version 53.0.2907.68 $opera -remote "openURL(https://google.com,new-window)" would open a broken link: http://openurl%28https//google.com,new-window) I found that problem while answering a StackOverflow question: https://stackoverflow.com/questions/51123537/webbrowser-open-breaks-the-link-python-3-7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 19:20:36 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Jul 2018 23:20:36 +0000 Subject: [issue34019] webbrowser: wrong arguments for Opera browser. In-Reply-To: <1530525080.65.0.56676864532.issue34019@psf.upfronthosting.co.za> Message-ID: <1530573636.09.0.56676864532.issue34019@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Sorry, you are right! It seems that my Opera opened another tab with Google by default and I was confused by that. Thanks for the context. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 19:24:24 2018 From: report at bugs.python.org (Bumsik Kim) Date: Mon, 02 Jul 2018 23:24:24 +0000 Subject: [issue34019] webbrowser: wrong arguments for Opera browser. In-Reply-To: <1530525080.65.0.56676864532.issue34019@psf.upfronthosting.co.za> Message-ID: <1530573864.95.0.56676864532.issue34019@psf.upfronthosting.co.za> Bumsik Kim added the comment: No problem :) To add more, the Opera's documentation (https://www.opera.com/docs/switches) says: "This document was last updated for Opera 11.61" This is the reason I guessed Opera changed its CLI format to Chrome's and forget to document it.... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 19:26:09 2018 From: report at bugs.python.org (Jim DeLaHunt) Date: Mon, 02 Jul 2018 23:26:09 +0000 Subject: [issue33649] asyncio docs overhaul In-Reply-To: <1527277722.54.0.682650639539.issue33649@psf.upfronthosting.co.za> Message-ID: <1530573969.58.0.56676864532.issue33649@psf.upfronthosting.co.za> Jim DeLaHunt added the comment: I'm a developer using Python in my application. I just spent the last couple of weeks learning about asyncio with the present documentation. I am very happy to see that work is underway for improved documentation. I would be glad to take on writing tasks or to review drafts, if there is a way to plug myself into that work. I like the general structure. Some specific topics which would have helped me in my recent learning: * As an application developer using an event loop as part of the application, how do I develop a Protocol specific to my app, and use with Streams? An important part of this is being clear what the interface is between Transport and Protocol. This interface resides in both classes; Protocol calls Transport methods, and Transport calls Protocol methods. * As an application developer using an event loop as part of the application, how do I develop a Transport specific to my app, and use it with Streams? (In my case, I have two transports in mind: a file, containing data archived from a TCP network port, and an RS232 serial connection, carrying data that might otherwise be sent via a TCP network port. It seems to me that I should be able at run-time to select from any of those three Transports, and apply my app-specific Protocol when creating my connection.) * As an application developer, how do I give a function which is not a coroutine to the event loop for scheduling and execution? (I think the answer is loop.call_soon(), but the docs don't say "to run your function call loop.call_soon(myfunc...)", they say "call_soon(): Arrange for a callback to be called as soon as possible". Not the same thing. And, is a "callback" different "an arbitrary function"? Not clear.) * As an application developer, how do I make an syncio-based streaming server and streaming client respond cleanly to interrupts, e.g. control-C in a command-line app? (Existing docs hints at catching signals, but don't show how to combine those with exception handlers in the coroutine to shut down connections cleanly.) * As a Transport developer, what interface must I provide between Transport and Protocol? What services does the EventLoop provide to help implement my Transport? As mentioned before, to me it looks like the Transport-Protocol interface resides in both classes; Protocol calls Transport methods, and Transport calls Protocol methods. The EventLoop services useful to Transports are not gathered in a discussion of Transports. There is only an enumeration of the EventLoop methods, regardless of purpose. Editorial checks I suggest making to the revision: Rewrite to describe the behaviour in the doc, instead of delegating to a PEP. No more "this class is almost like the thing in PEP xyz, except for these differences". Describe the asyncio class, and steal text from PEP xyz as needed to do that. Every section about a thing must start by saying what that thing is and what it is used for. There are some big counterexamples in the current text. e.g. "19.5.1.2. Calls" starts out with: "Most asyncio functions don?t accept keywords. If you want to pass keywords to your callback, use functools.partial()." That does not describe what "calls" are, nor what they are used for. And, in this case, a better title might be, "Getting the event loop to call regular functions". e.g. "19.5.1.4. Futures" has no starting text. This is the first heading mentioning Futures when reading sequentially in the asyncio doc, so I interpreted it as a place to learn about Futures. It is not. This section would be better titles "Eventloop methods for Futures". The proposed "Low-level APIs" section might solve this problem by explaining the nature and purpose of Futures before mentioning the EventLoop factory for Futures objects. Consider separating the explanation of the nature and purpose of a thing from the reference to the methods of the thing. The proposed structure talks about "High-Level APIs" and "Low-Level APIs", but not "Architecture" and "API Reference". I would suggest injecting an "Architecture" section which can give the nature and purpose of each of the public classes in Asyncio, without enumerating their methods. Then the sections labelled "High-Level APIs" and "Low-Level APIs" can be the API reference. I hope these suggestions are helpful. I'll be monitoring this issue to see how I can help. ---------- nosy: +JDLH _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 20:34:50 2018 From: report at bugs.python.org (Orivej Desh) Date: Tue, 03 Jul 2018 00:34:50 +0000 Subject: [issue34027] python 3.7 openpty/forkpty build failure on macOS In-Reply-To: <1530567068.14.0.56676864532.issue34027@psf.upfronthosting.co.za> Message-ID: <1530578090.03.0.56676864532.issue34027@psf.upfronthosting.co.za> Orivej Desh added the comment: The explicit conditional on __APPLE__ can be avoided with the attached patch. (Tested on NixOS and macOS with Nixpkgs.) ---------- nosy: +orivej Added file: https://bugs.python.org/file47666/darwin-libutil.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 21:52:47 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 03 Jul 2018 01:52:47 +0000 Subject: [issue34027] python 3.7 openpty/forkpty build failure using nix package manager macOS environment In-Reply-To: <1530567068.14.0.56676864532.issue34027@psf.upfronthosting.co.za> Message-ID: <1530582767.87.0.56676864532.issue34027@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the suggested patch but I am not persuaded that there is a problem needing fixing on the Python side. As I see it, Python's posixmodule builds fine in the environments we claim to support, including macOS, and has for a long time. It appears that the build failure reported here is because Nix is not properly emulating a macOS build environment and that builds under Nix have been producing warnings prior to 3.7 so it's not a new issue. Rather than trying to patch around the Nix problem on the Python side, and potentially introducing problems on platforms that Python "officially" supports, it seems to me the better options are for either (1) Nix to better emulate a real macOS build environment by supplying a more correct set of header files (which also might help other third-party packages trying to use Nix for macOS builds); or, if that is not possible, (2) to carry a local patch for Python when building under Nix. I'm open to persuasion but it would have to be a very compelling argument. We have never claimed to support macOS builds on anything other than Apple-supplied macOS development environments running on macOS and I don't see that changing. ---------- title: python 3.7 openpty/forkpty build failure on macOS -> python 3.7 openpty/forkpty build failure using nix package manager macOS environment _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 21:56:39 2018 From: report at bugs.python.org (Eryk Sun) Date: Tue, 03 Jul 2018 01:56:39 +0000 Subject: [issue34011] Default preference not given to venv DLL's In-Reply-To: <1530353263.14.0.56676864532.issue34011@psf.upfronthosting.co.za> Message-ID: <1530582999.33.0.56676864532.issue34011@psf.upfronthosting.co.za> Eryk Sun added the comment: Offhand I don't know why it copies PYD and DLL files from the DLLs directory. It's part of the standard library. The virtual environment should only need to copy or symlink the binaries in the application directory, such as python.exe, pythonw.exe, vcruntime<###>.dll, python<##>.dll, and python<#>.dll. Currently a virtual environment doesn't use the binaries that get copied or symlinked from the DLLs directory, since the system DLLs directory is in sys.path. Also, why does it copy over init.tcl? _tkinter uses Py_GetPrefix() to to get the real prefix directory in order to find the TCL library at "tcl\tclX.y". For a Python 3.7 virtual environment, I verified using Sysinternals procmon that TCL loads the init file from "C:\Program Files\Python37\tcl\tcl8.6\init.tcl", not the virtual environment. ---------- components: +Library (Lib), Windows nosy: +eryksun, paul.moore, steve.dower, tim.golden, vinay.sajip, zach.ware stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 21:58:12 2018 From: report at bugs.python.org (Eryk Sun) Date: Tue, 03 Jul 2018 01:58:12 +0000 Subject: [issue34011] Default preference not given to venv DLL's In-Reply-To: <1530353263.14.0.56676864532.issue34011@psf.upfronthosting.co.za> Message-ID: <1530583092.94.0.56676864532.issue34011@psf.upfronthosting.co.za> Change by Eryk Sun : ---------- versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 22:50:15 2018 From: report at bugs.python.org (Orivej Desh) Date: Tue, 03 Jul 2018 02:50:15 +0000 Subject: [issue34027] python 3.7 openpty/forkpty build failure using nix package manager macOS environment In-Reply-To: <1530567068.14.0.56676864532.issue34027@psf.upfronthosting.co.za> Message-ID: <1530586215.13.0.56676864532.issue34027@psf.upfronthosting.co.za> Orivej Desh added the comment: I understand the desirability of avoiding potential problems on supported platforms (given that you can not test building Python on all of them) and recognize that both options you have given are reasonable, but as I see it posixmodule.c incorrectly uses autoconf checks for the presence of header files to infer the platform: it assumes that libutil.h can not exist on macOS. It should either include all found relevant headers, as proposed in my patch or done e.g. in dropbear [1] and gnulib [2], or it should dispatch on the platform directly as LnL7 has proposed (although in this case it should no longer use the autoconf check on macOS). [1] https://secure.ucc.asn.au/hg/dropbear/file/DROPBEAR_2018.76/includes.h [2] http://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/pty.in.h?id=281b825eba78dc403b9bf34979923bc587bc31af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 2 22:55:26 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 03 Jul 2018 02:55:26 +0000 Subject: [issue25345] Unable to install Python 3.5 on Windows 10 In-Reply-To: <1444326068.92.0.817766252718.issue25345@psf.upfronthosting.co.za> Message-ID: <1530586526.72.0.56676864532.issue25345@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 01:20:46 2018 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 03 Jul 2018 05:20:46 +0000 Subject: [issue34011] Default preference not given to venv DLL's In-Reply-To: <1530353263.14.0.56676864532.issue34011@psf.upfronthosting.co.za> Message-ID: <1530595246.8.0.56676864532.issue34011@psf.upfronthosting.co.za> Vinay Sajip added the comment: The code that does the copy is the original PEP 405 implementation code (from 26 May 2012). I'm fairly sure that these files were copied over only because (at least prior to the Python 3.3 release in September 2012) they were needed to be in the venv for the venv to work correctly. Python internals may have changed subsequently, making these copies unnecessary. I can't easily recreate a Python 3.3.0 on Windows to confirm this, but I'm pretty sure I only coded it to copy over what was actually needed at the time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 01:54:07 2018 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 03 Jul 2018 05:54:07 +0000 Subject: [issue34011] Default preference not given to venv DLL's In-Reply-To: <1530353263.14.0.56676864532.issue34011@psf.upfronthosting.co.za> Message-ID: <1530597247.13.0.56676864532.issue34011@psf.upfronthosting.co.za> Vinay Sajip added the comment: Hmmm. I managed to find a machine to install Python3.3.0 on, and it appears that even with that copy suite removed, the tests still work. So possibly it's something that changed between 3.3.0 alpha and 3.3.0 final. I can try removing the copy code for 3.8 but I'm not sure if any code out there is relying on the copied files being in the venv, so it may not be a good idea to backport. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 02:35:12 2018 From: report at bugs.python.org (Daiderd Jordan) Date: Tue, 03 Jul 2018 06:35:12 +0000 Subject: [issue34027] python 3.7 openpty/forkpty build failure using nix package manager macOS environment In-Reply-To: <1530567068.14.0.56676864532.issue34027@psf.upfronthosting.co.za> Message-ID: <1530599712.17.0.56676864532.issue34027@psf.upfronthosting.co.za> Daiderd Jordan added the comment: Even tho it's headers are not /usr/lib/libutil.dylib is available on every macOS system. Unlike on bsd this doesn't include the relevant symbols for openpty/forkpty, that's why I used an __APPLE__ condition but including both also works fine. Assuming it's headers are not available doesn't seem like a good assumption, even tho they won't be in most cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 03:16:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 07:16:00 +0000 Subject: [issue34022] Python 3.7: 6 tests failed on OpenSUSE and Debian In-Reply-To: <1530533915.92.0.56676864532.issue34022@psf.upfronthosting.co.za> Message-ID: <1530602160.7.0.56676864532.issue34022@psf.upfronthosting.co.za> STINNER Victor added the comment: > Yes, it must be something in the chroot, because when run in the plain command line, all tests as well on openSUSE Tumbleweed (with the latest updates). Are you testing with patches? It may be interesting to try to get these patches upstream: [ 59s] Patch #1 (Python-3.0b1-record-rpm.patch): [ 59s] Patch #2 (python-3.6.0-multilib-new.patch): [ 59s] Patch #4 (python-3.3.0b1-localpath.patch): [ 59s] Patch #6 (python-3.3.0b1-fix_date_time_compiler.patch): [ 59s] Patch #7 (python-3.3.0b1-curses-panel.patch): [ 59s] Patch #9 (python-3.3.0b1-test-posix_fadvise.patch): [ 59s] Patch #12 (python-3.3.3-skip-distutils-test_sysconfig_module.patch): [ 59s] Patch #15 (subprocess-raise-timeout.patch): [ 59s] Patch #22 (distutils-reproducible-compile.patch): Some patches seem old. Are they still needed? Where can I find these patches? I'm interested by patches modifying site.py for example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 03:29:50 2018 From: report at bugs.python.org (Matej Cepl) Date: Tue, 03 Jul 2018 07:29:50 +0000 Subject: [issue34022] Python 3.7: 6 tests failed on OpenSUSE and Debian In-Reply-To: <1530533915.92.0.56676864532.issue34022@psf.upfronthosting.co.za> Message-ID: <1530602990.96.0.56676864532.issue34022@psf.upfronthosting.co.za> Matej Cepl added the comment: > Are you testing with patches? It may be interesting to try to get these patches upstream: Tested both and without patches, the same results. Everything in openSUSE is done in open (rather strikingly similar to RH openness, although things are even more simple, because so much is web accessible), so the official project for development of openSUSE python3 is https://build.opensuse.org/package/show/devel:languages:python:Factory/python3 all patches are there (from there I can make push request to the https://build.opensuse.org/package/show/openSUSE:Factory/python3 which is where openSUSE packages come from). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 03:36:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 07:36:02 +0000 Subject: [issue34022] Python 3.7: 6 tests failed on OpenSUSE and Debian In-Reply-To: <1530533915.92.0.56676864532.issue34022@psf.upfronthosting.co.za> Message-ID: <1530603362.13.0.56676864532.issue34022@psf.upfronthosting.co.za> STINNER Victor added the comment: > Are you testing with patches? It may be interesting to try to get these patches upstream: (...) I applied manually these patches on 3.7: the 6 tests still pass. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 03:45:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 07:45:37 +0000 Subject: [issue29708] support reproducible Python builds In-Reply-To: <1488540966.18.0.904677570473.issue29708@psf.upfronthosting.co.za> Message-ID: <1530603937.26.0.56676864532.issue29708@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +7666 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 03:47:23 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 03 Jul 2018 07:47:23 +0000 Subject: [issue34027] python 3.7 openpty/forkpty build failure using nix package manager macOS environment In-Reply-To: <1530567068.14.0.56676864532.issue34027@psf.upfronthosting.co.za> Message-ID: <1530604043.18.0.56676864532.issue34027@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I agree with Ned that we shouldn't add code to deal with non-standard compiler setups, correctly supporting macOS is hard enough as it is. That said, the attached patch (but not PR8056) looks fine to me, it includes all possibly relevant headers files (as mentioned in msg320933) and that should be ok. The PR is not acceptable because it unnecessarily contains macOS specific code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 03:47:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 07:47:58 +0000 Subject: [issue34022] Python 3.7: 6 tests failed on OpenSUSE and Debian In-Reply-To: <1530533915.92.0.56676864532.issue34022@psf.upfronthosting.co.za> Message-ID: <1530604078.08.0.56676864532.issue34022@psf.upfronthosting.co.za> STINNER Victor added the comment: > Some patches seem old. Are they still needed? Where can I find these patches? I'm interested by patches modifying site.py for example. I created PR 8057 to upstream distutils-reproducible-compile.patch. Matej Cepl: Would you mind to try to find the original author of this patch file? I would like to credit them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 03:52:03 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 07:52:03 +0000 Subject: [issue29708] support reproducible Python builds In-Reply-To: <1488540966.18.0.904677570473.issue29708@psf.upfronthosting.co.za> Message-ID: <1530604323.16.0.56676864532.issue29708@psf.upfronthosting.co.za> STINNER Victor added the comment: I created PR 8057 to upstream distutils-reproducible-compile.patch from OpenSUSE (context: see bpo-34022). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 04:10:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 08:10:24 +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: <1530605424.2.0.56676864532.issue34022@psf.upfronthosting.co.za> STINNER Victor added the comment: FAIL: test_invalidation_mode (test.test_py_compile.PyCompileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.7.0/Lib/test/test_py_compile.py", line 153, in test_invalidation_mode self.assertEqual(flags, 0b1) AssertionError: 3 != 1 This failure looks suspicious. I looked at the code, and the tested function behaves differently depending of the SOURCE_DATE_EPOCH environment variable is set. Aha! I found something: $ SOURCE_DATE_EPOCH=1530605018 ./python -m test -j0 ... 6 tests failed: test_cmd_line_script test_compileall test_importlib test_multiprocessing_main_handling test_py_compile test_runpy ... ---------- title: Python 3.7: 6 tests failed on OpenSUSE and Debian -> 6 tests fail using SOURCE_DATE_EPOCH env var _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 04:11:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 08:11:08 +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: <1530605468.33.0.56676864532.issue34022@psf.upfronthosting.co.za> STINNER Victor added the comment: See bpo-29708 and PEP 552 for more info about reproducible builds. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 05:06:58 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 03 Jul 2018 09:06:58 +0000 Subject: [issue21011] PyArg_ParseTupleAndKeywords doesn't take const char *keywords[] In-Reply-To: <1395420316.16.0.247771357348.issue21011@psf.upfronthosting.co.za> Message-ID: <1530608818.15.0.56676864532.issue21011@psf.upfronthosting.co.za> INADA Naoki added the comment: I think we can't fix this until Python 4. May I close this issue as "won't fix" for now? Or can we add "Python 4" keyword to list backward incompatible changes we want to do in the future? ---------- nosy: +inada.naoki versions: +Python 3.8 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 05:10:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 09:10:33 +0000 Subject: [issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7 In-Reply-To: <1527865087.2.0.81473610881.issue33735@psf.upfronthosting.co.za> Message-ID: <1530609033.52.0.56676864532.issue33735@psf.upfronthosting.co.za> STINNER Victor added the comment: I reproduced the issue on the Gentoo Refleak buildbot and I succeeded to bisect up to a single test: test_imap_unordered(). pydev at stormageddon ~/cpython $ ./python -m test test_multiprocessing_spawn -m test.test_multiprocessing_spawn.WithProcessesTestPool.test_imap_unordered -R 3:3 Run tests sequentially 0:00:00 load avg: 1.45 [1/1] test_multiprocessing_spawn beginning 6 repetitions 123456 ...... test_multiprocessing_spawn leaked [3, 2, 1] memory blocks, sum=6 test_multiprocessing_spawn failed == Tests result: FAILURE == 1 test failed: test_multiprocessing_spawn Total duration: 6 sec 548 ms Tests result: FAILURE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 05:13:31 2018 From: report at bugs.python.org (simon) Date: Tue, 03 Jul 2018 09:13:31 +0000 Subject: [issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support Message-ID: <1530609211.5.0.56676864532.issue34028@psf.upfronthosting.co.za> New submission from simon : when compiling Python 3.7.0 setup.py is reporting that the ssl module failed to compile due to missing support for X509_VERIFY_PARAM_set1_host() despite it existing in rsa.h for all versions of OpenSSL 1.1.0. Could not build the ssl module! Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host(). LibreSSL 2.6.4 and earlier do not provide the necessary APIs, https://github.com/libressl-portable/portable/issues/381 In addition _ssl.o does actually compile. The issue appears that _ssl is appearing in "missing", "self.failed", "self.failed_on_import" setup.py 366 if any('_ssl' in l 367 for l in (missing, self.failed, self.failed_on_import)): 368 print() 369 print("Could not build the ssl module!") 370 print("Python requires an OpenSSL 1.0.2 or 1.1 compatible " 371 "libssl with X509_VERIFY_PARAM_set1_host().") 372 print("LibreSSL 2.6.4 and earlier do not provide the necessary " 373 "APIs, https://github.com/libressl-portable/portable/issues/381") 374 print() I havent had time to go through the code yet to find out where the error is gettng flagged and if its a associated with how I have compiled openssl i.e. I need a compilation flag to enabled X509_VERIFY_PARAM_set1_host() support. ---------- assignee: christian.heimes components: SSL messages: 320947 nosy: christian.heimes, simon at simonfoley.net priority: normal severity: normal status: open title: Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 05:19:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 09:19:37 +0000 Subject: [issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7 In-Reply-To: <1527865087.2.0.81473610881.issue33735@psf.upfronthosting.co.za> Message-ID: <1530609577.82.0.56676864532.issue33735@psf.upfronthosting.co.za> STINNER Victor added the comment: It doesn't look like a real leak, but more a cache which takes multiple iterations to be fully filled. pydev at stormageddon ~/cpython $ ./python -m test test_multiprocessing_spawn -m test.test_multiprocessing_spawn.WithProcessesTestPool.test_imap_unordered -R 1:30 WARNING: Running tests with --huntrleaks/-R and less than 3 warmup repetitions can give false positives! Run tests sequentially 0:00:00 load avg: 0.88 [1/1] test_multiprocessing_spawn beginning 31 repetitions 1234567890123456789012345678901 ............................... test_multiprocessing_spawn leaked [4, 5, 1, 5, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] memory blocks, sum=18 test_multiprocessing_spawn failed in 42 sec 470 ms == Tests result: FAILURE == 1 test failed: test_multiprocessing_spawn Total duration: 42 sec 490 ms Tests result: FAILURE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 05:20:25 2018 From: report at bugs.python.org (Ryan) Date: Tue, 03 Jul 2018 09:20:25 +0000 Subject: [issue34029] tkinter.filedialog.askdirectory() crashing before dialog opens Message-ID: <1530609625.32.0.56676864532.issue34029@psf.upfronthosting.co.za> New submission from Ryan : I'm creating a GUI application that needs to give the user the option to change a folder that's used for saving data. I managed to track it down to the import of pywinauto to the application. All other filedialogs seem to work, it's only askdirectory that's having issues. I've attached a small file that shows the crash - if you comment out the pywinauto import, no crash occurs. ---------- components: Tkinter messages: 320949 nosy: gpolo, rsteel1 priority: normal severity: normal status: open title: tkinter.filedialog.askdirectory() crashing before dialog opens type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 05:20:43 2018 From: report at bugs.python.org (Ryan) Date: Tue, 03 Jul 2018 09:20:43 +0000 Subject: [issue34029] tkinter.filedialog.askdirectory() crashing before dialog opens In-Reply-To: <1530609625.32.0.56676864532.issue34029@psf.upfronthosting.co.za> Message-ID: <1530609643.98.0.56676864532.issue34029@psf.upfronthosting.co.za> Change by Ryan : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 05:21:19 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 09:21:19 +0000 Subject: [issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7 In-Reply-To: <1527865087.2.0.81473610881.issue33735@psf.upfronthosting.co.za> Message-ID: <1530609679.21.0.56676864532.issue33735@psf.upfronthosting.co.za> STINNER Victor added the comment: > test_multiprocessing_spawn leaked [4, 5, 1, 5, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] memory blocks, sum=18 Sorry, I forgot to mention that I modified libregrtest to get this output: diff --git a/Lib/test/libregrtest/refleak.py b/Lib/test/libregrtest/refleak.py index 6724488fcf..a3c50e21e0 100644 --- a/Lib/test/libregrtest/refleak.py +++ b/Lib/test/libregrtest/refleak.py @@ -101,7 +101,7 @@ def dash_R(the_module, test, indirect_test, huntrleaks): failed = False for deltas, item_name, checker in [ (rc_deltas, 'references', check_rc_deltas), - (alloc_deltas, 'memory blocks', check_rc_deltas), + (alloc_deltas, 'memory blocks', check_fd_deltas), (fd_deltas, 'file descriptors', check_fd_deltas) ]: # ignore warmup runs ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 05:21:41 2018 From: report at bugs.python.org (Ryan) Date: Tue, 03 Jul 2018 09:21:41 +0000 Subject: [issue34029] tkinter.filedialog.askdirectory() crashing before dialog opens when importing pywinauto In-Reply-To: <1530609625.32.0.56676864532.issue34029@psf.upfronthosting.co.za> Message-ID: <1530609701.6.0.56676864532.issue34029@psf.upfronthosting.co.za> Change by Ryan : ---------- title: tkinter.filedialog.askdirectory() crashing before dialog opens -> tkinter.filedialog.askdirectory() crashing before dialog opens when importing pywinauto _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 05:29:39 2018 From: report at bugs.python.org (Matej Cepl) Date: Tue, 03 Jul 2018 09:29:39 +0000 Subject: [issue29708] support reproducible Python builds In-Reply-To: <1488540966.18.0.904677570473.issue29708@psf.upfronthosting.co.za> Message-ID: <1530610179.66.0.56676864532.issue29708@psf.upfronthosting.co.za> Change by Matej Cepl : ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 05:30:39 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 03 Jul 2018 09:30:39 +0000 Subject: [issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support In-Reply-To: <1530609211.5.0.56676864532.issue34028@psf.upfronthosting.co.za> Message-ID: <1530610239.88.0.56676864532.issue34028@psf.upfronthosting.co.za> Christian Heimes added the comment: The function definition should be in openssl/x509_vfy.h, not rsa.h. What's the output of configure on your system? You should see something like ./configure ... checking for pkg-config... /usr/bin/pkg-config checking whether compiling and linking against OpenSSL works... yes checking for X509_VERIFY_PARAM_set1_host in libssl... yes checking for --with-ssl-default-suites... python ... What's your platform and openssl version? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 05:45:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Jul 2018 09:45:24 +0000 Subject: [issue21011] PyArg_ParseTupleAndKeywords doesn't take const char *keywords[] In-Reply-To: <1395420316.16.0.247771357348.issue21011@psf.upfronthosting.co.za> Message-ID: <1530611124.09.0.56676864532.issue21011@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: We can't change this API because this would break virtually all user code. But we can introduce a macro like PY_SSIZE_T_CLEAN. If it is defined before including Python.h, PyArg_ParseTupleAndKeywords() will take an array of const strings. This will help for compatibility with C++. ---------- nosy: +serhiy.storchaka type: resource usage -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 05:56:05 2018 From: report at bugs.python.org (Ryan) Date: Tue, 03 Jul 2018 09:56:05 +0000 Subject: [issue34029] tkinter.filedialog.askdirectory() crashing before dialog opens when importing pywinauto In-Reply-To: <1530609625.32.0.56676864532.issue34029@psf.upfronthosting.co.za> Message-ID: <1530611765.58.0.56676864532.issue34029@psf.upfronthosting.co.za> Change by Ryan : Added file: https://bugs.python.org/file47667/minimal_file.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 06:16:42 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 03 Jul 2018 10:16:42 +0000 Subject: [issue33418] Memory leaks in functions In-Reply-To: <1525370063.61.0.682650639539.issue33418@psf.upfronthosting.co.za> Message-ID: <1530613002.78.0.56676864532.issue33418@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- keywords: +patch pull_requests: +7667 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 06:19:55 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 03 Jul 2018 10:19:55 +0000 Subject: [issue33418] Memory leaks in functions In-Reply-To: <1525370063.61.0.682650639539.issue33418@psf.upfronthosting.co.za> Message-ID: <1530613195.92.0.56676864532.issue33418@psf.upfronthosting.co.za> INADA Naoki added the comment: I'm not sure this should be backported to 3.6 and 2.7. While this is a obvious bug, f.__module__ = f seems very unnatural. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 06:23:35 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 03 Jul 2018 10:23:35 +0000 Subject: [issue33418] Memory leaks in functions In-Reply-To: <1525370063.61.0.682650639539.issue33418@psf.upfronthosting.co.za> Message-ID: <1530613415.31.0.56676864532.issue33418@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > While this is a obvious bug, f.__module__ = f seems very unnatural. Sure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 06:43:01 2018 From: report at bugs.python.org (simon) Date: Tue, 03 Jul 2018 10:43:01 +0000 Subject: [issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support In-Reply-To: <1530609211.5.0.56676864532.issue34028@psf.upfronthosting.co.za> Message-ID: <1530614581.28.0.56676864532.issue34028@psf.upfronthosting.co.za> simon added the comment: Apologies, my bad you are correct the function was defined in x509_vfy.h Im compiling on RHEL Red Hat Enterprise Linux Server release 7.5 (Maipo) I have tried Openssl from source versions; openssl-1.0.2o (this releaseis a mess and the folder structure has been altered) openssl-1.1.0h openssl-1.1.0 I havce tried Python-3.7.0 Python-3.6.3 checking for pkg-config... /usr/bin/pkg-config checking for openssl/ssl.h in /usr/local/ssl... no checking for openssl/ssl.h in /usr/lib/ssl... no checking for openssl/ssl.h in /usr/ssl... no checking for openssl/ssl.h in /usr/pkg... no checking for openssl/ssl.h in /usr/local... no checking for openssl/ssl.h in /usr... no checking whether compiling and linking against OpenSSL works... no checking for --with-ssl-default-suites... python My details of Setup are; SSL=/home/{my_home_folder}/openssl _ssl _ssl.c \ -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ -L$(SSL) -lssl -lcrypto I now spot that the Linker is having issues (-L) libssl.so & cyypt.so is in /home/{my_home_folder}/openssl all the header files are in; =/home/{my_home_folder}/openssl/include/openssl including opensslconf.h however not of the declarations have been commented out including any of the DEPRECATEDIN_1_0_0 etc etc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 06:49:11 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 03 Jul 2018 10:49:11 +0000 Subject: [issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7 In-Reply-To: <1527865087.2.0.81473610881.issue33735@psf.upfronthosting.co.za> Message-ID: <1530614951.28.0.56676864532.issue33735@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: It failed for the first time on Ubuntu and then was successful for all the rest of 5-6 runs. I don't know why for the failure run it has load avg as 0.00 and how to get to this stage. # Shell session ? cpython git:(master) uname -a Linux ubuntu-s-1vcpu-1gb-blr1-01 4.4.0-127-generic #153-Ubuntu SMP Sat May 19 10:58:46 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux ? cpython git:(master) ./python Python 3.8.0a0 (heads/master:d824ca7, Jul 3 2018, 06:50:05) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> exit() ? cpython git:(master) ./python -m test test_multiprocessing_spawn -m test.test_multiprocessing_spawn.WithProcessesTestPool.test_imap_unordered -R 3:3 Run tests sequentially 0:00:00 load avg: 0.00 [1/1] test_multiprocessing_spawn beginning 6 repetitions 123456 ...... test_multiprocessing_spawn leaked [2, 2, 1] memory blocks, sum=5 test_multiprocessing_spawn failed == Tests result: FAILURE == 1 test failed: test_multiprocessing_spawn Total duration: 9 sec 221 ms Tests result: FAILURE ? cpython git:(master) ./python -m test test_multiprocessing_spawn -m test.test_multiprocessing_spawn.WithProcessesTestPool.test_imap_unordered -R 3:3 Run tests sequentially 0:00:00 load avg: 0.34 [1/1] test_multiprocessing_spawn beginning 6 repetitions 123456 ...... == Tests result: SUCCESS == 1 test OK. Total duration: 8 sec 822 ms Tests result: SUCCESS ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 06:51:05 2018 From: report at bugs.python.org (Gabriele Tornetta) Date: Tue, 03 Jul 2018 10:51:05 +0000 Subject: [issue34030] easy_install from Python 3.7 (Win64) cannot install modules Message-ID: <1530615065.91.0.56676864532.issue34030@psf.upfronthosting.co.za> New submission from Gabriele Tornetta : When trying to install a module (pycrypto in this case), easy_install fails with the following error (run via Git Bash) $ easy_install pycrypto-2.6.win-amd64-py3.3.exe Processing pycrypto-2.6.win-amd64-py3.3.exe error: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\\\AppData\\Local\\Temp\\easy_install-z4dfyyqo\\pycrypto-2.6-py3.7-win32.egg.tmp\\Crypto\\Cipher\\__pycache__\\AES.cpython-33.pyc' The version of easy_install that ships with Python 3.6 works as expected. ---------- components: Demos and Tools messages: 320957 nosy: Gabriele Tornetta priority: normal severity: normal status: open title: easy_install from Python 3.7 (Win64) cannot install modules type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 07:06:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 11:06:18 +0000 Subject: [issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7 In-Reply-To: <1527865087.2.0.81473610881.issue33735@psf.upfronthosting.co.za> Message-ID: <1530615978.45.0.56676864532.issue33735@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +7668 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 07:15:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 11:15:42 +0000 Subject: [issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7 In-Reply-To: <1527865087.2.0.81473610881.issue33735@psf.upfronthosting.co.za> Message-ID: <1530616542.91.0.56676864532.issue33735@psf.upfronthosting.co.za> STINNER Victor added the comment: > It failed for the first time on Ubuntu and then was successful for all the rest of 5-6 runs. The bug is random. But the problem is that sometimes, it fails. It must never fail, otherwise the buildbot fails randomly. The Gentoo Refleak buildbot runs multiple tests in parallel and so its system load is high, tests are run slower, making the failure more likely. Anyway, I have a fix! PR 8059. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 07:16:16 2018 From: report at bugs.python.org (Michael -O) Date: Tue, 03 Jul 2018 11:16:16 +0000 Subject: [issue30183] [HPUX] compilation error in pytime.c with cc compiler In-Reply-To: <1493267090.1.0.00115311377195.issue30183@psf.upfronthosting.co.za> Message-ID: <1530616576.93.0.56676864532.issue30183@psf.upfronthosting.co.za> Michael -O <1983-01-06 at gmx.net> added the comment: I have applied the patch to 3.6.6 from the source tarball and I was able to proceed with the compilation. I would take the failed tests as blocker. Try to solve them later. Can this be closed? ---------- nosy: +Michael -O _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 07:18:14 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 03 Jul 2018 11:18:14 +0000 Subject: [issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support In-Reply-To: <1530609211.5.0.56676864532.issue34028@psf.upfronthosting.co.za> Message-ID: <1530616694.51.0.56676864532.issue34028@psf.upfronthosting.co.za> Christian Heimes added the comment: configure is not able to find OpenSSL. You either have to configure Python to pick up your OpenSSL (./configure --with-openssl=/path/to/openssl) or install the OpenSSL developer packages. RHEL 7.5 comes with OpenSSL 1.0.2, so you are good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 07:18:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 11:18:52 +0000 Subject: [issue30183] [HPUX] compilation error in pytime.c with cc compiler In-Reply-To: <1493267090.1.0.00115311377195.issue30183@psf.upfronthosting.co.za> Message-ID: <1530616732.5.0.56676864532.issue30183@psf.upfronthosting.co.za> STINNER Victor added the comment: Yes, I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 07:20:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 11:20:38 +0000 Subject: [issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7 In-Reply-To: <1527865087.2.0.81473610881.issue33735@psf.upfronthosting.co.za> Message-ID: <1530616838.36.0.56676864532.issue33735@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 23401fb960bb94e6ea62d2999527968d53d3fc65 by Victor Stinner in branch 'master': bpo-33735: Fix test_multiprocessing random failure (GH-8059) https://github.com/python/cpython/commit/23401fb960bb94e6ea62d2999527968d53d3fc65 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 07:21:57 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Jul 2018 11:21:57 +0000 Subject: [issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7 In-Reply-To: <1527865087.2.0.81473610881.issue33735@psf.upfronthosting.co.za> Message-ID: <1530616917.93.0.56676864532.issue33735@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7669 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 07:23:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 11:23:24 +0000 Subject: [issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7 In-Reply-To: <1527865087.2.0.81473610881.issue33735@psf.upfronthosting.co.za> Message-ID: <1530617004.17.0.56676864532.issue33735@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +7670 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 07:23:47 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Jul 2018 11:23:47 +0000 Subject: [issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7 In-Reply-To: <1527865087.2.0.81473610881.issue33735@psf.upfronthosting.co.za> Message-ID: <1530617027.93.0.56676864532.issue33735@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7671 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 07:23:54 2018 From: report at bugs.python.org (Ryan) Date: Tue, 03 Jul 2018 11:23:54 +0000 Subject: [issue34029] tkinter.filedialog.askdirectory() crashing before dialog opens when importing pywinauto In-Reply-To: <1530609625.32.0.56676864532.issue34029@psf.upfronthosting.co.za> Message-ID: <1530617034.15.0.56676864532.issue34029@psf.upfronthosting.co.za> Ryan added the comment: It seems reinstalling pywinauto has fixed this issue for now - I have no idea what could have caused it in the first place though. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 07:25:24 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 03 Jul 2018 11:25:24 +0000 Subject: [issue34010] tarfile stream read performance In-Reply-To: <1530350820.63.0.56676864532.issue34010@psf.upfronthosting.co.za> Message-ID: <1530617124.25.0.56676864532.issue34010@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 07:30:11 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 03 Jul 2018 11:30:11 +0000 Subject: [issue34019] webbrowser: wrong arguments for Opera browser. In-Reply-To: <1530525080.65.0.56676864532.issue34019@psf.upfronthosting.co.za> Message-ID: <1530617411.53.0.56676864532.issue34019@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New changeset 3cf1f154edb88c108877729ea09f4ac174697fea by Pablo Galindo (Bumsik Kim) in branch 'master': bpo-34019: Fix wrong arguments for Opera Browser (#8047) https://github.com/python/cpython/commit/3cf1f154edb88c108877729ea09f4ac174697fea ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 07:34:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 11:34:44 +0000 Subject: [issue33984] test_multiprocessing_forkserver leaked [1, 2, 1] memory blocks on x86 Gentoo Refleaks 3.x In-Reply-To: <1530139497.53.0.56676864532.issue33984@psf.upfronthosting.co.za> Message-ID: <1530617684.83.0.56676864532.issue33984@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh. I have a very good news: this issue is a duplicate of bpo-33735 and I just identified and fixed bpo-33735! ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 07:38:58 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Jul 2018 11:38:58 +0000 Subject: [issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7 In-Reply-To: <1527865087.2.0.81473610881.issue33735@psf.upfronthosting.co.za> Message-ID: <1530617938.56.0.56676864532.issue33735@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 42b2f84a85fe3334c5d8098cf76dfa727b348c4f by Miss Islington (bot) in branch '3.7': bpo-33735: Fix test_multiprocessing random failure (GH-8059) https://github.com/python/cpython/commit/42b2f84a85fe3334c5d8098cf76dfa727b348c4f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 07:40:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 11:40:06 +0000 Subject: [issue33984] test_multiprocessing_forkserver leaked [1, 2, 1] memory blocks on x86 Gentoo Refleaks 3.x In-Reply-To: <1530139497.53.0.56676864532.issue33984@psf.upfronthosting.co.za> Message-ID: <1530618006.91.0.56676864532.issue33984@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum. Sadly my commit 23401fb960bb94e6ea62d2999527968d53d3fc65 is not enough, the test still fails randomly: pydev at stormageddon ~/cpython $ ./python -m test test_multiprocessing_forkserver -m test_imap_unordered -R 3:3 -F Run tests sequentially 0:00:00 load avg: 5.79 [ 1] test_multiprocessing_forkserver beginning 6 repetitions 123456 ...... 0:00:28 load avg: 6.98 [ 2] test_multiprocessing_forkserver beginning 6 repetitions 123456 ...... 0:00:59 load avg: 7.69 [ 3] test_multiprocessing_forkserver -- test_multiprocessing_forkserver passed in 30 sec 717 ms beginning 6 repetitions 123456 ...... 0:01:28 load avg: 8.63 [ 4] test_multiprocessing_forkserver beginning 6 repetitions 123456 ...... test_multiprocessing_forkserver leaked [2, 1, 1] memory blocks, sum=4 test_multiprocessing_forkserver failed == Tests result: FAILURE == 3 tests OK. 1 test failed: test_multiprocessing_forkserver Total duration: 1 min 55 sec Tests result: FAILURE The test failed when the system load was high (8.63). I hope that in pratice, my change will be enough to get less random failures. The "Re-run in verbose mode" on the "idle" buildbot should make the bug disappear. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 07:41:15 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Jul 2018 11:41:15 +0000 Subject: [issue34019] webbrowser: wrong arguments for Opera browser. In-Reply-To: <1530525080.65.0.56676864532.issue34019@psf.upfronthosting.co.za> Message-ID: <1530618075.28.0.56676864532.issue34019@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7672 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 07:42:05 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Jul 2018 11:42:05 +0000 Subject: [issue34019] webbrowser: wrong arguments for Opera browser. In-Reply-To: <1530525080.65.0.56676864532.issue34019@psf.upfronthosting.co.za> Message-ID: <1530618125.44.0.56676864532.issue34019@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7673 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 07:43:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 11:43:27 +0000 Subject: [issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7 In-Reply-To: <1527865087.2.0.81473610881.issue33735@psf.upfronthosting.co.za> Message-ID: <1530618207.29.0.56676864532.issue33735@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 53fafafa340e292a1c9e4aacf5860999613c2b36 by Victor Stinner in branch '2.7': bpo-33735: Fix test_multiprocessing random failure (GH-8059) (GH-8061) https://github.com/python/cpython/commit/53fafafa340e292a1c9e4aacf5860999613c2b36 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 07:49:45 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 03 Jul 2018 11:49:45 +0000 Subject: [issue34018] SQLite converters are documented to be sensitive to the case of type names, but they're not In-Reply-To: <1530519833.89.0.56676864532.issue34018@psf.upfronthosting.co.za> Message-ID: <1530618585.32.0.56676864532.issue34018@psf.upfronthosting.co.za> Tal Einat added the comment: It's worth noting that the referenced commit where this change was made is from 2006... ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 07:51:03 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Jul 2018 11:51:03 +0000 Subject: [issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7 In-Reply-To: <1527865087.2.0.81473610881.issue33735@psf.upfronthosting.co.za> Message-ID: <1530618663.47.0.56676864532.issue33735@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 3bd9d3b934eb8b27553f19a7ab1c97f95745c68f by Miss Islington (bot) in branch '3.6': bpo-33735: Fix test_multiprocessing random failure (GH-8059) https://github.com/python/cpython/commit/3bd9d3b934eb8b27553f19a7ab1c97f95745c68f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 07:57:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 11:57:01 +0000 Subject: [issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7 In-Reply-To: <1527865087.2.0.81473610881.issue33735@psf.upfronthosting.co.za> Message-ID: <1530619021.39.0.56676864532.issue33735@psf.upfronthosting.co.za> STINNER Victor added the comment: bpo-33984 has been marked as a duplicate of this issue: "test_multiprocessing_forkserver leaked [1, 2, 1] memory blocks on x86 Gentoo Refleaks 3.x". Sadly, my commit 23401fb960bb94e6ea62d2999527968d53d3fc65 is not perfect, the test still fails when the system load is high: https://bugs.python.org/issue33984#msg320967 But since tests are re-run sequentially, I hope that it will be fine. I close the issue. I will reopen it if the bug reoccurs. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 07:59:34 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 03 Jul 2018 11:59:34 +0000 Subject: [issue34018] SQLite converters are documented to be sensitive to the case of type names, but they're not In-Reply-To: <1530519833.89.0.56676864532.issue34018@psf.upfronthosting.co.za> Message-ID: <1530619174.74.0.56676864532.issue34018@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset 831c29721dcb1b768c6315a4b8a4059c4c97ee8b by Tal Einat (Sergey Fedoseev) in branch 'master': bpo-34018: Doc'd that type names of SQLite converters are case-insensitive. (GH-8042) https://github.com/python/cpython/commit/831c29721dcb1b768c6315a4b8a4059c4c97ee8b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 08:00:44 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Jul 2018 12:00:44 +0000 Subject: [issue34018] SQLite converters are documented to be sensitive to the case of type names, but they're not In-Reply-To: <1530519833.89.0.56676864532.issue34018@psf.upfronthosting.co.za> Message-ID: <1530619244.25.0.56676864532.issue34018@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7674 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 08:01:45 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Jul 2018 12:01:45 +0000 Subject: [issue34018] SQLite converters are documented to be sensitive to the case of type names, but they're not In-Reply-To: <1530519833.89.0.56676864532.issue34018@psf.upfronthosting.co.za> Message-ID: <1530619305.95.0.56676864532.issue34018@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7675 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 08:02:10 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 03 Jul 2018 12:02:10 +0000 Subject: [issue34018] SQLite converters are documented to be sensitive to the case of type names, but they're not In-Reply-To: <1530519833.89.0.56676864532.issue34018@psf.upfronthosting.co.za> Message-ID: <1530619330.34.0.56676864532.issue34018@psf.upfronthosting.co.za> Tal Einat added the comment: I tested and indeed this is case-insensitive even on 2.7. ---------- versions: +Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 08:02:42 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Jul 2018 12:02:42 +0000 Subject: [issue34018] SQLite converters are documented to be sensitive to the case of type names, but they're not In-Reply-To: <1530519833.89.0.56676864532.issue34018@psf.upfronthosting.co.za> Message-ID: <1530619362.5.0.56676864532.issue34018@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7676 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 08:16:59 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Jul 2018 12:16:59 +0000 Subject: [issue34019] webbrowser: wrong arguments for Opera browser. In-Reply-To: <1530525080.65.0.56676864532.issue34019@psf.upfronthosting.co.za> Message-ID: <1530620219.13.0.56676864532.issue34019@psf.upfronthosting.co.za> miss-islington added the comment: New changeset dd5f43a023f25e8aea8c9297b5297d76668d64e1 by Miss Islington (bot) in branch '3.6': bpo-34019: Fix wrong arguments for Opera Browser (GH-8047) https://github.com/python/cpython/commit/dd5f43a023f25e8aea8c9297b5297d76668d64e1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 08:35:20 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 03 Jul 2018 12:35:20 +0000 Subject: [issue34031] Incorrect usage of unittest.TestCase in test_urllib2_localnet Message-ID: <1530621320.5.0.56676864532.issue34031@psf.upfronthosting.co.za> New submission from Pablo Galindo Salgado : In /Lib/test/test_urllib2_localnet.py there is an incorrect usage of unittest.TestCase (an extra comma makes it use two arguments instead of one): class BasicAuthTests(unittest.TestCase): ... def test_basic_auth_success(self): ... try: self.assertTrue(urllib.request.urlopen(self.server_url)) except urllib.error.HTTPError: self.fail("Basic auth failed for the url: %s", self.server_url) here self.fail takes two argument, but it only admits one. This produces this traceback if there are proxy issues when running the tests: Traceback (most recent call last): File "/home7/pablogsal/Python-3.7.0/Lib/test/test_urllib2_localnet.py", line 307, in test_basic_auth_success self.assertTrue(urllib.request.urlopen(self.server_url)) File "/home/pablogsal/Python-3.7.0/Lib/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/home/pablogsal/Python-3.7.0/Lib/urllib/request.py", line 531, in open response = meth(req, response) File "/home/pablogsal/Python-3.7.0/Lib/urllib/request.py", line 641, in http_response 'http', request, response, code, msg, hdrs) File "/home/pablogsal/Python-3.7.0/Lib/urllib/request.py", line 569, in error return self._call_chain(*args) File "/home/pablogsal/Python-3.7.0/Lib/urllib/request.py", line 503, in _call_chain result = func(*args) File "/home/pablogsal/Python-3.7.0/Lib/urllib/request.py", line 649, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 403: Forbidden During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/pablogsal/Python-3.7.0/Lib/test/test_urllib2_localnet.py", line 309, in test_basic_auth_success self.fail("Basic auth failed for the url: %s", self.server_url) TypeError: fail() takes from 1 to 2 positional arguments but 3 were given ---------------------------------------------------------------------- ---------- assignee: pablogsal components: Tests messages: 320975 nosy: pablogsal priority: normal severity: normal status: open title: Incorrect usage of unittest.TestCase in test_urllib2_localnet 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 Jul 3 08:35:49 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 03 Jul 2018 12:35:49 +0000 Subject: [issue34031] Incorrect usage of unittest.TestCase in test_urllib2_localnet In-Reply-To: <1530621320.5.0.56676864532.issue34031@psf.upfronthosting.co.za> Message-ID: <1530621349.65.0.56676864532.issue34031@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: In /Lib/test/test_urllib2_localnet.py there is an incorrect usage of unittest.TestCase.fail (an extra comma makes it use two arguments instead of one): class BasicAuthTests(unittest.TestCase): ... def test_basic_auth_success(self): ... try: self.assertTrue(urllib.request.urlopen(self.server_url)) except urllib.error.HTTPError: self.fail("Basic auth failed for the url: %s", self.server_url) here self.fail takes two argument, but it only admits one. This produces this traceback if there are proxy issues when running the tests: Traceback (most recent call last): File "/home7/pablogsal/Python-3.7.0/Lib/test/test_urllib2_localnet.py", line 307, in test_basic_auth_success self.assertTrue(urllib.request.urlopen(self.server_url)) File "/home/pablogsal/Python-3.7.0/Lib/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/home/pablogsal/Python-3.7.0/Lib/urllib/request.py", line 531, in open response = meth(req, response) File "/home/pablogsal/Python-3.7.0/Lib/urllib/request.py", line 641, in http_response 'http', request, response, code, msg, hdrs) File "/home/pablogsal/Python-3.7.0/Lib/urllib/request.py", line 569, in error return self._call_chain(*args) File "/home/pablogsal/Python-3.7.0/Lib/urllib/request.py", line 503, in _call_chain result = func(*args) File "/home/pablogsal/Python-3.7.0/Lib/urllib/request.py", line 649, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 403: Forbidden During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/pablogsal/Python-3.7.0/Lib/test/test_urllib2_localnet.py", line 309, in test_basic_auth_success self.fail("Basic auth failed for the url: %s", self.server_url) TypeError: fail() takes from 1 to 2 positional arguments but 3 were given ---------------------------------------------------------------------- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 08:35:53 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 03 Jul 2018 12:35:53 +0000 Subject: [issue34031] Incorrect usage of unittest.TestCase in test_urllib2_localnet In-Reply-To: <1530621349.65.0.56676864532.issue34031@psf.upfronthosting.co.za> Message-ID: <1530621353.24.0.56676864532.issue34031@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- Removed message: https://bugs.python.org/msg320975 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 08:37:19 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 03 Jul 2018 12:37:19 +0000 Subject: [issue34018] SQLite converters are documented to be sensitive to the case of type names, but they're not In-Reply-To: <1530519833.89.0.56676864532.issue34018@psf.upfronthosting.co.za> Message-ID: <1530621439.22.0.56676864532.issue34018@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset 6699386231d326c50439b9e1df752e1aed7ca6b4 by Tal Einat (Miss Islington (bot)) in branch '3.7': bpo-34018: Doc'd that type names of SQLite converters are case-insensitive. (GH-8042) (GH-8065) https://github.com/python/cpython/commit/6699386231d326c50439b9e1df752e1aed7ca6b4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 08:37:29 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 03 Jul 2018 12:37:29 +0000 Subject: [issue34018] SQLite converters are documented to be sensitive to the case of type names, but they're not In-Reply-To: <1530519833.89.0.56676864532.issue34018@psf.upfronthosting.co.za> Message-ID: <1530621449.24.0.56676864532.issue34018@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset f55a818954212e8e6c97e3d66cf1478120a3220f by Tal Einat (Miss Islington (bot)) in branch '3.6': bpo-34018: Doc'd that type names of SQLite converters are case-insensitive. (GH-8042) (GH-8067) https://github.com/python/cpython/commit/f55a818954212e8e6c97e3d66cf1478120a3220f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 08:37:38 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 03 Jul 2018 12:37:38 +0000 Subject: [issue34018] SQLite converters are documented to be sensitive to the case of type names, but they're not In-Reply-To: <1530519833.89.0.56676864532.issue34018@psf.upfronthosting.co.za> Message-ID: <1530621458.52.0.56676864532.issue34018@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset 292ce153fcc2d991164d19ad3f3deb86157898d5 by Tal Einat (Miss Islington (bot)) in branch '2.7': bpo-34018: Doc'd that type names of SQLite converters are case-insensitive. (GH-8042) (GH-8066) https://github.com/python/cpython/commit/292ce153fcc2d991164d19ad3f3deb86157898d5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 08:38:11 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 03 Jul 2018 12:38:11 +0000 Subject: [issue34018] SQLite converters are documented to be sensitive to the case of type names, but they're not In-Reply-To: <1530519833.89.0.56676864532.issue34018@psf.upfronthosting.co.za> Message-ID: <1530621491.98.0.56676864532.issue34018@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 Tue Jul 3 09:12:34 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 03 Jul 2018 13:12:34 +0000 Subject: [issue24085] large memory overhead when pyc is recompiled In-Reply-To: <1430420344.67.0.572478851339.issue24085@psf.upfronthosting.co.za> Message-ID: <1530623554.0.0.56676864532.issue24085@psf.upfronthosting.co.za> INADA Naoki added the comment: In case repro2, unreturned memory is in glibc malloc. jemalloc mitigates this issue. There are some fragmentation in pymalloc, but I think it's acceptable level. $ python3 -B repro2.py ready 1079124 VmHWM: 1079124 kB VmRSS: 83588 kB $ LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1 python3 -B repro2.py ready 1108424 VmHWM: 1108424 kB VmRSS: 28140 kB ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 09:26:01 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 03 Jul 2018 13:26:01 +0000 Subject: [issue24085] large memory overhead when pyc is recompiled In-Reply-To: <1430420344.67.0.572478851339.issue24085@psf.upfronthosting.co.za> Message-ID: <1530624361.95.0.56676864532.issue24085@psf.upfronthosting.co.za> INADA Naoki added the comment: since anon_city_hoods has massive constants, compiler_add_const makes dict larger and larger. It creates many large tuples too. I suspect it makes glibc malloc unhappy. Maybe, we can improve pymalloc for medium and large objects, by porting strategy from jemalloc. It can be good GSoC project. But I suggest close this issue as "won't fix" for now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 09:28:00 2018 From: report at bugs.python.org (Ryan) Date: Tue, 03 Jul 2018 13:28:00 +0000 Subject: [issue34029] tkinter.filedialog.askdirectory() crashing before dialog opens when importing pywinauto In-Reply-To: <1530609625.32.0.56676864532.issue34029@psf.upfronthosting.co.za> Message-ID: <1530624480.18.0.56676864532.issue34029@psf.upfronthosting.co.za> Ryan added the comment: Okay so I'm an idiot and forgot that I'd commented out the pywinauto import in one of my project files, which is how I found out that was the issue in the first place. Crash is still occurring after a pywinauto reinstall. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 09:43:43 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 03 Jul 2018 13:43:43 +0000 Subject: [issue34030] easy_install from Python 3.7 (Win64) cannot install modules In-Reply-To: <1530615065.91.0.56676864532.issue34030@psf.upfronthosting.co.za> Message-ID: <1530625423.93.0.56676864532.issue34030@psf.upfronthosting.co.za> Ned Deily added the comment: easy_install is part of the setuptools project and issues with it are handled here: https://github.com/pypa/setuptools/issues https://pypi.org/project/setuptools/ ---------- nosy: +ned.deily resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 10:32:33 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 03 Jul 2018 14:32:33 +0000 Subject: [issue34031] [EASY] Incorrect usage of unittest.TestCase in test_urllib2_localnet In-Reply-To: <1530621349.65.0.56676864532.issue34031@psf.upfronthosting.co.za> Message-ID: <1530628353.02.0.56676864532.issue34031@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- keywords: +easy title: Incorrect usage of unittest.TestCase in test_urllib2_localnet -> [EASY] Incorrect usage of unittest.TestCase in test_urllib2_localnet _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 10:41:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Jul 2018 14:41:22 +0000 Subject: [issue24085] large memory overhead when pyc is recompiled In-Reply-To: <1430420344.67.0.572478851339.issue24085@psf.upfronthosting.co.za> Message-ID: <1530628882.94.0.56676864532.issue24085@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: VmRSS for different versions: malloc jmalloc 2.7: 237316 kB 90524 kB 3.4: 53888 kB 14768 kB 3.5: 51396 kB 14908 kB 3.6: 90692 kB 31776 kB 3.7: 130952 kB 28296 kB 3.8: 130284 kB 27644 kB ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 11:00:40 2018 From: report at bugs.python.org (Matej Cepl) Date: Tue, 03 Jul 2018 15:00:40 +0000 Subject: [issue34032] Add platlibdir to allow distinction between /usr/lib and /usr/lib64 for Linux Message-ID: <1530630040.09.0.56676864532.issue34032@psf.upfronthosting.co.za> New submission from Matej Cepl : Many Linux distribution (most of them) distinguish between library directory /usr/lib for noarch or 32bit libraries and /usr/lib64. This patch (originally from openSUSE) enables to capture this distinction. ---------- components: Build files: python-3.6.0-multilib-new.patch keywords: patch messages: 320985 nosy: mcepl, vstinner priority: normal severity: normal status: open title: Add platlibdir to allow distinction between /usr/lib and /usr/lib64 for Linux versions: Python 3.8 Added file: https://bugs.python.org/file47668/python-3.6.0-multilib-new.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 11:15:22 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Jul 2018 15:15:22 +0000 Subject: [issue34015] doc Add link to Descriptor HowTo Guide in Data Model In-Reply-To: <1530408862.0.0.56676864532.issue34015@psf.upfronthosting.co.za> Message-ID: <1530630922.83.0.56676864532.issue34015@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I don't want to do this. The docs are the authoritative source and the how-to is a secondary source that is primarily about how particular descriptors are implemented. ---------- nosy: +rhettinger resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 11:36:31 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 15:36:31 +0000 Subject: [issue33996] Crash in gen_send_ex(): _PyErr_GetTopmostException() returns freed memory In-Reply-To: <1530275751.35.0.56676864532.issue33996@psf.upfronthosting.co.za> Message-ID: <1530632191.64.0.56676864532.issue33996@psf.upfronthosting.co.za> STINNER Victor added the comment: It's not a bug in Python but in greenlet: * greenlet bug: https://github.com/python-greenlet/greenlet/issues/131 * my greenlet fix: https://github.com/python-greenlet/greenlet/pull/132 * Red Hat bug: https://bugzilla.redhat.com/show_bug.cgi?id=1594248 ---------- priority: release blocker -> resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 11:46:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 15:46:25 +0000 Subject: [issue34033] distutils is not reproducible Message-ID: <1530632785.81.0.56676864532.issue34033@psf.upfronthosting.co.za> New submission from STINNER Victor : Follow up of bpo-29708: OpenSUSE uses a downstream patch for distutils to fix https://bugzilla.opensuse.org/show_bug.cgi?id=1049186: distutils-reproducible-compile.patch. I converted the patch as a PR: PR 8057. Naoki INADA wrote: """ Currently, marshal uses refcnt to determine using w_ref or not. Some immutable objects (especially, long and str) can be cached and reused. It may affects refcnt when byte compiling. I think we should use more deterministic way instead of refcnt. Maybe, count all constants in the module before marshal, like we did in compiling function for co_consts and co_names. As a bonus, it may reduce resource usage too by merging constants over functions. (e.g. ('self',) co_varnames and (None,) co_consts) """ https://github.com/python/cpython/pull/8057#issuecomment-402065657 Serhiy Storchaka added: """ I think we need to understand the issue better before committing changes. When found the source of unstability of file names, we can find other similar sources and make them stable too. For example if the source is listdir() or glob(), we can consider sorting results of all listdir() or glob() in distutils and related methods. On other side, if the problem is with reference counters in marshal, we can change the marshal module instead. """ https://github.com/python/cpython/pull/8057#issuecomment-402198390 ---------- components: Library (Lib) messages: 320988 nosy: vstinner priority: normal severity: normal status: open title: distutils is not reproducible versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 11:46:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 15:46:47 +0000 Subject: [issue29708] support reproducible Python builds In-Reply-To: <1488540966.18.0.904677570473.issue29708@psf.upfronthosting.co.za> Message-ID: <1530632807.34.0.56676864532.issue29708@psf.upfronthosting.co.za> STINNER Victor added the comment: I created bpo-34033: distutils is not reproducible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 11:47:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 15:47:04 +0000 Subject: [issue34033] distutils is not reproducible In-Reply-To: <1530632785.81.0.56676864532.issue34033@psf.upfronthosting.co.za> Message-ID: <1530632824.53.0.56676864532.issue34033@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +7677 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 11:47:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 15:47:56 +0000 Subject: [issue34033] distutils is not reproducible In-Reply-To: <1530632785.81.0.56676864532.issue34033@psf.upfronthosting.co.za> Message-ID: <1530632876.37.0.56676864532.issue34033@psf.upfronthosting.co.za> STINNER Victor added the comment: Copy of https://bugzilla.opensuse.org/show_bug.cgi?id=1049186 first message: """ e.g. python-simplejson has one-bit diffs in .pyc files See http://rb.zq1.de/compare.factory-20170713/python-simplejson-compare.out in python3-simplejson.rpm we get -00004e50 68 6f 72 5f 5f da 07 64 65 63 69 6d 61 6c 72 0c |hor__..decimalr.| +00004e50 68 6f 72 5f 5f 5a 07 64 65 63 69 6d 61 6c 72 0c |hor__Z.decimalr.| in python3-simplejson-test.rpm we get the opposite change -00000580 72 13 00 00 00 5a 07 64 65 63 69 6d 61 6c 72 03 |r....Z.decimalr.| +00000580 72 13 00 00 00 da 07 64 65 63 69 6d 61 6c 72 03 |r......decimalr.| and it seems to be related to filesystem ordering, since it built reproducibly when using a filesystem with sorted readdir using disorderfs via reproducible-faketools-filesys from https://build.opensuse.org/package/show/home:bmwiedemann:reproducible/reproducible-faketools """ https://bugzilla.opensuse.org/show_bug.cgi?id=1049186#c0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 11:50:22 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 03 Jul 2018 15:50:22 +0000 Subject: [issue34033] distutils is not reproducible In-Reply-To: <1530632785.81.0.56676864532.issue34033@psf.upfronthosting.co.za> Message-ID: <1530633022.42.0.56676864532.issue34033@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I agree that we should fix the underlying issue (marshal) rather than papering over it by sorting. In fact, we should have a test that compiles a bunch of pycs in a random orders and sees if they're the same or not. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 12:41:15 2018 From: report at bugs.python.org (Matej Cepl) Date: Tue, 03 Jul 2018 16:41:15 +0000 Subject: [issue34032] Add platlibdir to allow distinction between /usr/lib and /usr/lib64 for Linux In-Reply-To: <1530630040.09.0.56676864532.issue34032@psf.upfronthosting.co.za> Message-ID: <1530636075.01.0.56676864532.issue34032@psf.upfronthosting.co.za> Change by Matej Cepl : ---------- pull_requests: +7678 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 13:19:15 2018 From: report at bugs.python.org (Dmitry Kalinkin) Date: Tue, 03 Jul 2018 17:19:15 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1530638355.44.0.56676864532.issue1222585@psf.upfronthosting.co.za> Change by Dmitry Kalinkin : Added file: https://bugs.python.org/file47669/python-3.8-distutils-C++.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 13:20:44 2018 From: report at bugs.python.org (Daiderd Jordan) Date: Tue, 03 Jul 2018 17:20:44 +0000 Subject: [issue34027] python 3.7 openpty/forkpty build failure using nix package manager macOS environment In-Reply-To: <1530567068.14.0.56676864532.issue34027@psf.upfronthosting.co.za> Message-ID: <1530638444.83.0.56676864532.issue34027@psf.upfronthosting.co.za> Daiderd Jordan added the comment: Either patch looks fine to me, should I close the pull request? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 13:56:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Jul 2018 17:56:15 +0000 Subject: [issue32888] Improve exception message in ast.literal_eval In-Reply-To: <1519147581.54.0.467229070634.issue32888@psf.upfronthosting.co.za> Message-ID: <1530640575.65.0.56676864532.issue32888@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Please wait until issue32892 and issue32893 be committed or rejected before merging this PR. ---------- dependencies: +Remove specific constant AST types in favor of ast.Constant, ast.literal_eval() shouldn't accept booleans as numbers in AST nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 13:59:20 2018 From: report at bugs.python.org (=?utf-8?b?QsWCYcW8ZWogTWljaGFsaWs=?=) Date: Tue, 03 Jul 2018 17:59:20 +0000 Subject: [issue28657] cmd.Cmd.get_help() implementation can't see do_*() methods added dynamically by setattr() In-Reply-To: <1478776450.68.0.870801686772.issue28657@psf.upfronthosting.co.za> Message-ID: <1530640760.09.0.56676864532.issue28657@psf.upfronthosting.co.za> B?a?ej Michalik added the comment: I found it. Our app had CLI that was so vast, that it didn't made sense to put all of the 'do_xyz' methods into the same class that would run the interface internals. Instead, we had a child Cmd class that had a "add_command(self, command, func, helpstring=None)" method. That method would then perform an assignment with setattr() calls: setattr(self, "do_" + command, func). That's why the title of this issue has the innocent setattr() mentioned. I didn't knew at the time, whether or not the usage of it was important to the issue. It made sense to us back then, since we had multiple components waiting for the user to interact with them, that mostly didn't had much of anything to do with each other. It also made keeping track of the commands much easier. Each component had its own set of command, callback and helpstring triplets, and putting them together into the Cmd class was a responsibility of a completely separate code. It looked cleaner that way. When I was talking about "modifying class definition", I had a "OurCmd().__class__.do_xyz = callback" situation in mind. I think that it makes it behave in the same way as with the patch, as long as there is only one OurCmd instance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 14:06:26 2018 From: report at bugs.python.org (Santiago Hernandez) Date: Tue, 03 Jul 2018 18:06:26 +0000 Subject: [issue34034] Python 3.7.0 multiprocessing forkserver ForkingPickler behaviour change Message-ID: <1530641186.32.0.56676864532.issue34034@psf.upfronthosting.co.za> New submission from Santiago Hernandez : Hi, I am splitting some processing among different processes with the forkserver start method using multiprocessing. In python 3.4 to 3.6 this worked fine. In python 3.7.0 it's breaking with the following Traceback: ``` File "/data/venvs/py37/Python-3.7.0/lib/python3.7/multiprocessing/process.py", line 112, in start self._popen = self._Popen(self) File "/data/venvs/py37/Python-3.7.0/lib/python3.7/multiprocessing/context.py", line 223, in _Popen return _default_context.get_context().Process._Popen(process_obj) File "/data/venvs/py37/Python-3.7.0/lib/python3.7/multiprocessing/context.py", line 284, in _Popen return Popen(process_obj) File "/data/venvs/py37/Python-3.7.0/lib/python3.7/multiprocessing/popen_spawn_posix.py", line 32, in __init__ super().__init__(process_obj) File "/data/venvs/py37/Python-3.7.0/lib/python3.7/multiprocessing/popen_fork.py", line 20, in __init__ self._launch(process_obj) File "/data/venvs/py37/Python-3.7.0/lib/python3.7/multiprocessing/popen_spawn_posix.py", line 47, in _launch reduction.dump(process_obj, fp) File "/data/venvs/py37/Python-3.7.0/lib/python3.7/multiprocessing/reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) TypeError: can't pickle weakref objects ``` I am attaching a minimum example where this happens. In the example this can be solved by making self._run_single a staticmethod. However, I would like to understand what is going on and what changed in python for this to throw an exception now, when before it did not. Thanks. Santiago ---------- files: example.py messages: 320995 nosy: Santiago Hernandez priority: normal severity: normal status: open title: Python 3.7.0 multiprocessing forkserver ForkingPickler behaviour change versions: Python 3.7 Added file: https://bugs.python.org/file47670/example.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 14:24:34 2018 From: report at bugs.python.org (Evgeny Prilepin) Date: Tue, 03 Jul 2018 18:24:34 +0000 Subject: [issue34035] zipfile: AttributeError in "seek" method of "_SharedFile" class Message-ID: <1530642274.73.0.56676864532.issue34035@psf.upfronthosting.co.za> New submission from Evgeny Prilepin : The misprint in the file lib/zipfile.py in the line 704 leads to AttributeError: '_SharedFile' object has no attribute 'writing' "self.writing()" should be replaced by "self._writing()". I also think this code shold be covered by tests. ---------- components: Library (Lib) messages: 320996 nosy: espdev priority: normal severity: normal status: open title: zipfile: AttributeError in "seek" method of "_SharedFile" class type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 14:36:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Jul 2018 18:36:20 +0000 Subject: [issue34035] zipfile: AttributeError in "seek" method of "_SharedFile" class In-Reply-To: <1530642274.73.0.56676864532.issue34035@psf.upfronthosting.co.za> Message-ID: <1530642980.97.0.56676864532.issue34035@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +easy nosy: +serhiy.storchaka stage: -> needs patch type: crash -> behavior versions: +Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 14:58:59 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 03 Jul 2018 18:58:59 +0000 Subject: [issue33944] Deprecate and remove pth files In-Reply-To: <1529688140.44.0.56676864532.issue33944@psf.upfronthosting.co.za> Message-ID: <1530644339.53.0.56676864532.issue33944@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I think we'll clearly need a PEP for this clean up. I'd like to see a separate "preload" feature as well, especially one that is deterministic and happens before site.py. Not sure if that should be one PEP or two. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 15:10:48 2018 From: report at bugs.python.org (Semyon Levin) Date: Tue, 03 Jul 2018 19:10:48 +0000 Subject: [issue34036] ModuleNotFoundError: No module named '_ctypes' when install Python 3.7 on Linux Message-ID: <1530645048.53.0.56676864532.issue34036@psf.upfronthosting.co.za> New submission from Semyon Levin : make install failed with File "/tmp/tmp2gwe2ma_/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/utils/glibc.py", line 3, in File "/common/dev/slevin/tools/Python-3.7.0/Lib/ctypes/__init__.py", line 7, in from _ctypes import Union, Structure, Array ModuleNotFoundError: No module named '_ctypes' make: *** [install] Error 1 I used PKG_CONFIG_PATH in config and LIBFFI_INCLUDEDIR was created correctly in Makefile. How to configure location for libffi.a ? ---------- messages: 320998 nosy: semkin priority: normal severity: normal status: open title: ModuleNotFoundError: No module named '_ctypes' when install Python 3.7 on Linux _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 15:11:23 2018 From: report at bugs.python.org (Semyon Levin) Date: Tue, 03 Jul 2018 19:11:23 +0000 Subject: [issue34036] ModuleNotFoundError: No module named '_ctypes' when install Python 3.7 on Linux In-Reply-To: <1530645048.53.0.56676864532.issue34036@psf.upfronthosting.co.za> Message-ID: <1530645083.09.0.56676864532.issue34036@psf.upfronthosting.co.za> Change by Semyon Levin : ---------- components: +Installation versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 15:17:49 2018 From: report at bugs.python.org (Evgeny Prilepin) Date: Tue, 03 Jul 2018 19:17:49 +0000 Subject: [issue34035] zipfile: AttributeError in "seek" method of "_SharedFile" class In-Reply-To: <1530642274.73.0.56676864532.issue34035@psf.upfronthosting.co.za> Message-ID: <1530645469.05.0.56676864532.issue34035@psf.upfronthosting.co.za> Evgeny Prilepin added the comment: I think the line 1031 also contains the misprint and will raise NameError. > self._decompressor = zipfile._get_decompressor(self._compress_type) "zipfile." is not correct code in this place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 15:38:09 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 03 Jul 2018 19:38:09 +0000 Subject: [issue34034] Python 3.7.0 multiprocessing forkserver ForkingPickler behaviour change In-Reply-To: <1530641186.32.0.56676864532.issue34034@psf.upfronthosting.co.za> Message-ID: <1530646689.95.0.56676864532.issue34034@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It could be many different things. The bottom line here, though, is that the Process class is not designed to be picklable (how would it work?), which is probably why you're seeing this. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 15:47:31 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 03 Jul 2018 19:47:31 +0000 Subject: [issue24596] Script globals in a GC cycle not finalized when exiting with SystemExit In-Reply-To: <1436448692.77.0.0262276090845.issue24596@psf.upfronthosting.co.za> Message-ID: <1530647251.95.0.56676864532.issue24596@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset d8cba5d16f1333fd625726fc72e66afbd45b8d00 by Antoine Pitrou (Zackery Spytz) in branch 'master': bpo-24596: Decref module in PyRun_SimpleFileExFlags() on SystemExit (GH-7918) https://github.com/python/cpython/commit/d8cba5d16f1333fd625726fc72e66afbd45b8d00 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 15:48:01 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Jul 2018 19:48:01 +0000 Subject: [issue24596] Script globals in a GC cycle not finalized when exiting with SystemExit In-Reply-To: <1436448692.77.0.0262276090845.issue24596@psf.upfronthosting.co.za> Message-ID: <1530647281.76.0.56676864532.issue24596@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7679 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 15:48:48 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Jul 2018 19:48:48 +0000 Subject: [issue24596] Script globals in a GC cycle not finalized when exiting with SystemExit In-Reply-To: <1436448692.77.0.0262276090845.issue24596@psf.upfronthosting.co.za> Message-ID: <1530647328.18.0.56676864532.issue24596@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7680 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 15:49:30 2018 From: report at bugs.python.org (Bernhard M. Wiedemann) Date: Tue, 03 Jul 2018 19:49:30 +0000 Subject: [issue29708] support reproducible Python builds In-Reply-To: <1488540966.18.0.904677570473.issue29708@psf.upfronthosting.co.za> Message-ID: <1530647370.23.0.56676864532.issue29708@psf.upfronthosting.co.za> Bernhard M. Wiedemann added the comment: also related to this topic: https://github.com/pypa/pip/pull/5525 for pip's RECORD file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 16:13:32 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 03 Jul 2018 20:13:32 +0000 Subject: [issue24596] Script globals in a GC cycle not finalized when exiting with SystemExit In-Reply-To: <1436448692.77.0.0262276090845.issue24596@psf.upfronthosting.co.za> Message-ID: <1530648812.22.0.56676864532.issue24596@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 20ae4c60258479a0732d12af292f422679444e2c by Antoine Pitrou (Miss Islington (bot)) in branch '3.7': bpo-24596: Decref module in PyRun_SimpleFileExFlags() on SystemExit (GH-7918) (GH-8070) https://github.com/python/cpython/commit/20ae4c60258479a0732d12af292f422679444e2c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 16:17:48 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 03 Jul 2018 20:17:48 +0000 Subject: [issue24596] Script globals in a GC cycle not finalized when exiting with SystemExit In-Reply-To: <1436448692.77.0.0262276090845.issue24596@psf.upfronthosting.co.za> Message-ID: <1530649068.63.0.56676864532.issue24596@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset e1ebf51f76037b7e02711aaeb9bf66c9147f4c74 by Antoine Pitrou (Miss Islington (bot)) in branch '3.6': bpo-24596: Decref module in PyRun_SimpleFileExFlags() on SystemExit (GH-7918) (GH-8069) https://github.com/python/cpython/commit/e1ebf51f76037b7e02711aaeb9bf66c9147f4c74 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 16:18:03 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 03 Jul 2018 20:18:03 +0000 Subject: [issue24596] Script globals in a GC cycle not finalized when exiting with SystemExit In-Reply-To: <1436448692.77.0.0262276090845.issue24596@psf.upfronthosting.co.za> Message-ID: <1530649083.57.0.56676864532.issue24596@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 16:29:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Jul 2018 20:29:02 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1530649742.68.0.56676864532.issue33720@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +7681 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 17:01:04 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 03 Jul 2018 21:01:04 +0000 Subject: [issue33944] Deprecate and remove pth files In-Reply-To: <1529688140.44.0.56676864532.issue33944@psf.upfronthosting.co.za> Message-ID: <1530651664.44.0.56676864532.issue33944@psf.upfronthosting.co.za> Eric Snow added the comment: @barry, make sure you take a look at https://bugs.python.org/issue14803. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 17:02:07 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 03 Jul 2018 21:02:07 +0000 Subject: [issue16822] execv (et al.) should invoke atexit handlers before executing new code In-Reply-To: <1356907108.89.0.568486797575.issue16822@psf.upfronthosting.co.za> Message-ID: <1530651727.82.0.56676864532.issue16822@psf.upfronthosting.co.za> Change by Eric Snow : ---------- nosy: +emilyemorehouse, eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 18:57:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 22:57:26 +0000 Subject: [issue34037] test_asyncio: test_run_in_executor_cancel() leaked a dangling thread on AMD64 FreeBSD 10.x Shared 3.7 Message-ID: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> New submission from STINNER Victor : AMD64 FreeBSD 10.x Shared 3.7: http://buildbot.python.org/all/#/builders/124/builds/410 ... test_remove_fds_after_closing (test.test_asyncio.test_events.KqueueEventLoopTests) ... ok test_run_in_executor (test.test_asyncio.test_events.KqueueEventLoopTests) ... ok test_run_in_executor_cancel (test.test_asyncio.test_events.KqueueEventLoopTests) ... Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2) Dangling thread: Dangling thread: <_MainThread(MainThread, started 34393318400)> ok test_run_until_complete (test.test_asyncio.test_events.KqueueEventLoopTests) ... ok test_run_until_complete_nesting (test.test_asyncio.test_events.KqueueEventLoopTests) ... ok ... 1 test altered the execution environment: test_asyncio ---------- components: Tests, asyncio messages: 321006 nosy: asvetlov, vstinner, yselivanov priority: normal severity: normal status: open title: test_asyncio: test_run_in_executor_cancel() leaked a dangling thread on AMD64 FreeBSD 10.x Shared 3.7 versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 18:58:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 22:58:18 +0000 Subject: [issue32710] test_asyncio: ProactorEventLoopTests.test_sendfile_close_peer_in_middle_of_receiving() leaked [4, 4, 3] memory blocks on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1517229818.86.0.467229070634.issue32710@psf.upfronthosting.co.za> Message-ID: <1530658698.89.0.56676864532.issue32710@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: test_asyncio leaked [4, 4, 3] memory blocks, sum=11 on AMD64 Windows8.1 Refleaks 3.x -> test_asyncio: ProactorEventLoopTests.test_sendfile_close_peer_in_middle_of_receiving() leaked [4, 4, 3] memory blocks on AMD64 Windows8.1 Refleaks 3.x _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 18:59:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Jul 2018 22:59:50 +0000 Subject: [issue32710] test_asyncio: ProactorEventLoopTests.test_sendfile_close_peer_in_middle_of_receiving() leaked [4, 4, 3] memory blocks on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1517229818.86.0.467229070634.issue32710@psf.upfronthosting.co.za> Message-ID: <1530658790.49.0.56676864532.issue32710@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-33735: my commit 23401fb960bb94e6ea62d2999527968d53d3fc65 fixes a false alarm in regrtest when hunting leaks in test_multiprocessing_spawn or test_multiprocessing_forkserver. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 21:57:58 2018 From: report at bugs.python.org (Bradley Laney) Date: Wed, 04 Jul 2018 01:57:58 +0000 Subject: [issue34031] [EASY] Incorrect usage of unittest.TestCase in test_urllib2_localnet In-Reply-To: <1530621349.65.0.56676864532.issue34031@psf.upfronthosting.co.za> Message-ID: <1530669478.93.0.56676864532.issue34031@psf.upfronthosting.co.za> Bradley Laney added the comment: Hey again @pablogsal. Thanks for reviewing the email issue again. I'll try to fix and submit a PR for this if that's ok. ---------- nosy: +Bradley Laney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 22:16:00 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 04 Jul 2018 02:16:00 +0000 Subject: [issue33418] Memory leaks in functions In-Reply-To: <1525370063.61.0.682650639539.issue33418@psf.upfronthosting.co.za> Message-ID: <1530670560.53.0.56676864532.issue33418@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 3c452404ae178b742967589a0bb4a5ec768d76e0 by INADA Naoki in branch 'master': bpo-33418: Add tp_clear for function object (GH-8058) https://github.com/python/cpython/commit/3c452404ae178b742967589a0bb4a5ec768d76e0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 3 22:16:14 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 04 Jul 2018 02:16:14 +0000 Subject: [issue33418] Memory leaks in functions In-Reply-To: <1525370063.61.0.682650639539.issue33418@psf.upfronthosting.co.za> Message-ID: <1530670574.46.0.56676864532.issue33418@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 00:33:55 2018 From: report at bugs.python.org (T L) Date: Wed, 04 Jul 2018 04:33:55 +0000 Subject: [issue34038] urllib2.urlopen fails if http_proxy(s) is set to a sock5 proxy Message-ID: <1530678835.56.0.56676864532.issue34038@psf.upfronthosting.co.za> New submission from T L : Changing the urlopen call to a curl commnand invoke works. $ export http_proxy=socks5://127.0.0.1:8888 https_proxy=socks5://127.0.0.1:8888 # this will raise an exception with string representation is a blank string # at least for url: https://s3.amazonaws.com/mozilla-games/emscripten/packages/llvm/tag/linux_64bit/emscripten-llvm-e1.37.35.tar.gz from urllib2 import urlopen, HTTPError u = urlopen(url) mkdir_p(os.path.dirname(file_name)) with open(file_name, 'wb') as f: file_size = get_content_length(u) if file_size > 0: print("Downloading: %s from %s, %s Bytes" % (file_name, url, file_size)) else: print("Downloading: %s from %s" % (file_name, url)) file_size_dl = 0 block_sz = 8192 while True: buffer = u.read(block_sz) if not buffer: break file_size_dl += len(buffer) f.write(buffer) # this alternative way works import commands status, output = commands.getstatusoutput("curl -L --output " + file_name + " " + url) ---------- components: Library (Lib) messages: 321010 nosy: T L2 priority: normal severity: normal status: open title: urllib2.urlopen fails if http_proxy(s) is set to a sock5 proxy type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 01:22:01 2018 From: report at bugs.python.org (hajoscher) Date: Wed, 04 Jul 2018 05:22:01 +0000 Subject: [issue34010] tarfile stream read performance In-Reply-To: <1530350820.63.0.56676864532.issue34010@psf.upfronthosting.co.za> Message-ID: <1530681721.06.0.56676864532.issue34010@psf.upfronthosting.co.za> hajoscher added the comment: Yes, it performance is really bad for large files, and memory consumption as well. I will write something for NEWS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 02:47:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 04 Jul 2018 06:47:06 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1530686826.33.0.56676864532.issue33720@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The alternate solution is provided by PR 8071. The culprit of the main stack consumption is the code for unmarshalling float and complex in protocols 0 and 1 which uses 256-bytes buffers on the stack. Moving it to the separate function allows to decrease the stack consumption and increase the maximum marshal recursion depth on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 03:02:00 2018 From: report at bugs.python.org (Benjamin Gear) Date: Wed, 04 Jul 2018 07:02:00 +0000 Subject: [issue34039] Loop limited to 1000 Message-ID: <1530687720.09.0.56676864532.issue34039@psf.upfronthosting.co.za> New submission from Benjamin Gear : I think this is a bug or maybe I'm seeing it wrong so I have a while loop witch collects data from a website json outs it into a list then does the same thing into a 2nd list then it calls the my comparing function and outputs the changes at 1st with only a while loop no call to function and would run no problem for days now I have changed it to collect all the data and now I'm getting limited to 1000 recursions I then attempted to alter the 100 limit witch works until seg fault now https://github.com/blkph0x/pyinator ---------- messages: 321013 nosy: Blkph0x priority: normal severity: normal status: open title: Loop limited to 1000 type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 03:34:39 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 04 Jul 2018 07:34:39 +0000 Subject: [issue34039] Loop limited to 1000 In-Reply-To: <1530687720.09.0.56676864532.issue34039@psf.upfronthosting.co.za> Message-ID: <1530689679.61.0.56676864532.issue34039@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Sorry, this is for reporting bugs in the Python interpreter and standard library, not your own code. If you have a bug in your pyinator project, you should report it to yourself, not us :-) If you think my analysis of the problem below is wrong, and that you have truly found a bug in the interpreter, please read this: http://www.sscce.org/ and give us the smallest example of this bug you can, don't just link to your library and expect us to find the problem ourselves. My analysis, based on a *brief* look at your project, it that every time you call GetPriceCheck, you increase the recursion limit by an extra 1000, and then keep making more and more recursive calls until you run out of memory and segfault. That's pretty much unavoidable. To prevent that, you can: - add more memory; - make fewer recursive calls; - fix your code to use a better technique for scraping websites. (It is rude to keep hitting a website over and over and over again, without any limit. Websites have limited bandwidth, which they pay for, and every time you hit the website, that makes it harder for somebody else. At the very least, you should back off exponentially, waiting longer between each attempt: 1 second, 2 seconds, 4 seconds, 8 seconds, 16 seconds...) The recursion limit is designed to prevent segfaults by giving you a nice Python-level exception instead of a hard, OS-level segmentation fault. But if you set the recursion limit too high, you by-pass that protection and you are responsible for not crashing the stack. ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 03:49:19 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Jul 2018 07:49:19 +0000 Subject: [issue34040] test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly Message-ID: <1530690559.26.0.56676864532.issue34040@psf.upfronthosting.co.za> New submission from STINNER Victor : AMD64 FreeBSD 10.x Shared 3.x: http://buildbot.python.org/all/#/builders/87/builds/1137 ====================================================================== FAIL: test_forkserver_sigkill (test.test_multiprocessing_forkserver.WithProcessesTestProcess) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/_test_multiprocessing.py", line 680, in test_forkserver_sigkill self.check_forkserver_death(signal.SIGKILL) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/_test_multiprocessing.py", line 670, in check_forkserver_death self.assertTrue(evt.is_set()) AssertionError: False is not true Re-running test 'test_multiprocessing_forkserver' in verbose mode Ran 310 tests in 100.124s OK (skipped=27) ---------- components: Tests messages: 321015 nosy: vstinner priority: normal severity: normal status: open title: test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 03:49:42 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 04 Jul 2018 07:49:42 +0000 Subject: [issue34010] tarfile stream read performance regression In-Reply-To: <1530350820.63.0.56676864532.issue34010@psf.upfronthosting.co.za> Message-ID: <1530690582.89.0.56676864532.issue34010@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- keywords: +3.2regression title: tarfile stream read performance -> tarfile stream read performance regression _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 03:49:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Jul 2018 07:49:47 +0000 Subject: [issue31687] test_semaphore_tracker() of test_multiprocessing_spawn fails randomly (race condition?) In-Reply-To: <1507109795.91.0.213398074469.issue31687@psf.upfronthosting.co.za> Message-ID: <1530690587.11.0.56676864532.issue31687@psf.upfronthosting.co.za> STINNER Victor added the comment: > FAIL: test_forkserver_sigkill (test.test_multiprocessing_forkserver.WithProcessesTestProcess) This failure is unrelated to the semaphore tracker, so I created bpo-34040: "test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 03:50:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Jul 2018 07:50:22 +0000 Subject: [issue34040] test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly In-Reply-To: <1530690559.26.0.56676864532.issue34040@psf.upfronthosting.co.za> Message-ID: <1530690622.5.0.56676864532.issue34040@psf.upfronthosting.co.za> STINNER Victor added the comment: Another example of failure: https://bugs.python.org/issue31687#msg307355 x86 Tiger 3.x: http://buildbot.python.org/all/#/builders/30/builds/260 ====================================================================== FAIL: test_semaphore_tracker (test.test_multiprocessing_forkserver.TestSemaphoreTracker) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/_test_multiprocessing.py", line 4380, in test_semaphore_tracker _multiprocessing.sem_unlink(name2) AssertionError: OSError not raised ====================================================================== FAIL: test_forkserver_sigkill (test.test_multiprocessing_forkserver.WithProcessesTestProcess) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/_test_multiprocessing.py", line 653, in test_forkserver_sigkill self.check_forkserver_death(signal.SIGKILL) File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/_test_multiprocessing.py", line 643, in check_forkserver_death self.assertTrue(evt.is_set()) AssertionError: False is not true ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 04:11:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Jul 2018 08:11:54 +0000 Subject: [issue34040] test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly In-Reply-To: <1530690559.26.0.56676864532.issue34040@psf.upfronthosting.co.za> Message-ID: <1530691914.79.0.56676864532.issue34040@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +7682 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 04:13:21 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 04 Jul 2018 08:13:21 +0000 Subject: [issue34010] tarfile stream read performance regression In-Reply-To: <1530350820.63.0.56676864532.issue34010@psf.upfronthosting.co.za> Message-ID: <1530692001.8.0.56676864532.issue34010@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 12a08c47601cadea8e7d3808502cdbcca87b2ce2 by INADA Naoki (hajoscher) in branch 'master': bpo-34010: Fix tarfile read performance regression (GH-8020) https://github.com/python/cpython/commit/12a08c47601cadea8e7d3808502cdbcca87b2ce2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 04:14:43 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 04 Jul 2018 08:14:43 +0000 Subject: [issue34010] tarfile stream read performance regression In-Reply-To: <1530350820.63.0.56676864532.issue34010@psf.upfronthosting.co.za> Message-ID: <1530692083.6.0.56676864532.issue34010@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7683 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 04:15:29 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 04 Jul 2018 08:15:29 +0000 Subject: [issue34010] tarfile stream read performance regression In-Reply-To: <1530350820.63.0.56676864532.issue34010@psf.upfronthosting.co.za> Message-ID: <1530692129.28.0.56676864532.issue34010@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7684 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 04:17:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Jul 2018 08:17:20 +0000 Subject: [issue30849] test_stress_delivery_dependent() of test_signal randomly fails on AMD64 Debian root 3.6/3.x In-Reply-To: <1499181411.1.0.541300647507.issue30849@psf.upfronthosting.co.za> Message-ID: <1530692240.66.0.56676864532.issue30849@psf.upfronthosting.co.za> STINNER Victor added the comment: > After increasing the number of CPUs in the virtual machine the failure no longer reproduced. It is reproducible only with a single CPU. The test just failed on AMD64 Debian root 3.x and according to test.pythoninfo, this machine has a single CPU: os.cpu_count: 1 http://buildbot.python.org/all/#/builders/27/builds/1247 ... == CPU count: 1 == encodings: locale=UTF-8, FS=utf-8 Using random seed 6423496 Run tests in parallel using 2 child processes 0:00:00 load avg: 0.71 [ 1/417] test_genericclass passed 0:00:00 load avg: 0.71 [ 2/417] test_copyreg passed 0:00:03 load avg: 0.71 [ 3/417] test_os passed stty: standard input: Inappropriate ioctl for device running: test_tokenize (32 sec 627 ms), test_signal (30 sec 11 ms) 0:00:51 load avg: 1.32 [ 4/417] test_tokenize passed (50 sec 821 ms) -- running: test_signal (48 sec 506 ms) 0:00:54 load avg: 1.32 [ 5/417/1] test_signal failed ... test_stress_delivery_dependent (test.test_signal.StressTest) ... detected median itimer() resolution: 0.000044 s. FAIL test_stress_delivery_simultaneous (test.test_signal.StressTest) ... detected median itimer() resolution: 0.000032 s. ok ... ====================================================================== FAIL: test_stress_delivery_dependent (test.test_signal.StressTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_signal.py", line 1156, in test_stress_delivery_dependent self.assertEqual(len(sigs), N, "Some signals were lost") AssertionError: 3617 != 10000 : Some signals were lost ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 04:25:19 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 04 Jul 2018 08:25:19 +0000 Subject: [issue34010] tarfile stream read performance regression In-Reply-To: <1530350820.63.0.56676864532.issue34010@psf.upfronthosting.co.za> Message-ID: <1530692719.32.0.56676864532.issue34010@psf.upfronthosting.co.za> INADA Naoki added the comment: thanks ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 04:28:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Jul 2018 08:28:59 +0000 Subject: [issue34010] tarfile stream read performance regression In-Reply-To: <1530350820.63.0.56676864532.issue34010@psf.upfronthosting.co.za> Message-ID: <1530692939.01.0.56676864532.issue34010@psf.upfronthosting.co.za> STINNER Victor added the comment: https://github.com/python/cpython/pull/8020/files/77a54a39aace1a38794884218abe801b85b54e62#diff-ef64d8b610dda67977a63a9837f46349 - buf = "".join(t) + buf = b"".join(t) @hajoscher: "It never caused a problem, since this line is never called; size is never None in the function call. But still, should be fixed, I guess." Would it be possible to have an unit test for this modified line? Untested code is broken, as you showed :-) ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 04:32:44 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 04 Jul 2018 08:32:44 +0000 Subject: [issue34010] tarfile stream read performance regression In-Reply-To: <1530350820.63.0.56676864532.issue34010@psf.upfronthosting.co.za> Message-ID: <1530693164.13.0.56676864532.issue34010@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c1b75b5fb92fda0ac5b931d7b18c1418557cb7c4 by Miss Islington (bot) in branch '3.7': bpo-34010: Fix tarfile read performance regression (GH-8020) https://github.com/python/cpython/commit/c1b75b5fb92fda0ac5b931d7b18c1418557cb7c4 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 04:43:52 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 04 Jul 2018 08:43:52 +0000 Subject: [issue34010] tarfile stream read performance regression In-Reply-To: <1530350820.63.0.56676864532.issue34010@psf.upfronthosting.co.za> Message-ID: <1530693832.76.0.56676864532.issue34010@psf.upfronthosting.co.za> miss-islington added the comment: New changeset d7a0ad7dd7bd7dfbdbf6be2c89fde5a71813628a by Miss Islington (bot) in branch '3.6': bpo-34010: Fix tarfile read performance regression (GH-8020) https://github.com/python/cpython/commit/d7a0ad7dd7bd7dfbdbf6be2c89fde5a71813628a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 05:49:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Jul 2018 09:49:51 +0000 Subject: [issue34040] test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly In-Reply-To: <1530690559.26.0.56676864532.issue34040@psf.upfronthosting.co.za> Message-ID: <1530697791.79.0.56676864532.issue34040@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 07888e1cce89e9bb7dc501e287b4cb126e01c378 by Victor Stinner in branch 'master': bpo-34040, multiprocessing: Fix test_forkserver_sigkill() (GH-8081) https://github.com/python/cpython/commit/07888e1cce89e9bb7dc501e287b4cb126e01c378 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 05:51:11 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 04 Jul 2018 09:51:11 +0000 Subject: [issue34040] test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly In-Reply-To: <1530690559.26.0.56676864532.issue34040@psf.upfronthosting.co.za> Message-ID: <1530697871.16.0.56676864532.issue34040@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7685 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 05:51:53 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 04 Jul 2018 09:51:53 +0000 Subject: [issue34040] test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly In-Reply-To: <1530690559.26.0.56676864532.issue34040@psf.upfronthosting.co.za> Message-ID: <1530697913.6.0.56676864532.issue34040@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7686 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 05:54:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Jul 2018 09:54:39 +0000 Subject: [issue34040] test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly In-Reply-To: <1530690559.26.0.56676864532.issue34040@psf.upfronthosting.co.za> Message-ID: <1530698079.01.0.56676864532.issue34040@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 2.7 is not affected: it has no forkserver. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 05:59:59 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 04 Jul 2018 09:59:59 +0000 Subject: [issue33944] Deprecate and remove pth files In-Reply-To: <1529688140.44.0.56676864532.issue33944@psf.upfronthosting.co.za> Message-ID: <1530698399.32.0.56676864532.issue33944@psf.upfronthosting.co.za> Nick Coghlan added the comment: To avoid confusing the discussions, two PEPs is likely a better option: 1. Designing and implementing a dedicated preload mechanism 2. Adjusting the way pth file handling works, including deprecating and removing the "pth arbitrary file execution" trick (depends on the first one as the forward compatible migration path for legitimate code preloading use cases) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 06:04:14 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Wed, 04 Jul 2018 10:04:14 +0000 Subject: [issue34041] add *deterministic* parameter to sqlite3.Connection.create_function() Message-ID: <1530698654.39.0.56676864532.issue34041@psf.upfronthosting.co.za> New submission from Sergey Fedoseev : SQLiter 3.8.3 and higher allows to mark created functions as deterministic to allow additional optimizations. There isn't currently a way to it from Python. https://sqlite.org/c3ref/create_function.html ---------- components: Extension Modules messages: 321027 nosy: sir-sigurd priority: normal severity: normal status: open title: add *deterministic* parameter to sqlite3.Connection.create_function() type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 06:06:04 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Wed, 04 Jul 2018 10:06:04 +0000 Subject: [issue34041] add *deterministic* parameter to sqlite3.Connection.create_function() In-Reply-To: <1530698654.39.0.56676864532.issue34041@psf.upfronthosting.co.za> Message-ID: <1530698764.62.0.56676864532.issue34041@psf.upfronthosting.co.za> Change by Sergey Fedoseev : ---------- keywords: +patch pull_requests: +7687 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 06:10:17 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 04 Jul 2018 10:10:17 +0000 Subject: [issue34040] test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly In-Reply-To: <1530690559.26.0.56676864532.issue34040@psf.upfronthosting.co.za> Message-ID: <1530699017.14.0.56676864532.issue34040@psf.upfronthosting.co.za> miss-islington added the comment: New changeset eb700f8c94602feb8c10ad8fc600f55e17e3b092 by Miss Islington (bot) in branch '3.7': bpo-34040, multiprocessing: Fix test_forkserver_sigkill() (GH-8081) https://github.com/python/cpython/commit/eb700f8c94602feb8c10ad8fc600f55e17e3b092 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 06:10:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Jul 2018 10:10:18 +0000 Subject: [issue32942] test_script_helper fails on Windows when run from the source code directory In-Reply-To: <1519513656.28.0.467229070634.issue32942@psf.upfronthosting.co.za> Message-ID: <1530699018.1.0.56676864532.issue32942@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a390cb6b6fb6638e91d699513167e8f35b47f846 by Victor Stinner (Lorenz Mende) in branch 'master': bpo-32942: Fix environment dependent test_script_helper (GH-8034) https://github.com/python/cpython/commit/a390cb6b6fb6638e91d699513167e8f35b47f846 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 06:11:42 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 04 Jul 2018 10:11:42 +0000 Subject: [issue32942] test_script_helper fails on Windows when run from the source code directory In-Reply-To: <1519513656.28.0.467229070634.issue32942@psf.upfronthosting.co.za> Message-ID: <1530699102.76.0.56676864532.issue32942@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7688 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 06:12:31 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 04 Jul 2018 10:12:31 +0000 Subject: [issue32942] test_script_helper fails on Windows when run from the source code directory In-Reply-To: <1519513656.28.0.467229070634.issue32942@psf.upfronthosting.co.za> Message-ID: <1530699151.96.0.56676864532.issue32942@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7689 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 06:15:18 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 04 Jul 2018 10:15:18 +0000 Subject: [issue34040] test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly In-Reply-To: <1530690559.26.0.56676864532.issue34040@psf.upfronthosting.co.za> Message-ID: <1530699318.26.0.56676864532.issue34040@psf.upfronthosting.co.za> miss-islington added the comment: New changeset ae23d8de8d7d810a8dbe1b09ea37590aff3e1aa0 by Miss Islington (bot) in branch '3.6': bpo-34040, multiprocessing: Fix test_forkserver_sigkill() (GH-8081) https://github.com/python/cpython/commit/ae23d8de8d7d810a8dbe1b09ea37590aff3e1aa0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 06:35:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Jul 2018 10:35:04 +0000 Subject: [issue34040] test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly In-Reply-To: <1530690559.26.0.56676864532.issue34040@psf.upfronthosting.co.za> Message-ID: <1530700504.41.0.56676864532.issue34040@psf.upfronthosting.co.za> STINNER Victor added the comment: I doubled the sleep: it should be better. If not, we can easily increase even more the sleep ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 06:35:11 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 04 Jul 2018 10:35:11 +0000 Subject: [issue32942] test_script_helper fails on Windows when run from the source code directory In-Reply-To: <1519513656.28.0.467229070634.issue32942@psf.upfronthosting.co.za> Message-ID: <1530700511.31.0.56676864532.issue32942@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 6b3ff35670869fb915d43ac434c473c1fc11598e by Miss Islington (bot) in branch '3.7': bpo-32942: Fix environment dependent test_script_helper (GH-8034) https://github.com/python/cpython/commit/6b3ff35670869fb915d43ac434c473c1fc11598e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 06:46:18 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 04 Jul 2018 10:46:18 +0000 Subject: [issue32942] test_script_helper fails on Windows when run from the source code directory In-Reply-To: <1519513656.28.0.467229070634.issue32942@psf.upfronthosting.co.za> Message-ID: <1530701178.41.0.56676864532.issue32942@psf.upfronthosting.co.za> miss-islington added the comment: New changeset aea19a0530726c7ba6a9461b0024506529dc35e8 by Miss Islington (bot) in branch '3.6': bpo-32942: Fix environment dependent test_script_helper (GH-8034) https://github.com/python/cpython/commit/aea19a0530726c7ba6a9461b0024506529dc35e8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 06:51:28 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Jul 2018 10:51:28 +0000 Subject: [issue32942] test_script_helper fails on Windows when run from the source code directory In-Reply-To: <1519513656.28.0.467229070634.issue32942@psf.upfronthosting.co.za> Message-ID: <1530701488.89.0.56676864532.issue32942@psf.upfronthosting.co.za> STINNER Victor added the comment: Thank you Lorenz Mende for your fix, and Terry for your review! I tested manually the fix, and I confirm that it works (Terry also tested and confirmed that the fix works as expected). I applied your fix to master, and backport it to 3.6 and 3.7. Python 2.7 has no test on script_helper, so it's not affected by this bug. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 07:01:48 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 04 Jul 2018 11:01:48 +0000 Subject: [issue34009] Document Travis CI / Ubuntu 14.04 OpenSSL compatibility issues In-Reply-To: <1530350802.86.0.56676864532.issue34009@psf.upfronthosting.co.za> Message-ID: <1530702108.61.0.56676864532.issue34009@psf.upfronthosting.co.za> Nick Coghlan added the comment: Given the update in https://github.com/deadsnakes/travis-ci-python3.7-example#update-2018-07-03, I've simplified the PR to remove any references to Travis CI, and instead just mention the code names for the relevant Debian and Ubuntu releases. I've also kept the pointer to our CI config for building your own Python against OpenSSL 1.1.0, regardless of the host OS state. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 07:39:17 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 04 Jul 2018 11:39:17 +0000 Subject: [issue34008] Do we support calling Py_Main() after Py_Initialize()? In-Reply-To: <1530341921.37.0.56676864532.issue34008@psf.upfronthosting.co.za> Message-ID: <1530704357.59.0.56676864532.issue34008@psf.upfronthosting.co.za> Nick Coghlan added the comment: Aye, and I think from Miro's comments on your PR, making it apply some of the same configuration settings that 3.6 and earlier applied is going to be required to get fontforge working again for 3.7. At the very least, the call to set sys.argv is needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 07:42:51 2018 From: report at bugs.python.org (Kay Hayen) Date: Wed, 04 Jul 2018 11:42:51 +0000 Subject: [issue34042] Reference loss for local classes Message-ID: <1530704571.33.0.56676864532.issue34042@psf.upfronthosting.co.za> New submission from Kay Hayen : I have a test in Nuitka, designed to detect reference counting problems with Python code. It basically takes a snapshot of the refcount, runs a function until it stabilizes, then says PASS, or else reports the last diff. Obviously for CPython it's supposed to pass. Testing with self compiled 3.7.0 and 3.7.0-1 as in Debian testing (buster) currently, this happens for me: This is a cutout, there are more than 100 functions, I am listing the ones that report: simpleFunction16: FAILED 118414 118412 leaked -2 simpleFunction17: FAILED 118395 118393 leaked -2 simpleFunction18: FAILED 118375 118373 leaked -2 ... simpleFunction21: FAILED 118337 118333 leaked -4 ... simpleFunction25: FAILED 118315 118313 leaked -2 simpleFunction26: FAILED 118295 118293 leaked -2 ... simpleFunction38: FAILED 118257 118253 leaked -4 simpleFunction39: FAILED 118235 118233 leaked -2 ... simpleFunction43: FAILED 118215 118213 leaked -2 simpleFunction48: FAILED 118195 118193 leaked -2 ... simpleFunction76: FAILED 118422 118418 leaked -4 ... simpleFunction88: FAILED 118400 118398 leaked -2 This is really bad, because normally values are positive, merely preventing a release. A negative value indicates that references have been lost. This will normally result in corruption of the memory allocator for Python, although I have not yet seen that. I have a few remaining cases, where compiled code causes negative leaks too, there is happens. But I didn't force the issue yet. Notice that this is of course with the debug Python version and let me express, pure CPython is used to run the test code. When compiling with Nuitka and 3.7, my private code gives the same ref counts for there, but it also pretty much does the same things, these are some of the functions: def simpleFunction16(): class EmptyClass: pass return EmptyClass def simpleFunction39(): class Parent(object): pass All the other cases also use locally defined classes and only test cases using local classes are failing for me here. To reproduce is easy: git clone --branch develop http://git.nuitka.net/Nuitka.git python3.7-dbg Nuitka/tests/basics/Referencing.py Thanks, Kay Hayen ---------- messages: 321037 nosy: kayhayen priority: normal severity: normal status: open title: Reference loss for local classes versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 08:08:37 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 04 Jul 2018 12:08:37 +0000 Subject: [issue34035] zipfile: AttributeError in "seek" method of "_SharedFile" class In-Reply-To: <1530642274.73.0.56676864532.issue34035@psf.upfronthosting.co.za> Message-ID: <1530706117.68.0.56676864532.issue34035@psf.upfronthosting.co.za> R?mi Lapeyre added the comment: Hi Evegeny, I was able to reproduce the issue, if it's all right for you I would like to post a PR to solve the issue and extend the test suite od this module. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 08:10:32 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 04 Jul 2018 12:10:32 +0000 Subject: [issue34043] Optimize tarfile uncompression performance Message-ID: <1530706232.53.0.56676864532.issue34043@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- components: Library (Lib) nosy: inada.naoki priority: normal severity: normal status: open title: Optimize tarfile uncompression performance type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 08:20:05 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 04 Jul 2018 12:20:05 +0000 Subject: [issue34043] Optimize tarfile uncompression performance Message-ID: <1530706805.74.0.56676864532.issue34043@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- keywords: +patch pull_requests: +7690 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 08:21:11 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 04 Jul 2018 12:21:11 +0000 Subject: [issue34043] Optimize tarfile uncompression performance Message-ID: <1530706871.24.0.56676864532.issue34043@psf.upfronthosting.co.za> New submission from INADA Naoki : tarfile._Stream has two buffer for compressed and uncompressed data. Those buffers are not aligned so unnecessary bytes slicing happens for every reading chunks. This commit bypass compressed buffering. In this benchmark [1], user time become 250ms from 300ms. [1]: https://bugs.python.org/msg320763 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 08:22:31 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 04 Jul 2018 12:22:31 +0000 Subject: [issue34010] tarfile stream read performance regression In-Reply-To: <1530350820.63.0.56676864532.issue34010@psf.upfronthosting.co.za> Message-ID: <1530706951.62.0.56676864532.issue34010@psf.upfronthosting.co.za> INADA Naoki added the comment: @Victor I think removing unused code is better than adding test for it and maintain it. So I removed that unused code block in GH-8089. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 08:27:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Jul 2018 12:27:59 +0000 Subject: [issue34010] tarfile stream read performance regression In-Reply-To: <1530350820.63.0.56676864532.issue34010@psf.upfronthosting.co.za> Message-ID: <1530707279.48.0.56676864532.issue34010@psf.upfronthosting.co.za> STINNER Victor added the comment: > @Victor I think removing unused code is better than adding test for it and maintain it. Sure. I reviewed your PR 8089. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 08:31:54 2018 From: report at bugs.python.org (Evgeny Prilepin) Date: Wed, 04 Jul 2018 12:31:54 +0000 Subject: [issue34035] zipfile: AttributeError in "seek" method of "_SharedFile" class In-Reply-To: <1530642274.73.0.56676864532.issue34035@psf.upfronthosting.co.za> Message-ID: <1530707514.65.0.56676864532.issue34035@psf.upfronthosting.co.za> Evgeny Prilepin added the comment: Hi R?mi, it would be great if you posted a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 09:02:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 04 Jul 2018 13:02:30 +0000 Subject: [issue34043] Optimize tarfile uncompression performance In-Reply-To: <1530706871.24.0.56676864532.issue34043@psf.upfronthosting.co.za> Message-ID: <1530709350.26.0.56676864532.issue34043@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +lars.gustaebel, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 09:07:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 04 Jul 2018 13:07:28 +0000 Subject: [issue34042] Reference loss for local classes In-Reply-To: <1530704571.33.0.56676864532.issue34042@psf.upfronthosting.co.za> Message-ID: <1530709648.89.0.56676864532.issue34042@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- components: +Interpreter Core nosy: +serhiy.storchaka type: -> resource usage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 09:29:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 04 Jul 2018 13:29:17 +0000 Subject: [issue34042] Reference loss for local classes In-Reply-To: <1530704571.33.0.56676864532.issue34042@psf.upfronthosting.co.za> Message-ID: <1530710957.22.0.56676864532.issue34042@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The simplest reproducer: import gc, sys for i in range(100): class A: pass del A c = gc.collect() del c print(sys.gettotalrefcount()) ---------- nosy: +pitrou, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 10:18:34 2018 From: report at bugs.python.org (Peter Senna Tschudin) Date: Wed, 04 Jul 2018 14:18:34 +0000 Subject: [issue33374] generate-posix-vars failed when building Python 2.7.14 on Linux In-Reply-To: <1524843947.56.0.682650639539.issue33374@psf.upfronthosting.co.za> Message-ID: <1530713914.0.0.56676864532.issue33374@psf.upfronthosting.co.za> Peter Senna Tschudin added the comment: I got here when trying to build Yocto Sumo on Fedora 28. python_native build was failing with a segfault. Here is how I fixed it with no elegance intended: $ git clone https://github.com/python/cpython.git $ cd cpython/ $ git show 0b91f8a668201fc58fa732b8acc496caedfdbae0 > /tmp/gcc8-fix.patch $ cd $HOME/poky-sumo/meta/recipes-devtools/python $ cp /tmp/gcc8-fix.patch python-native/ $ git diff python-native_2.7.14.bb diff --git a/meta/recipes-devtools/python/python-native_2.7.14.bb b/meta/recipes-devtools/python/python-native_2.7.14.bb index 7c491fa3e0..e9a8c14e9c 100644 --- a/meta/recipes-devtools/python/python-native_2.7.14.bb +++ b/meta/recipes-devtools/python/python-native_2.7.14.bb @@ -16,6 +16,7 @@ SRC_URI += "\ file://builddir.patch \ file://parallel-makeinst-create-bindir.patch \ file://revert_use_of_sysconfigdata.patch \ + file://gcc8-fix.patch \ " S = "${WORKDIR}/Python-${PV}" ---------- nosy: +Peter Senna Tschudin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 10:40:54 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 04 Jul 2018 14:40:54 +0000 Subject: [issue34031] [EASY] Incorrect usage of unittest.TestCase in test_urllib2_localnet In-Reply-To: <1530621349.65.0.56676864532.issue34031@psf.upfronthosting.co.za> Message-ID: <1530715254.2.0.56676864532.issue34031@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: This might be slightly unrelated but I grepped for similar cases and came across self.fail, "Broken file" in Lib/test/test_file.py at https://github.com/python/cpython/blob/a390cb6b6fb6638e91d699513167e8f35b47f846/Lib/test/test_file.py#L245. I think this is not triggered for broken file which I tried in the test by removing the if condition. Kindly correct me if I am wrong on the syntax or this should be raised as a separate issue. Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 10:47:28 2018 From: report at bugs.python.org (Reid) Date: Wed, 04 Jul 2018 14:47:28 +0000 Subject: [issue16899] Add support for C99 complex type (_Complex) as ctypes.c_complex In-Reply-To: <1357682763.46.0.590255439385.issue16899@psf.upfronthosting.co.za> Message-ID: <1530715648.75.0.56676864532.issue16899@psf.upfronthosting.co.za> Reid added the comment: I concur with rutsky. Complex numbers are essential in the physical sciences, and the complex type is part of the c99 standard. Trying to shoehorn complex support by a user-defined type makes use of the builtin methods for the standard complex type clunky. ---------- nosy: +rkmountainguy versions: +Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 10:55:46 2018 From: report at bugs.python.org (Sebastian Bank) Date: Wed, 04 Jul 2018 14:55:46 +0000 Subject: [issue34044] subprocess: reusing STARTUPINFO breaks under 3.7 (Windows) Message-ID: <1530716146.72.0.56676864532.issue34044@psf.upfronthosting.co.za> New submission from Sebastian Bank : AFAIU, the change for https://bugs.python.org/issue19764 broke the following usage of subprocess on Windows (re-using a subprocess.STARTUPINFO instance to hide the command window): import os, subprocess STARTUPINFO = subprocess.STARTUPINFO() STARTUPINFO.dwFlags |= subprocess.STARTF_USESHOWWINDOW STARTUPINFO.wShowWindow = subprocess.SW_HIDE # raises OSError: [WinError 87] # in the second loop iteration starting with Python 3.7 for i in range(2): print(i) with open(os.devnull, 'w') as stderr: subprocess.check_call(['attrib'], stderr=stderr, startupinfo=STARTUPINFO) AFAICT, this works on Python 2.7, 3.4, 3.5, and 3.6 I think the documentation in https://docs.python.org/3/library/subprocess.html#windows-popen-helpers does not mention that every Popen call should be done with a fresh instance, so either the documentation needs to be changed, or the implementation (e.g. by deep-copying the instance). See also https://bugs.python.org/issue19764#msg320784 ---------- components: Library (Lib) messages: 321047 nosy: eryksun, vstinner, xflr6 priority: normal severity: normal status: open title: subprocess: reusing STARTUPINFO breaks under 3.7 (Windows) type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 10:56:46 2018 From: report at bugs.python.org (Sebastian Bank) Date: Wed, 04 Jul 2018 14:56:46 +0000 Subject: [issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista In-Reply-To: <1385370115.99.0.757096187315.issue19764@psf.upfronthosting.co.za> Message-ID: <1530716206.88.0.56676864532.issue19764@psf.upfronthosting.co.za> Sebastian Bank added the comment: Thanks Eryk. Done: https://bugs.python.org/issue34044 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 11:01:25 2018 From: report at bugs.python.org (Armin Rigo) Date: Wed, 04 Jul 2018 15:01:25 +0000 Subject: [issue16899] Add support for C99 complex type (_Complex) as ctypes.c_complex In-Reply-To: <1357682763.46.0.590255439385.issue16899@psf.upfronthosting.co.za> Message-ID: <1530716485.66.0.56676864532.issue16899@psf.upfronthosting.co.za> Armin Rigo added the comment: cffi supports complex numbers since release 1.11---for direct calls using the API mode. That means that neither CFFI's ABI mode, nor ctypes, can possibly work yet. The problem is still libffi's own support, which is still not implemented (apart on a very uncommon CPU architecture, the s390). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 11:02:58 2018 From: report at bugs.python.org (Krishna Ram Prakash R) Date: Wed, 04 Jul 2018 15:02:58 +0000 Subject: [issue34045] DoS due to null pointer dereference in marshal.dumps() Message-ID: <1530716578.74.0.56676864532.issue34045@psf.upfronthosting.co.za> New submission from Krishna Ram Prakash R : By passing a malformed string as input to marshal.loads() an attacker can trigger a null pointer dereference resulting in DoS. This happens because when a Python object is unmarshalled by reference, it is assumed that the target object is fully constructed. We can construct a marshal string such that it can reference partially constructed Python objects. Example ------- tuple(FrozenSet(REF(0))) Tuple -> FrozenSet -> REF(0) When unmarshalling of the tuple object starts, a new PyTuple_New() object is created and its address is added to p->refs array before starting to parse and load all its children elements in a loop. A FrozenSet can be added as 0th element of this tuple. And then add the 0th element of this FrozenSet as p->refs[0]. After an element is added to FrozenSet, it tries to hash it believing that it is a completely constructed Python object. While it tries to hash the original tuple, it does not have any valid addresses in ob_item array. This results in a null pointer dereference throwing a SIGSEGV and crashing of interpreter. Running the below script results in a segmentation fault. ``` #!/usr/bin/env python3 import marshal marshal.loads(b"\xa9\x01\xbe\x01\x00\x00\x00r\x00\x00\x00\x00") ``` ---------- components: Interpreter Core, Library (Lib) messages: 321050 nosy: benjamin.peterson, rkrp priority: normal severity: normal status: open title: DoS due to null pointer dereference in marshal.dumps() type: security versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 11:12:43 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 04 Jul 2018 15:12:43 +0000 Subject: [issue34045] DoS due to null pointer dereference in marshal.dumps() In-Reply-To: <1530716578.74.0.56676864532.issue34045@psf.upfronthosting.co.za> Message-ID: <1530717163.84.0.56676864532.issue34045@psf.upfronthosting.co.za> Eric V. Smith added the comment: I do not believe this is a problem. The marshal documentation includes this: Warning The marshal module is not intended to be secure against erroneous or maliciously constructed data. Never unmarshal data received from an untrusted or unauthenticated source. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 11:16:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Jul 2018 15:16:56 +0000 Subject: [issue34044] subprocess: reusing STARTUPINFO breaks under 3.7 (Windows) In-Reply-To: <1530716146.72.0.56676864532.issue34044@psf.upfronthosting.co.za> Message-ID: <1530717416.52.0.56676864532.issue34044@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +7691 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 11:17:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Jul 2018 15:17:05 +0000 Subject: [issue34044] subprocess: reusing STARTUPINFO breaks under 3.7 (Windows) In-Reply-To: <1530716146.72.0.56676864532.issue34044@psf.upfronthosting.co.za> Message-ID: <1530717425.3.0.56676864532.issue34044@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 11:37:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Jul 2018 15:37:33 +0000 Subject: [issue34032] Add platlibdir to allow distinction between /usr/lib and /usr/lib64 for Linux In-Reply-To: <1530630040.09.0.56676864532.issue34032@psf.upfronthosting.co.za> Message-ID: <1530718653.16.0.56676864532.issue34032@psf.upfronthosting.co.za> STINNER Victor added the comment: Fedora python3 patch: https://src.fedoraproject.org/rpms/python3/blob/master/f/00102-lib64.patch ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 11:43:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 04 Jul 2018 15:43:05 +0000 Subject: [issue34045] DoS due to null pointer dereference in marshal.dumps() In-Reply-To: <1530716578.74.0.56676864532.issue34045@psf.upfronthosting.co.za> Message-ID: <1530718985.13.0.56676864532.issue34045@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I concur with Eric. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 11:45:14 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 04 Jul 2018 15:45:14 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1530719114.69.0.56676864532.issue33720@psf.upfronthosting.co.za> Steve Dower added the comment: Thanks for writing that second PR, Serhiy! I'd already spotted that as the likely fix on our side, though I do want to complete the investigation into why MSVC generated unnecessarily sparse frames. But that is basically an internal discussion for me to follow up on at work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 11:45:58 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 04 Jul 2018 15:45:58 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1530719158.69.0.56676864532.issue33720@psf.upfronthosting.co.za> Steve Dower added the comment: I added the backport to 3.7 label to your PR, as I want to restore the marshal stack depth limit in 3.7.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 11:50:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Jul 2018 15:50:34 +0000 Subject: [issue34032] Add platlibdir to allow distinction between /usr/lib and /usr/lib64 for Linux In-Reply-To: <1530630040.09.0.56676864532.issue34032@psf.upfronthosting.co.za> Message-ID: <1530719434.17.0.56676864532.issue34032@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum. I'm not sure about "unix_home" scheme in distutils. It seems like Fedora still writes files into $HOME/.../lib/... and not $HOME/.../lib64/.... Example on Fedora 28: vstinner at apu$ python3 -m pip install --user greenlet Collecting greenlet Using cached https://files.pythonhosted.org/packages/dd/ce/7b3a19a3eb8c79e6237ba1fb7a8729b39034dd2de8753b8d27e5abc59fd5/greenlet-0.4.13-cp36-cp36m-manylinux1_x86_64.whl Installing collected packages: greenlet Successfully installed greenlet-0.4.13 vstinner at apu$ python3 -m pip uninstall greenlet Uninstalling greenlet-0.4.13: Would remove: /home/vstinner/.local/include/python3.6m/greenlet/greenlet.h /home/vstinner/.local/lib/python3.6/site-packages/greenlet-0.4.13.dist-info/* /home/vstinner/.local/lib/python3.6/site-packages/greenlet.cpython-36m-x86_64-linux-gnu.so Proceed (y/n)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 11:51:14 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 04 Jul 2018 15:51:14 +0000 Subject: [issue34031] [EASY] Incorrect usage of unittest.TestCase in test_urllib2_localnet In-Reply-To: <1530621349.65.0.56676864532.issue34031@psf.upfronthosting.co.za> Message-ID: <1530719474.4.0.56676864532.issue34031@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 12:19:59 2018 From: report at bugs.python.org (Nir Barel) Date: Wed, 04 Jul 2018 16:19:59 +0000 Subject: [issue34046] subparsers -> add_parser doesn't support hyphen char '-' Message-ID: <1530721199.23.0.56676864532.issue34046@psf.upfronthosting.co.za> New submission from Nir Barel : parent_parser = argparse.ArgumentParser(add_help=False) main_parser = argparse.ArgumentParser(prog='app_cli') service_subparsers = main_parser.add_subparsers(title="service", dest="service_command", ) service_parser = service_subparsers.add_parser("-dr", help="sample help", parents=[parent_parser]) service_parser.add_argument("-old_host",help="my old host", dest="oldHost", required=False) args = main_parser.parse_args() when I try to run the app_cli -dr I am getting an error "error:unrecognized arguments: -dr" when I try to run the app_cli with -dr -h I am getting the help of the main application and not the help of the service subparser only if I change '-dr' to 'dr' it works as expected, but I need to support the hyphen for all arguments ---------- components: Library (Lib) messages: 321057 nosy: nir_barel at bmc.com priority: normal severity: normal status: open title: subparsers -> add_parser doesn't support hyphen char '-' type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 13:14:47 2018 From: report at bugs.python.org (Bruce Elgort) Date: Wed, 04 Jul 2018 17:14:47 +0000 Subject: [issue34047] Scrolling in IDLE for OS X is not working Message-ID: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> New submission from Bruce Elgort : When using IDLE on OS X and scrolling to the bottom of a file you are not able to scroll using a mouse back up. You need to use the arrow keys. ---------- assignee: terry.reedy components: IDLE messages: 321058 nosy: belgort, terry.reedy priority: normal severity: normal status: open title: Scrolling in IDLE for OS X is not working type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 13:15:13 2018 From: report at bugs.python.org (Bruce Elgort) Date: Wed, 04 Jul 2018 17:15:13 +0000 Subject: [issue34047] Scrolling in IDLE for OS X is not working correctly when reaching end of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1530724513.98.0.56676864532.issue34047@psf.upfronthosting.co.za> Change by Bruce Elgort : ---------- title: Scrolling in IDLE for OS X is not working -> Scrolling in IDLE for OS X is not working correctly when reaching end of file _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 13:17:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 04 Jul 2018 17:17:17 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1530724637.56.0.56676864532.issue33720@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Unfortunately PR 8071 doesn't fix the crash on PGO builds. :-( Initially I tested it only on the debug build, and now have tested on the PGO build. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 13:50:25 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 04 Jul 2018 17:50:25 +0000 Subject: [issue34047] Scrolling in IDLE for OS X is not working correctly when reaching end of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1530726625.69.0.56676864532.issue34047@psf.upfronthosting.co.za> Ned Deily added the comment: I think I am able to reproduce that behavior (I'm using IDLE from a python.org 10.9+ installer). What I'm seeing is that if you scroll to the bottom of a file that exceeds the length of the open text window and then click on and try to move the position indicator in the scroll bar, the position indicator does not move nor does the file scroll. But if I then click elsewhere in the scroll bar and then try to grab and move the indicator, it works OK. So perhaps IDLE is overriding a text widget event or some such. FWIW a quick test in the wish8.6 text demo seems to work OK. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 14:38:54 2018 From: report at bugs.python.org (Roundup Robot) Date: Wed, 04 Jul 2018 18:38:54 +0000 Subject: [issue34031] [EASY] Incorrect usage of unittest.TestCase in test_urllib2_localnet In-Reply-To: <1530621349.65.0.56676864532.issue34031@psf.upfronthosting.co.za> Message-ID: <1530729534.98.0.56676864532.issue34031@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +7692 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 14:42:08 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 04 Jul 2018 18:42:08 +0000 Subject: [issue30516] Documentation for datetime substract operation incorrect? In-Reply-To: <1496179333.45.0.413102703331.issue30516@psf.upfronthosting.co.za> Message-ID: <1530729728.63.0.56676864532.issue30516@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: New changeset 5b6e49a1393b3e2313471696e3568e26296137b4 by Alexander Belopolsky (Farhaan Bukhsh) in branch 'master': bpo-30516: Fix documentation issue with -timedelta in datetime (GH-7348) https://github.com/python/cpython/commit/5b6e49a1393b3e2313471696e3568e26296137b4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 14:43:23 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 04 Jul 2018 18:43:23 +0000 Subject: [issue30516] Documentation for datetime substract operation incorrect? In-Reply-To: <1496179333.45.0.413102703331.issue30516@psf.upfronthosting.co.za> Message-ID: <1530729803.45.0.56676864532.issue30516@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7693 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 14:44:14 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 04 Jul 2018 18:44:14 +0000 Subject: [issue30516] Documentation for datetime substract operation incorrect? In-Reply-To: <1496179333.45.0.413102703331.issue30516@psf.upfronthosting.co.za> Message-ID: <1530729854.19.0.56676864532.issue30516@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7694 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 16:41:58 2018 From: report at bugs.python.org (=?utf-8?b?SmFuIMWgdmVj?=) Date: Wed, 04 Jul 2018 20:41:58 +0000 Subject: [issue34048] Bad behavior of re.IGNORECASE Message-ID: <1530736918.23.0.56676864532.issue34048@psf.upfronthosting.co.za> New submission from Jan ?vec : re.sub() is behaving incorrectly, if re.IGNORECASE is used. Tested on 2.7, 3.4 and 3.6. The code follows: import re def subst(text): text = re.sub(r"\bnine\b", "niner", text, re.IGNORECASE) return text print(subst("nine nine nine nine")) It prints "niner niner nine nine". Without the re.IGNORECASE, the output is correct: "niner niner niner niner" ---------- components: Regular Expressions messages: 321062 nosy: Jan ?vec, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: Bad behavior of re.IGNORECASE type: behavior versions: Python 2.7, Python 3.4, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 16:45:13 2018 From: report at bugs.python.org (=?utf-8?b?SmFuIMWgdmVj?=) Date: Wed, 04 Jul 2018 20:45:13 +0000 Subject: [issue34048] Bad behavior of re.IGNORECASE In-Reply-To: <1530736918.23.0.56676864532.issue34048@psf.upfronthosting.co.za> Message-ID: <1530737113.21.0.56676864532.issue34048@psf.upfronthosting.co.za> Jan ?vec added the comment: Not a bug, it assigns the value of re.IGNORECASE into the count parameter. Sorry ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 17:31:14 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 04 Jul 2018 21:31:14 +0000 Subject: [issue34047] Scrolling in IDLE for OS X is not working correctly when reaching end of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1530739874.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Terry J. Reedy added the comment: There are 3 ways to scroll by key in each direction: Arrow Down/Up, Page Down/Up, and Cntl End/Home. There are 4 ways to scroll by mouse, in each direction: Mousewheel down/up, Scrollbar arrow bottom/top (== Arrow keys), Scrollbar trough below/above slider (= Page keys), and Scrollbar slider. On Windows, if I Load Module idlelib.editor and go to the bottom, with the text cursor on the last line, all up methods work. Bruce, which of the four mouse up methods don't work for you? Just grabbing the slider, as Ned found? What happens is you move the slider down, and try to move up without releasing the button? Cheryl or Tal, can one of you check on Linux? In the text area, the mouse pointer, for me, is a vertical bar and the slider is a light gray. When I move the mouse over the scrollbar slider, the slider become active and ready to click on. The indication is that the mouse pointer becomes an arrow pointing up left and the slider turns dark gray. When the mouse is over the scrollbar trough or arrows, the slider only darkens to medium gray. When over an arrow, the arrow darkens. Bruce, do you see the 'activation' change when the slider is at the bottom and you mouse over it, but cannot grab it? In May, we changed the 3.6+ editor text/mousewheel/scrollbar interaction a bit so that the text scrolled by lines, rather than by pixel. #33664, PR 7351. There is always a complete line at the top -- unless one changes the window height to a non-integral number of lines and moves the cursor to the last line. (Then the complete lines are at the bottom until one moves the cursor to the top line -- Cheryl, we should try to fix this.) The patch changed the command function that the scrollbar calls when it is clicked or the slider is moved to editor.EditorWindow.handle_yview. The new function has an extraneous "return 'break'" that can and should be removed. But I doubt that is the problem. It also has new code that is only executed for slider movements. If only the slider has a problem and this slider code were to raise when at the bottom, we might have an explanation. I am dubious, as the only possible platform-specific calls are the tkinter calls text.index('end') and text.index('@0.0'). To check this anyway, please start IDLE in the Mac terminal with 'python3 -m idlelib' (correct on Mac?) and repeat the failing action and see if a traceback appears. It might also help to know if 2.7 or 3.5- have the same problem. ---------- nosy: +cheryl.sabella, taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 18:23:28 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 04 Jul 2018 22:23:28 +0000 Subject: [issue33998] random.randrange completely ignores the step argument when stop is None In-Reply-To: <1530280333.65.0.56676864532.issue33998@psf.upfronthosting.co.za> Message-ID: <1530743008.39.0.56676864532.issue33998@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thank you for the contribution, but I'm going to decline. The parallel function range() doesn't even accept keyword arguments. I don't see any reason to support an oddity such as "randrange(10, step=2)" in part because the meaning isn't clear and in part because there is no known use case. ---------- assignee: tim.peters -> rhettinger resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 18:59:54 2018 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 04 Jul 2018 22:59:54 +0000 Subject: [issue20602] sys.flags and sys.float_info disappear at shutdown In-Reply-To: <1392146521.44.0.544055558433.issue20602@psf.upfronthosting.co.za> Message-ID: <1530745194.04.0.56676864532.issue20602@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +7695 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 19:04:06 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 04 Jul 2018 23:04:06 +0000 Subject: [issue30516] Documentation for datetime substract operation incorrect? In-Reply-To: <1496179333.45.0.413102703331.issue30516@psf.upfronthosting.co.za> Message-ID: <1530745446.19.0.56676864532.issue30516@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: New changeset 55f39bdabc91b387c18451c78ee077e6d05d6cfe by Alexander Belopolsky (Miss Islington (bot)) in branch '3.6': bpo-30516: Fix documentation issue with -timedelta in datetime (GH-7348) (GH-8092) https://github.com/python/cpython/commit/55f39bdabc91b387c18451c78ee077e6d05d6cfe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 19:04:27 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 04 Jul 2018 23:04:27 +0000 Subject: [issue30516] Documentation for datetime substract operation incorrect? In-Reply-To: <1496179333.45.0.413102703331.issue30516@psf.upfronthosting.co.za> Message-ID: <1530745467.07.0.56676864532.issue30516@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: New changeset a8bb18bbb9c286cfac5a0b8c8679c440e5c49305 by Alexander Belopolsky (Miss Islington (bot)) in branch '3.7': bpo-30516: Fix documentation issue with -timedelta in datetime (GH-7348) (GH-8093) https://github.com/python/cpython/commit/a8bb18bbb9c286cfac5a0b8c8679c440e5c49305 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 19:05:50 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 04 Jul 2018 23:05:50 +0000 Subject: [issue30516] Documentation for datetime substract operation incorrect? In-Reply-To: <1496179333.45.0.413102703331.issue30516@psf.upfronthosting.co.za> Message-ID: <1530745550.66.0.56676864532.issue30516@psf.upfronthosting.co.za> Change by Alexander Belopolsky : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 19:11:45 2018 From: report at bugs.python.org (Matej Cepl) Date: Wed, 04 Jul 2018 23:11:45 +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: <1530745905.52.0.56676864532.issue34022@psf.upfronthosting.co.za> Matej Cepl added the comment: >From https://mail.python.org/pipermail/python-dev/2018-July/154273.html (by Nick Coghlan): In particular, if a build system sets SOURCE_DATE_EPOCH without specifying a pyc format for py_compile or compileall, Python 3.7 will give you checked hashes by default: https://docs.python.org/3/library/py_compile.html?highlight=source_date_epoch#py_compile.compile ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 19:18:53 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 04 Jul 2018 23:18:53 +0000 Subject: [issue34008] Do we support calling Py_Main() after Py_Initialize()? In-Reply-To: <1530341921.37.0.56676864532.issue34008@psf.upfronthosting.co.za> Message-ID: <1530746333.22.0.56676864532.issue34008@psf.upfronthosting.co.za> Change by Alexander Belopolsky : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 19:27:10 2018 From: report at bugs.python.org (Matej Cepl) Date: Wed, 04 Jul 2018 23:27:10 +0000 Subject: [issue34033] distutils is not reproducible In-Reply-To: <1530632785.81.0.56676864532.issue34033@psf.upfronthosting.co.za> Message-ID: <1530746830.92.0.56676864532.issue34033@psf.upfronthosting.co.za> Change by Matej Cepl : ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 23:06:10 2018 From: report at bugs.python.org (Zachary Ware) Date: Thu, 05 Jul 2018 03:06:10 +0000 Subject: [issue30400] Race condition in shutil.copyfile() In-Reply-To: <1495138920.07.0.300372261513.issue30400@psf.upfronthosting.co.za> Message-ID: <1530759970.36.0.56676864532.issue30400@psf.upfronthosting.co.za> Zachary Ware added the comment: This can only be accepted into 3.8 at this point due to the new exception type. The patch looks fairly straightforward; would it be possible to add a test that hits the new raise condition? ---------- nosy: +zach.ware stage: -> patch review versions: +Python 3.8 -Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 23:30:09 2018 From: report at bugs.python.org (Zachary Ware) Date: Thu, 05 Jul 2018 03:30:09 +0000 Subject: [issue1327594] Static Windows Build fails to locate existing installation Message-ID: <1530761409.5.0.56676864532.issue1327594@psf.upfronthosting.co.za> Zachary Ware added the comment: The patch is many years out of date by this point. Does anyone know what it takes to create a static binary on Windows these days? ---------- versions: +Python 3.8 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 4 23:42:10 2018 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 05 Jul 2018 03:42:10 +0000 Subject: [issue20602] sys.flags and sys.float_info disappear at shutdown In-Reply-To: <1392146521.44.0.544055558433.issue20602@psf.upfronthosting.co.za> Message-ID: <1530762130.0.0.56676864532.issue20602@psf.upfronthosting.co.za> Zackery Spytz added the comment: This behaviour is present in 2.7. ---------- nosy: +ZackerySpytz versions: +Python 2.7, Python 3.6, Python 3.7, Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 00:04:35 2018 From: report at bugs.python.org (Zachary Ware) Date: Thu, 05 Jul 2018 04:04:35 +0000 Subject: [issue16968] Fix test discovery for test_concurrent_futures.py In-Reply-To: <1358201974.23.0.0352259739582.issue16968@psf.upfronthosting.co.za> Message-ID: <1530763475.72.0.56676864532.issue16968@psf.upfronthosting.co.za> Change by Zachary Ware : ---------- pull_requests: +7696 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 00:07:02 2018 From: report at bugs.python.org (Zachary Ware) Date: Thu, 05 Jul 2018 04:07:02 +0000 Subject: [issue16968] Fix test discovery for test_concurrent_futures.py In-Reply-To: <1358201974.23.0.0352259739582.issue16968@psf.upfronthosting.co.za> Message-ID: <1530763622.18.0.56676864532.issue16968@psf.upfronthosting.co.za> Zachary Ware added the comment: Looking at this again after 5 years, things have changed a bit and I also better understand what's actually going on in the tests. IIUC, the `test_main` function's only real purpose was to cause any dangling threads or processes to be reaped, which should actually be done by the shutdown methods of the tested executors. Doing that cleanup in test_main (if successful), would actually prevent us from getting useful warnings from regrtest if shutdown did not clean up properly, so the attached PR simply removes test_main. ---------- versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 01:08:09 2018 From: report at bugs.python.org (Matej Cepl) Date: Thu, 05 Jul 2018 05:08:09 +0000 Subject: [issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc. In-Reply-To: <1515429303.77.0.467229070634.issue32521@psf.upfronthosting.co.za> Message-ID: <1530767289.29.0.56676864532.issue32521@psf.upfronthosting.co.za> Matej Cepl added the comment: So, if this is a duplicate of #32007, shouldn't it be closed? ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 01:12:20 2018 From: report at bugs.python.org (Matej Cepl) Date: Thu, 05 Jul 2018 05:12:20 +0000 Subject: [issue32007] nis module fails to build against glibc-2.26 In-Reply-To: <1510419983.02.0.213398074469.issue32007@psf.upfronthosting.co.za> Message-ID: <1530767540.65.0.56676864532.issue32007@psf.upfronthosting.co.za> Matej Cepl added the comment: It seems to be even more weird. Even with installed libnsl-devel (libnsl-devel-1.2.0-2.5.x86_64 on openSUSE/Tumbleweed) I get this in config.log: checking for t_open in -lnsl... no and truly, when grepping for t_open in /usr/include/rpc* I get nothing. ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 01:14:18 2018 From: report at bugs.python.org (Matej Cepl) Date: Thu, 05 Jul 2018 05:14:18 +0000 Subject: [issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc. In-Reply-To: <1515429303.77.0.467229070634.issue32521@psf.upfronthosting.co.za> Message-ID: <1530767658.79.0.56676864532.issue32521@psf.upfronthosting.co.za> Matej Cepl added the comment: It seems to be even more weird. Even with installed libnsl-devel (libnsl-devel-1.2.0-2.5.x86_64 on openSUSE/Tumbleweed) I get this in config.log: checking for t_open in -lnsl... no and truly, when grepping for t_open in /usr/include/rpc* I get nothing. When searching for t_open, it seems to be something from Solaris world. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 01:39:53 2018 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 05 Jul 2018 05:39:53 +0000 Subject: [issue33955] Implement PyOS_CheckStack on macOS using pthread_get_stack*_np In-Reply-To: <1529925495.69.0.56676864532.issue33955@psf.upfronthosting.co.za> Message-ID: <1530769193.64.0.56676864532.issue33955@psf.upfronthosting.co.za> Dong-hee Na added the comment: @ronaldoussoren I updated the PR Please take a look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 01:52:14 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 05 Jul 2018 05:52:14 +0000 Subject: [issue34019] webbrowser: wrong arguments for Opera browser. In-Reply-To: <1530525080.65.0.56676864532.issue34019@psf.upfronthosting.co.za> Message-ID: <1530769934.7.0.56676864532.issue34019@psf.upfronthosting.co.za> Tal Einat added the comment: Shouldn't this be backported to 2.7 as well? ---------- nosy: +taleinat versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 02:08:35 2018 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 05 Jul 2018 06:08:35 +0000 Subject: [issue33955] Implement PyOS_CheckStack on macOS using pthread_get_stack*_np In-Reply-To: <1529925495.69.0.56676864532.issue33955@psf.upfronthosting.co.za> Message-ID: <1530770915.94.0.56676864532.issue33955@psf.upfronthosting.co.za> Dong-hee Na added the comment: benchmark result: 22.639114022999998 secs master (+0%) 22.806662271 secs PR 8046 (-0.74%) def fib(n): if n == 0: return 0 if n == 1: return 1 return fib(n-2) + fib(n-1) if __name__ == '__main__': import timeit print(timeit.timeit("fib(10)", setup="from __main__ import fib")) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 02:13:03 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 05 Jul 2018 06:13:03 +0000 Subject: [issue34029] tkinter.filedialog.askdirectory() crashing before dialog opens when importing pywinauto In-Reply-To: <1530609625.32.0.56676864532.issue34029@psf.upfronthosting.co.za> Message-ID: <1530771183.9.0.56676864532.issue34029@psf.upfronthosting.co.za> Tal Einat added the comment: Confirmed with Python 3.6.3 on Windows 10 64-bit: It hangs showing an empty window. Debugging a bit, the hang happens in Lib/tkinter/commondialog.py, line 43: s = w.tk.call(self.command, *w._options(self.options)) The value of self.command is 'tk_chooseDirectory', and w._options(self.options) just gives an empty tuple, so the actual call is: s = w.tk.call('tk_chooseDirectory', ()) This means that the hang is within w.tk.call(). I'd follow this up with the pywinauto devs. To me this doesn't seem like something wrong with the tkinter module. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 02:44:31 2018 From: report at bugs.python.org (Windson Yang) Date: Thu, 05 Jul 2018 06:44:31 +0000 Subject: [issue34049] abs() method accept argument that implement __abs__() Message-ID: <1530773071.47.0.56676864532.issue34049@psf.upfronthosting.co.za> New submission from Windson Yang : Just like callable() method in https://docs.python.org/3/library/functions.html#callable > ...instances are callable if their class has a __call__() method. I think we should also mention this in abs(), abs(x) Return the absolute value of a number. If x defines __abs__, abs(x) returns x.__abs__(). The argument may be an integer or a floating point number. If the argument is a complex number, its magnitude is returned. ---------- components: Library (Lib) messages: 321080 nosy: Windson Yang priority: normal severity: normal status: open title: abs() method accept argument that implement __abs__() type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 03:15:45 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Jul 2018 07:15:45 +0000 Subject: [issue34049] abs() method accept argument that implement __abs__() In-Reply-To: <1530773071.47.0.56676864532.issue34049@psf.upfronthosting.co.za> Message-ID: <1530774945.25.0.56676864532.issue34049@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This is a reasonable request. Would you like to make a PR? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 04:04:56 2018 From: report at bugs.python.org (Windson Yang) Date: Thu, 05 Jul 2018 08:04:56 +0000 Subject: [issue34049] abs() method accept argument that implement __abs__() In-Reply-To: <1530773071.47.0.56676864532.issue34049@psf.upfronthosting.co.za> Message-ID: <1530777896.79.0.56676864532.issue34049@psf.upfronthosting.co.za> Change by Windson Yang : ---------- keywords: +patch pull_requests: +7697 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 04:09:08 2018 From: report at bugs.python.org (Windson Yang) Date: Thu, 05 Jul 2018 08:09:08 +0000 Subject: [issue34049] abs() method accept argument that implement __abs__() In-Reply-To: <1530773071.47.0.56676864532.issue34049@psf.upfronthosting.co.za> Message-ID: <1530778148.66.0.56676864532.issue34049@psf.upfronthosting.co.za> Windson Yang added the comment: I'd love to. (BTW, @rhettinger I just watched your fantastic multiprocessing tutorial. :D) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 04:10:28 2018 From: report at bugs.python.org (Windson Yang) Date: Thu, 05 Jul 2018 08:10:28 +0000 Subject: [issue34049] abs() method accept argument that implement __abs__() In-Reply-To: <1530773071.47.0.56676864532.issue34049@psf.upfronthosting.co.za> Message-ID: <1530778228.39.0.56676864532.issue34049@psf.upfronthosting.co.za> Change by Windson Yang : ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 04:17:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 05 Jul 2018 08:17:30 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1530778650.0.0.56676864532.issue33720@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset fc05e68d8fac70349b7ea17ec14e7e0cfa956121 by Serhiy Storchaka in branch 'master': bpo-33720: Improve tests for the stack overflow in marshal.loads(). (GH-7336) https://github.com/python/cpython/commit/fc05e68d8fac70349b7ea17ec14e7e0cfa956121 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 04:17:41 2018 From: report at bugs.python.org (Roland Weber) Date: Thu, 05 Jul 2018 08:17:41 +0000 Subject: [issue34050] Broken links to "OpenSSL cipher list format" in documentation Message-ID: <1530778661.86.0.56676864532.issue34050@psf.upfronthosting.co.za> New submission from Roland Weber : The docs for SSLContext.set_ciphers [1] in Python 3 and ssl.wrap_socket [2] in Python 2 contain a link for "OpenSSL cipher list format", which points to an empty wiki page at https://wiki.openssl.org/index.php/Manual:Ciphers(1)#CIPHER_LIST_FORMAT The OpenSSL cipher list format is currently documented here instead: https://www.openssl.org/docs/manmaster/man1/ciphers.html [1] https://docs.python.org/3/library/ssl.html#ssl.SSLContext.set_ciphers [2] https://docs.python.org/2/library/ssl.html#ssl.wrap_socket ---------- assignee: docs at python components: Documentation messages: 321085 nosy: docs at python, rolweber priority: normal severity: normal status: open title: Broken links to "OpenSSL cipher list format" in documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 04:18:32 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 05 Jul 2018 08:18:32 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1530778712.54.0.56676864532.issue33720@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7699 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 04:20:31 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 05 Jul 2018 08:20:31 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1530778831.33.0.56676864532.issue33720@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7700 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 04:38:35 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 05 Jul 2018 08:38:35 +0000 Subject: [issue34050] Broken links to "OpenSSL cipher list format" in documentation In-Reply-To: <1530778661.86.0.56676864532.issue34050@psf.upfronthosting.co.za> Message-ID: <1530779915.06.0.56676864532.issue34050@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks for your report. Do you want to work on a patch, too? ---------- keywords: +easy nosy: +christian.heimes stage: -> needs patch versions: +Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 04:45:26 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 05 Jul 2018 08:45:26 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1530780326.97.0.56676864532.issue33720@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 3f121a40c7526aedb2a40a1be8f0ae96b267bf26 by Miss Islington (bot) in branch '3.7': bpo-33720: Improve tests for the stack overflow in marshal.loads(). (GH-7336) https://github.com/python/cpython/commit/3f121a40c7526aedb2a40a1be8f0ae96b267bf26 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 04:45:49 2018 From: report at bugs.python.org (Windson Yang) Date: Thu, 05 Jul 2018 08:45:49 +0000 Subject: [issue34051] Update multiprocessing example Message-ID: <1530780349.49.0.56676864532.issue34051@psf.upfronthosting.co.za> New submission from Windson Yang : The docs at https://docs.python.org/3.8/library/multiprocessing.html#synchronization-between-processes give an example: from multiprocessing import Process, Lock def f(l, i): l.acquire() try: print('hello world', i) finally: l.release() if __name__ == '__main__': lock = Lock() for num in range(10): Process(target=f, args=(lock, num)).start() and point out "For instance one can use a lock to ensure that only one process prints to standard output at a time...". I'm not sure this is a good enough example for the reader. The reader can't tell the difference between the function with l.acquire() or not, The output just shows in the terminal at the same time. So I think a better idea just add time.sleep(0.1) before print('hello world', i) like this: l.acquire() try: # do something here # time.sleep(0.1) print('hello world', i) I can provide a pr if you guys like this idea. ---------- assignee: docs at python components: Documentation messages: 321088 nosy: Windson Yang, docs at python priority: normal severity: normal status: open title: Update multiprocessing example versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 04:48:49 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 05 Jul 2018 08:48:49 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1530780529.63.0.56676864532.issue33720@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 878c4fe40e8954372e9bf80ae555045ecae68e73 by Miss Islington (bot) in branch '3.6': bpo-33720: Improve tests for the stack overflow in marshal.loads(). (GH-7336) https://github.com/python/cpython/commit/878c4fe40e8954372e9bf80ae555045ecae68e73 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 04:50:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 05 Jul 2018 08:50:16 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1530780616.86.0.56676864532.issue33720@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +7701 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 04:55:09 2018 From: report at bugs.python.org (Kay Hayen) Date: Thu, 05 Jul 2018 08:55:09 +0000 Subject: [issue34042] Reference loss for local classes In-Reply-To: <1530704571.33.0.56676864532.issue34042@psf.upfronthosting.co.za> Message-ID: <1530780909.13.0.56676864532.issue34042@psf.upfronthosting.co.za> Kay Hayen added the comment: Just to confirm, this is also happening on Windows as well, with both 32 and 64 bits. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 05:18:28 2018 From: report at bugs.python.org (Roland Weber) Date: Thu, 05 Jul 2018 09:18:28 +0000 Subject: [issue34050] Broken links to "OpenSSL cipher list format" in documentation In-Reply-To: <1530778661.86.0.56676864532.issue34050@psf.upfronthosting.co.za> Message-ID: <1530782308.62.0.56676864532.issue34050@psf.upfronthosting.co.za> Roland Weber added the comment: I'm afraid I don't have the time to work on a patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 05:20:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 05 Jul 2018 09:20:22 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1530782421.98.0.56676864532.issue33720@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 9720f60f2aba457121bfe42d09aa3ed91f28b86f by Serhiy Storchaka in branch '2.7': [2.7] bpo-33720: Improve tests for the stack overflow in marshal.loads(). (GH-7336). (GH-8107) https://github.com/python/cpython/commit/9720f60f2aba457121bfe42d09aa3ed91f28b86f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 05:43:44 2018 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 05 Jul 2018 09:43:44 +0000 Subject: [issue1327594] Static Windows Build fails to locate existing installation Message-ID: <1530783824.96.0.56676864532.issue1327594@psf.upfronthosting.co.za> Change by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 06:06:36 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 05 Jul 2018 10:06:36 +0000 Subject: [issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7 In-Reply-To: <1527865087.2.0.81473610881.issue33735@psf.upfronthosting.co.za> Message-ID: <1530785196.93.0.56676864532.issue33735@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: We have some similar failures on the x86 Gentoo Refleaks 3.7 buildbots: http://buildbot.python.org/all/#/builders/114/builds/157/steps/4/logs/stdio http://buildbot.python.org/all/#/builders/114/builds/155/steps/4/logs/stdio ---------------------------------------------------------------------- Ran 310 tests in 249.377s OK (skipped=30) . test_multiprocessing_spawn leaked [1, 2, 2] memory blocks, sum=5 1 test failed again: test_multiprocessing_spawn == Tests result: FAILURE then FAILURE == It seems that is due to a high load on the buildbot but I am surprised that this is not mitigated after PR 8059. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 06:34:47 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Thu, 05 Jul 2018 10:34:47 +0000 Subject: [issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function Message-ID: <1530786887.48.0.56676864532.issue34052@psf.upfronthosting.co.za> New submission from Sergey Fedoseev : In [1]: import sqlite3 In [2]: con = sqlite3.connect(':memory:') In [3]: con.execute('SELECT f()') --------------------------------------------------------------------------- OperationalError Traceback (most recent call last) in () ----> 1 con.execute('SELECT f()') OperationalError: no such function: f In [4]: con.create_function('f', 0, []) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) in () ----> 1 con.create_function('f', 0, []) TypeError: unhashable type: 'list' In [5]: con.execute('SELECT f()') --------------------------------------------------------------------------- OperationalError Traceback (most recent call last) in () ----> 1 con.execute('SELECT f()') OperationalError: user-defined function raised exception It seems that something like this cause segmentation fault, but I can't reproduce it. Some other similar sqlite functions also affected. They can be easily modified to accept unhashable objects, but probably it should be done in another issue. ---------- components: Extension Modules messages: 321094 nosy: sir-sigurd priority: normal severity: normal status: open title: sqlite's create_function() raises exception on unhashable callback, but creates function type: behavior versions: Python 2.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 06:39:17 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Thu, 05 Jul 2018 10:39:17 +0000 Subject: [issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function In-Reply-To: <1530786887.48.0.56676864532.issue34052@psf.upfronthosting.co.za> Message-ID: <1530787157.15.0.56676864532.issue34052@psf.upfronthosting.co.za> Change by Sergey Fedoseev : ---------- keywords: +patch pull_requests: +7702 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 06:52:10 2018 From: report at bugs.python.org (Pander) Date: Thu, 05 Jul 2018 10:52:10 +0000 Subject: [issue34053] Support localization of unicode descriptions Message-ID: <1530787930.49.0.56676864532.issue34053@psf.upfronthosting.co.za> New submission from Pander : Please, support localization for Unicode block description and character description. Translations are available from https://github.com/unicode-table/unicode-table-data/tree/master/loc If possible, use a gettext approach similar to https://pypi.org/project/pycountry/ Implementing this feature will allow users to read Unicode descriptions in their own language, other than English. For example, now is possible only in English: from unicodedata import name print(name('?')) LATIN SMALL LETTER SHARP S So unicodedata could provide a way to translate LATIN SMALL LETTER SHARP S to e.g. German with: from unicodedata import name, LOCALED_DIR from gettext import translation german = translation('UnicodeData' LOCALED_DIR, languages=['de']) german.install() print(_(name('?'))) LATEINISCHER KLEINBUCHSTABE SCHARFES S and something similar for unicodedata.category ---------- components: Unicode messages: 321095 nosy: PanderMusubi, ezio.melotti, vstinner priority: normal severity: normal status: open title: Support localization of unicode descriptions type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 06:53:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 05 Jul 2018 10:53:58 +0000 Subject: [issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function In-Reply-To: <1530786887.48.0.56676864532.issue34052@psf.upfronthosting.co.za> Message-ID: <1530788038.14.0.56676864532.issue34052@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka nosy: +ghaering, serhiy.storchaka versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 06:54:19 2018 From: report at bugs.python.org (simon) Date: Thu, 05 Jul 2018 10:54:19 +0000 Subject: [issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support In-Reply-To: <1530609211.5.0.56676864532.issue34028@psf.upfronthosting.co.za> Message-ID: <1530788059.9.0.56676864532.issue34028@psf.upfronthosting.co.za> simon added the comment: Thanks I have found teh root cause of the problem ... --with-openssl=[my_dir] The configure scripts has an assumption you are compiling against a binary packaged version of openssl and that there is a /lib folder under [my_dir]. This simply does not exist under any of the source code releases of openssl. So after I compiled the openssl source code I had to create the lib folder under my openssh build directory and symlink the *.so libraries there for the configure script to work This is still an issue even if you edit Setup correctlty to compile the module. >> This is a problem for people like me who are institutional users that have cross platform enterprise softwre deployment platforms (e.g. BladeLogic). There are restricted policies on what packages you can install on a server. In most cases especially for in house developed software) you need to build all dependencies seperatly and bundle them into a package (e.g. /opt RPM) that includes all required depencencies rather than rely on distribution library packages that are hard to manage at an Enterprise level and where you may be sharing the same OS. To make the code more robust should it not 1st check under the root of [my_dir] before assuming [my_dir]/lib exests or at least report teh full path with the /lib added onto teh end of {my_dir} so you know where confiure has gone wrong ? Is this not a fair expectation? no lib folder checking for openssl/ssl.h in /home/BD7046/openssl... no checking whether compiling and linking against OpenSSL works... no with lib folder checking for openssl/ssl.h in /home/BC7046/openssl... yes checking whether compiling and linking against OpenSSL works... yes Thanks for all your help #PortingPerltoPython ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 07:17:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Jul 2018 11:17:04 +0000 Subject: [issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7 In-Reply-To: <1527865087.2.0.81473610881.issue33735@psf.upfronthosting.co.za> Message-ID: <1530789424.68.0.56676864532.issue33735@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok ok, let me be honest with myself, my *workaround* change is not reliable :-) ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 07:31:02 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 05 Jul 2018 11:31:02 +0000 Subject: [issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc. In-Reply-To: <1515429303.77.0.467229070634.issue32521@psf.upfronthosting.co.za> Message-ID: <1530790262.32.0.56676864532.issue32521@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Matej is this about Python 2? Because the solution didn't actually work for Python 2 and on Fedora we had to implement a workaround [0]. Unfortunately there weren't enough free cycles so far to investigate further. [0] https://src.fedoraproject.org/rpms/python2/c/3056bfd92a4269ad8f9b57cab05af3125e87ca8c?branch=master ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 07:49:17 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 05 Jul 2018 11:49:17 +0000 Subject: [issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support In-Reply-To: <1530609211.5.0.56676864532.issue34028@psf.upfronthosting.co.za> Message-ID: <1530791357.75.0.56676864532.issue34028@psf.upfronthosting.co.za> Christian Heimes added the comment: autoconf's --with-library options typically don't support build directories and work with installed versions only. The --with-openssl is no different. I suggest that you install OpenSSL to a local directory and then configure Python to fetch OpenSSL from that directory. The multissltest script in Tools/ssl uses that approach to build Python with multiple OpenSSL versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 08:41:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Jul 2018 12:41:04 +0000 Subject: [issue34053] Support localization of unicode descriptions In-Reply-To: <1530787930.49.0.56676864532.issue34053@psf.upfronthosting.co.za> Message-ID: <1530794464.41.0.56676864532.issue34053@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't think that such feature belongs to the stdlib. I suggest you to start a project on PyPI and comes back once the module is popular enough to justify to be added to the stdlib. Moreover, IMHO python-ideas is a better place, than this bug tracker, to propose to idea. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 09:08:37 2018 From: report at bugs.python.org (Pander) Date: Thu, 05 Jul 2018 13:08:37 +0000 Subject: [issue34053] Support localization of unicode descriptions In-Reply-To: <1530787930.49.0.56676864532.issue34053@psf.upfronthosting.co.za> Message-ID: <1530796117.2.0.56676864532.issue34053@psf.upfronthosting.co.za> Pander added the comment: Thanks, posted it at https://groups.google.com/forum/#!topic/python-ideas/g2jj4WRVDFA ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 09:10:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Jul 2018 13:10:08 +0000 Subject: [issue34053] Support localization of unicode descriptions In-Reply-To: <1530787930.49.0.56676864532.issue34053@psf.upfronthosting.co.za> Message-ID: <1530796208.47.0.56676864532.issue34053@psf.upfronthosting.co.za> STINNER Victor added the comment: > Thanks, posted it at https://groups.google.com/forum/#!topic/python-ideas/g2jj4WRVDFA Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 09:36:39 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 05 Jul 2018 13:36:39 +0000 Subject: [issue1327594] Static Windows Build fails to locate existing installation Message-ID: <1530797799.26.0.56676864532.issue1327594@psf.upfronthosting.co.za> Steve Dower added the comment: Not sure, though I have thought about it a bit. And as with the embeddable package, I wouldn't want it finding a global install anyway. So this probably isn't an issue. (I'm pretty sure I also changed the version string to be statically initialised, so maybe this is fixed?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 10:50:12 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 05 Jul 2018 14:50:12 +0000 Subject: [issue34042] Reference loss for local classes In-Reply-To: <1530704571.33.0.56676864532.issue34042@psf.upfronthosting.co.za> Message-ID: <1530802212.02.0.56676864532.issue34042@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: I ran git bisect with @Serhiy reproducer and it yielded commit 3929499914d47365ae744df312e16da8955c90ac as the first bad commit that has this problem. I did not look more into that but the bisect is reproducible (yields the same commit if you run it several times). ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:00:50 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:00:50 +0000 Subject: [issue33941] datetime.strptime not able to recognize invalid date formats In-Reply-To: <1529672618.24.0.56676864532.issue33941@psf.upfronthosting.co.za> Message-ID: <1530802850.1.0.56676864532.issue33941@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:03:09 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:03:09 +0000 Subject: [issue10381] Add timezone support to datetime C API In-Reply-To: <1289415057.12.0.111170767809.issue10381@psf.upfronthosting.co.za> Message-ID: <1530802989.3.0.56676864532.issue10381@psf.upfronthosting.co.za> Paul Ganssle added the comment: This can be closed now, I think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:04:57 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:04:57 +0000 Subject: [issue29097] [Windows] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6 In-Reply-To: <1482958160.11.0.32337159902.issue29097@psf.upfronthosting.co.za> Message-ID: <1530803097.28.0.56676864532.issue29097@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:08:24 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:08:24 +0000 Subject: [issue33701] test_datetime crashed (SIGSEGV) on Travis CI In-Reply-To: <1527719641.19.0.682650639539.issue33701@psf.upfronthosting.co.za> Message-ID: <1530803304.46.0.56676864532.issue33701@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:09:00 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:09:00 +0000 Subject: [issue23607] Inconsistency in datetime.utcfromtimestamp(Decimal) In-Reply-To: <1425810901.79.0.570490913636.issue23607@psf.upfronthosting.co.za> Message-ID: <1530803340.63.0.56676864532.issue23607@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:10:35 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:10:35 +0000 Subject: [issue15443] datetime module has no support for nanoseconds In-Reply-To: <1343158610.62.0.806232279741.issue15443@psf.upfronthosting.co.za> Message-ID: <1530803435.04.0.56676864532.issue15443@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:12:20 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:12:20 +0000 Subject: [issue6280] calendar.timegm() belongs in time module, next to time.gmtime() In-Reply-To: <1244911683.12.0.112588761912.issue6280@psf.upfronthosting.co.za> Message-ID: <1530803540.65.0.56676864532.issue6280@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:12:59 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:12:59 +0000 Subject: [issue34023] timedelta(seconds=x) strange results when type(x) == np.int32 In-Reply-To: <1530539031.68.0.56676864532.issue34023@psf.upfronthosting.co.za> Message-ID: <1530803579.22.0.56676864532.issue34023@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:13:24 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:13:24 +0000 Subject: [issue33940] datetime.strptime have no directive to convert date values with Era and Time Zone name In-Reply-To: <1529672249.4.0.56676864532.issue33940@psf.upfronthosting.co.za> Message-ID: <1530803604.51.0.56676864532.issue33940@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:15:38 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:15:38 +0000 Subject: [issue33381] Incorrect documentation for strftime()/strptime() format code %f In-Reply-To: <1524963978.65.0.682650639539.issue33381@psf.upfronthosting.co.za> Message-ID: <1530803738.34.0.56676864532.issue33381@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:29:42 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:29:42 +0000 Subject: [issue33381] Incorrect documentation for strftime()/strptime() format code %f In-Reply-To: <1524963978.65.0.682650639539.issue33381@psf.upfronthosting.co.za> Message-ID: <1530804582.68.0.56676864532.issue33381@psf.upfronthosting.co.za> Paul Ganssle added the comment: I don't believe this is a duplicate if #32267, which is actually about the %z directive. I think the implementation here is correct and the documentation is semi-correct, it depends on how you look at it, consider: >>> datetime(2018, 1, 1, 0, 0, 0, 1).strftime('%f') '000001' >>> datetime(2018, 1, 1, 0, 0, 0, 100000).strftime('%f') '100000' In the first case "1" got expanded to "000001" and "100000" was printed as-is. However, when you interpret it as being *after* the decimal point, you would consider the first one to not be zero-padded at all and the second one to be zero-padded on the right. I think the documentation can just be changed to "zero-padded to 6 digits" without specifying left or right. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:40:41 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:40:41 +0000 Subject: [issue31898] Add a `recommended-packages.txt` file In-Reply-To: <1509340647.27.0.213398074469.issue31898@psf.upfronthosting.co.za> Message-ID: <1530805241.49.0.56676864532.issue31898@psf.upfronthosting.co.za> Paul Ganssle added the comment: > datetime.timezone -> pytz.timezone (updates driven by IANA timezone database) I will note that `pytz.timezone` and `datetime.timezone` are not really comparable (they do two very different things), and as of Python 3.6, `dateutil.tz` is the recommended source for IANA time zones, not `pytz`, per https://docs.python.org/3/library/datetime.html ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:41:41 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:41:41 +0000 Subject: [issue13305] datetime.strftime("%Y") not consistent for years < 1000 In-Reply-To: <1320091957.61.0.759691422668.issue13305@psf.upfronthosting.co.za> Message-ID: <1530805301.94.0.56676864532.issue13305@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:42:37 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:42:37 +0000 Subject: [issue9305] Don't use east/west of UTC in date/time documentation In-Reply-To: <1279556505.28.0.814004588201.issue9305@psf.upfronthosting.co.za> Message-ID: <1530805357.28.0.56676864532.issue9305@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:44:02 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:44:02 +0000 Subject: [issue24954] No way to generate or parse timezone as produced by datetime.isoformat() In-Reply-To: <1440801281.72.0.545558404714.issue24954@psf.upfronthosting.co.za> Message-ID: <1530805442.27.0.56676864532.issue24954@psf.upfronthosting.co.za> Paul Ganssle added the comment: I believe this can be consolidated with #15873 and closed, since that is finished and available in Python 3.7. ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:44:40 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:44:40 +0000 Subject: [issue31839] datetime: add method to parse isoformat() output In-Reply-To: <1508648168.49.0.213398074469.issue31839@psf.upfronthosting.co.za> Message-ID: <1530805480.32.0.56676864532.issue31839@psf.upfronthosting.co.za> Paul Ganssle added the comment: This is a duplicate of #15873 and #24954 and can be closed, as `fromisoformat()` was added in Python 3.7. ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:45:46 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:45:46 +0000 Subject: [issue12750] add cross-platform support for %s strftime-format code In-Reply-To: <1313375473.21.0.352014190788.issue12750@psf.upfronthosting.co.za> Message-ID: <1530805546.51.0.56676864532.issue12750@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:46:39 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:46:39 +0000 Subject: [issue25729] update pure python datetime.timedelta creation In-Reply-To: <1448437946.34.0.869547453804.issue25729@psf.upfronthosting.co.za> Message-ID: <1530805599.81.0.56676864532.issue25729@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:47:37 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:47:37 +0000 Subject: [issue16322] time.tzname on Python 3.3.0 for Windows is decoded by wrong encoding In-Reply-To: <1351166210.69.0.0993824857313.issue16322@psf.upfronthosting.co.za> Message-ID: <1530805657.5.0.56676864532.issue16322@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:53:14 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:53:14 +0000 Subject: [issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize In-Reply-To: <1467035358.55.0.678180807375.issue27400@psf.upfronthosting.co.za> Message-ID: <1530805994.19.0.56676864532.issue27400@psf.upfronthosting.co.za> Paul Ganssle added the comment: Hmm. I never noticed this. In the past I have used the (undocumented) PyDateTimeAPI struct, which the official macros wrap. I'm not sure how official that struct is considering it doesn't show up in the documentation. I agree that it should be possible to construct TZ-aware datetimes using the official C API, so I guess the question is whether to add a bunch more macros or document the existing struct. ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:54:06 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:54:06 +0000 Subject: [issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize In-Reply-To: <1467035358.55.0.678180807375.issue27400@psf.upfronthosting.co.za> Message-ID: <1530806046.43.0.56676864532.issue27400@psf.upfronthosting.co.za> Paul Ganssle added the comment: Oops, that previous comment was intended for a completely different ticket. My mistake. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:54:14 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:54:14 +0000 Subject: [issue30155] Add ability to get/set tzinfo on datetime instances in C API In-Reply-To: <1493047646.24.0.156322797242.issue30155@psf.upfronthosting.co.za> Message-ID: <1530806054.59.0.56676864532.issue30155@psf.upfronthosting.co.za> Paul Ganssle added the comment: Hmm. I never noticed this. In the past I have used the (undocumented) PyDateTimeAPI struct, which the official macros wrap. I'm not sure how official that struct is considering it doesn't show up in the documentation. I agree that it should be possible to construct TZ-aware datetimes using the official C API, so I guess the question is whether to add a bunch more macros or document the existing struct. ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:55:30 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:55:30 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1530806130.74.0.56676864532.issue22005@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:56:46 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:56:46 +0000 Subject: [issue9004] datetime.utctimetuple() should not set tm_isdst flag to 0 In-Reply-To: <1276659404.06.0.425467293989.issue9004@psf.upfronthosting.co.za> Message-ID: <1530806206.86.0.56676864532.issue9004@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:57:32 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:57:32 +0000 Subject: [issue28730] __reduce__ not being called in dervied extension class from datetime.datetime In-Reply-To: <1479432663.49.0.198725524634.issue28730@psf.upfronthosting.co.za> Message-ID: <1530806252.86.0.56676864532.issue28730@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:58:15 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:58:15 +0000 Subject: [issue5516] equality not symmetric for subclasses of datetime.date and datetime.datetime In-Reply-To: <1237423886.27.0.985547007127.issue5516@psf.upfronthosting.co.za> Message-ID: <1530806295.29.0.56676864532.issue5516@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:59:27 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:59:27 +0000 Subject: [issue22377] %Z in strptime doesn't match EST and others In-Reply-To: <1410301455.57.0.912701656833.issue22377@psf.upfronthosting.co.za> Message-ID: <1530806367.82.0.56676864532.issue22377@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 11:59:37 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 15:59:37 +0000 Subject: [issue22426] strptime accepts the wrong '2010-06-01 MSK' string but rejects the right '2010-06-01 MSD' In-Reply-To: <1410904746.97.0.914535199618.issue22426@psf.upfronthosting.co.za> Message-ID: <1530806377.28.0.56676864532.issue22426@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 12:00:09 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 16:00:09 +0000 Subject: [issue15390] PEP 3121, 384 refactoring applied to datetime module In-Reply-To: <1342647232.82.0.0763290244077.issue15390@psf.upfronthosting.co.za> Message-ID: <1530806409.67.0.56676864532.issue15390@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 12:00:32 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 05 Jul 2018 16:00:32 +0000 Subject: [issue27741] datetime.datetime.strptime functionality description incorrect In-Reply-To: <1470941311.19.0.0562450492824.issue27741@psf.upfronthosting.co.za> Message-ID: <1530806432.49.0.56676864532.issue27741@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 12:26:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Jul 2018 16:26:49 +0000 Subject: [issue33627] test-complex of test_numeric_tower.test_complex() crashes intermittently on Ubuntu buildbots In-Reply-To: <1527118249.12.0.682650639539.issue33627@psf.upfronthosting.co.za> Message-ID: <1530808009.3.0.56676864532.issue33627@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see the bug since at least one month. I close the issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 12:26:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Jul 2018 16:26:55 +0000 Subject: [issue33701] test_datetime crashed (SIGSEGV) on Travis CI In-Reply-To: <1527719641.19.0.682650639539.issue33701@psf.upfronthosting.co.za> Message-ID: <1530808015.25.0.56676864532.issue33701@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see the bug since at least one month. I close the issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 12:33:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Jul 2018 16:33:47 +0000 Subject: [issue34054] multiprocessing should use time.monotonic() for timeout Message-ID: <1530808427.84.0.56676864532.issue34054@psf.upfronthosting.co.za> New submission from STINNER Victor : In different functions, the multiprocessing module uses the system clock: time.time(). The system clock can be updated manually by the system administrator or automatically by NTP (for example). Attached PR modifies multiprocessing to use time.monotonic() instead to not be affected by system clock changes. time.monotonic() is always available since Python 3.5. See also the PEP 418. ---------- components: Library (Lib) messages: 321115 nosy: vstinner priority: normal severity: normal status: open title: multiprocessing should use time.monotonic() for timeout versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 12:35:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Jul 2018 16:35:23 +0000 Subject: [issue34054] multiprocessing should use time.monotonic() for timeout In-Reply-To: <1530808427.84.0.56676864532.issue34054@psf.upfronthosting.co.za> Message-ID: <1530808523.4.0.56676864532.issue34054@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +7703 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 12:37:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Jul 2018 16:37:55 +0000 Subject: [issue34054] multiprocessing should use time.monotonic() for timeout In-Reply-To: <1530808427.84.0.56676864532.issue34054@psf.upfronthosting.co.za> Message-ID: <1530808675.25.0.56676864532.issue34054@psf.upfronthosting.co.za> STINNER Victor added the comment: Monotonic clock: https://docs.python.org/dev/library/time.html#time.monotonic ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 12:52:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Jul 2018 16:52:42 +0000 Subject: [issue10381] Add timezone support to datetime C API In-Reply-To: <1289415057.12.0.111170767809.issue10381@psf.upfronthosting.co.za> Message-ID: <1530809562.11.0.56676864532.issue10381@psf.upfronthosting.co.za> STINNER Victor added the comment: I tested manually "./python -m test test_datetime test_datetime" in 3.6, 3.7 and master branches: I confirm that the test no longer crash. It has been fixed by the commit 58dc03c737a71de93edef7723c9f6186116288ef. Moreover, I don't recall a recent crash on Windows Refleak or Gentoo Refleak buildbots. Thanks again Paul Ganssle for this nice enhancement! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 12:59:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Jul 2018 16:59:50 +0000 Subject: [issue33988] [EASY] [3.7] test_platform fails when run with -Werror In-Reply-To: <1530182239.82.0.56676864532.issue33988@psf.upfronthosting.co.za> Message-ID: <1530809990.88.0.56676864532.issue33988@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset f5770f354cb982303237d581ad2b296486475965 by Victor Stinner (Xtreak) in branch '3.7': bpo-33988: Fix test_warnings using -W error (GH-7985) https://github.com/python/cpython/commit/f5770f354cb982303237d581ad2b296486475965 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 13:00:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Jul 2018 17:00:35 +0000 Subject: [issue33988] [EASY] [3.7] test_platform fails when run with -Werror In-Reply-To: <1530182239.82.0.56676864532.issue33988@psf.upfronthosting.co.za> Message-ID: <1530810035.78.0.56676864532.issue33988@psf.upfronthosting.co.za> STINNER Victor added the comment: Thank you Karthikeyan Singaravelan for your fix! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 13:14:16 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 05 Jul 2018 17:14:16 +0000 Subject: [issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize In-Reply-To: <1467035358.55.0.678180807375.issue27400@psf.upfronthosting.co.za> Message-ID: <1530810856.09.0.56676864532.issue27400@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- Removed message: https://bugs.python.org/msg321111 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 13:14:18 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 05 Jul 2018 17:14:18 +0000 Subject: [issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize In-Reply-To: <1467035358.55.0.678180807375.issue27400@psf.upfronthosting.co.za> Message-ID: <1530810858.27.0.56676864532.issue27400@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- Removed message: https://bugs.python.org/msg321110 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 13:15:55 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 05 Jul 2018 17:15:55 +0000 Subject: [issue34042] Reference loss for local classes In-Reply-To: <1530704571.33.0.56676864532.issue34042@psf.upfronthosting.co.za> Message-ID: <1530810955.11.0.56676864532.issue34042@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: I investigated that commit but I cannot find anything :(. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 13:50:36 2018 From: report at bugs.python.org (Matej Cepl) Date: Thu, 05 Jul 2018 17:50:36 +0000 Subject: [issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc. In-Reply-To: <1515429303.77.0.467229070634.issue32521@psf.upfronthosting.co.za> Message-ID: <1530813036.95.0.56676864532.issue32521@psf.upfronthosting.co.za> Matej Cepl added the comment: > Matej is this about Python 2? I am currently ONLY on building python 3.7.0, nothing else bothers me at the moment. Let me summarize my findings, or what I think is the situation (of course, I could be completely wrong): * See https://build.opensuse.org/package/show/devel:languages:python:Factory/python3 ... Tumbleweed and Leap 15 (which all have libnsl) fail to be build with libnsl-devel installed. It seems to me that it somehow tries to build nismodule.c, but fails in configure (see above), so it doesn't end up well. I think the problem is that the Python build system expects libnsl to be the one which is found in Solaris and so it looks for its API. Except, the Linux one is different and doesn't provide the same API. And from there, it goes all down to hell. With Leap 42.3 (which has glibc-2.27-4.1, but no libnsl, so I guess NIS API is still inside of glibc; is it possible?), nis builds correctly and so it is included. * Concerning Python 2. I don't see any problems with it. https://build.opensuse.org/package/show/devel:languages:python:Factory/python shows https://is.gd/sbwIf6 that glibc is the same glibc-2.27-4.1, libnsl-devel-1.2.0-2.1, ./configure still fails, but http://download.opensuse.org/repositories/devel:/languages:/python:/Factory/openSUSE_Tumbleweed/x86_64/python-base-2.7.15-112.1.x86_64.rpm still contains /usr/lib64/python2.7/lib-dynload/nis.so module. OK, so I have no clue and it is all complete mess. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 14:03:58 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 05 Jul 2018 18:03:58 +0000 Subject: [issue34042] Reference loss for local classes In-Reply-To: <1530704571.33.0.56676864532.issue34042@psf.upfronthosting.co.za> Message-ID: <1530813838.94.0.56676864532.issue34042@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: I think I found it. After doing the bisect manually (as redirecting stdout/stderr) seems to affect somehow the test) I found commit b0a7a037b8fde56b62f886d5188bced7776777b4 as the culprit. Reverting this commit on the current master seem to solve the problem. This is the diff of the revert: diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 40d7d8af6e..f7d792232e 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -613,52 +613,6 @@ new_dict_with_shared_keys(PyDictKeysObject *keys) return new_dict(keys, values); } - -static PyObject * -clone_combined_dict(PyDictObject *orig) -{ - assert(PyDict_CheckExact(orig)); - assert(orig->ma_values == NULL); - assert(orig->ma_keys->dk_refcnt == 1); - - Py_ssize_t keys_size = _PyDict_KeysSize(orig->ma_keys); - PyDictKeysObject *keys = PyObject_Malloc(keys_size); - if (keys == NULL) { - PyErr_NoMemory(); - return NULL; - } - - memcpy(keys, orig->ma_keys, keys_size); - - /* After copying key/value pairs, we need to incref all - keys and values and they are about to be co-owned by a - new dict object. */ - PyDictKeyEntry *ep0 = DK_ENTRIES(keys); - Py_ssize_t n = keys->dk_nentries; - for (Py_ssize_t i = 0; i < n; i++) { - PyDictKeyEntry *entry = &ep0[i]; - PyObject *value = entry->me_value; - if (value != NULL) { - Py_INCREF(value); - Py_INCREF(entry->me_key); - } - } - - PyDictObject *new = (PyDictObject *)new_dict(keys, NULL); - if (new == NULL) { - /* In case of an error, `new_dict()` takes care of - cleaning up `keys`. */ - return NULL; - } - new->ma_used = orig->ma_used; - assert(_PyDict_CheckConsistency(new)); - if (_PyObject_GC_IS_TRACKED(orig)) { - /* Maintain tracking. */ - _PyObject_GC_TRACK(new); - } - return (PyObject *)new; -} - PyObject * PyDict_New(void) { @@ -2527,13 +2481,7 @@ PyDict_Copy(PyObject *o) PyErr_BadInternalCall(); return NULL; } - mp = (PyDictObject *)o; - if (mp->ma_used == 0) { - /* The dict is empty; just return a new dict. */ - return PyDict_New(); - } - if (_PyDict_HasSplitTable(mp)) { PyDictObject *split_copy; Py_ssize_t size = USABLE_FRACTION(DK_SIZE(mp->ma_keys)); @@ -2560,27 +2508,6 @@ PyDict_Copy(PyObject *o) _PyObject_GC_TRACK(split_copy); return (PyObject *)split_copy; } - - if (PyDict_CheckExact(mp) && mp->ma_values == NULL && - (mp->ma_used >= (mp->ma_keys->dk_nentries * 2) / 3)) - { - /* Use fast-copy if: - - (1) 'mp' is an instance of a subclassed dict; and - - (2) 'mp' is not a split-dict; and - - (3) if 'mp' is non-compact ('del' operation does not resize dicts), - do fast-copy only if it has at most 1/3 non-used keys. - - The last condition (3) is important to guard against a pathological - case when a large dict is almost emptied with multiple del/pop - operations and copied after that. In cases like this, we defer to - PyDict_Merge, which produces a compacted copy. - */ - return clone_combined_dict(mp); - } - copy = PyDict_New(); if (copy == NULL) return NULL; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 14:04:26 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 05 Jul 2018 18:04:26 +0000 Subject: [issue34042] Reference loss for local classes In-Reply-To: <1530704571.33.0.56676864532.issue34042@psf.upfronthosting.co.za> Message-ID: <1530813866.25.0.56676864532.issue34042@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've bisected myself and the culprit seems to be b0a7a037b8fde56b62f886d5188bced7776777b4 ("""bpo-31179: Make dict.copy() up to 5.5 times faster."""). ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 14:07:02 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 05 Jul 2018 18:07:02 +0000 Subject: [issue34042] Reference loss for local classes In-Reply-To: <1530704571.33.0.56676864532.issue34042@psf.upfronthosting.co.za> Message-ID: <1530814022.22.0.56676864532.issue34042@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: @Antoine Wow, it seems that we both foundb0a7a037b8fde56b62f886d5188bced7776777b4 with one minute of difference :D I added Yuri to the noise list as is the author of that PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 14:09:27 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 05 Jul 2018 18:09:27 +0000 Subject: [issue33944] Deprecate and remove pth files In-Reply-To: <1529688140.44.0.56676864532.issue33944@psf.upfronthosting.co.za> Message-ID: <1530814167.36.0.56676864532.issue33944@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This issue, as stated, looks like a severe regression to me. In each of my python installs, Lib/site-packages has a file called 'python.pth' containing 'F:/Python'. This is not a glob of inscrutable code. It is not even Python code. Just a path. Is this issue about something else also called a 'pth file'? F:/Python latter is a package development directory on my supplementary hard drive. When I first install a new version of Python (early alpha), I copy this tiny file. Voila! The packages within /Python are 'installed' for the new version without making copies. Editing a file edits it for all 'installs'. Deleting the directory for an old and no longer needed version does not delete any of my files. Import in files within F:/Python/pack act as if pack were installed in the site package for the version of python running the file. I can easily run anything in Command Prompt with 'py -x.y -m pack.file'. I can easily rerun with a different version by hitting up arrow and changing x.y. Command Prompt's current working directory does not matter. I think this is one of Python's most under-appreciated features. I am rather sure there is no way to so easily get the same effect. Abuse of a great feature is not a good reason to delete it completely. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 15:05:33 2018 From: report at bugs.python.org (Grant Jenks) Date: Thu, 05 Jul 2018 19:05:33 +0000 Subject: [issue34055] IDLE inserts extra blank line in prompt after SyntaxError Message-ID: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> New submission from Grant Jenks : IDLE inserts an extra blank line after the prompt after encountering a SyntaxError: ``` >>> 1 + 2 3 >>> print('Hello') Hello v-- Missing single quote! >>> d = {1: 'uno', 2: 'dos', 3: 'tres} SyntaxError: EOL while scanning string literal >>> print('Hello') <-- Extra blank line and whitespace (tab and space). Hello >>> 1 + 2 <-- Extra blank line and whitespace (tab and space). 3 >>> ``` Notice the line starting with ">>> d =" above contains a missing single quote which causes a "SyntaxError: EOL while scanning string literal". This causes IDLE to insert extra blank lines with one tab and one space after every input. The old behavior looked like: ``` >>> 1 + 2 3 >>> print('Hello') Hello >>> d = {1: 'uno', 2: 'dos', 3: 'tres} SyntaxError: EOL while scanning string literal >>> print('Hello') Hello >>> 1 + 2 3 ``` ---------- assignee: terry.reedy components: IDLE messages: 321126 nosy: grantjenks, terry.reedy priority: normal severity: normal status: open title: IDLE inserts extra blank line in prompt after SyntaxError type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 15:09:22 2018 From: report at bugs.python.org (Bruce Elgort) Date: Thu, 05 Jul 2018 19:09:22 +0000 Subject: [issue34047] Scrolling in IDLE for OS X is not working correctly when reaching end of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1530817762.02.0.56676864532.issue34047@psf.upfronthosting.co.za> Bruce Elgort added the comment: 2.7.15 scrolling is working just fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 15:25:05 2018 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 05 Jul 2018 19:25:05 +0000 Subject: [issue24954] No way to generate or parse timezone as produced by datetime.isoformat() In-Reply-To: <1440801281.72.0.545558404714.issue24954@psf.upfronthosting.co.za> Message-ID: <1530818705.95.0.56676864532.issue24954@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 15:43:52 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 05 Jul 2018 19:43:52 +0000 Subject: [issue34042] Reference loss for local classes In-Reply-To: <1530704571.33.0.56676864532.issue34042@psf.upfronthosting.co.za> Message-ID: <1530819832.91.0.56676864532.issue34042@psf.upfronthosting.co.za> Yury Selivanov added the comment: This isn't a real reference bug, but rather a bug in total refs accountability. It seems that I missed the fact that we track refs to the keys table with a DK_INCREF macro. The new `clone_combined_dict` uses `memcpy` to clone the keys table (along with its `dk_refcnt` field, but it doesn't register the fact that we have a new keys table after copying. The bug can be solved with the following diff: diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 7a1bcebec6..3ac6a54415 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -656,6 +656,7 @@ clone_combined_dict(PyDictObject *orig) /* Maintain tracking. */ _PyObject_GC_TRACK(new); } + _Py_INC_REFTOTAL; return (PyObject *)new; } I don't think this is a critical-level bug that needs an emergency 3.7.1 release, but I'll submit a PR right now. Would appreciate if you guys can review it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 15:44:53 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 05 Jul 2018 19:44:53 +0000 Subject: [issue34042] Reference loss for local classes In-Reply-To: <1530704571.33.0.56676864532.issue34042@psf.upfronthosting.co.za> Message-ID: <1530819893.22.0.56676864532.issue34042@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Agreed, if it was a real reference bug, the interpreter should crash before the total reference count gets negative ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 15:45:38 2018 From: report at bugs.python.org (Steve Holden) Date: Thu, 05 Jul 2018 19:45:38 +0000 Subject: [issue15443] datetime module has no support for nanoseconds In-Reply-To: <1343158610.62.0.806232279741.issue15443@psf.upfronthosting.co.za> Message-ID: <1530819938.36.0.56676864532.issue15443@psf.upfronthosting.co.za> Change by Steve Holden : ---------- nosy: -holdenweb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 15:52:29 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 05 Jul 2018 19:52:29 +0000 Subject: [issue34042] Reference loss for local classes In-Reply-To: <1530704571.33.0.56676864532.issue34042@psf.upfronthosting.co.za> Message-ID: <1530820349.46.0.56676864532.issue34042@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- keywords: +patch pull_requests: +7704 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 15:54:19 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 05 Jul 2018 19:54:19 +0000 Subject: [issue34042] Reference loss for local classes In-Reply-To: <1530704571.33.0.56676864532.issue34042@psf.upfronthosting.co.za> Message-ID: <1530820459.83.0.56676864532.issue34042@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Agreed, if it was a real reference bug, the interpreter should crash before the total reference count gets negative ;-) First thing I checked with Serhiy's script :) A PR with a fix: https://github.com/python/cpython/pull/8119 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 16:54:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Jul 2018 20:54:22 +0000 Subject: [issue34044] subprocess: reusing STARTUPINFO breaks under 3.7 (Windows) In-Reply-To: <1530716146.72.0.56676864532.issue34044@psf.upfronthosting.co.za> Message-ID: <1530824062.16.0.56676864532.issue34044@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 483422f57e5d8c8bf8820fec29fc9b96bb15d4ef by Victor Stinner in branch 'master': bpo-34044: subprocess.Popen copies startupinfo (GH-8090) https://github.com/python/cpython/commit/483422f57e5d8c8bf8820fec29fc9b96bb15d4ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 16:54:47 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 05 Jul 2018 20:54:47 +0000 Subject: [issue34044] subprocess: reusing STARTUPINFO breaks under 3.7 (Windows) In-Reply-To: <1530716146.72.0.56676864532.issue34044@psf.upfronthosting.co.za> Message-ID: <1530824087.55.0.56676864532.issue34044@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7705 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 16:59:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Jul 2018 20:59:20 +0000 Subject: [issue34044] subprocess: reusing STARTUPINFO breaks under 3.7 (Windows) In-Reply-To: <1530716146.72.0.56676864532.issue34044@psf.upfronthosting.co.za> Message-ID: <1530824360.97.0.56676864532.issue34044@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +7706 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 17:15:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Jul 2018 21:15:37 +0000 Subject: [issue34044] subprocess: reusing STARTUPINFO breaks under 3.7 (Windows) In-Reply-To: <1530716146.72.0.56676864532.issue34044@psf.upfronthosting.co.za> Message-ID: <1530825337.33.0.56676864532.issue34044@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 29be3bd3c9aed0190e60096a603120cacda82375 by Victor Stinner in branch '3.7': bpo-34044: subprocess.Popen copies startupinfo (GH-8090) (GH-8121) https://github.com/python/cpython/commit/29be3bd3c9aed0190e60096a603120cacda82375 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 17:20:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Jul 2018 21:20:00 +0000 Subject: [issue34044] subprocess: reusing STARTUPINFO breaks under 3.7 (Windows) In-Reply-To: <1530716146.72.0.56676864532.issue34044@psf.upfronthosting.co.za> Message-ID: <1530825600.06.0.56676864532.issue34044@psf.upfronthosting.co.za> STINNER Victor added the comment: Sebastian Bank: Thank you for your bug report and your example! I used your example to write an unit test. I fixed the bug in 3.7 and master branches. The fix will be part of the future 3.7.1 release. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 17:23:06 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Thu, 05 Jul 2018 21:23:06 +0000 Subject: [issue33944] Deprecate and remove pth files In-Reply-To: <1529688140.44.0.56676864532.issue33944@psf.upfronthosting.co.za> Message-ID: <1530825786.17.0.56676864532.issue33944@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: > They are very difficult to debug because they're processed too early. .pth's are processed by site.py, so no more difficult than site/sitecustomize. You can e.g. run `site.addpackage(,,None)' to debug the logic. > They usually contain globs of inscrutable code. An ability to contain code is there for a reason: to allow a module do something more intelligent than adding hardcoded paths if needed (e.g. pywin32 adds a subdir with .dll dependencies to PATH). A chunk of code is limited to a single line -- a conscious limitation to deter misuse 'cuz search path setup code is presumed to be small. If someone needs something other than path setup, they should do it upon the module's import instead. If they insist on misusing the feature, Python's design does what it's supposed to do in such cases: "make right things easy, make wrong things hard". If there's a valid reason to allow larger code chunks, we can introduce a different syntax -- e.g. something like bash here-documents. > Exceptions in pth files can get swallowed in some cases. If this happens, it's a bug. A line from .pth is executed with "exec line", any exceptions should propagate up the stack as usual. > They are loaded in indeterminate order. Present a use case justifying a specific order. I can see a probable use case: a package needs to do something using its dependencies, so any .pth for the dependencies should run before the one for the package. But I can't see why that package can't do this upon its import instead (saves unnecessary work if the user won't be using that package in that session, too). The only valid case I can see is if the package is using some 3rd-party import system (e.g. a .7z archive or some module repository) that needs to be loaded first for its search path to make sense. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 17:58:25 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 05 Jul 2018 21:58:25 +0000 Subject: [issue34055] IDLE: erroneous 'smart' indents in shell In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1530827905.59.0.56676864532.issue34055@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The SyntaxError is not relevant. Interactive CPython: >>> d=[] >>> d=() >>> d={} >>> Erroneous extra lines in IDLE 3.6+ Shell but not editor: >>> d = [] >>> d=() >>> d={} >>> d=[i for i in [1]] >>> The 'blank' lines are indents produced by IDLE's smart indent mechanism, which is trigger by keying '\n', *before* the code is tentatively compiled. While the extra lines are an error for the examples above, they are arguably correct for your example, where there is no closing '}'. The indenter treats it the same as if there were a closing quote, as in the following, which *is* the same in shell and editor, and correct. d = {1: 'one}' # Indent lines up next dict item with the one above. Even though your example is no a bug, it lead me to discover a regression in current 3.6+. In the past year, there have been a couple of patches that touched the autoindent code. ---------- stage: -> test needed title: IDLE inserts extra blank line in prompt after SyntaxError -> IDLE: erroneous 'smart' indents in shell versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 18:07:40 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 05 Jul 2018 22:07:40 +0000 Subject: [issue34055] IDLE: erroneous 'smart' indents in shell In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1530828460.24.0.56676864532.issue34055@psf.upfronthosting.co.za> Terry J. Reedy added the comment: def funcname(param = 'somestring) # Indent for next param. is another situation where \n is treating as closing '. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 18:17:37 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 05 Jul 2018 22:17:37 +0000 Subject: [issue34047] Scrolling in IDLE for OS X is not working correctly when reaching end of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1530829057.91.0.56676864532.issue34047@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 1 down, but how about my other questions? Is there only a problem if the slider is the first thing touched? Is there still a problem if the line "return 'break'" in idlelib.editor.EditorWindow.handle_yview is deleted or disabled by prefixig it with '#'? (Are you allowed to edit stdlib files?) Do you see any messages if you start IDLE in a terminal? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 18:21:22 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 05 Jul 2018 22:21: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: <1530829282.31.0.56676864532.issue34047@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- stage: -> test needed title: Scrolling in IDLE for OS X is not working correctly when reaching end of file -> IDLE: on macOS, scroll slider 'sticks' at bottom of file _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 18:27:55 2018 From: report at bugs.python.org (Sebastian Bank) Date: Thu, 05 Jul 2018 22:27:55 +0000 Subject: [issue34044] subprocess: reusing STARTUPINFO breaks under 3.7 (Windows) In-Reply-To: <1530716146.72.0.56676864532.issue34044@psf.upfronthosting.co.za> Message-ID: <1530829675.19.0.56676864532.issue34044@psf.upfronthosting.co.za> Sebastian Bank added the comment: Perfect, thanks for the quick fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 18:31:12 2018 From: report at bugs.python.org (Patrick McCarty) Date: Thu, 05 Jul 2018 22:31:12 +0000 Subject: [issue34056] checked hash-based pyc files not working with imp module Message-ID: <1530829872.86.0.56676864532.issue34056@psf.upfronthosting.co.za> New submission from Patrick McCarty : OS: Clear Linux build 23460 Python version: 3.7.0 Description: I am seeing an uncaught exception in Python 3.7.0 when using the "imp" module to import a module that has a checked hash-based pyc file. See the attached source files. Steps to reproduce: 1) Copy attached source files to a directory 2) In that directory, run $ python3.7 -m compileall --invalidation-mode checked-hash imp-test-mod.py $ python3.7 imp-test.py 3) See the resulting output (omitting the imp deprecation notice): Traceback (most recent call last): File "imp-test.py", line 6, in mod = imp.load_module(modname, f, p, d) File "/usr/lib/python3.7/imp.py", line 235, in load_module return load_source(name, filename, file) File "/usr/lib/python3.7/imp.py", line 172, in load_source module = _load(spec) File "", line 696, in _load File "", line 677, in _load_unlocked File "", line 724, in exec_module File "", line 838, in get_code TypeError: a bytes-like object is required, not 'str' ---------- components: Interpreter Core files: imp-test.py messages: 321139 nosy: phmccarty priority: normal severity: normal status: open title: checked hash-based pyc files not working with imp module type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file47671/imp-test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 18:32:11 2018 From: report at bugs.python.org (Patrick McCarty) Date: Thu, 05 Jul 2018 22:32:11 +0000 Subject: [issue34056] checked hash-based pyc files not working with imp module In-Reply-To: <1530829872.86.0.56676864532.issue34056@psf.upfronthosting.co.za> Message-ID: <1530829931.93.0.56676864532.issue34056@psf.upfronthosting.co.za> Change by Patrick McCarty : Added file: https://bugs.python.org/file47672/imp-test-mod.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 18:41:49 2018 From: report at bugs.python.org (Alberto) Date: Thu, 05 Jul 2018 22:41:49 +0000 Subject: [issue34057] Py_Initialize aborts when using static Python version. Windows Message-ID: <1530830509.1.0.56676864532.issue34057@psf.upfronthosting.co.za> New submission from Alberto : Hi, I've followed the build instructions to get a statically linked Python library in windows. The compilation works great and I get a big fat statically linked .lib file. When I use it and in my code I call Py_Initialize() the program aborts and I get this error: Fatal Python error: initfsencoding: unable to load the file system codec ModuleNotFoundError: No module named 'encodings' It seems that python is looking for encodings on the file system instead of looking for the built-in one since if I do Py_SetPythonHome(L"C:\\Python37.0-x64"); before calling Py_Initialize it works fine. Why is Python looking for external modules when it is a statically linked library and encodings should be built-in? How can I indicate Python to look for the modules in itself and not externally? Regards ---------- components: Interpreter Core messages: 321140 nosy: illera88 priority: normal severity: normal status: open title: Py_Initialize aborts when using static Python version. Windows type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 18:46:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Jul 2018 22:46:26 +0000 Subject: [issue34057] Py_Initialize aborts when using static Python version. Windows In-Reply-To: <1530830509.1.0.56676864532.issue34057@psf.upfronthosting.co.za> Message-ID: <1530830786.34.0.56676864532.issue34057@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 19:10:25 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Jul 2018 23:10:25 +0000 Subject: [issue34049] abs() method accept argument that implement __abs__() In-Reply-To: <1530773071.47.0.56676864532.issue34049@psf.upfronthosting.co.za> Message-ID: <1530832225.61.0.56676864532.issue34049@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 19:12:37 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Jul 2018 23:12:37 +0000 Subject: [issue34051] Update multiprocessing example In-Reply-To: <1530780349.49.0.56676864532.issue34051@psf.upfronthosting.co.za> Message-ID: <1530832357.61.0.56676864532.issue34051@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- assignee: docs at python -> davin nosy: +davin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 19:34:05 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Jul 2018 23:34:05 +0000 Subject: [issue28657] cmd.Cmd.get_help() implementation can't see do_*() methods added dynamically by setattr() In-Reply-To: <1478776450.68.0.870801686772.issue28657@psf.upfronthosting.co.za> Message-ID: <1530833645.53.0.56676864532.issue28657@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > That method would then perform an assignment with setattr() calls: setattr(self, "do_" + command, func). Could this have been done with: setattr(self.__class__, "do_" + command, func)? I'm concerned that attaching functions to the instance is fighting the Python norms and the design of the module. It seems like a can of worms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 19:36:55 2018 From: report at bugs.python.org (Bumsik Kim) Date: Thu, 05 Jul 2018 23:36:55 +0000 Subject: [issue34019] webbrowser: wrong arguments for Opera browser. In-Reply-To: <1530525080.65.0.56676864532.issue34019@psf.upfronthosting.co.za> Message-ID: <1530833815.65.0.56676864532.issue34019@psf.upfronthosting.co.za> Bumsik Kim added the comment: I also believe this can be backported to 2.7 as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 19:54:01 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Jul 2018 23:54:01 +0000 Subject: [issue28657] cmd.Cmd.get_help() implementation can't see do_*() methods added dynamically by setattr() In-Reply-To: <1478776450.68.0.870801686772.issue28657@psf.upfronthosting.co.za> Message-ID: <1530834841.0.0.56676864532.issue28657@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- resolution: later -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 19:56:35 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 05 Jul 2018 23:56:35 +0000 Subject: [issue34019] webbrowser: wrong arguments for Opera browser. In-Reply-To: <1530525080.65.0.56676864532.issue34019@psf.upfronthosting.co.za> Message-ID: <1530834995.3.0.56676864532.issue34019@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- pull_requests: +7707 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 20:01:28 2018 From: report at bugs.python.org (Bruce Elgort) Date: Fri, 06 Jul 2018 00:01:28 +0000 Subject: [issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file In-Reply-To: <1530829282.34.0.902498594338.issue34047@psf.upfronthosting.co.za> Message-ID: Bruce Elgort added the comment: Terry, Here is a video I made showing the problem I?m having. I have no clue about the other things you are asking about. https://www.youtube.com/watch?v=BpyMhdjTNvQ Bruce > On Jul 5, 2018, at 3:21 PM, Terry J. Reedy wrote: > > > Change by Terry J. Reedy : > > > ---------- > stage: -> test needed > title: Scrolling in IDLE for OS X is not working correctly when reaching end of file -> IDLE: on macOS, scroll slider 'sticks' at bottom of file > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 20:53:40 2018 From: report at bugs.python.org (Ted Kandell) Date: Fri, 06 Jul 2018 00:53:40 +0000 Subject: [issue34058] Default Python 3.7 install broken on openSUSE Leap 42.3: $PYTHONHOME/lib64/python3.7/lib-dynload/ not linked to $PYTHONHOME/lib/python3.7/lib-dynload/ Message-ID: <1530838420.77.0.56676864532.issue34058@psf.upfronthosting.co.za> New submission from Ted Kandell : The default Python 3.7 install (./configure with no parameters) does not work (at least) on openSUSE Leap 42.3. Python3 gives a ModuleNotFoundError: No module named 'readline' error, and pip3 has a ModuleNotFoundError: No module named '_socket' error, because the site libraries cannot be found. The fix is to manually: sudo ln -s /usr/local/lib64/python3.7/lib-dynload/ /usr/local/lib/python3.7/lib-dynload The same problem should also be present with a PYTHONHOME other than the default /usr/local . I suspect this is a more widespread problem than just openSUSE Leap 42.3, and may exist in other distros as well. The fix should be for make install to automatically create the symbolic link for the $PYTHONHOME/lib64/python3.7/lib-dynload directory in $PYTHONHOME/lib/python3.7/ . ---------- components: Installation messages: 321145 nosy: tkandell priority: normal severity: normal status: open title: Default Python 3.7 install broken on openSUSE Leap 42.3: $PYTHONHOME/lib64/python3.7/lib-dynload/ not linked to $PYTHONHOME/lib/python3.7/lib-dynload/ type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 22:30:50 2018 From: report at bugs.python.org (Windson Yang) Date: Fri, 06 Jul 2018 02:30:50 +0000 Subject: [issue34051] Update multiprocessing example In-Reply-To: <1530780349.49.0.56676864532.issue34051@psf.upfronthosting.co.za> Message-ID: <1530844250.58.0.56676864532.issue34051@psf.upfronthosting.co.za> Change by Windson Yang : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 5 23:42:18 2018 From: report at bugs.python.org (Guillaume Perrault-Archambault) Date: Fri, 06 Jul 2018 03:42:18 +0000 Subject: [issue34059] multiprocessing deadlock Message-ID: <1530848538.94.0.56676864532.issue34059@psf.upfronthosting.co.za> New submission from Guillaume Perrault-Archambault : The simple code attached causes a deadlock in Linux. Problem is I have to slightly muck around with it depending on the distro and python version to get it to deadlock. On the cluster I use the most (python 3.6.3, CentOS Linux release 7.4.1708, pytorch 0.4.0 with no CUDA), the code attached causes a deadlock. ---------- components: Library (Lib) files: multiprocess_torch.py messages: 321146 nosy: gobbedy priority: normal severity: normal status: open title: multiprocessing deadlock type: crash versions: Python 3.6 Added file: https://bugs.python.org/file47673/multiprocess_torch.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 00:52:34 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 06 Jul 2018 04:52:34 +0000 Subject: [issue34056] checked hash-based pyc files not working with imp module In-Reply-To: <1530829872.86.0.56676864532.issue34056@psf.upfronthosting.co.za> Message-ID: <1530852754.45.0.56676864532.issue34056@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Can you not use imp? It's been deprecated since 3.4 and gradually become more and more broken and useless as this and other import improvements (e.g., namespace packages) have happened. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 01:06:04 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 06 Jul 2018 05:06:04 +0000 Subject: [issue34043] Optimize tarfile uncompression performance In-Reply-To: <1530706871.24.0.56676864532.issue34043@psf.upfronthosting.co.za> Message-ID: <1530853564.01.0.56676864532.issue34043@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 8d130913cb9359c01de412178f9942419e921170 by INADA Naoki in branch 'master': bpo-34043: Optimize tarfile uncompress performance (GH-8089) https://github.com/python/cpython/commit/8d130913cb9359c01de412178f9942419e921170 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 01:18:00 2018 From: report at bugs.python.org (Patrick McCarty) Date: Fri, 06 Jul 2018 05:18:00 +0000 Subject: [issue34056] checked hash-based pyc files not working with imp module In-Reply-To: <1530829872.86.0.56676864532.issue34056@psf.upfronthosting.co.za> Message-ID: <1530854280.63.0.56676864532.issue34056@psf.upfronthosting.co.za> Patrick McCarty added the comment: Thanks for the response. I would like to avoid using imp, but I work on a distro team that ships many packages that still use the module. We wanted to start using checked-hash invalidation right away after upgrading to 3.7.0, but some of our release tests failed due to this issue. I am willing to file bugs against other projects still using imp to stop using it, if that is the recommended direction. Considering that imp still works with timestamp invalidation, and checked-hash invalidation being a brand new feature, I wanted to file a bug here first before reaching out to the other projects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 01:42:24 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 06 Jul 2018 05:42:24 +0000 Subject: [issue34056] checked hash-based pyc files not working with imp module In-Reply-To: <1530829872.86.0.56676864532.issue34056@psf.upfronthosting.co.za> Message-ID: <1530855744.78.0.56676864532.issue34056@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I see. Thanks for being an early adopter! We can probably hack something together for imp. I'll send a PR in a moment. Filing bugs about imp usage would be valuable, especially if it flushes out any cases where imp provides functionality that our newer APIs don't. We'd quite like to kill imp. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 01:46:34 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 06 Jul 2018 05:46:34 +0000 Subject: [issue34056] checked hash-based pyc files not working with imp module In-Reply-To: <1530829872.86.0.56676864532.issue34056@psf.upfronthosting.co.za> Message-ID: <1530855994.79.0.56676864532.issue34056@psf.upfronthosting.co.za> Change by Benjamin Peterson : ---------- keywords: +patch pull_requests: +7708 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 02:47:48 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 06 Jul 2018 06:47:48 +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: <1530859668.21.0.56676864532.issue34047@psf.upfronthosting.co.za> Tal Einat added the comment: Confirmed on latest master on OSX. I'm also experiencing many other kinds of erratic scrolling behavior: 1. Dragging the scrollbar isn't possible immediately after opening the file Lib/idlelib/editor.py. Also later after scrolling to the top. 2. Scrolling via two-finger swipte on the trackpad scrolls down both when I scroll up and down. 3. Clicking in the trough slightly below the slider has no effect. There's definitely something very broken! Commenting out the `return 'break'` in handle_yview() doesn't appear to affect this. In all cases I ran idle from a terminal via `python -m idlelib` and saw no errors. ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 02:55:31 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 06 Jul 2018 06:55:31 +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: <1530860131.97.0.56676864532.issue34047@psf.upfronthosting.co.za> Tal Einat added the comment: With Python 3.6.5 on OSX, I'm seeing all of the issues (including the originally reported one) except the issue with the scroll direction inversion on two-finger swipe. ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 02:57:22 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 06 Jul 2018 06:57: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: <1530860242.39.0.56676864532.issue34047@psf.upfronthosting.co.za> Tal Einat added the comment: On OSX with Python 3.7.0 behavior is the same as current master. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 03:19:11 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 06 Jul 2018 07:19:11 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1530861551.65.0.56676864532.issue33899@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset c4ef4896eac86a6759901c8546e26de4695a1389 by Tal Einat (Ammar Askar) in branch 'master': bpo-33899: Make tokenize module mirror end-of-file is end-of-line behavior (GH-7891) https://github.com/python/cpython/commit/c4ef4896eac86a6759901c8546e26de4695a1389 ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 03:25:22 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 06 Jul 2018 07:25:22 +0000 Subject: [issue16822] execv (et al.) should invoke atexit handlers before executing new code In-Reply-To: <1356907108.89.0.568486797575.issue16822@psf.upfronthosting.co.za> Message-ID: <1530861922.54.0.56676864532.issue16822@psf.upfronthosting.co.za> Tal Einat added the comment: > we could definitely have a separate "atexec" handler Couldn't coverage.py and similar apps can just invoke the atexit handlers before calling os.execv() or similar? If so, perhaps a mention of this in the docs would suffice? ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 03:27:31 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Jul 2018 07:27:31 +0000 Subject: [issue34057] Py_Initialize aborts when using static Python version. Windows In-Reply-To: <1530830509.1.0.56676864532.issue34057@psf.upfronthosting.co.za> Message-ID: <1530862051.36.0.56676864532.issue34057@psf.upfronthosting.co.za> STINNER Victor added the comment: > Why is Python looking for external modules when it is a statically linked library and encodings should be built-in? Hi, this is not a bug. Python needs its standard library. You might want to put the whole stdlib into a single ZIP, but I don't recall how to do that. The encodings and codecs modules are not built-in, but _codecs is built-in: >>> import encodings, codecs, _codecs >>> encodings >>> codecs >>> _codecs I suggest to close this issue as "not a bug". You should ask on a Python mailing list or forum to get help how to build a standalone Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 03:31:24 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 06 Jul 2018 07:31:24 +0000 Subject: [issue34043] Optimize tarfile uncompression performance In-Reply-To: <1530706871.24.0.56676864532.issue34043@psf.upfronthosting.co.za> Message-ID: <1530862284.32.0.56676864532.issue34043@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 Fri Jul 6 03:47:44 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 06 Jul 2018 07:47:44 +0000 Subject: [issue23493] optimize sort_keys in json module by using operator.itemgetter() In-Reply-To: <1424449556.4.0.766318893285.issue23493@psf.upfronthosting.co.za> Message-ID: <1530863264.94.0.56676864532.issue23493@psf.upfronthosting.co.za> INADA Naoki added the comment: In C version, we don't use key func. items = PyMapping_Items(dct); if (items == NULL) goto bail; if (s->sort_keys && PyList_Sort(items) < 0) { Like that, how about removing key function completely? ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 03:52:44 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 06 Jul 2018 07:52:44 +0000 Subject: [issue23493] optimize sort_keys in json module by using operator.itemgetter() In-Reply-To: <1424449556.4.0.766318893285.issue23493@psf.upfronthosting.co.za> Message-ID: <1530863564.27.0.56676864532.issue23493@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- keywords: +patch pull_requests: +7709 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 03:58:00 2018 From: report at bugs.python.org (Ammar Askar) Date: Fri, 06 Jul 2018 07:58:00 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1530863880.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Change by Ammar Askar : ---------- pull_requests: +7710 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 04:08:06 2018 From: report at bugs.python.org (Ammar Askar) Date: Fri, 06 Jul 2018 08:08:06 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1530864486.26.0.56676864532.issue33899@psf.upfronthosting.co.za> Change by Ammar Askar : ---------- pull_requests: +7711 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 04:20:34 2018 From: report at bugs.python.org (Ammar Askar) Date: Fri, 06 Jul 2018 08:20:34 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1530865234.25.0.56676864532.issue33899@psf.upfronthosting.co.za> Change by Ammar Askar : ---------- pull_requests: +7712 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 04:24:16 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 06 Jul 2018 08:24:16 +0000 Subject: [issue34007] test_gdb fails in s390x SLES buildbots In-Reply-To: <1530318299.83.0.56676864532.issue34007@psf.upfronthosting.co.za> Message-ID: <1530865456.08.0.56676864532.issue34007@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: All the builds fail consistently after http://buildbot.python.org/all/#/builders/54/builds/465 and things were passing before 465. Maybe is this something to do with the commit that happened there that we could revert and test it in the machine by doing a git-bisect? But I couldn't see anything on GDB related code being changed in Python on #465. My initial hunch was that it had something to do with GDB 8.0+ but Ubuntu 18.04 LTS also runs on 8.0+ fine. Tests pass : 00e05242ae650bc29e8052a5fb79cbb83224a657 Tests fail : d6a283b37b66ecd2d0ff43602ddc8e91b54a51c5 ? cpython git:(master) git log 00e05242ae650bc29e8052a5fb79cbb83224a657~1..d6a283b37b66ecd2d0ff43602ddc8e91b54a51c5 commit d6a283b37b66ecd2d0ff43602ddc8e91b54a51c5 Author: Zackery Spytz Date: Fri Jun 29 13:30:07 2018 -0600 [3.6] bpo-25862: Fix assertion failures in io.TextIOWrapper.tell(). (GH-3918). (GH-8012) (cherry picked from commit 23db935bcf258657682e66464bf8512def8af830) Co-authored-by: Zackery Spytz commit a73027918a659ca69480a7e023d3838e2601ce6d Author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> Date: Fri Jun 29 03:17:43 2018 -0700 Fix the indentation in the documentation of bin() and hash() (GH-7998) (cherry picked from commit bda9c3eae3ad16e43145599ac6359bfdcaf1fd4a) Co-authored-by: Andr?s Delfino commit 00e05242ae650bc29e8052a5fb79cbb83224a657 Author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> Date: Thu Jun 28 22:32:16 2018 -0700 bpo-14117: Make minor tweaks to turtledemo (GH-8002) The 'wikipedia' example is now 'rosette', describing what it draws. The 'penrose' print output is reduced. The 'tree' '1024' output is eliminated. (cherry picked from commit 891a1f86d415779cf67ca23e626a868e586feb05) Co-authored-by: Terry Jan Reedy ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 05:03:44 2018 From: report at bugs.python.org (Kay Hayen) Date: Fri, 06 Jul 2018 09:03:44 +0000 Subject: [issue34042] Reference loss for local classes In-Reply-To: <1530704571.33.0.56676864532.issue34042@psf.upfronthosting.co.za> Message-ID: <1530867824.08.0.56676864532.issue34042@psf.upfronthosting.co.za> Kay Hayen added the comment: Hello, so it's harmless and it explains the other reference counting issue, where a change in call convention could make a reference counting bug show or go away: codecs.open(TESTFN, encoding='cp949') This was showing it, where as codecs.open(TESTFN, "rb", 'cp949') was not. With all the difference being a dictionary passed into a function call or not. I am now assuming that getting your fix this will also go away. Caused me a bit of head scratching already. If you could do what you often you, and make this what distributions like Debian pull from, it would be good enough in terms of release for me, as it blocks Nuitka tests from passing on them. Yours, Kay ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 06:04:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 06 Jul 2018 10:04:11 +0000 Subject: [issue16968] Fix test discovery for test_concurrent_futures.py In-Reply-To: <1358201974.23.0.0352259739582.issue16968@psf.upfronthosting.co.za> Message-ID: <1530871451.45.0.56676864532.issue16968@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Seems that reap_children() in regrtest is ran only if the test is passed. And it doesn't produce warnings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 06:17:47 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 06 Jul 2018 10:17:47 +0000 Subject: [issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files In-Reply-To: <1389140162.94.0.578256004005.issue20180@psf.upfronthosting.co.za> Message-ID: <1530872267.03.0.56676864532.issue20180@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset c929df3b96c8d7e7977e581431192be21cdafd19 by Tal Einat in branch 'master': bpo-20180: complete AC conversion of Objects/stringlib/transmogrify.h (GH-8039) https://github.com/python/cpython/commit/c929df3b96c8d7e7977e581431192be21cdafd19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 06:21:08 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 06 Jul 2018 10:21:08 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1530872468.37.0.56676864532.issue33899@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset ab75d9e4244ee24bc96ea9d52362899e3bf365a2 by Tal Einat (Ammar Askar) in branch '3.7': [3.7] bpo-33899: Make tokenize module mirror end-of-file is end-of-line behavior (GH-7891) (GH-8132) https://github.com/python/cpython/commit/ab75d9e4244ee24bc96ea9d52362899e3bf365a2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 06:22:28 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 06 Jul 2018 10:22:28 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1530872548.25.0.56676864532.issue33899@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset 11c36a3e16f7fd4e937466014e8393ede4b61a25 by Tal Einat (Ammar Askar) in branch '3.6': [3.6] bpo-33899: Make tokenize module mirror end-of-file is end-of-line behavior (GH-7891) (GH-8134) https://github.com/python/cpython/commit/11c36a3e16f7fd4e937466014e8393ede4b61a25 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 06:23:15 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 06 Jul 2018 10:23:15 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1530872595.8.0.56676864532.issue33899@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset 7829bba45d0e2446f3a0ca240bfe46959f01071e by Tal Einat (Ammar Askar) in branch '2.7': [2.7] bpo-33899: Make tokenize module mirror end-of-file is end-of-line behavior (GH-7891) (#8133) https://github.com/python/cpython/commit/7829bba45d0e2446f3a0ca240bfe46959f01071e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 06:24:50 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 06 Jul 2018 10:24:50 +0000 Subject: [issue33899] Tokenize module does not mirror "end-of-input" is newline behavior In-Reply-To: <1529394112.27.0.56676864532.issue33899@psf.upfronthosting.co.za> Message-ID: <1530872690.71.0.56676864532.issue33899@psf.upfronthosting.co.za> Tal Einat added the comment: Thanks for all of your work on this, Ammar! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 07:05:19 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 06 Jul 2018 11:05:19 +0000 Subject: [issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files In-Reply-To: <1389140162.94.0.578256004005.issue20180@psf.upfronthosting.co.za> Message-ID: <1530875119.64.0.56676864532.issue20180@psf.upfronthosting.co.za> Tal Einat added the comment: Now that transmogrify is done, the only open question is about itertools and collections. 1. Should collections be converted? 2. How to proceed with itertools? There are two PRs ready, with the one just for groupby() approved, but not yet reviewed by Raymond Hettinger. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 07:41:15 2018 From: report at bugs.python.org (Ned Batchelder) Date: Fri, 06 Jul 2018 11:41:15 +0000 Subject: [issue16822] execv (et al.) should invoke atexit handlers before executing new code In-Reply-To: <1356907108.89.0.568486797575.issue16822@psf.upfronthosting.co.za> Message-ID: <1530877275.8.0.56676864532.issue16822@psf.upfronthosting.co.za> Ned Batchelder added the comment: Coverage.py is registering a handler to save data before the program ends. The execv call is not in the coverage.py code, it's in the program that coverage.py is running. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 07:51:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Jul 2018 11:51:57 +0000 Subject: [issue34054] multiprocessing should use time.monotonic() for timeout In-Reply-To: <1530808427.84.0.56676864532.issue34054@psf.upfronthosting.co.za> Message-ID: <1530877917.21.0.56676864532.issue34054@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset c2368cbc83ca2bafeaea0e4760be4996046d0444 by Victor Stinner in branch 'master': bpo-34054: multiprocessing uses time.monotonic() (GH-8118) https://github.com/python/cpython/commit/c2368cbc83ca2bafeaea0e4760be4996046d0444 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 07:53:03 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 06 Jul 2018 11:53:03 +0000 Subject: [issue34054] multiprocessing should use time.monotonic() for timeout In-Reply-To: <1530808427.84.0.56676864532.issue34054@psf.upfronthosting.co.za> Message-ID: <1530877983.24.0.56676864532.issue34054@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7713 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 07:54:01 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 06 Jul 2018 11:54:01 +0000 Subject: [issue34054] multiprocessing should use time.monotonic() for timeout In-Reply-To: <1530808427.84.0.56676864532.issue34054@psf.upfronthosting.co.za> Message-ID: <1530878041.3.0.56676864532.issue34054@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7714 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 08:11:23 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 06 Jul 2018 12:11:23 +0000 Subject: [issue34054] multiprocessing should use time.monotonic() for timeout In-Reply-To: <1530808427.84.0.56676864532.issue34054@psf.upfronthosting.co.za> Message-ID: <1530879083.93.0.56676864532.issue34054@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 4bd5fce27d5c03a013e5ebb008670ca0d89e3298 by Miss Islington (bot) in branch '3.7': bpo-34054: multiprocessing uses time.monotonic() (GH-8118) https://github.com/python/cpython/commit/4bd5fce27d5c03a013e5ebb008670ca0d89e3298 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 08:14:36 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 06 Jul 2018 12:14:36 +0000 Subject: [issue34054] multiprocessing should use time.monotonic() for timeout In-Reply-To: <1530808427.84.0.56676864532.issue34054@psf.upfronthosting.co.za> Message-ID: <1530879276.92.0.56676864532.issue34054@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 972458a4245afb4e934fbcb9c0224b105fb5d7ba by Miss Islington (bot) in branch '3.6': bpo-34054: multiprocessing uses time.monotonic() (GH-8118) https://github.com/python/cpython/commit/972458a4245afb4e934fbcb9c0224b105fb5d7ba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 08:32:12 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 06 Jul 2018 12:32:12 +0000 Subject: [issue23493] optimize sort_keys in json module by using operator.itemgetter() In-Reply-To: <1424449556.4.0.766318893285.issue23493@psf.upfronthosting.co.za> Message-ID: <1530880332.68.0.56676864532.issue23493@psf.upfronthosting.co.za> INADA Naoki added the comment: I can't confirm significant performance benefit. sort_keys is not bottleneck of pure Python encoder. BTW, benefit from C encoder is more significant. It's about 3x faster. Adding `indent` option support to C encoder may be good target for new contributors who want to write C. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 09:28:16 2018 From: report at bugs.python.org (Gabriele Tornetta) Date: Fri, 06 Jul 2018 13:28:16 +0000 Subject: [issue29750] smtplib doesn't handle unicode passwords In-Reply-To: <1488919224.48.0.0966376973087.issue29750@psf.upfronthosting.co.za> Message-ID: <1530883696.93.0.56676864532.issue29750@psf.upfronthosting.co.za> Gabriele Tornetta added the comment: Are there any PRs already for this issue? I couldn't find any on GitHub. Also, is the plan to branch the fix down to at least 3.6? ---------- nosy: +Gabriele Tornetta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 10:05:33 2018 From: report at bugs.python.org (Matej Cepl) Date: Fri, 06 Jul 2018 14:05:33 +0000 Subject: [issue32007] nis module fails to build against glibc-2.26 In-Reply-To: <1510419983.02.0.213398074469.issue32007@psf.upfronthosting.co.za> Message-ID: <1530885933.57.0.56676864532.issue32007@psf.upfronthosting.co.za> Matej Cepl added the comment: > - I agree with Benjamin, let's deprecate the NIS module. NIS/YP functionality has been replaced by NSS a long time ago. Agree. a) who will separate its functionality into separate module for PyPI, b) who start a thread on python-devel? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 10:07:52 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 06 Jul 2018 14:07:52 +0000 Subject: [issue29750] smtplib doesn't handle unicode passwords In-Reply-To: <1488919224.48.0.0966376973087.issue29750@psf.upfronthosting.co.za> Message-ID: <1530886072.95.0.56676864532.issue29750@psf.upfronthosting.co.za> Tal Einat added the comment: I have worked on this, almost ready for a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 11:18:04 2018 From: report at bugs.python.org (Windson Yang) Date: Fri, 06 Jul 2018 15:18:04 +0000 Subject: [issue34059] multiprocessing deadlock In-Reply-To: <1530848538.94.0.56676864532.issue34059@psf.upfronthosting.co.za> Message-ID: <1530890284.15.0.56676864532.issue34059@psf.upfronthosting.co.za> Windson Yang added the comment: I'm can't reproduce the deadlock, maybe it's related to torch package? Can you try without torch to see if this happens again? ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 11:21:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Jul 2018 15:21:47 +0000 Subject: [issue34059] multiprocessing deadlock In-Reply-To: <1530848538.94.0.56676864532.issue34059@psf.upfronthosting.co.za> Message-ID: <1530890507.37.0.56676864532.issue34059@psf.upfronthosting.co.za> STINNER Victor added the comment: IMHO it's an issue with your usage of the torch module which is not part of the Python stdlib, so I suggest to close this issue as "third party" or "not a bug". ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 11:45:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Jul 2018 15:45:51 +0000 Subject: [issue34054] multiprocessing should use time.monotonic() for timeout In-Reply-To: <1530808427.84.0.56676864532.issue34054@psf.upfronthosting.co.za> Message-ID: <1530891951.09.0.56676864532.issue34054@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 Jul 6 12:01:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Jul 2018 16:01:09 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows Message-ID: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> New submission from STINNER Victor : I would help to debug race conditions on Windows to log the "CPU usage" on regrtest, as we do on other platforms (using os.getloadavg()). Links: * https://stackoverflow.com/questions/13666458/python-collect-system-stats * https://docs.microsoft.com/en-us/windows/desktop/api/pdh/nf-pdh-pdhmakecounterpatha * GetSystemTimes()? * https://stackoverflow.com/questions/23143693/retrieving-cpu-load-percent-total-in-windows-with-c ---------- components: Tests, Windows messages: 321177 nosy: paul.moore, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal status: open title: regrtest: log "CPU usage" on Windows versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 12:03:58 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 06 Jul 2018 16:03:58 +0000 Subject: [issue34042] Reference loss for local classes In-Reply-To: <1530704571.33.0.56676864532.issue34042@psf.upfronthosting.co.za> Message-ID: <1530893038.91.0.56676864532.issue34042@psf.upfronthosting.co.za> Yury Selivanov added the comment: > If you could do what you often you, and make this what distributions like Debian pull from, it would be good enough in terms of release for me, as it blocks Nuitka tests from passing on them. I'm not sure what you mean by "what you often do". I'll push a fix to master and 3.7 branches in a few minutes, so perhaps you can open a PR to ask Linux vendors to add a patch for 3.7.0 to their packages. An easier solution would be for you to disable refcounting tests that rely on gettotalrefcount just for 3.7.0. And I apologize for the hassle :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 12:20:11 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 06 Jul 2018 16:20:11 +0000 Subject: [issue34042] Reference loss for local classes In-Reply-To: <1530704571.33.0.56676864532.issue34042@psf.upfronthosting.co.za> Message-ID: <1530894011.02.0.56676864532.issue34042@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 0b75228700e0077d8bf2636e74733389514b4b2f by Yury Selivanov in branch 'master': bpo-34042: Fix dict.copy() to maintain correct total refcount (GH-8119) https://github.com/python/cpython/commit/0b75228700e0077d8bf2636e74733389514b4b2f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 12:21:26 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 06 Jul 2018 16:21:26 +0000 Subject: [issue34042] Reference loss for local classes In-Reply-To: <1530704571.33.0.56676864532.issue34042@psf.upfronthosting.co.za> Message-ID: <1530894086.87.0.56676864532.issue34042@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7715 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 12:24:49 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 06 Jul 2018 16:24:49 +0000 Subject: [issue34032] Add platlibdir to allow distinction between /usr/lib and /usr/lib64 for Linux In-Reply-To: <1530630040.09.0.56676864532.issue34032@psf.upfronthosting.co.za> Message-ID: <1530894289.13.0.56676864532.issue34032@psf.upfronthosting.co.za> ?ric Araujo added the comment: I think there are open tickets discussing this, and the problem is more complex that a simple PR: - Debian does multiarch that?s more than just lib/lib64 - some systems have lib32 I think - recent systems merge / and /usr, is that relevant? - how does virtualenv follow or customize install schemes - doko patches Python in Debian and Ubuntu to edit sysconfig/distutils ---------- nosy: +doko, eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 12:30:04 2018 From: report at bugs.python.org (Alberto) Date: Fri, 06 Jul 2018 16:30:04 +0000 Subject: [issue34057] Py_Initialize aborts when using static Python version. Windows In-Reply-To: <1530862051.36.0.56676864532.issue34057@psf.upfronthosting.co.za> Message-ID: Alberto added the comment: Hi, First of all thank you for your answer. If every module can't be statically compiled within a library, what is the point of having instructions to compile python statically in the build instructions? Can I modify the code to make it completely statically? Thank you On Fri, Jul 6, 2018 at 12:27 AM STINNER Victor wrote: > > STINNER Victor added the comment: > > > Why is Python looking for external modules when it is a statically > linked library and encodings should be built-in? > > Hi, this is not a bug. Python needs its standard library. You might want > to put the whole stdlib into a single ZIP, but I don't recall how to do > that. > > The encodings and codecs modules are not built-in, but _codecs is built-in: > > >>> import encodings, codecs, _codecs > >>> encodings > > >>> codecs > > >>> _codecs > > > I suggest to close this issue as "not a bug". You should ask on a Python > mailing list or forum to get help how to build a standalone Python. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > -- Alberto Garc?a Illera GPG Public Key: https://goo.gl/twKUUv ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 12:40:19 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 06 Jul 2018 16:40:19 +0000 Subject: [issue34042] Reference loss for local classes In-Reply-To: <1530704571.33.0.56676864532.issue34042@psf.upfronthosting.co.za> Message-ID: <1530895219.8.0.56676864532.issue34042@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 127bd9bfd591c8ec1a97eb7f4037c8b884eef973 by Miss Islington (bot) in branch '3.7': bpo-34042: Fix dict.copy() to maintain correct total refcount (GH-8119) https://github.com/python/cpython/commit/127bd9bfd591c8ec1a97eb7f4037c8b884eef973 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 12:41:53 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 06 Jul 2018 16:41:53 +0000 Subject: [issue34042] Reference loss for local classes In-Reply-To: <1530704571.33.0.56676864532.issue34042@psf.upfronthosting.co.za> Message-ID: <1530895313.32.0.56676864532.issue34042@psf.upfronthosting.co.za> Yury Selivanov added the comment: Thank you for reporting the issue, Kay. And huge thanks to Antoine and Pablo for bisecting. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 12:47:16 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 06 Jul 2018 16:47:16 +0000 Subject: [issue34041] add *deterministic* parameter to sqlite3.Connection.create_function() In-Reply-To: <1530698654.39.0.56676864532.issue34041@psf.upfronthosting.co.za> Message-ID: <1530895636.48.0.56676864532.issue34041@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 12:51:48 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 06 Jul 2018 16:51:48 +0000 Subject: [issue34061] Document sqlite3.NotSupportedError exception Message-ID: <1530895908.13.0.56676864532.issue34061@psf.upfronthosting.co.za> New submission from Berker Peksag : Most of the exceptions in sqlite3 module were documented in issue 6057 (https://github.com/python/cpython/commit/ed789f9cf9586d94e85115bb516a2ab6b9a2f668) Unfortunately, I noticed that I missed NotSupportedError while reviewing PR 8086. I think it should be documented in the Exceptions section as well: https://docs.python.org/3.8/library/sqlite3.html#exceptions We can adapt the text in PEP 249: https://www.python.org/dev/peps/pep-0249/#notsupportederror ---------- assignee: docs at python components: Documentation keywords: easy messages: 321184 nosy: berker.peksag, docs at python priority: normal severity: normal stage: needs patch status: open title: Document sqlite3.NotSupportedError exception type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 13:24:58 2018 From: report at bugs.python.org (Guillaume Perrault-Archambault) Date: Fri, 06 Jul 2018 17:24:58 +0000 Subject: [issue34059] multiprocessing deadlock In-Reply-To: <1530890507.37.0.56676864532.issue34059@psf.upfronthosting.co.za> Message-ID: Guillaume Perrault-Archambault added the comment: Hi Victor and Yang, Thanks for your fast replies. I did initially think it could be a torch issue. Indeed, I have an equivalent numpy testcase that does not deadlock. However, the fact that it gets stuck inside a multiprocessing wait statement makes me think it's still a multiprocessing issue. I've spent two weeks full time on this issue. Over at torch forums I've had no replies ( https://discuss.pytorch.org/t/multiprocessing-code-works-using-numpy-but-deadlocked-using-pytorch/20473 ). On stackexchange I only got a workaround suggestion that works sporadically ( https://stackoverflow.com/questions/51093970/multiprocessing-code-works-using-numpy-but-deadlocked-using-pytorch). Basically I can get rid of the deadlock (sometimes) if I impose only one thread per process. But this is not a solution anyway. I have tried stepping through the code, but because it is multiprocessed, you cannot step through it (at least not in the conventional way, since the main thread is not doing the heavy lifting). I've tried adding print statements in the multiprocess library and mucking around with it a bit, but debugging multi-processed code in this way is an absolute nightmare because you can't even trust the order in which print statements display on the screen. And probably more relevant, I'm out of my league here. I'm really at a complete dead end. I'm blocked and my work cannot progress without fixing this issue. I'd be very grateful if you could try to reproduce and rule out the multiprocessing library. If you need help reproducing I can send a different testcase that deadlocked on my friend's Mac (for him, the original testcase did not deadlock). Testcase I attached in my original post it sometimes deadlocks and sometimes doesn't, depending on the machine I run on. So I'm not suprised you got no deadlock when you tried to reproduce. I can always get it deadlocking on Linux/Mac though, by tweaking the code. To give you a sense of how unreliably it deadlocks, just removing the for loop in the code (which is outside the multiprocessing portion of the code!) somehow gets rid of the deadlock. Also, it never deadlocks on Windows. If you could provide any help on this issue I'd be very grateful. Regards, Guillaume. On Fri, Jul 6, 2018 at 11:21 AM STINNER Victor wrote: > > STINNER Victor added the comment: > > IMHO it's an issue with your usage of the torch module which is not part > of the Python stdlib, so I suggest to close this issue as "third party" or > "not a bug". > > ---------- > nosy: +vstinner > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 13:38:14 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Fri, 06 Jul 2018 17:38:14 +0000 Subject: [issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc. In-Reply-To: <1515429303.77.0.467229070634.issue32521@psf.upfronthosting.co.za> Message-ID: <1530898694.84.0.56676864532.issue32521@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: On Fedora after the fix we had also to BuildRequire libnsl2-devel and libtirpc-devel after the glibc change was implemented for the correct headers to be included within the buildroot. I am not familiar with suse's build system webui to find the logs, but are those packages provided by the distribution? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 14:13:30 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 06 Jul 2018 18:13:30 +0000 Subject: [issue34062] Python launcher on Windows does not work with --list or --list-paths Message-ID: <1530900810.19.0.56676864532.issue34062@psf.upfronthosting.co.za> New submission from Brett Cannon : When you run `py -h` it says you can use -0 or --list as well as -0p or --list-paths, but both --list and --list-paths don't work (the -0-based options do, though). ---------- components: Windows messages: 321187 nosy: brett.cannon, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: test needed status: open title: Python launcher on Windows does not work with --list or --list-paths type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 14:40:54 2018 From: report at bugs.python.org (Eryk Sun) Date: Fri, 06 Jul 2018 18:40:54 +0000 Subject: [issue33922] [Windows] Document the launcher's -64 suffix In-Reply-To: <1529538222.45.0.56676864532.issue33922@psf.upfronthosting.co.za> Message-ID: <1530902454.49.0.56676864532.issue33922@psf.upfronthosting.co.za> Change by Eryk Sun : ---------- assignee: -> docs at python components: +Documentation dependencies: +Allow windows launcher to specify bit lengths with & without minor version nosy: +docs at python resolution: duplicate -> stage: resolved -> patch review status: closed -> open superseder: Allow windows launcher to specify bit lengths with & without minor version -> title: Enforce 64bit Python by Launcher -> [Windows] Document the launcher's -64 suffix versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 14:51:56 2018 From: report at bugs.python.org (Guillaume Perrault-Archambault) Date: Fri, 06 Jul 2018 18:51:56 +0000 Subject: [issue34059] multiprocessing deadlock In-Reply-To: <1530848538.94.0.56676864532.issue34059@psf.upfronthosting.co.za> Message-ID: <1530903116.04.0.56676864532.issue34059@psf.upfronthosting.co.za> Guillaume Perrault-Archambault added the comment: A friend of mine has suggested a fix that seems to work for now (upgrade numpy from 1.14.3 to 1.14.5). This makes no sense at all but it does seem to work for now. I have a strong suspicion that this is just masking the problem and that it will reappear. However, since it works I would not want you to waste any time on this. I will reopen if the deadlock reappears! I do apologize if you already spent a lot of time on this. Regards, Guillaume ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 15:21:27 2018 From: report at bugs.python.org (Eryk Sun) Date: Fri, 06 Jul 2018 19:21:27 +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: <1530904887.2.0.56676864532.issue34062@psf.upfronthosting.co.za> Eryk Sun added the comment: I don't think the launcher has unit tests. The if statement in process() that calls show_python_list only checks for "-0". It needs to check for the long names as well, e.g.: if (argc == 2) { /* First check for -0[p], --list, or --list-paths. */ if (!wcsncmp(p, L"-0", 2) || !wcscmp(p, L"--list") || !wcscmp(p, L"--list-paths")) { valid = show_python_list(argv); } } show_python_list shouldn't need to be modified. It already looks for -0p and --list-paths to include paths in the output format. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 15:49:46 2018 From: report at bugs.python.org (Santiago Hernandez) Date: Fri, 06 Jul 2018 19:49:46 +0000 Subject: [issue34034] Python 3.7.0 multiprocessing forkserver ForkingPickler behaviour change In-Reply-To: <1530646689.95.0.56676864532.issue34034@psf.upfronthosting.co.za> Message-ID: Santiago Hernandez added the comment: Thanks, I get it now, I hadn't seen that the pickling of the workers was Processes pickling. Yeah, I was not doing this anywhere else, it seems like slipped through once. But it called my attention that it used to work and now it doesn't. On Tue, Jul 3, 2018 at 4:38 PM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > It could be many different things. The bottom line here, though, is that > the Process class is not designed to be picklable (how would it work?), > which is probably why you're seeing this. > > ---------- > nosy: +pitrou > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 16:05:11 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 06 Jul 2018 20:05:11 +0000 Subject: [issue34034] Python 3.7.0 multiprocessing forkserver ForkingPickler behaviour change In-Reply-To: <1530641186.32.0.56676864532.issue34034@psf.upfronthosting.co.za> Message-ID: <1530907511.36.0.56676864532.issue34034@psf.upfronthosting.co.za> Antoine Pitrou added the comment: No problem! I'm going to close this issue as I don't think there's anything we can do here. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 17:03:41 2018 From: report at bugs.python.org (Alberto) Date: Fri, 06 Jul 2018 21:03:41 +0000 Subject: [issue34057] Py_Initialize aborts when using static Python version. Windows In-Reply-To: <1530830509.1.0.56676864532.issue34057@psf.upfronthosting.co.za> Message-ID: <1530911021.71.0.56676864532.issue34057@psf.upfronthosting.co.za> Alberto added the comment: Hey Victor, I've spent another number of hours debugging the problem and trying to avoid encodings to be loaded but I've had no luck since initfsencoding is necesary for init_sys_streams to work and that's an important function that sets stdin, stout and sterr. It seems that encodings is the only thing that prevents Py_Initialize to be called and therefore for a static python version to be used. Is there any way to move encodings to pythoncore? Is there any other solution? I'm happy to put my time on this (I've already spent 3 full days debugging the problem). I think this could be considered a bug since there is no point on statically build python and use it as a library as the README stands if there is still requirements on encodings which need to reside on the filesystem. Thank you again for your time ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 17:42:25 2018 From: report at bugs.python.org (Jim Jewett) Date: Fri, 06 Jul 2018 21:42:25 +0000 Subject: [issue34063] binhex REASONABLY_LARGE = 32768 so what is 128000 Message-ID: <1530913345.39.0.56676864532.issue34063@psf.upfronthosting.co.za> New submission from Jim Jewett : binhex defines a module-wide constant of REASONABLY_LARGE = 32768 # Minimal amount we pass the rle-coder Later on, in 5 locations it does either ifp.read(128000) or ifp.read_rsrc(128000) It isn't clear why a different constant is used, let alone why a literal is used instead of something like REASONABLY_LARGE. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 321193 nosy: Jim.Jewett, docs at python priority: low severity: normal stage: needs patch status: open title: binhex REASONABLY_LARGE = 32768 so what is 128000 type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 19:54:13 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 06 Jul 2018 23:54:13 +0000 Subject: [issue34019] webbrowser: wrong arguments for Opera browser. In-Reply-To: <1530525080.65.0.56676864532.issue34019@psf.upfronthosting.co.za> Message-ID: <1530921253.24.0.56676864532.issue34019@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New changeset 8902a1d14e9fe6fb80f4145ad4ea27a579567289 by Pablo Galindo in branch '2.7': [2.7] bpo-34019: Fix wrong arguments for Opera Browser (GH-8047) (#8126) https://github.com/python/cpython/commit/8902a1d14e9fe6fb80f4145ad4ea27a579567289 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 19:55:06 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 06 Jul 2018 23:55:06 +0000 Subject: [issue23493] optimize sort_keys in json module by using operator.itemgetter() In-Reply-To: <1424449556.4.0.766318893285.issue23493@psf.upfronthosting.co.za> Message-ID: <1530921306.38.0.56676864532.issue23493@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset e25399b40cd15620e77c9ad2ed24549006ae9b47 by INADA Naoki in branch 'master': bpo-23493: json: Change sort_keys in Python encoder same to C (GH-8131) https://github.com/python/cpython/commit/e25399b40cd15620e77c9ad2ed24549006ae9b47 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 21:01:09 2018 From: report at bugs.python.org (Martin Panter) Date: Sat, 07 Jul 2018 01:01:09 +0000 Subject: [issue31839] datetime: add method to parse isoformat() output In-Reply-To: <1508648168.49.0.213398074469.issue31839@psf.upfronthosting.co.za> Message-ID: <1530925269.83.0.56676864532.issue31839@psf.upfronthosting.co.za> Change by Martin Panter : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> datetime: add ability to parse RFC 3339 dates and times _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 21:20:51 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 07 Jul 2018 01:20:51 +0000 Subject: [issue34013] Inconsistent SyntaxError for print In-Reply-To: <1530380578.04.0.56676864532.issue34013@psf.upfronthosting.co.za> Message-ID: <1530926451.9.0.56676864532.issue34013@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Eric, Nick, Serhiy: this issue proposes to extend the print message patch of #30597 to cover more cases. On the face of it, this seems sensible, but I have no read the original discussion or the current and proposed patches. ---------- nosy: +eric.smith, ncoghlan, serhiy.storchaka, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 21:34:22 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 07 Jul 2018 01:34:22 +0000 Subject: [issue34017] Tkinter CheckButton not working in EXE In-Reply-To: <1530518241.17.0.56676864532.issue34017@psf.upfronthosting.co.za> Message-ID: <1530927262.72.0.56676864532.issue34017@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The tracker only covers the PSF cpython distribution. When you code ran in Spyder, our responsibily ended. cx Freeze is a 3rd party package: contact their support. ---------- nosy: +terry.reedy resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 21:51:45 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 07 Jul 2018 01:51:45 +0000 Subject: [issue34029] tkinter.filedialog.askdirectory() crashing before dialog opens when importing pywinauto In-Reply-To: <1530609625.32.0.56676864532.issue34029@psf.upfronthosting.co.za> Message-ID: <1530928305.49.0.56676864532.issue34029@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Ryan: this tracker only covers issues with the PSF CPython distribution. Problems with 3rd party modules like pywinauto are not our responsibility until someone determines that its misbehavior reflects a CPython bug. ---------- nosy: +terry.reedy resolution: -> third party status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 22:19:23 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 07 Jul 2018 02:19:23 +0000 Subject: [issue34058] Default Python 3.7 install broken on openSUSE Leap 42.3: $PYTHONHOME/lib64/python3.7/lib-dynload/ not linked to $PYTHONHOME/lib/python3.7/lib-dynload/ In-Reply-To: <1530838420.77.0.56676864532.issue34058@psf.upfronthosting.co.za> Message-ID: <1530929963.47.0.56676864532.issue34058@psf.upfronthosting.co.za> Terry J. Reedy added the comment: A crash, for the tracker, is failed execution without a Python exception and trackback. Debian, Fedora, Gentoo, RHEL, and Ubuntu (AMD64) buildbots are currently green. We don't have one for SUSE, open or other wise. If you have not yet reported the issue to openSUSE, I would do so in case this is something they should deal with. Victor, do you have anything to add? ---------- nosy: +terry.reedy, vstinner type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 22:46:15 2018 From: report at bugs.python.org (Ted Kandell) Date: Sat, 07 Jul 2018 02:46:15 +0000 Subject: [issue34058] Default Python 3.7 install broken on openSUSE Leap 42.3: $PYTHONHOME/lib64/python3.7/lib-dynload/ not linked to $PYTHONHOME/lib/python3.7/lib-dynload/ In-Reply-To: <1530838420.77.0.56676864532.issue34058@psf.upfronthosting.co.za> Message-ID: <1530931575.22.0.56676864532.issue34058@psf.upfronthosting.co.za> Ted Kandell added the comment: This isn't for the OpenSUSE official build itself, just compiling and installing from source on OpenSUSE 42.3. Without the symlink, and also with a wrong PYTHONHOME, pip coredumps. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 23:28:20 2018 From: report at bugs.python.org (Preston Moore) Date: Sat, 07 Jul 2018 03:28:20 +0000 Subject: [issue30400] Race condition in shutil.copyfile() In-Reply-To: <1495138920.07.0.300372261513.issue30400@psf.upfronthosting.co.za> Message-ID: <1530934100.75.0.56676864532.issue30400@psf.upfronthosting.co.za> Preston Moore added the comment: Sure. I'll get everything up to date for 3.8 and create and required test. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 23:41:11 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 07 Jul 2018 03:41:11 +0000 Subject: [issue34056] checked hash-based pyc files not working with imp module In-Reply-To: <1530829872.86.0.56676864532.issue34056@psf.upfronthosting.co.za> Message-ID: <1530934871.1.0.56676864532.issue34056@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset b0274f2cddd36b49fe5080efbe160277ef546471 by Benjamin Peterson in branch 'master': closes bpo-34056: Always return bytes from _HackedGetData.get_data(). (GH-8130) https://github.com/python/cpython/commit/b0274f2cddd36b49fe5080efbe160277ef546471 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 6 23:41:33 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Jul 2018 03:41:33 +0000 Subject: [issue34056] checked hash-based pyc files not working with imp module In-Reply-To: <1530829872.86.0.56676864532.issue34056@psf.upfronthosting.co.za> Message-ID: <1530934893.23.0.56676864532.issue34056@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7716 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 00:00:48 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Jul 2018 04:00:48 +0000 Subject: [issue34056] checked hash-based pyc files not working with imp module In-Reply-To: <1530829872.86.0.56676864532.issue34056@psf.upfronthosting.co.za> Message-ID: <1530936048.19.0.56676864532.issue34056@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 7bd6f0e5500f778e940374237b94651f60ae1990 by Miss Islington (bot) in branch '3.7': closes bpo-34056: Always return bytes from _HackedGetData.get_data(). (GH-8130) https://github.com/python/cpython/commit/7bd6f0e5500f778e940374237b94651f60ae1990 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 01:21:03 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 07 Jul 2018 05:21:03 +0000 Subject: [issue34058] Default Python 3.7 install broken on openSUSE Leap 42.3: $PYTHONHOME/lib64/python3.7/lib-dynload/ not linked to $PYTHONHOME/lib/python3.7/lib-dynload/ In-Reply-To: <1530838420.77.0.56676864532.issue34058@psf.upfronthosting.co.za> Message-ID: <1530940863.51.0.56676864532.issue34058@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Did you get the source from openSUSE or from python.org? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 03:09:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 07 Jul 2018 07:09:53 +0000 Subject: [issue34058] Default Python 3.7 install broken on openSUSE Leap 42.3: $PYTHONHOME/lib64/python3.7/lib-dynload/ not linked to $PYTHONHOME/lib/python3.7/lib-dynload/ In-Reply-To: <1530838420.77.0.56676864532.issue34058@psf.upfronthosting.co.za> Message-ID: <1530947393.71.0.56676864532.issue34058@psf.upfronthosting.co.za> STINNER Victor added the comment: Can we please recommpile Python from scratch and attach the output of make? Example: ./configure make 2>&1 | tee log And attach log to this ticket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 03:10:43 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 07 Jul 2018 07:10:43 +0000 Subject: [issue34058] Default Python 3.7 install broken on openSUSE Leap 42.3: $PYTHONHOME/lib64/python3.7/lib-dynload/ not linked to $PYTHONHOME/lib/python3.7/lib-dynload/ In-Reply-To: <1530838420.77.0.56676864532.issue34058@psf.upfronthosting.co.za> Message-ID: <1530947443.8.0.56676864532.issue34058@psf.upfronthosting.co.za> STINNER Victor added the comment: For readline, you probably have to install a dependency like: libreadline-dev. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 03:13:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 07 Jul 2018 07:13:24 +0000 Subject: [issue34058] Default Python 3.7 install broken on openSUSE Leap 42.3: $PYTHONHOME/lib64/python3.7/lib-dynload/ not linked to $PYTHONHOME/lib/python3.7/lib-dynload/ In-Reply-To: <1530940863.51.0.56676864532.issue34058@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > Debian, Fedora, Gentoo, RHEL, and Ubuntu (AMD64) buildbots are currently green. We don't have one for SUSE, open or other wise. We have SLES buildbots, that's OpenSUSE no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 04:21:42 2018 From: report at bugs.python.org (Ted Kandell) Date: Sat, 07 Jul 2018 08:21:42 +0000 Subject: [issue34058] Default Python 3.7 install broken on openSUSE Leap 42.3: $PYTHONHOME/lib64/python3.7/lib-dynload/ not linked to $PYTHONHOME/lib/python3.7/lib-dynload/ In-Reply-To: <1530838420.77.0.56676864532.issue34058@psf.upfronthosting.co.za> Message-ID: <1530951702.32.0.56676864532.issue34058@psf.upfronthosting.co.za> Ted Kandell added the comment: I got the source directly from www.python.org ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 04:28:49 2018 From: report at bugs.python.org (Ted Kandell) Date: Sat, 07 Jul 2018 08:28:49 +0000 Subject: [issue34058] Default Python 3.7 install broken on openSUSE Leap 42.3: $PYTHONHOME/lib64/python3.7/lib-dynload/ not linked to $PYTHONHOME/lib/python3.7/lib-dynload/ In-Reply-To: <1530838420.77.0.56676864532.issue34058@psf.upfronthosting.co.za> Message-ID: <1530952129.68.0.56676864532.issue34058@psf.upfronthosting.co.za> Ted Kandell added the comment: ./configure output default, no parameters ---------- Added file: https://bugs.python.org/file47674/configure.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 04:34:50 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 07 Jul 2018 08:34:50 +0000 Subject: [issue34051] Update multiprocessing example In-Reply-To: <1530780349.49.0.56676864532.issue34051@psf.upfronthosting.co.za> Message-ID: <1530952490.64.0.56676864532.issue34051@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The example feels a bit artificial indeed, but I don't think adding a sleep() call would make it realistic. Why would you protect sleep() with a lock? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 04:47:26 2018 From: report at bugs.python.org (Ted Kandell) Date: Sat, 07 Jul 2018 08:47:26 +0000 Subject: [issue34058] Default Python 3.7 install broken on openSUSE Leap 42.3: $PYTHONHOME/lib64/python3.7/lib-dynload/ not linked to $PYTHONHOME/lib/python3.7/lib-dynload/ In-Reply-To: <1530838420.77.0.56676864532.issue34058@psf.upfronthosting.co.za> Message-ID: <1530953246.32.0.56676864532.issue34058@psf.upfronthosting.co.za> Ted Kandell added the comment: The output of make after a make clean is attached. For readline, on openSUSE 42.3 you have to install ncurses-devel, not libreadline-dev. The instructions aren't clear about this either, or the fact that an ncurses or readline development library has to be installed separately. However, this didn't cause the "readline" problem, since the shared libraries were in /usr/local/lib64 instead of /usr/local/lib, and so they couldn't be found in any case. ---------- Added file: https://bugs.python.org/file47675/make.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 05:04:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Jul 2018 09:04:56 +0000 Subject: [issue34013] Inconsistent SyntaxError for print In-Reply-To: <1530380578.04.0.56676864532.issue34013@psf.upfronthosting.co.za> Message-ID: <1530954296.96.0.56676864532.issue34013@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also #32685. ---------- nosy: +CuriousLearner, nitishch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 06:30:07 2018 From: report at bugs.python.org (Ryusei Yamaguchi) Date: Sat, 07 Jul 2018 10:30:07 +0000 Subject: [issue34064] subprocess functions with shell=1 pass wrong command to win32 shell Message-ID: <1530959407.22.0.56676864532.issue34064@psf.upfronthosting.co.za> New submission from Ryusei Yamaguchi : In some cases, functions defined in subprocess modules pass wrong command to win32 shell. Python 3.8.0a0 (heads/master:4629c0d531, Jul 7 2018, 16:37:33) [MSC v.1914 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import subprocess >>> subprocess.check_output('cmd /c echo hello', shell=1) b'hello"\r\n' The result is as same as the following command run with cmd.exe: C:\> %COMSPEC% /c "cmd /c echo hello" hello" Specifying /s switch fixes the issue: C:\> %COMSPEC% /s /c "cmd /c echo hello" hello ---------- components: Library (Lib), Windows messages: 321213 nosy: mandel59, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: subprocess functions with shell=1 pass wrong command to win32 shell 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 Sat Jul 7 06:36:50 2018 From: report at bugs.python.org (Ryusei Yamaguchi) Date: Sat, 07 Jul 2018 10:36:50 +0000 Subject: [issue34064] subprocess functions with shell=1 pass wrong command to win32 shell In-Reply-To: <1530959407.22.0.56676864532.issue34064@psf.upfronthosting.co.za> Message-ID: <1530959810.64.0.56676864532.issue34064@psf.upfronthosting.co.za> Change by Ryusei Yamaguchi : ---------- keywords: +patch pull_requests: +7717 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 07:32:03 2018 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 07 Jul 2018 11:32:03 +0000 Subject: [issue34065] 'force' should be printed as italic font not highlight font. Message-ID: <1530963123.0.0.56676864532.issue34065@psf.upfronthosting.co.za> New submission from Dong-hee Na : https://docs.python.org/3.8/library/logging.html#logging.basicConfig Although I wrote the 'force' as '``force`` ' but it is printed as a highlighted font. The 'force' section should be printed as italic font not highlight font. Maybe there is something mistake I didn't catch. ---------- assignee: docs at python components: Documentation messages: 321214 nosy: corona10, docs at python priority: normal severity: normal status: open title: 'force' should be printed as italic font not highlight font. versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 07:34:10 2018 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 07 Jul 2018 11:34:10 +0000 Subject: [issue34065] 'force' should be printed as italic font not highlight font. In-Reply-To: <1530963123.0.0.56676864532.issue34065@psf.upfronthosting.co.za> Message-ID: <1530963250.0.0.56676864532.issue34065@psf.upfronthosting.co.za> Dong-hee Na added the comment: Oh it should *force* not ``force`` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 07:41:29 2018 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 07 Jul 2018 11:41:29 +0000 Subject: [issue34065] 'force' should be printed as italic font not highlight font. In-Reply-To: <1530963123.0.0.56676864532.issue34065@psf.upfronthosting.co.za> Message-ID: <1530963689.34.0.56676864532.issue34065@psf.upfronthosting.co.za> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +7719 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 08:08:39 2018 From: report at bugs.python.org (Bob Kline) Date: Sat, 07 Jul 2018 12:08:39 +0000 Subject: [issue31652] make install fails: no module _ctypes In-Reply-To: <1506812661.87.0.213398074469.issue31652@psf.upfronthosting.co.za> Message-ID: <1530965319.53.0.56676864532.issue31652@psf.upfronthosting.co.za> Bob Kline added the comment: Confirming that this is still failing with 3.7.0 released. ---------- nosy: +bkline _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 08:29:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Jul 2018 12:29:41 +0000 Subject: [issue19072] classmethod doesn't honour descriptor protocol of wrapped callable In-Reply-To: <1379856164.11.0.6368818134.issue19072@psf.upfronthosting.co.za> Message-ID: <1530966581.45.0.56676864532.issue19072@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Berker, do you mind to create a PR? Supporting class properties looks good rationale to me. But we need to check how this change affects performance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 08:29:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Jul 2018 12:29:50 +0000 Subject: [issue19072] classmethod doesn't honour descriptor protocol of wrapped callable In-Reply-To: <1379856164.11.0.6368818134.issue19072@psf.upfronthosting.co.za> Message-ID: <1530966590.27.0.56676864532.issue19072@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 08:36:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Jul 2018 12:36:43 +0000 Subject: [issue34065] 'force' should be printed as italic font not highlight font. In-Reply-To: <1530963123.0.0.56676864532.issue34065@psf.upfronthosting.co.za> Message-ID: <1530967003.94.0.56676864532.issue34065@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 2800dcf656229c2ca4c90b4ddbace0717c41bb9e by Serhiy Storchaka (Dong-hee Na) in branch 'master': bpo-34065: Improve the markup of logging.basicConfig() arguments (GH-8153) https://github.com/python/cpython/commit/2800dcf656229c2ca4c90b4ddbace0717c41bb9e ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 09:56:55 2018 From: report at bugs.python.org (Julien Palard) Date: Sat, 07 Jul 2018 13:56:55 +0000 Subject: [issue32523] inconsistent spacing in changelog.html In-Reply-To: <1515514882.86.0.467229070634.issue32523@psf.upfronthosting.co.za> Message-ID: <1530971815.0.0.56676864532.issue32523@psf.upfronthosting.co.za> Change by Julien Palard : ---------- keywords: +patch pull_requests: +7720 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 10:04:20 2018 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 07 Jul 2018 14:04:20 +0000 Subject: [issue34065] 'force' should be printed as italic font not highlight font. In-Reply-To: <1530963123.0.0.56676864532.issue34065@psf.upfronthosting.co.za> Message-ID: <1530972260.63.0.56676864532.issue34065@psf.upfronthosting.co.za> Change by Dong-hee Na : ---------- pull_requests: +7721 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 10:07:14 2018 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 07 Jul 2018 14:07:14 +0000 Subject: [issue34065] 'force' should be printed as italic font not highlight font. In-Reply-To: <1530963123.0.0.56676864532.issue34065@psf.upfronthosting.co.za> Message-ID: <1530972434.91.0.56676864532.issue34065@psf.upfronthosting.co.za> Change by Dong-hee Na : ---------- pull_requests: +7722 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 11:43:37 2018 From: report at bugs.python.org (Windson Yang) Date: Sat, 07 Jul 2018 15:43:37 +0000 Subject: [issue34051] Update multiprocessing example In-Reply-To: <1530780349.49.0.56676864532.issue34051@psf.upfronthosting.co.za> Message-ID: <1530978217.6.0.56676864532.issue34051@psf.upfronthosting.co.za> Windson Yang added the comment: Hello, @Antoine Pitrou. Maybe there is another way to let the reader know "only one process prints to standard output at a time" instead of sleep() function? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 11:47:44 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 07 Jul 2018 15:47:44 +0000 Subject: [issue34051] Update multiprocessing example In-Reply-To: <1530780349.49.0.56676864532.issue34051@psf.upfronthosting.co.za> Message-ID: <1530978464.01.0.56676864532.issue34051@psf.upfronthosting.co.za> Antoine Pitrou added the comment: To be frank, I don't think that matters much. The user should understand what a lock is already, if they want to make use of multiprocessing fruitfully. The example showcases how to create a lock and how to pass it to child processes (by giving it as a function parameter). Printing to standard output is not the important thing here. However if you want to improve this example, you could replace the acquire/release pair with a "with" statement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 12:11:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Jul 2018 16:11:25 +0000 Subject: [issue34065] 'force' should be printed as italic font not highlight font. In-Reply-To: <1530963123.0.0.56676864532.issue34065@psf.upfronthosting.co.za> Message-ID: <1530979885.17.0.56676864532.issue34065@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset cad4a27585e4255295dcc06e80f1140cd11bdfd4 by Serhiy Storchaka (Dong-hee Na) in branch '3.6': [3.6] bpo-34065: Improve the markup of logging.basicConfig() arguments (GH-8153). (GH-8155) https://github.com/python/cpython/commit/cad4a27585e4255295dcc06e80f1140cd11bdfd4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 12:11:43 2018 From: report at bugs.python.org (Berker Peksag) Date: Sat, 07 Jul 2018 16:11:43 +0000 Subject: [issue19072] classmethod doesn't honour descriptor protocol of wrapped callable In-Reply-To: <1379856164.11.0.6368818134.issue19072@psf.upfronthosting.co.za> Message-ID: <1530979903.97.0.56676864532.issue19072@psf.upfronthosting.co.za> Berker Peksag added the comment: > Berker, do you mind to create a PR? I will submit a PR tomorrow. Do you have specific ideas for a micro-benchmark in mind or do you want to me just run the Python benchmark suite against the patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 12:12:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Jul 2018 16:12:13 +0000 Subject: [issue34065] 'force' should be printed as italic font not highlight font. In-Reply-To: <1530963123.0.0.56676864532.issue34065@psf.upfronthosting.co.za> Message-ID: <1530979933.86.0.56676864532.issue34065@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 75f2eb5eca38d22da62eb5814b9614792cfce13c by Serhiy Storchaka (Dong-hee Na) in branch '3.7': [3.7] bpo-34065: Improve the markup of logging.basicConfig() arguments (GH-8153). (GH-8156) https://github.com/python/cpython/commit/75f2eb5eca38d22da62eb5814b9614792cfce13c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 12:44:06 2018 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 07 Jul 2018 16:44:06 +0000 Subject: [issue34065] 'force' should be printed as italic font not highlight font. In-Reply-To: <1530963123.0.0.56676864532.issue34065@psf.upfronthosting.co.za> Message-ID: <1530981846.93.0.56676864532.issue34065@psf.upfronthosting.co.za> Change by Dong-hee Na : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 13:11:52 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Jul 2018 17:11:52 +0000 Subject: [issue34066] Possible resource warning in "with open()" Message-ID: <1530983512.39.0.56676864532.issue34066@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The bytecode generated for "with open()": with open(path) as file: data = file.read() 1 0 LOAD_NAME 0 (open) 2 LOAD_NAME 1 (path) 4 CALL_FUNCTION 1 6 SETUP_WITH 14 (to 22) 8 STORE_NAME 2 (file) 2 10 LOAD_NAME 2 (file) 12 LOAD_METHOD 3 (read) 14 CALL_METHOD 0 16 STORE_NAME 4 (data) 18 POP_BLOCK 20 BEGIN_FINALLY >> 22 WITH_CLEANUP_START 24 WITH_CLEANUP_FINISH 26 END_FINALLY 28 LOAD_CONST 0 (None) 30 RETURN_VALUE The execution can be interrupted by Ctrl-C between calling open() and entering the 'with' block. In this case the file object will be created, but its __enter__ and __exit__ methods will be not executed. As a result it will be closed after disappearing a reference to it and a ResourceWarning will be emitted. The solution is disabling interruption before the SETUP_WITH opcode. It is already disabled before SETUP_FINALLY and YIELD_FROM. It is worth to disable it before BEFORE_ASYNC_WITH for consistency although I don't have examples for it. See also issue29988. ---------- components: Interpreter Core messages: 321224 nosy: Mark.Shannon, benjamin.peterson, ncoghlan, serhiy.storchaka, yselivanov priority: normal severity: normal status: open title: Possible resource warning in "with open()" type: resource usage versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 13:21:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Jul 2018 17:21:22 +0000 Subject: [issue34066] Possible resource warning in "with open()" In-Reply-To: <1530983512.39.0.56676864532.issue34066@psf.upfronthosting.co.za> Message-ID: <1530984082.92.0.56676864532.issue34066@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +7723 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 13:25:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Jul 2018 17:25:37 +0000 Subject: [issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds In-Reply-To: <1491349378.03.0.0671954460373.issue29988@psf.upfronthosting.co.za> Message-ID: <1530984337.74.0.56676864532.issue29988@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The issue with synchronous 'with' can be solved by issue32949. See also issue34066 for the problem with interruption before calling __enter__. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 13:33:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Jul 2018 17:33:25 +0000 Subject: [issue34067] Problem with contextlib.nullcontext Message-ID: <1530984805.95.0.56676864532.issue34067@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : There is a flaw in the example in the documentation for contextlib.nullcontext. def process_file(file_or_path): if isinstance(file_or_path, str): # If string, open file cm = open(file_or_path) else: # Caller is responsible for closing file cm = nullcontext(file_or_path) with cm as file: # Perform processing on the file The execution can be interrupted by Ctrl-C between opening a file and entering a 'with' block. There is the same problem with the simple "with open(path) as file:", but it can be easily solved (see issue34066). It is harder to do for this example, because there are more opcodes between calling open() and entering 'with'. I afraid that this problem can't be solved in general case. Maybe contextlib.nullcontext has a flaw similar to the flaw in contextlib.nested(). ---------- messages: 321226 nosy: ncoghlan, serhiy.storchaka priority: normal severity: normal status: open title: Problem with contextlib.nullcontext type: resource usage versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 14:03:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Jul 2018 18:03:59 +0000 Subject: [issue19072] classmethod doesn't honour descriptor protocol of wrapped callable In-Reply-To: <1379856164.11.0.6368818134.issue19072@psf.upfronthosting.co.za> Message-ID: <1530986639.61.0.56676864532.issue19072@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think it is impossible to get significant impact on the Python benchmark suite from this patch. But mickrobenchmarks can expose the regression if it exists. Something like: ./python -m perf timeit -s 'class A:' -s ' @classmethod' -s ' def cm(cls): pass' -- 'A.cm()' ./python -m perf timeit -s 'class A:' -s ' @classmethod' -s ' def cm(cls): pass' -s 'f = A.cm' -- 'f()' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 14:10:15 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 07 Jul 2018 18:10:15 +0000 Subject: [issue32523] inconsistent spacing in changelog.html In-Reply-To: <1515514882.86.0.467229070634.issue32523@psf.upfronthosting.co.za> Message-ID: <1530987015.46.0.56676864532.issue32523@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Since 'News entry is one paragraph without subject line' is a change from older policy, I suggest posting a reminder to committers list and rechecking devguide. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 14:32:40 2018 From: report at bugs.python.org (Julien Palard) Date: Sat, 07 Jul 2018 18:32:40 +0000 Subject: [issue32523] inconsistent spacing in changelog.html In-Reply-To: <1515514882.86.0.467229070634.issue32523@psf.upfronthosting.co.za> Message-ID: <1530988360.6.0.56676864532.issue32523@psf.upfronthosting.co.za> Julien Palard added the comment: terry: Make sense, I'll also try to add the reminder in blurb if I find an appropriate place and wording. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 15:08:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Jul 2018 19:08:23 +0000 Subject: [issue33888] Use CPython instead of Python when talking about implementation details In-Reply-To: <1529259198.28.0.56676864532.issue33888@psf.upfronthosting.co.za> Message-ID: <1530990503.75.0.56676864532.issue33888@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 15:35:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Jul 2018 19:35:20 +0000 Subject: [issue33804] Document the default value of the size parameter of io.TextIOBase.read In-Reply-To: <1528419097.71.0.592728768989.issue33804@psf.upfronthosting.co.za> Message-ID: <1530992120.52.0.56676864532.issue33804@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What about other methods and other classes? ---------- nosy: +benjamin.peterson, serhiy.storchaka, stutzbach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 16:05:16 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Sat, 07 Jul 2018 20:05:16 +0000 Subject: [issue33804] Document the default value of the size parameter of io.TextIOBase.read In-Reply-To: <1528419097.71.0.592728768989.issue33804@psf.upfronthosting.co.za> Message-ID: <1530993916.92.0.56676864532.issue33804@psf.upfronthosting.co.za> Andr?s Delfino added the comment: I do see your point (not bloat BPO with a one line fix per each undocumented feature), but IMHO it's somewhat unrealistic to fix all issues of the same type in a single PR. I opened this PR because I was reading this particular function and noticed that the "size" parameter is documented as required. If it was documented as optional, the default value is not documented either. Perhaps we can compromise, and I can look at all the classes/functions in "io", and improve this PR? I cannot propose myself to do this to the whole Python documentation at once :/ Excuse me if I didn't interpret your comment right. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 16:17:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Jul 2018 20:17:19 +0000 Subject: [issue33804] Document the default value of the size parameter of io.TextIOBase.read In-Reply-To: <1528419097.71.0.592728768989.issue33804@psf.upfronthosting.co.za> Message-ID: <1530994639.57.0.56676864532.issue33804@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b6bb77c2b8e83ba6cb845c7b512ac564276e854f by Serhiy Storchaka (Andr?s Delfino) in branch 'master': bpo-33804: Document that the argument for io.TextIOBase.read() is optional (GH-7510) https://github.com/python/cpython/commit/b6bb77c2b8e83ba6cb845c7b512ac564276e854f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 16:18:39 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Jul 2018 20:18:39 +0000 Subject: [issue33804] Document the default value of the size parameter of io.TextIOBase.read In-Reply-To: <1528419097.71.0.592728768989.issue33804@psf.upfronthosting.co.za> Message-ID: <1530994719.25.0.56676864532.issue33804@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7724 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 16:20:28 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Jul 2018 20:20:28 +0000 Subject: [issue33804] Document the default value of the size parameter of io.TextIOBase.read In-Reply-To: <1528419097.71.0.592728768989.issue33804@psf.upfronthosting.co.za> Message-ID: <1530994828.06.0.56676864532.issue33804@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7725 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 16:23:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Jul 2018 20:23:12 +0000 Subject: [issue33804] Document the default value of the size parameter of io.TextIOBase.read In-Reply-To: <1528419097.71.0.592728768989.issue33804@psf.upfronthosting.co.za> Message-ID: <1530994992.11.0.56676864532.issue33804@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I see. The real problem was that the argument for io.TextIOBase.read() was not documented as optional. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 16:24:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Jul 2018 20:24:49 +0000 Subject: [issue33702] Add some missings links in production lists and a little polish In-Reply-To: <1527724302.5.0.682650639539.issue33702@psf.upfronthosting.co.za> Message-ID: <1530995089.19.0.56676864532.issue33702@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset caccca78e46bf3c3b24e09b3afb1c1b08c39990c by Serhiy Storchaka (Andr?s Delfino) in branch 'master': bpo-33702: Add some missing links in production lists and do a little polish (GH-7259) https://github.com/python/cpython/commit/caccca78e46bf3c3b24e09b3afb1c1b08c39990c ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 16:25:56 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Jul 2018 20:25:56 +0000 Subject: [issue33702] Add some missings links in production lists and a little polish In-Reply-To: <1527724302.5.0.682650639539.issue33702@psf.upfronthosting.co.za> Message-ID: <1530995156.17.0.56676864532.issue33702@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7726 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 16:26:56 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Jul 2018 20:26:56 +0000 Subject: [issue33702] Add some missings links in production lists and a little polish In-Reply-To: <1527724302.5.0.682650639539.issue33702@psf.upfronthosting.co.za> Message-ID: <1530995216.49.0.56676864532.issue33702@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7727 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 16:37:29 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Sat, 07 Jul 2018 20:37:29 +0000 Subject: [issue33804] Document the default value of the size parameter of io.TextIOBase.read In-Reply-To: <1528419097.71.0.592728768989.issue33804@psf.upfronthosting.co.za> Message-ID: <1530995849.23.0.56676864532.issue33804@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- pull_requests: +7728 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 16:39:06 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Jul 2018 20:39:06 +0000 Subject: [issue33804] Document the default value of the size parameter of io.TextIOBase.read In-Reply-To: <1528419097.71.0.592728768989.issue33804@psf.upfronthosting.co.za> Message-ID: <1530995946.25.0.56676864532.issue33804@psf.upfronthosting.co.za> miss-islington added the comment: New changeset e5b47ea5859522f81599a82d49175f6fad263482 by Miss Islington (bot) in branch '3.7': bpo-33804: Document that the argument for io.TextIOBase.read() is optional (GH-7510) https://github.com/python/cpython/commit/e5b47ea5859522f81599a82d49175f6fad263482 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 16:45:10 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Jul 2018 20:45:10 +0000 Subject: [issue33804] Document the default value of the size parameter of io.TextIOBase.read In-Reply-To: <1528419097.71.0.592728768989.issue33804@psf.upfronthosting.co.za> Message-ID: <1530996310.16.0.56676864532.issue33804@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 770937b6fd87af91390ac765f6a4c4767432cbc3 by Miss Islington (bot) in branch '3.6': bpo-33804: Document that the argument for io.TextIOBase.read() is optional (GH-7510) https://github.com/python/cpython/commit/770937b6fd87af91390ac765f6a4c4767432cbc3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 16:52:42 2018 From: report at bugs.python.org (Marcin Niemira) Date: Sat, 07 Jul 2018 20:52:42 +0000 Subject: [issue34061] Document sqlite3.NotSupportedError exception In-Reply-To: <1530895908.13.0.56676864532.issue34061@psf.upfronthosting.co.za> Message-ID: <1530996762.55.0.56676864532.issue34061@psf.upfronthosting.co.za> Change by Marcin Niemira : ---------- keywords: +patch pull_requests: +7729 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 17:09:11 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Jul 2018 21:09:11 +0000 Subject: [issue33702] Add some missings links in production lists and a little polish In-Reply-To: <1527724302.5.0.682650639539.issue33702@psf.upfronthosting.co.za> Message-ID: <1530997751.76.0.56676864532.issue33702@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 80c188f3efca3ddb3d588b91938655e52ee65bda by Miss Islington (bot) in branch '3.7': bpo-33702: Add some missing links in production lists and do a little polish (GH-7259) https://github.com/python/cpython/commit/80c188f3efca3ddb3d588b91938655e52ee65bda ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 17:09:22 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Jul 2018 21:09:22 +0000 Subject: [issue33702] Add some missings links in production lists and a little polish In-Reply-To: <1527724302.5.0.682650639539.issue33702@psf.upfronthosting.co.za> Message-ID: <1530997762.79.0.56676864532.issue33702@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 445f9edaa4efbf76ae0fe8e18707665ac16dd5a4 by Miss Islington (bot) in branch '3.6': bpo-33702: Add some missing links in production lists and do a little polish (GH-7259) https://github.com/python/cpython/commit/445f9edaa4efbf76ae0fe8e18707665ac16dd5a4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 17:10:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Jul 2018 21:10:20 +0000 Subject: [issue33804] Document the default value of the size parameter of io.TextIOBase.read In-Reply-To: <1528419097.71.0.592728768989.issue33804@psf.upfronthosting.co.za> Message-ID: <1530997820.89.0.56676864532.issue33804@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset ad0fc8ddba0e2f6715dc14c74cb4dbd437b3777d by Serhiy Storchaka (Andr?s Delfino) in branch '2.7': [2.7] bpo-33804: Document that the argument for io.TextIOBase.read() is optional (GH-7510). (GH-8171) https://github.com/python/cpython/commit/ad0fc8ddba0e2f6715dc14c74cb4dbd437b3777d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 17:11:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Jul 2018 21:11:27 +0000 Subject: [issue33804] Document the default value of the size parameter of io.TextIOBase.read In-Reply-To: <1528419097.71.0.592728768989.issue33804@psf.upfronthosting.co.za> Message-ID: <1530997887.11.0.56676864532.issue33804@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 Sat Jul 7 17:25:21 2018 From: report at bugs.python.org (Marcin Niemira) Date: Sat, 07 Jul 2018 21:25:21 +0000 Subject: [issue34050] Broken links to "OpenSSL cipher list format" in documentation In-Reply-To: <1530778661.86.0.56676864532.issue34050@psf.upfronthosting.co.za> Message-ID: <1530998721.58.0.56676864532.issue34050@psf.upfronthosting.co.za> Change by Marcin Niemira : ---------- keywords: +patch pull_requests: +7730 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 17:36:25 2018 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 07 Jul 2018 21:36:25 +0000 Subject: [issue28626] Tutorial: rearrange discussion of output formatting to encourage f-strings In-Reply-To: <1478452855.22.0.932657206329.issue28626@psf.upfronthosting.co.za> Message-ID: <1530999385.56.0.56676864532.issue28626@psf.upfronthosting.co.za> A.M. Kuchling added the comment: New changeset ced350b1952857a9b9c68ec7e2786358bcb61050 by Andrew Kuchling in branch 'master': bpo-28626: rearrange discussion of output formatting to encourage f-strings (#6036) https://github.com/python/cpython/commit/ced350b1952857a9b9c68ec7e2786358bcb61050 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 17:37:46 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Jul 2018 21:37:46 +0000 Subject: [issue28626] Tutorial: rearrange discussion of output formatting to encourage f-strings In-Reply-To: <1478452855.22.0.932657206329.issue28626@psf.upfronthosting.co.za> Message-ID: <1530999466.72.0.56676864532.issue28626@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7731 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 18:24:23 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 07 Jul 2018 22:24:23 +0000 Subject: [issue34050] Broken links to "OpenSSL cipher list format" in documentation In-Reply-To: <1530778661.86.0.56676864532.issue34050@psf.upfronthosting.co.za> Message-ID: <1531002263.15.0.56676864532.issue34050@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset 9c5ba097485c8c643b670acd4026f4382bc92f4b by Benjamin Peterson (Marcin Niemira) in branch 'master': closes bpo-34050: Fix link in SSL docs (GH-8173) https://github.com/python/cpython/commit/9c5ba097485c8c643b670acd4026f4382bc92f4b ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 18:25:30 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Jul 2018 22:25:30 +0000 Subject: [issue34050] Broken links to "OpenSSL cipher list format" in documentation In-Reply-To: <1530778661.86.0.56676864532.issue34050@psf.upfronthosting.co.za> Message-ID: <1531002330.29.0.56676864532.issue34050@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7732 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 18:25:54 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 07 Jul 2018 22:25:54 +0000 Subject: [issue34050] Broken links to "OpenSSL cipher list format" in documentation In-Reply-To: <1530778661.86.0.56676864532.issue34050@psf.upfronthosting.co.za> Message-ID: <1531002354.1.0.56676864532.issue34050@psf.upfronthosting.co.za> Change by Benjamin Peterson : ---------- pull_requests: +7733 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 18:28:12 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 07 Jul 2018 22:28:12 +0000 Subject: [issue34050] Broken links to "OpenSSL cipher list format" in documentation In-Reply-To: <1530778661.86.0.56676864532.issue34050@psf.upfronthosting.co.za> Message-ID: <1531002492.03.0.56676864532.issue34050@psf.upfronthosting.co.za> Change by Benjamin Peterson : ---------- pull_requests: +7734 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 18:44:08 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Sat, 07 Jul 2018 22:44:08 +0000 Subject: [issue33702] Add some missings links in production lists and a little polish In-Reply-To: <1527724302.5.0.682650639539.issue33702@psf.upfronthosting.co.za> Message-ID: <1531003448.27.0.56676864532.issue33702@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 18:44:20 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Sat, 07 Jul 2018 22:44:20 +0000 Subject: [issue33702] Add some missings links in production lists and a little polish In-Reply-To: <1527724302.5.0.682650639539.issue33702@psf.upfronthosting.co.za> Message-ID: <1531003460.95.0.56676864532.issue33702@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 18:47:37 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Jul 2018 22:47:37 +0000 Subject: [issue34050] Broken links to "OpenSSL cipher list format" in documentation In-Reply-To: <1530778661.86.0.56676864532.issue34050@psf.upfronthosting.co.za> Message-ID: <1531003657.97.0.56676864532.issue34050@psf.upfronthosting.co.za> miss-islington added the comment: New changeset a912305512efd08cbaa15dc1488fb626c9fec067 by Miss Islington (bot) in branch '3.7': closes bpo-34050: Fix link in SSL docs (GH-8173) https://github.com/python/cpython/commit/a912305512efd08cbaa15dc1488fb626c9fec067 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 18:48:09 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 07 Jul 2018 22:48:09 +0000 Subject: [issue34050] Broken links to "OpenSSL cipher list format" in documentation In-Reply-To: <1530778661.86.0.56676864532.issue34050@psf.upfronthosting.co.za> Message-ID: <1531003689.56.0.56676864532.issue34050@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset 3707dfaf45baf867f17bbbc78ccf2f0d13711dbd by Benjamin Peterson in branch '2.7': [2.7] closes bpo-34050: Fix link in SSL docs (GH-8173). (GH-8179) https://github.com/python/cpython/commit/3707dfaf45baf867f17bbbc78ccf2f0d13711dbd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 19:03:39 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 07 Jul 2018 23:03:39 +0000 Subject: [issue34050] Broken links to "OpenSSL cipher list format" in documentation In-Reply-To: <1530778661.86.0.56676864532.issue34050@psf.upfronthosting.co.za> Message-ID: <1531004619.51.0.56676864532.issue34050@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset becb5277670bdb37e8c8471a5a510466eaf9598a by Benjamin Peterson in branch '3.6': [3.6] closes bpo-34050: Fix link in SSL docs (GH-8173) (GH-8178) https://github.com/python/cpython/commit/becb5277670bdb37e8c8471a5a510466eaf9598a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 19:25:50 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 07 Jul 2018 23:25:50 +0000 Subject: [issue33888] Use CPython instead of Python when talking about implementation details In-Reply-To: <1529259198.28.0.56676864532.issue33888@psf.upfronthosting.co.za> Message-ID: <1531005950.51.0.56676864532.issue33888@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 8d41278045ee4e8bf1cadb58a7db58d70ad55237 by Terry Jan Reedy (Andr?s Delfino) in branch 'master': bpo-33888: Use CPython instead of Python in the FAQ (GH-7767) https://github.com/python/cpython/commit/8d41278045ee4e8bf1cadb58a7db58d70ad55237 ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 19:27:00 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Jul 2018 23:27:00 +0000 Subject: [issue33888] Use CPython instead of Python when talking about implementation details In-Reply-To: <1529259198.28.0.56676864532.issue33888@psf.upfronthosting.co.za> Message-ID: <1531006020.86.0.56676864532.issue33888@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7735 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 19:28:01 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Jul 2018 23:28:01 +0000 Subject: [issue33888] Use CPython instead of Python when talking about implementation details In-Reply-To: <1529259198.28.0.56676864532.issue33888@psf.upfronthosting.co.za> Message-ID: <1531006081.81.0.56676864532.issue33888@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7736 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 19:29:00 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Jul 2018 23:29:00 +0000 Subject: [issue33888] Use CPython instead of Python when talking about implementation details In-Reply-To: <1529259198.28.0.56676864532.issue33888@psf.upfronthosting.co.za> Message-ID: <1531006140.69.0.56676864532.issue33888@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7737 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 19:33:00 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Jul 2018 23:33:00 +0000 Subject: [issue33888] Use CPython instead of Python when talking about implementation details In-Reply-To: <1529259198.28.0.56676864532.issue33888@psf.upfronthosting.co.za> Message-ID: <1531006380.25.0.56676864532.issue33888@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 3a98ddd136275ef944aa4387c964fc0c5adf6fab by Miss Islington (bot) in branch '2.7': bpo-33888: Use CPython instead of Python in the FAQ (GH-7767) https://github.com/python/cpython/commit/3a98ddd136275ef944aa4387c964fc0c5adf6fab ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 19:42:35 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Jul 2018 23:42:35 +0000 Subject: [issue33888] Use CPython instead of Python when talking about implementation details In-Reply-To: <1529259198.28.0.56676864532.issue33888@psf.upfronthosting.co.za> Message-ID: <1531006955.79.0.56676864532.issue33888@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 21fe81c1fea1bca6b500550b5895e9ebcb3ebba6 by Miss Islington (bot) in branch '3.7': bpo-33888: Use CPython instead of Python in the FAQ (GH-7767) https://github.com/python/cpython/commit/21fe81c1fea1bca6b500550b5895e9ebcb3ebba6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 19:50:35 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Jul 2018 23:50:35 +0000 Subject: [issue33888] Use CPython instead of Python when talking about implementation details In-Reply-To: <1529259198.28.0.56676864532.issue33888@psf.upfronthosting.co.za> Message-ID: <1531007435.72.0.56676864532.issue33888@psf.upfronthosting.co.za> miss-islington added the comment: New changeset b7874c809cbead0eb07554b61efe7823238c8bd9 by Miss Islington (bot) in branch '3.6': bpo-33888: Use CPython instead of Python in the FAQ (GH-7767) https://github.com/python/cpython/commit/b7874c809cbead0eb07554b61efe7823238c8bd9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 20:09:06 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 08 Jul 2018 00:09:06 +0000 Subject: [issue34057] Py_Initialize aborts when using static Python version. Windows In-Reply-To: <1530830509.1.0.56676864532.issue34057@psf.upfronthosting.co.za> Message-ID: <1531008546.78.0.56676864532.issue34057@psf.upfronthosting.co.za> Change by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 20:25:16 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 08 Jul 2018 00:25:16 +0000 Subject: [issue33888] Use CPython instead of Python when talking about implementation details In-Reply-To: <1529259198.28.0.56676864532.issue33888@psf.upfronthosting.co.za> Message-ID: <1531009516.62.0.56676864532.issue33888@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Merged with Guido's approval on the PR. Thanks. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 20:37:02 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 08 Jul 2018 00:37:02 +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: <1531010222.56.0.56676864532.issue34047@psf.upfronthosting.co.za> Terry J. Reedy added the comment: We need to determine whether the problem is with tk/tkinter or specifically with IDLE, and whether it has anything with using ttk. The attached file duplicates the skeleton of an IDLE editor in 14 lines of tkinter code. This includes putting a ttk scrollbar on the tk frame. It works for me on Windows. If it misbehaves on Mac, uncomment ', Scrollbar' on the ttk line to get a ttk scrollbar on a ttk frame. Also comment out the entire ttk line to get a tk scrollbar on a tk frame. ---------- Added file: https://bugs.python.org/file47676/tk_scroll.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 20:39:47 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 08 Jul 2018 00:39:47 +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: <1531010387.48.0.56676864532.issue34047@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The mouse over scrollbar behavior I described above is specific to the ttk version. Mark Roseman has said that other ttk widgets *look* better on a ttk frame. Does the frame make any difference for scrollbar? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 20:45:16 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 08 Jul 2018 00:45:16 +0000 Subject: [issue34067] Problem with contextlib.nullcontext In-Reply-To: <1530984805.95.0.56676864532.issue34067@psf.upfronthosting.co.za> Message-ID: <1531010716.85.0.56676864532.issue34067@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 23:35:10 2018 From: report at bugs.python.org (Martin Panter) Date: Sun, 08 Jul 2018 03:35:10 +0000 Subject: [issue32401] No module named '_ctypes' In-Reply-To: <1513884303.03.0.213398074469.issue32401@psf.upfronthosting.co.za> Message-ID: <1531020910.78.0.56676864532.issue32401@psf.upfronthosting.co.za> Change by Martin Panter : ---------- superseder: -> make install fails: no module _ctypes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 23:40:15 2018 From: report at bugs.python.org (Martin Panter) Date: Sun, 08 Jul 2018 03:40:15 +0000 Subject: [issue34036] ModuleNotFoundError: No module named '_ctypes' when install Python 3.7 on Linux In-Reply-To: <1530645048.53.0.56676864532.issue34036@psf.upfronthosting.co.za> Message-ID: <1531021215.61.0.56676864532.issue34036@psf.upfronthosting.co.za> Martin Panter added the comment: Ctypes is meant to be (at least it used to be) an optional module. If you don?t actually care about building ctypes, this might be the same as Issue 31652. Using ?configure --without-ensurepip? was suggested as a workaround. If you do want ctypes to be built, I would look for compiler and linker messages relating to the ?_ctypes? module (before the install step). ---------- nosy: +martin.panter superseder: -> make install fails: no module _ctypes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 7 23:43:20 2018 From: report at bugs.python.org (Martin Panter) Date: Sun, 08 Jul 2018 03:43:20 +0000 Subject: [issue31652] make install fails: no module _ctypes In-Reply-To: <1506812661.87.0.213398074469.issue31652@psf.upfronthosting.co.za> Message-ID: <1531021400.67.0.56676864532.issue31652@psf.upfronthosting.co.za> Martin Panter added the comment: In Chi-Hsuan suggests ?configure --without-ensurepip? as a workaround. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 00:14:22 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 08 Jul 2018 04:14:22 +0000 Subject: [issue34067] Problem with contextlib.nullcontext In-Reply-To: <1530984805.95.0.56676864532.issue34067@psf.upfronthosting.co.za> Message-ID: <1531023262.45.0.56676864532.issue34067@psf.upfronthosting.co.za> Nick Coghlan added the comment: That's certainly similar to the problems with contextlib.nested, but I don't think it's as inherently flawed as nested was. What I'd suggest we change the existing example to is this: from functools import partial from os import fspath def process_file(file_or_path): try: as_fspath = os.fspath(file_or_path) except TypeError: # If it's a file, caller is responsible for closing it make_cm = partial(nullcontext, file_or_path) else: # If it's a path, open file when the context is entered make_cm = partial(open, as_fspath) with make_cm() as file: # Perform processing on the file Optionally, we could also present a cleaner example where a pre-created context manager is passed in and we're just coping with the fact it may be None: def update_resource(resource, updates, resource_lock=None): if resource_lock is None: resource_lock = nullcontext() with resource_lock: resource.apply_updates(updates) (I'll also note that ExitStack is *far* from being immune to the Ctrl-C problem, as it's implemented in Python itself, which allows its __exit__ method to be interrupted, as well as for interrupt to occur between a resource being created or acquired, and it being registered with the stack) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 00:14:52 2018 From: report at bugs.python.org (Windson Yang) Date: Sun, 08 Jul 2018 04:14:52 +0000 Subject: [issue34051] Update multiprocessing example In-Reply-To: <1530780349.49.0.56676864532.issue34051@psf.upfronthosting.co.za> Message-ID: <1531023292.31.0.56676864532.issue34051@psf.upfronthosting.co.za> Windson Yang added the comment: Thank you, I think to use acquire() and release() may be better than with statement in this example. I will close this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 00:15:01 2018 From: report at bugs.python.org (Windson Yang) Date: Sun, 08 Jul 2018 04:15:01 +0000 Subject: [issue34051] Update multiprocessing example In-Reply-To: <1530780349.49.0.56676864532.issue34051@psf.upfronthosting.co.za> Message-ID: <1531023301.81.0.56676864532.issue34051@psf.upfronthosting.co.za> Change by Windson Yang : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 00:26:50 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 08 Jul 2018 04:26:50 +0000 Subject: [issue34057] Py_Initialize aborts when using static Python version. Windows In-Reply-To: <1530830509.1.0.56676864532.issue34057@psf.upfronthosting.co.za> Message-ID: <1531024010.68.0.56676864532.issue34057@psf.upfronthosting.co.za> Nick Coghlan added the comment: encodings is only the *first* unfrozen Python module that we load - once you get past that, then you'll find that we also load os.py and various other things. cx_freeze is an illustrative example to look at in that regard, as it preconfigures the interpreter to be able to find the cx_freeze generated zip archive that has the program's Python modules in it: https://github.com/anthony-tuininga/cx_Freeze/blob/master/source/bases/Common.c The technique that cx_freeze doesn't use yet is to combine the statically linked Python binary and the generated zip archive into a single file (similar to what zipapp does), and adjust the sys.path definition inside the binary to refer back to the executable itself (since executable files can have arbitrary content appended, while zip files can have arbitrary content *pre*pended). We're always going to require that embedding applications provide a working import path of some kind, so this isn't a bug. It might be worth converting to a documentation enhancement request though, as we don't really make it clear in https://docs.python.org/3/c-api/init.html what the "minimum viable import set" actually looks like. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 01:36:43 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 08 Jul 2018 05:36:43 +0000 Subject: [issue34019] webbrowser: wrong arguments for Opera browser. In-Reply-To: <1530525080.65.0.56676864532.issue34019@psf.upfronthosting.co.za> Message-ID: <1531028203.36.0.56676864532.issue34019@psf.upfronthosting.co.za> Tal Einat added the comment: Thanks for reporting the issue and the PR, Bumsik Kim! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 01:58:12 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 08 Jul 2018 05:58:12 +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: <1531029492.55.0.56676864532.issue34047@psf.upfronthosting.co.za> Tal Einat added the comment: Terry, with your minimal scrolling frame with text, everything works fine for me on OSX, regardless of whether the frame/scrollbar are tk/ttk, including using the ttk scrollbar on a tk frame. So this does seem to be an issue with IDLE. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 02:26:36 2018 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 08 Jul 2018 06:26:36 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531031196.71.0.56676864532.issue33967@psf.upfronthosting.co.za> Dong-hee Na added the comment: @doerwalter Can I take a look this issue? ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 02:33:02 2018 From: report at bugs.python.org (Ma Lin) Date: Sun, 08 Jul 2018 06:33:02 +0000 Subject: [issue31652] make install fails: no module _ctypes In-Reply-To: <1506812661.87.0.213398074469.issue31652@psf.upfronthosting.co.za> Message-ID: <1531031582.38.0.56676864532.issue31652@psf.upfronthosting.co.za> Ma Lin added the comment: > I expect that the root cause is missing libffi(-dev[el]) on your system Yes, on my Ubuntu 18.04, `make` failed to compile _ctypes module. After install libffi-dev, it was compiled successfully: One more word, full necessary dependencies on my Ubuntu 18.04: sudo apt-get install build-essential libsqlite3-dev sqlite3 bzip2 libbz2-dev zlib1g-dev libssl-dev openssl libgdbm-dev libgdbm-compat-dev liblzma-dev libreadline-dev libncursesw5-dev libffi-dev uuid-dev ---------- nosy: +Ma Lin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 02:34:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 Jul 2018 06:34:42 +0000 Subject: [issue34068] Assertion failure in _PyType_Lookup Message-ID: <1531031682.19.0.56676864532.issue34068@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : I got the following failure when running tests with coverage on VSTS. https://python.visualstudio.com/cpython/cpython%20Team/_build/results?buildId=14680&view=logs 2018-07-05T12:11:22.0719913Z 0:17:49 load avg: 0.82 [373/413] test_urllib 2018-07-05T12:11:22.2574704Z python: Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. 2018-07-05T12:11:22.2603179Z Fatal Python error: Aborted 2018-07-05T12:11:22.2608453Z 2018-07-05T12:11:22.2622441Z Current thread 0x00007fb6465c7700 (most recent call first): 2018-07-05T12:11:22.2634973Z File "/opt/vsts/work/1/s/Lib/http/client.py", line 405 in close 2018-07-05T12:11:22.2650517Z File "/opt/vsts/work/1/s/Lib/traceback.py", line 216 in clear_frames 2018-07-05T12:11:22.2663944Z File "/opt/vsts/work/1/s/Lib/unittest/case.py", line 205 in __exit__ 2018-07-05T12:11:22.2676467Z File "/opt/vsts/work/1/s/Lib/test/test_urllib.py", line 368 in test_invalid_redirect 2018-07-05T12:11:22.2704792Z File "/opt/vsts/work/1/s/Lib/unittest/case.py", line 615 in run 2018-07-05T12:11:22.2727078Z File "/opt/vsts/work/1/s/Lib/unittest/case.py", line 663 in __call__ 2018-07-05T12:11:22.2738921Z File "/opt/vsts/work/1/s/Lib/unittest/suite.py", line 122 in run 2018-07-05T12:11:22.2754215Z File "/opt/vsts/work/1/s/Lib/unittest/suite.py", line 84 in __call__ 2018-07-05T12:11:22.2768065Z File "/opt/vsts/work/1/s/Lib/unittest/suite.py", line 122 in run 2018-07-05T12:11:22.2784999Z File "/opt/vsts/work/1/s/Lib/unittest/suite.py", line 84 in __call__ 2018-07-05T12:11:22.2797611Z File "/opt/vsts/work/1/s/Lib/unittest/suite.py", line 122 in run 2018-07-05T12:11:22.2813174Z File "/opt/vsts/work/1/s/Lib/unittest/suite.py", line 84 in __call__ 2018-07-05T12:11:22.2826999Z File "/opt/vsts/work/1/s/Lib/test/support/__init__.py", line 1782 in run 2018-07-05T12:11:22.2841544Z File "/opt/vsts/work/1/s/Lib/test/support/__init__.py", line 1883 in _run_suite 2018-07-05T12:11:22.2854173Z File "/opt/vsts/work/1/s/Lib/test/support/__init__.py", line 1973 in run_unittest 2018-07-05T12:11:22.2868193Z File "/opt/vsts/work/1/s/Lib/test/libregrtest/runtest.py", line 175 in test_runner 2018-07-05T12:11:22.2883280Z File "/opt/vsts/work/1/s/Lib/test/libregrtest/runtest.py", line 179 in runtest_inner 2018-07-05T12:11:22.2898238Z File "/opt/vsts/work/1/s/Lib/test/libregrtest/runtest.py", line 140 in runtest 2018-07-05T12:11:22.2912684Z File "/opt/vsts/work/1/s/Lib/test/libregrtest/main.py", line 384 in run_tests_sequential 2018-07-05T12:11:22.2927233Z File "/opt/vsts/work/1/s/Lib/test/libregrtest/main.py", line 488 in run_tests 2018-07-05T12:11:22.2941508Z File "/opt/vsts/work/1/s/Lib/test/libregrtest/main.py", line 566 in _main 2018-07-05T12:11:22.2955879Z File "/opt/vsts/work/1/s/Lib/test/libregrtest/main.py", line 531 in main 2018-07-05T12:11:22.2971440Z File "/opt/vsts/work/1/s/Lib/test/libregrtest/main.py", line 584 in main 2018-07-05T12:11:22.2985417Z File "/opt/vsts/work/1/s/Lib/test/__main__.py", line 2 in 2018-07-05T12:11:22.3002269Z File "/opt/vsts/work/1/s/venv/lib/python3.8/site-packages/coverage/execfile.py", line 184 in run_python_file 2018-07-05T12:11:22.3017503Z File "/opt/vsts/work/1/s/venv/lib/python3.8/site-packages/coverage/execfile.py", line 114 in run_python_module 2018-07-05T12:11:22.3035688Z File "/opt/vsts/work/1/s/venv/lib/python3.8/site-packages/coverage/cmdline.py", line 624 in do_run 2018-07-05T12:11:22.3051283Z File "/opt/vsts/work/1/s/venv/lib/python3.8/site-packages/coverage/cmdline.py", line 488 in command_line 2018-07-05T12:11:22.3067258Z File "/opt/vsts/work/1/s/venv/lib/python3.8/site-packages/coverage/cmdline.py", line 753 in main 2018-07-05T12:11:22.3083839Z File "/opt/vsts/work/1/s/venv/lib/python3.8/site-packages/coverage/__main__.py", line 8 in 2018-07-05T12:11:22.3099563Z File "/opt/vsts/work/1/s/Lib/runpy.py", line 85 in _run_code 2018-07-05T12:11:22.3113337Z File "/opt/vsts/work/1/s/Lib/runpy.py", line 193 in _run_module_as_main 2018-07-05T12:11:22.4058762Z Aborted (core dumped) 2018-07-05T12:11:22.4252037Z ##[error]Bash exited with code '134'. 2018-07-05T12:11:22.5073689Z ##[section]Finishing: Tests with coverage It is not related to changes made in PR 8071. Is Coverage.py doing something wrong or just exposes a flaw in the interpreter? ---------- components: Interpreter Core messages: 321261 nosy: nedbat, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Assertion failure in _PyType_Lookup type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 03:07:15 2018 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 08 Jul 2018 07:07:15 +0000 Subject: [issue34068] Assertion failure in _PyType_Lookup In-Reply-To: <1531031682.19.0.56676864532.issue34068@psf.upfronthosting.co.za> Message-ID: <1531033635.0.0.56676864532.issue34068@psf.upfronthosting.co.za> Stefan Behnel added the comment: I added this assertion exactly for the purpose of finding this kind of bug. It means that some code tried to look up an attribute with a live exception set, which previously could swallow the exception in certain situations, and even if not, it is always the wrong thing to do. Looking at the stack trace, my guess is that the problem is closer to the crash than the coverage calls. I'd suggest taking a look at the frame cleanup in the traceback module. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 03:09:22 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 08 Jul 2018 07:09:22 +0000 Subject: [issue34041] add *deterministic* parameter to sqlite3.Connection.create_function() In-Reply-To: <1530698654.39.0.56676864532.issue34041@psf.upfronthosting.co.za> Message-ID: <1531033762.86.0.56676864532.issue34041@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 0830858aeedecc9ece60349f8c31c2690d1a99f8 by Berker Peksag (Sergey Fedoseev) in branch 'master': bpo-34041: Allow creating deterministic functions in Connection.create_function() (GH-8086) https://github.com/python/cpython/commit/0830858aeedecc9ece60349f8c31c2690d1a99f8 ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 03:09:57 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 08 Jul 2018 07:09:57 +0000 Subject: [issue34041] add *deterministic* parameter to sqlite3.Connection.create_function() In-Reply-To: <1530698654.39.0.56676864532.issue34041@psf.upfronthosting.co.za> Message-ID: <1531033797.65.0.56676864532.issue34041@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 Sun Jul 8 03:15:25 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 08 Jul 2018 07:15:25 +0000 Subject: [issue16822] execv (et al.) should invoke atexit handlers before executing new code In-Reply-To: <1356907108.89.0.568486797575.issue16822@psf.upfronthosting.co.za> Message-ID: <1531034125.84.0.56676864532.issue16822@psf.upfronthosting.co.za> Tal Einat added the comment: Seems like a decision needs to be made: Add support for `atexec` handlers, close this issue, or something else? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 03:21:15 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 08 Jul 2018 07:21:15 +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: <1531034475.27.0.56676864532.issue34047@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The text widget in IDLE is actually an instance of MulticallCreator(Text). For tk_scroll2.py, I added the idlelib import and the call to MulticallCreator. ---------- Added file: https://bugs.python.org/file47677/tk_scroll2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 03:22:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 Jul 2018 07:22:35 +0000 Subject: [issue31014] webbrowser._synthesize uses outdated calling signature for webbrowser.register In-Reply-To: <1500906744.5.0.485850012333.issue31014@psf.upfronthosting.co.za> Message-ID: <1531034555.18.0.56676864532.issue31014@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 25b804a9c21c735ce322877f105ebab2539ccfc1 by Serhiy Storchaka in branch 'master': bpo-31014: Fix the webbrowser module. (GH-7267) https://github.com/python/cpython/commit/25b804a9c21c735ce322877f105ebab2539ccfc1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 03:23:42 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 08 Jul 2018 07:23:42 +0000 Subject: [issue31014] webbrowser._synthesize uses outdated calling signature for webbrowser.register In-Reply-To: <1500906744.5.0.485850012333.issue31014@psf.upfronthosting.co.za> Message-ID: <1531034622.45.0.56676864532.issue31014@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7738 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 03:42:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 Jul 2018 07:42:50 +0000 Subject: [issue25711] Rewrite zipimport from scratch In-Reply-To: <1448296120.48.0.872112518039.issue25711@psf.upfronthosting.co.za> Message-ID: <1531035770.12.0.56676864532.issue25711@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could anybody please make a review? This is just a first step, we need to do it before making other steps: implementing more modern import API, supporting large ZIP files and ZIP files with comments, implementing loading binary extensions from ZIP files, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 04:09:30 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 08 Jul 2018 08:09:30 +0000 Subject: [issue31014] webbrowser._synthesize uses outdated calling signature for webbrowser.register In-Reply-To: <1500906744.5.0.485850012333.issue31014@psf.upfronthosting.co.za> Message-ID: <1531037370.14.0.56676864532.issue31014@psf.upfronthosting.co.za> miss-islington added the comment: New changeset a410f9f614b62cd7df220186d081ffd73786be91 by Miss Islington (bot) in branch '3.7': bpo-31014: Fix the webbrowser module. (GH-7267) https://github.com/python/cpython/commit/a410f9f614b62cd7df220186d081ffd73786be91 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 04:19:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 Jul 2018 08:19:09 +0000 Subject: [issue31014] webbrowser._synthesize uses outdated calling signature for webbrowser.register In-Reply-To: <1500906744.5.0.485850012333.issue31014@psf.upfronthosting.co.za> Message-ID: <1531037949.19.0.56676864532.issue31014@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 05:29:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 Jul 2018 09:29:23 +0000 Subject: [issue30416] constant folding opens compiler to quadratic time hashing In-Reply-To: <1495314097.2.0.680001526088.issue30416@psf.upfronthosting.co.za> Message-ID: <1531042163.13.0.56676864532.issue30416@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Okay, this issue is fixed in 3.6. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 05:29:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 Jul 2018 09:29:31 +0000 Subject: [issue30416] constant folding opens compiler to quadratic time hashing In-Reply-To: <1495314097.2.0.680001526088.issue30416@psf.upfronthosting.co.za> Message-ID: <1531042171.93.0.56676864532.issue30416@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- priority: deferred blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 05:51:59 2018 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 08 Jul 2018 09:51:59 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531043519.07.0.56676864532.issue33967@psf.upfronthosting.co.za> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +7739 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 06:12:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 Jul 2018 10:12:12 +0000 Subject: [issue32788] Better error handling in sqlite3 In-Reply-To: <1518004914.65.0.467229070634.issue32788@psf.upfronthosting.co.za> Message-ID: <1531044732.63.0.56676864532.issue32788@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 06:57:23 2018 From: report at bugs.python.org (Joshua Avalon) Date: Sun, 08 Jul 2018 10:57:23 +0000 Subject: [issue34069] Fail to move file in Windows (AttributeError) Message-ID: <1531047443.22.0.56676864532.issue34069@psf.upfronthosting.co.za> New submission from Joshua Avalon : from shutil import move from pathlib import Path a = Path("s") b = Path("a.txt") move(b, a) This will throw AttributeError: 'WindowsPath' object has no attribute 'rstrip' >From the document, it should able to move: If the destination is an existing directory, then src is moved inside that directory. If the destination already exists but is not a directory, it may be overwritten depending on os.rename() semantics. If a = Path("s/a.txt"), it does not throw error. Enviroment: Window 10 Python 3.7.0 ---------- components: Windows messages: 321270 nosy: joshuaavalon, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Fail to move file in Windows (AttributeError) versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 07:11:19 2018 From: report at bugs.python.org (Eryk Sun) Date: Sun, 08 Jul 2018 11:11:19 +0000 Subject: [issue34064] subprocess functions with shell=1 pass wrong command to win32 shell In-Reply-To: <1530959407.22.0.56676864532.issue34064@psf.upfronthosting.co.za> Message-ID: <1531048279.6.0.56676864532.issue34064@psf.upfronthosting.co.za> Eryk Sun added the comment: This PR works around a bug in CMD, so I'm inclined to close it as a third-party issue. CMD is supposed to implement the following behavior: 1. If all of the following conditions are met, then quote characters on the command line are preserved: - no /S switch - exactly two quote characters - no special characters between the two quote characters, where special is one of: &<>()@^| - there are one or more whitespace characters between the two quote characters - the string between the two quote characters is the name of an executable file. 2. Otherwise, old behavior is to see if the first character is a quote character and if so, strip the leading character and remove the last quote character on the command line, preserving any text after the last quote character. In particular quotes should only be preserved if the quoted string is "the name of an executable file". To determine this, CMD calls an internal function named SearchForExecutable. This function special cases any command that begins with "cmd " (case insensitive) by substituting the current value of the %ComSpec% environment variable for the *entire* string. Of course this search succeeds, so it ends up handling the string "cmd /c echo hello" as if it's an executable. Probably no has noticed this bug since running `cmd /c "cmd /c ..."` is kind of a weird thing to do. To demonstrate this bug, let's compare running "cmd /c ..." with "cmd.exe /c ...": >>> subprocess.check_output('cmd /c "cmd /c echo hello"') b'hello"\r\n' >>> subprocess.check_output('cmd /c "cmd.exe /c echo hello"') b'hello\r\n' Adding /S makes CMD always use the old behavior that strips the quotes. However, this will change the existing behavior when the command line is an unquoted executable path with spaces in it. For example: >>> sys.executable 'C:\\Program Files\\Python36\\python.exe' >>> subprocess.call(sys.executable, shell=True) Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> exit() 0 With /S, CMD strips the quotes from the command. Without the quotes it parses "C:\Program" as the executable to run: >>> subprocess.call('cmd /s /c "{}"'.format(sys.executable)) 'C:\Program' is not recognized as an internal or external command, operable program or batch file. 1 ---------- nosy: +eryksun versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 07:33:27 2018 From: report at bugs.python.org (Eryk Sun) Date: Sun, 08 Jul 2018 11:33:27 +0000 Subject: [issue34069] shutil.move fails with AttributeError In-Reply-To: <1531047443.22.0.56676864532.issue34069@psf.upfronthosting.co.za> Message-ID: <1531049607.06.0.56676864532.issue34069@psf.upfronthosting.co.za> Eryk Sun added the comment: This issue isn't specific to Windows. It's a bug in shutil._basename: def _basename(path): # A basename() variant which first strips the trailing slash, if present. # Thus we always get the last component of the path, even for directories. sep = os.path.sep + (os.path.altsep or '') return os.path.basename(path.rstrip(sep)) It should use `os.fspath(path)` to get the path as a string. ---------- components: +Library (Lib) -Windows keywords: +easy nosy: +eryksun stage: -> needs patch title: Fail to move file in Windows (AttributeError) -> shutil.move fails with AttributeError type: -> behavior versions: +Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 08:03:01 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 08 Jul 2018 12:03:01 +0000 Subject: [issue34061] Document sqlite3.NotSupportedError exception In-Reply-To: <1530895908.13.0.56676864532.issue34061@psf.upfronthosting.co.za> Message-ID: <1531051381.21.0.56676864532.issue34061@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset bc9aa813a34474e517af8999565ff6151559d42f by Berker Peksag (Marcin Niemira) in branch 'master': bpo-34061: Document sqlite3.NotSupportedError (GH-8172) https://github.com/python/cpython/commit/bc9aa813a34474e517af8999565ff6151559d42f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 08:06:32 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 08 Jul 2018 12:06:32 +0000 Subject: [issue34061] Document sqlite3.NotSupportedError exception In-Reply-To: <1530895908.13.0.56676864532.issue34061@psf.upfronthosting.co.za> Message-ID: <1531051592.78.0.56676864532.issue34061@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- stage: patch review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 08:12:32 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 08 Jul 2018 12:12:32 +0000 Subject: [issue34069] shutil.move fails with AttributeError In-Reply-To: <1531047443.22.0.56676864532.issue34069@psf.upfronthosting.co.za> Message-ID: <1531051952.41.0.56676864532.issue34069@psf.upfronthosting.co.za> Berker Peksag added the comment: This is a duplicate of bpo-32689. > It should use `os.fspath(path)` to get the path as a string. PR 5393 already does that. ---------- nosy: +berker.peksag resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> shutil.move raises AttributeError if first argument is a pathlib.Path object and destination is a directory _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 08:42:14 2018 From: report at bugs.python.org (Marcin Niemira) Date: Sun, 08 Jul 2018 12:42:14 +0000 Subject: [issue34061] Document sqlite3.NotSupportedError exception In-Reply-To: <1530895908.13.0.56676864532.issue34061@psf.upfronthosting.co.za> Message-ID: <1531053734.71.0.56676864532.issue34061@psf.upfronthosting.co.za> Change by Marcin Niemira : ---------- pull_requests: +7740 stage: backport needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 08:52:40 2018 From: report at bugs.python.org (Marcin Niemira) Date: Sun, 08 Jul 2018 12:52:40 +0000 Subject: [issue34061] Document sqlite3.NotSupportedError exception In-Reply-To: <1530895908.13.0.56676864532.issue34061@psf.upfronthosting.co.za> Message-ID: <1531054360.73.0.56676864532.issue34061@psf.upfronthosting.co.za> Change by Marcin Niemira : ---------- pull_requests: +7741 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 09:08:22 2018 From: report at bugs.python.org (Sascha Silbe) Date: Sun, 08 Jul 2018 13:08:22 +0000 Subject: [issue1043134] Add preferred extensions for MIME types Message-ID: <1531055302.34.0.56676864532.issue1043134@psf.upfronthosting.co.za> Change by Sascha Silbe : ---------- nosy: +sascha_silbe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 09:09:38 2018 From: report at bugs.python.org (Sascha Silbe) Date: Sun, 08 Jul 2018 13:09:38 +0000 Subject: [issue4963] mimetypes.guess_extension result changes after mimetypes.init() In-Reply-To: <1232107494.83.0.0570958889295.issue4963@psf.upfronthosting.co.za> Message-ID: <1531055378.33.0.56676864532.issue4963@psf.upfronthosting.co.za> Change by Sascha Silbe : ---------- nosy: +sascha_silbe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 09:58:55 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 08 Jul 2018 13:58:55 +0000 Subject: [issue34061] Document sqlite3.NotSupportedError exception In-Reply-To: <1530895908.13.0.56676864532.issue34061@psf.upfronthosting.co.za> Message-ID: <1531058335.21.0.56676864532.issue34061@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 404156534893461165bb5b99a42cabe261dddb78 by Berker Peksag (Marcin Niemira) in branch '3.6': bpo-34061: Document sqlite3.NotSupportedError (GH-8172) https://github.com/python/cpython/commit/404156534893461165bb5b99a42cabe261dddb78 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 09:59:50 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 08 Jul 2018 13:59:50 +0000 Subject: [issue34061] Document sqlite3.NotSupportedError exception In-Reply-To: <1530895908.13.0.56676864532.issue34061@psf.upfronthosting.co.za> Message-ID: <1531058390.69.0.56676864532.issue34061@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 0b63759651b366ddb4c1c1dece12ef776053d5ee by Berker Peksag (Marcin Niemira) in branch '3.7': bpo-34061: Document sqlite3.NotSupportedError (GH-8172) https://github.com/python/cpython/commit/0b63759651b366ddb4c1c1dece12ef776053d5ee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 10:01:41 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 08 Jul 2018 14:01:41 +0000 Subject: [issue34061] Document sqlite3.NotSupportedError exception In-Reply-To: <1530895908.13.0.56676864532.issue34061@psf.upfronthosting.co.za> Message-ID: <1531058501.92.0.56676864532.issue34061@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks, Marcin. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 12:51:56 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 08 Jul 2018 16:51:56 +0000 Subject: [issue30400] Race condition in shutil.copyfile() In-Reply-To: <1495138920.07.0.300372261513.issue30400@psf.upfronthosting.co.za> Message-ID: <1531068716.23.0.56676864532.issue30400@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: All copy* functions and move() are subjects to race conditions (the only exception is rmtree()). You may solve the race condition in copyfile() but then you'd have the same problem in copystat() and copymode() which are used by copy() and copy2(). The definitive solution to this problem would theoretically be to have all these interconnected functions pass fds instead of "paths" but of course that is hardly possible. Personally I don't think this issue is worth being fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 13:37:15 2018 From: report at bugs.python.org (Eric Wieser) Date: Sun, 08 Jul 2018 17:37:15 +0000 Subject: [issue32780] ctypes: memoryview gives incorrect PEP3118 format strings for both packed and unpacked structs In-Reply-To: <1517894879.39.0.467229070634.issue32780@psf.upfronthosting.co.za> Message-ID: <1531071435.73.0.56676864532.issue32780@psf.upfronthosting.co.za> Eric Wieser added the comment: Pinging, as recommended by https://devguide.python.org/pullrequest/#reviewing. PEP3118 as a protocol is far less useful if the canonical implementation is non-compliant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 14:04:40 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 08 Jul 2018 18:04:40 +0000 Subject: [issue32780] ctypes: memoryview gives incorrect PEP3118 format strings for both packed and unpacked structs In-Reply-To: <1517894879.39.0.467229070634.issue32780@psf.upfronthosting.co.za> Message-ID: <1531073080.6.0.56676864532.issue32780@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Unfortunately, the PEP authors did very little in terms of implementing the PEP and neither CPython nor numpy has a fully compliant implementation. ---------- nosy: +aerojockey, teoliphant _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 14:06:20 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 08 Jul 2018 18:06:20 +0000 Subject: [issue32780] ctypes: memoryview gives incorrect PEP3118 format strings for both packed and unpacked structs In-Reply-To: <1517894879.39.0.467229070634.issue32780@psf.upfronthosting.co.za> Message-ID: <1531073180.24.0.56676864532.issue32780@psf.upfronthosting.co.za> Change by Alexander Belopolsky : ---------- assignee: -> belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 14:12:53 2018 From: report at bugs.python.org (David Herberth) Date: Sun, 08 Jul 2018 18:12:53 +0000 Subject: [issue34070] Superfluous call to isatty in open() when buffering >= 0 Message-ID: <1531073573.35.0.56676864532.issue34070@psf.upfronthosting.co.za> New submission from David Herberth : _iomodule.c:_io_open_impl checks for isatty even if not necessary (when buffering >= 0). Code: https://github.com/python/cpython/blob/c0ee341b29bd7d978b49272a2c0e2dcfa77404d5/Modules/_io/_iomodule.c#L392 { PyObject *res = _PyObject_CallMethodId(raw, &PyId_isatty, NULL); if (res == NULL) goto error; isatty = PyLong_AsLong(res); Py_DECREF(res); if (isatty == -1 && PyErr_Occurred()) goto error; } if (buffering == 1 || (buffering < 0 && isatty)) { buffering = -1; line_buffering = 1; } else line_buffering = 0; Python Code to reproduce: with open('foo', 'rb', buffering=0) as f: f.read() This generates an error (can be seen with strace): ioctl(5, TCGETS, 0x7ffef1435b60) = -1 ENOTTY (Inappropriate ioctl for device) I'll open a PR shortly. ---------- components: IO messages: 321281 nosy: Dav1d priority: normal severity: normal status: open title: Superfluous call to isatty in open() when buffering >= 0 type: performance versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 14:23:37 2018 From: report at bugs.python.org (David Herberth) Date: Sun, 08 Jul 2018 18:23:37 +0000 Subject: [issue34070] Superfluous call to isatty in open() when buffering >= 0 In-Reply-To: <1531073573.35.0.56676864532.issue34070@psf.upfronthosting.co.za> Message-ID: <1531074217.46.0.56676864532.issue34070@psf.upfronthosting.co.za> Change by David Herberth : ---------- keywords: +patch pull_requests: +7742 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 14:25:55 2018 From: report at bugs.python.org (INADA Naoki) Date: Sun, 08 Jul 2018 18:25:55 +0000 Subject: [issue24665] CJK support for textwrap In-Reply-To: <1437276510.99.0.116072917153.issue24665@psf.upfronthosting.co.za> Message-ID: <1531074355.4.0.56676864532.issue24665@psf.upfronthosting.co.za> INADA Naoki added the comment: I'm not expert of this area, but Korean support is still totally broken: >>> import unicodedata >>> s = "\u1100\u1161\u11a8" >>> unicodedata.east_asian_width(s[0]) 'W' >>> unicodedata.east_asian_width(s[1]) 'N' >>> unicodedata.east_asian_width(s[2]) 'N' >>> s '???' >>> s[:2] '??' >>> print(s[:2] + '\n' + s[2:]) ?? ? >>> print(s[:1] + '\n' + s[1:]) ? ?? I think "CJK support" is not nice naming for just using east_asian_width. PR-5649 doesn't use "CJK" word in APIs, but uses in commit log (PR title) and NEWS entry. Maybe, it should be "Textwrap now uses ``unicodedata.east_asian_width()`` to calculate text width when unicodedata is available." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 14:31:02 2018 From: report at bugs.python.org (INADA Naoki) Date: Sun, 08 Jul 2018 18:31:02 +0000 Subject: [issue24665] Use unicodedata.east_asian_width in textwrap In-Reply-To: <1437276510.99.0.116072917153.issue24665@psf.upfronthosting.co.za> Message-ID: <1531074662.29.0.56676864532.issue24665@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- title: CJK support for textwrap -> Use unicodedata.east_asian_width in textwrap versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 14:32:07 2018 From: report at bugs.python.org (Julien Palard) Date: Sun, 08 Jul 2018 18:32:07 +0000 Subject: [issue24665] Use unicodedata.east_asian_width in textwrap In-Reply-To: <1437276510.99.0.116072917153.issue24665@psf.upfronthosting.co.za> Message-ID: <1531074727.58.0.56676864532.issue24665@psf.upfronthosting.co.za> Julien Palard added the comment: Hi Inada, you're right and that's more or less why I not used CJK in the implementation: mainly I don't want to close the door to future enhancements on this topic (char width) of non-CJK languages (like those "invisible hyphens" here only to tell textwrapers where they can wrap inside of words, and so on). I'll remove CJK mentions (sadly maybe not today). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 14:34:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 Jul 2018 18:34:16 +0000 Subject: [issue33346] Syntax error with async generator inside dictionary comprehension In-Reply-To: <1524567941.57.0.682650639539.issue33346@psf.upfronthosting.co.za> Message-ID: <1531074856.85.0.56676864532.issue33346@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 6766 adds numerous examples of nesting async generator expressions and comprehensions as tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 15:41:07 2018 From: report at bugs.python.org (stein-k) Date: Sun, 08 Jul 2018 19:41:07 +0000 Subject: [issue32498] urllib.parse.unquote raises incorrect errormessage when string parameter is bytes In-Reply-To: <1515179710.49.0.467229070634.issue32498@psf.upfronthosting.co.za> Message-ID: <1531078867.41.0.56676864532.issue32498@psf.upfronthosting.co.za> stein-k added the comment: I have made the News Entry and created the Pull request as described here: https://devguide.python.org/pullrequest/. Should I update the Status and Resolution of the issue here, or wait for some kind of confirmation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 15:42:39 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 08 Jul 2018 19:42:39 +0000 Subject: [issue32949] Simplify "with"-related opcodes In-Reply-To: <1519566194.29.0.467229070634.issue32949@psf.upfronthosting.co.za> Message-ID: <1531078959.98.0.56676864532.issue32949@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Additional related PR: https://github.com/python/cpython/pull/6641 tied to issue33387 which proposes replacing the existing with and try related bytecodes with two simpler ones: RERAISE and WITH_EXCEPT_FINISH. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 15:44:06 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 08 Jul 2018 19:44:06 +0000 Subject: [issue33387] Simplify bytecodes for try-finally, try-except and with blocks. In-Reply-To: <1525026522.22.0.682650639539.issue33387@psf.upfronthosting.co.za> Message-ID: <1531079046.46.0.56676864532.issue33387@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- nosy: +gregory.p.smith, ncoghlan, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 16:07:04 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 Jul 2018 20:07:04 +0000 Subject: [issue34066] Possible resource warning in "with open()" In-Reply-To: <1530983512.39.0.56676864532.issue34066@psf.upfronthosting.co.za> Message-ID: <1531080424.62.0.56676864532.issue34066@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Maybe it is worth to disable interrupting before more opcodes. For example for fixing a problem with the contextlib.nullcontext example (issue34067) we need to disable interrupting before STORE_FAST, LOAD_FAST and JUMP_FORWARD. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 16:14:07 2018 From: report at bugs.python.org (Brett Cannon) Date: Sun, 08 Jul 2018 20:14:07 +0000 Subject: [issue25711] Rewrite zipimport from scratch In-Reply-To: <1531035770.12.0.56676864532.issue25711@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: I'm planning to review the PR at some point. On Sun, Jul 8, 2018, 00:42 Serhiy Storchaka, wrote: > > Serhiy Storchaka added the comment: > > Could anybody please make a review? This is just a first step, we need to > do it before making other steps: implementing more modern import API, > supporting large ZIP files and ZIP files with comments, implementing > loading binary extensions from ZIP files, etc. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 17:48:58 2018 From: report at bugs.python.org (Eric Wieser) Date: Sun, 08 Jul 2018 21:48:58 +0000 Subject: [issue32782] ctypes: memoryview gives incorrect PEP3118 itemsize for array of length zero In-Reply-To: <1517943201.04.0.467229070634.issue32782@psf.upfronthosting.co.za> Message-ID: <1531086538.61.0.56676864532.issue32782@psf.upfronthosting.co.za> Eric Wieser added the comment: Pinging, as recommended by https://devguide.python.org/pullrequest/#reviewing. Ideally this and https://bugs.python.org/issue32780 would make the same patch release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 18:40:48 2018 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 08 Jul 2018 22:40:48 +0000 Subject: [issue33346] Syntax error with async generator inside dictionary comprehension In-Reply-To: <1524567941.57.0.682650639539.issue33346@psf.upfronthosting.co.za> Message-ID: <1531089648.59.0.56676864532.issue33346@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 18:52:05 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 08 Jul 2018 22:52:05 +0000 Subject: [issue24665] CJK support for textwrap In-Reply-To: <1437276510.99.0.116072917153.issue24665@psf.upfronthosting.co.za> Message-ID: <1531090325.6.0.56676864532.issue24665@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think that this issue should be closed, as it is based on some confusions and errors. Textwrap works in terms of characters. The wrap method "wraps the single paragraph in text (a string) so every line is at most width characters long." When the module was written, 'character' meant "printable ascii (or 'extended ascii') character". It now means 'unicode codepoint'. Both are mentally real abstractions but have no particular correspondence to physical length. Calling textwrap buggy because it works in characters is wrong. Translating 'character' to 'fixed-width character space', so that one can measure physical length in terms of 'spaces' as a physical unit, is exact if and only if all characters are displayed in the same width space. This is true for fixed pitch output devices that simulate typewriters and text that only used fixed-width characters from a fixed pitch font. For long lines, the translation for a variable-pitch fonts may or may not be good enough for a particular use. As David noted, textwrap already fails for Ascii control characters. And it does cause problem when they are used in wrapped text. They are coded with 2 or 4 characters on input and may display as 0, 1, (possibly 2), 4, or 5 characters on output, depending on the display code and the display 'device'. As to the latter, "print('x\ax')" displays as 'xx' in a Windows console and as something like xx in a tkinter Text widget, except that the numbers in the box here on Firefox are not present, so that the tk box is (sort-of) the same width as 'x'. The particular premise of this issue is that CJK characters are somehow special and that 2.x releases, and now 3.x releases, are particularly broken for CJK text. Not so. If one has text that only uses same-width characters in a fixed-pitch CJK font (including wide spaces so columns line up), then textwrap works as well as it does for any other fixed-pitch text (ie, Ascii or Latin1). If one wants lines of a particular physical width, one passes a character width argument that corresponds to the desired physical width. The following is based on what I see in IDLE's Settings dialog Font page font sample for Windows 10 'Source Code Pro'. It includes samples from 12 'alphabet's To view it, run 'python -m idlelib', and on the top menu click Options => Configure IDLE. When the selected font is not a full BMP unicode font, Tk and Windows use other fonts, scaled to the same height, to synthesize a fairly complete BMP 'font'. The [Help] text says a bit more but has a mistake. What I see: Font size corresponds to physical height. Hence, the lines are very close to the same height. Some fonts look smaller or larger because they specify more or less blank space between lines. One factor is the use of descenders, as in Arabic. Character width for a fixed height varies. 20 characters in Greek, IPA, Hebrew, and Arabic take progressive less physical space than 20 Ascii or Latin1 characters. 20 characters in Devanagari, Cyrillic, and Tamil take progressively more. (The Tamil line only has 14 chars.) None of these are obviously fixed pitch. The Chinese, Korean, and Japanese samples have a fixed pitch. The characters are *not* actually 'double-wide', at least no relative to most other languages. The 10 CJK characters are as wide as 16 Source Code Pro characters. To match the physical width of 72 Ascii spaces, one should pass 'width=45'. But note that the exact ratio for Ascii depends on the font. It is a little higher for Courier and Lucida Console. It ranges from about 1 (for Arabic) to 2 (for Tamil) for other languages. The first 10 Tamil characters are slightly wider than the 10 CJK characters, so counting each CJK character as two average Tamil character is completely wrong. My conclusion: the proposal is unnecessary for pure CJK text; it is wrong in hard-coding a fix only for CJK; the CJK fix is wrong in hard-coding a particular ratio, in particular, one that is at the extreme end of the range of possibilities. Therefore, I think the open PR should be closed. I also think this issue should be closed in favor of #12499, which proposed to allow users to pass a transform function suitable for their particular use case. If that is implemented, and we decide to then add some sample functions, or rather, function factories, and to include one specifically for CJK*, then a new PR will be needed, and a new issue would be appropriate. * A more generic function factory for text with characters of two width classes might have as inputs a condition to identify '2nd language characters' and their fixed or average width relative relative to the 'first' language. ---------- nosy: +terry.reedy title: Use unicodedata.east_asian_width in textwrap -> CJK support for textwrap _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 19:32:51 2018 From: report at bugs.python.org (Jim DeLaHunt) Date: Sun, 08 Jul 2018 23:32:51 +0000 Subject: [issue34071] repr(task) raises AssertionError for coros which loop.create_task accepts; complications ensue Message-ID: <1531092771.84.0.56676864532.issue34071@psf.upfronthosting.co.za> New submission from Jim DeLaHunt : In Python 3.6.5, Task.__repr__() with raise an AssertionError for certain, arguably incorrect, coroutines which the instantiation of Task() accepts. repr(task) thus fails with an AssertionError, instead of returning a string which describes the task object and why its coroutine is wrong. Complications ensue. In particular, if this Task is used in a unittest.TestCase, and appears in test failure diagnostics, the test diagnostics are discarded when the AssertionError occurs, masking the problem in the code under test. In Python 3.7.0, Task.__init__() checks the supplied coroutine argument, using the same asyncio.iscoroutine() method which Task.__repr__() calls. Thus, while repr(task) can still raise an AssertionError, it is much harder to reach this situation. Task.__init__() is likely to raise an exception first, and the diagnostics will be pretty clear. To reproduce: 1. Here is a simple, perhaps misguided, attempt at a coroutine, and a Task which uses it: import asyncio async def ag(): yield None print("type(ag()) is ", type(ag())) print("asyncio.iscoroutine(ag)? ", asyncio.iscoroutine(ag)) print("repr(ag()) is ", repr(ag())) task = asyncio.get_event_loop().create_task(ag()) print("type(task) is ", type(task)) print("asyncio.iscoroutine(task._coro)? ", asyncio.iscoroutine(task._coro)) print("repr(task) is ") print(repr(task)) The output from Python 3.6.5 is: type(ag()) is asyncio.iscoroutine(ag)? False repr(ag()) is type(task) is asyncio.iscoroutine(task._coro)? False repr(task) is Traceback (most recent call last): File "bug_task_repr_1.py", line 31, in print(repr(task)) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_tasks.py", line 15, in _task_repr_info coro = coroutines._format_coroutine(task._coro) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/coroutines.py", line 276, in _format_coroutine assert iscoroutine(coro) AssertionError Observed behaviour: Here is a unit test which attempts to exercise the above Task. The test fails, but the AssertionError in Task.__repr__() discards the error diagnostics: from asyncio import test_utils class Test(test_utils.TestCase): def setUp(self): super().setUp() self.loop = self.new_test_loop() def test_wrongly_scheduled(self): # this is a simple, and maybe mistaken, coroutine async def ag(): yield None _ = self.loop.create_task(ag()) test_utils.run_once(self.loop) The output from Python 3.6.5 is: % python -m unittest bug_task_repr_2.py Exception in default exception handler Traceback (most recent call last): File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 1291, in call_exception_handler self.default_exception_handler(context) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 1263, in default_exception_handler value = repr(value) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_tasks.py", line 15, in _task_repr_info coro = coroutines._format_coroutine(task._coro) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/coroutines.py", line 276, in _format_coroutine assert iscoroutine(coro) AssertionError . ---------------------------------------------------------------------- Ran 1 test in 0.001s OK Note that the error traceback is all about the exception from Task.__repr__(), and the diagnostics about why the unit test failed is discarded. Expected behaviour: Here is the same unit test, but this time with a replacement method for Task._task_repr_info() which avoids the AssertionError. import asyncio from asyncio import test_utils import types class Test(test_utils.TestCase): def setUp(self): super().setUp() self.loop = self.new_test_loop() def test_wrongly_scheduled(self): # this is a simple, and maybe mistaken, coroutine async def ag(): yield None task = self.loop.create_task(ag()) task._repr_info = types.MethodType( task_safe_repr_info, task ) test_utils.run_once(self.loop) def task_safe_repr_info(self): '''task.task_safe_repr_info(): string list representation of task. Won't raise AssertionError If you have a Task object which is raising an AssertionError from "assert iscoroutine(coro)", then assign to instantiated object: task._repr_info = task_safe_repr_info Patched task object should be able to survive the AssertionError and deliver a useful representation. ''' try: # from Task._repr_info(self), which calls base_tasks._task_repr_info(self) info = asyncio.base_futures._future_repr_info(self) if self._must_cancel: # replace status info[0] = 'cancelling' # Expand: coro = coroutines._format_coroutine(task._coro) # coro_repr = coroutines._format_coroutine(task._coro):276 does assert iscoroutine(coro) # This fails. Expand that routine, without the assert. coro = self._coro if not hasattr(coro, 'cr_code') and not hasattr(coro, 'gi_code'): # Most likely a built-in type or a Cython coroutine. # Built-in types might not have __qualname__ or __name__. coro_name = getattr( coro, '__qualname__', getattr(coro, '__name__', type(coro).__name__)) coro_name = '{}()'.format(coro_name) running = False try: running = coro.cr_running except AttributeError: try: running = coro.gi_running except AttributeError: pass if running: coro_repr = '{} running'.format(coro_name) else: coro_repr = coro_name else: coro_name = None if isinstance(coro, asyncio.coroutines.CoroWrapper): func = coro.func coro_name = coro.__qualname__ if coro_name is not None: coro_name = '{}()'.format(coro_name) else: func = coro if coro_name is None: coro_name = asyncio.events._format_callback(func, (), {}) try: coro_code = coro.gi_code except AttributeError: coro_code = coro.cr_code try: coro_frame = coro.gi_frame except AttributeError: coro_frame = coro.cr_frame filename = coro_code.co_filename lineno = 0 if (isinstance(coro, asyncio.coroutines.CoroWrapper) and not inspect.isgeneratorfunction(coro.func) and coro.func is not None): source = asyncio.events._get_function_source(coro.func) if source is not None: filename, lineno = source if coro_frame is None: coro_repr = ('%s done, defined at %s:%s' % (coro_name, filename, lineno)) else: coro_repr = ('%s running, defined at %s:%s' % (coro_name, filename, lineno)) elif coro_frame is not None: lineno = coro_frame.f_lineno coro_repr = ('%s running at %s:%s' % (coro_name, filename, lineno)) else: lineno = coro_code.co_firstlineno coro_repr = ('%s done, defined at %s:%s' % (coro_name, filename, lineno)) # end of coroutines._format_coroutine(task._coro) # return coro_repr info.insert(1, 'coro=%s(<%s>)' % (type(coro), coro_repr)) if self._fut_waiter is not None: info.insert(2, 'wait_for=%r' % self._fut_waiter) return info except: return [type(self), id(self)] Here is the result of running that unit test on the patched Task object. Note that there is no AssertionError from repr(), and the diagnostics about the failing unit tests are now clear: % python -m unittest bug_task_repr_3.py . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK Task exception was never retrieved future: (.ag()>) exception=AttributeError("'async_generator' object has no attribute 'send'",)> AttributeError: 'async_generator' object has no attribute 'send' ---------- components: asyncio messages: 321292 nosy: JDLH, asvetlov, yselivanov priority: normal severity: normal status: open title: repr(task) raises AssertionError for coros which loop.create_task accepts; complications ensue type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 19:36:56 2018 From: report at bugs.python.org (Jim DeLaHunt) Date: Sun, 08 Jul 2018 23:36:56 +0000 Subject: [issue34071] repr(task) raises AssertionError for coros which loop.create_task accepts; complications ensue In-Reply-To: <1531092771.84.0.56676864532.issue34071@psf.upfronthosting.co.za> Message-ID: <1531093016.25.0.56676864532.issue34071@psf.upfronthosting.co.za> Jim DeLaHunt added the comment: This is what I observe when I run my original program with Python 3.7.0. Notice that the Task object instantiation fails with a clear error message: % python -c 'import sys; print(sys.version)' 3.7.0 (default, Jun 28 2018, 06:01:52) [Clang 8.0.0 (clang-800.0.42.1)] % python bug_task_repr_1.py type(ag()) is asyncio.iscoroutine(ag)? False repr(ag()) is Traceback (most recent call last): File "bug_task_repr_1.py", line 42, in task = asyncio.get_event_loop().create_task(ag()) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 386, in create_task task = tasks.Task(coro, loop=self) TypeError: a coroutine was expected, got Also, the unit test example fails due to asyncio.test_utils no longer being present in Python 3.7.0. I am comfortable with a workaround of upgrading to 3.7.0 or later for anyone who encounters this problem. I file this bug report mostly to let people who encounter this problem find this report in web searches, to help them understand the cause, and to see the workaround (patching Task._repr_info) if upgrading to 3.7 is not feasible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 19:41:25 2018 From: report at bugs.python.org (hyu) Date: Sun, 08 Jul 2018 23:41:25 +0000 Subject: [issue34072] 3.7.0 Windows embeddable zip vcruntime140.dll Message-ID: <1531093285.64.0.56676864532.issue34072@psf.upfronthosting.co.za> New submission from hyu : 3.7.0 Windows embeddable zip is missing vcruntime140.dll(?) Running python would display error about VCRUNTIME140.DLL. Copying vcruntime140.dll from earlier 3.6.x release is a work around. ---------- components: Windows messages: 321294 nosy: hyu, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: 3.7.0 Windows embeddable zip vcruntime140.dll type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 20:01:31 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 09 Jul 2018 00:01:31 +0000 Subject: [issue31623] Build MSI installer for 3.4 security releases on Windows In-Reply-To: <1506646876.94.0.213398074469.issue31623@psf.upfronthosting.co.za> Message-ID: <1531094491.42.0.56676864532.issue31623@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If we cannot test this and will not merge without testing*, then perhaps we should close it rather than pretend it still has a chance. *Which I think would be a bad idea. In any case, I made the title specific enough so that this issue and patch might possibly be discovered by someone wanting to do what Ivan claims the patch allows. ---------- nosy: +terry.reedy stage: -> test needed title: Allow to build MSI installer from the official tarball -> Build MSI installer for 3.4 security releases on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 20:27:44 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 09 Jul 2018 00:27:44 +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: <1531096064.12.0.56676864532.issue17180@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Should the patch be turned into a PR or should this be closed? ---------- nosy: +terry.reedy versions: -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 20:31:18 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 09 Jul 2018 00:31:18 +0000 Subject: [issue28778] wsgiref HTTP Response Header Injection: CRLF Injection In-Reply-To: <1479891172.05.0.173710900147.issue28778@psf.upfronthosting.co.za> Message-ID: <1531096278.82.0.56676864532.issue28778@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 21:30:20 2018 From: report at bugs.python.org (Jon Banafato) Date: Mon, 09 Jul 2018 01:30:20 +0000 Subject: [issue34073] asyncio and ProcessPoolExecutor: OSError on loop.close() Message-ID: <1531099820.7.0.56676864532.issue34073@psf.upfronthosting.co.za> New submission from Jon Banafato : Calling loop.close() on an eventloop configured to use a ProcessPoolExecutor can result in an OSError. Expected behavior: no exception raised. Actual behavior: an OSError is raised, and following this call, quit() fails to terminate the process gracefully. Example: Python 3.8.0a0 (default, Jul 7 2018, 14:35:49) [GCC 7.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import asyncio >>> from concurrent.futures import ProcessPoolExecutor >>> import os >>> >>> loop = asyncio.get_event_loop_policy().new_event_loop() >>> loop.set_default_executor(ProcessPoolExecutor()) >>> future = loop.run_in_executor(None, os.getpid) >>> loop.run_until_complete(future) 24697 >>> loop.close() Exception ignored in: .weakref_cb at 0x7f52e7f643f0> Traceback (most recent call last): File "/code/Lib/concurrent/futures/process.py", line 567, in weakref_cb thread_wakeup.wakeup() File "/code/Lib/concurrent/futures/process.py", line 89, in wakeup self._writer.send_bytes(b"") File "/code/Lib/multiprocessing/connection.py", line 183, in send_bytes self._check_closed() File "/code/Lib/multiprocessing/connection.py", line 136, in _check_closed Exception in thread QueueManagerThread: Traceback (most recent call last): File "/code/Lib/threading.py", line 917, in _bootstrap_inner self.run() File "/code/Lib/threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "/code/Lib/concurrent/futures/process.py", line 368, in _queue_management_worker thread_wakeup.clear() File "/code/Lib/concurrent/futures/process.py", line 92, in clear while self._reader.poll(): File "/code/Lib/multiprocessing/connection.py", line 255, in poll self._check_closed() File "/code/Lib/multiprocessing/connection.py", line 136, in _check_closed raise OSError("handle is closed") OSError: handle is closed raise OSError("handle is closed") OSError: handle is closed ---------- components: Library (Lib), asyncio messages: 321297 nosy: asvetlov, jonafato, yselivanov priority: normal severity: normal status: open title: asyncio and ProcessPoolExecutor: OSError on loop.close() type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 8 21:59:53 2018 From: report at bugs.python.org (Larry Hastings) Date: Mon, 09 Jul 2018 01:59:53 +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: <1531101593.54.0.56676864532.issue17180@psf.upfronthosting.co.za> Larry Hastings added the comment: I'll accept this into 3.4 and 3.5, if someone produces a PR and someone else reviews it. Given that the issue has already celebrated its fifth birthday I can't say I feel a lot of urgency about it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 01:36:55 2018 From: report at bugs.python.org (Julien Palard) Date: Mon, 09 Jul 2018 05:36:55 +0000 Subject: [issue34073] asyncio and ProcessPoolExecutor: OSError on loop.close() In-Reply-To: <1531099820.7.0.56676864532.issue34073@psf.upfronthosting.co.za> Message-ID: <1531114615.55.0.56676864532.issue34073@psf.upfronthosting.co.za> Julien Palard added the comment: Can reproduce with 3.7.0 on Linux. ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 02:38:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Jul 2018 06:38:38 +0000 Subject: [issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't In-Reply-To: <1428893040.89.0.319300847517.issue23926@psf.upfronthosting.co.za> Message-ID: <1531118318.57.0.56676864532.issue23926@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Do you mind to convert your patch into a pull request Joe? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 02:39:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Jul 2018 06:39:12 +0000 Subject: [issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't In-Reply-To: <1428893040.89.0.319300847517.issue23926@psf.upfronthosting.co.za> Message-ID: <1531118352.9.0.56676864532.issue23926@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- components: +Interpreter Core versions: +Python 3.7, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 04:08:20 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 09 Jul 2018 08:08:20 +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: <1531123700.55.0.56676864532.issue17180@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 04:44:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Jul 2018 08:44:39 +0000 Subject: [issue23927] getargs.c skipitem() doesn't skip 'w*' In-Reply-To: <1428893068.41.0.966263121411.issue23927@psf.upfronthosting.co.za> Message-ID: <1531125879.9.0.56676864532.issue23927@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +7744 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 04:47:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Jul 2018 08:47:49 +0000 Subject: [issue26544] platform.libc_ver() returns incorrect version number In-Reply-To: <1457742963.17.0.0403505576154.issue26544@psf.upfronthosting.co.za> Message-ID: <1531126069.38.0.56676864532.issue26544@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 2a9b8babf0d09946ebebfdb2931cc0d3db5a1d3d by Serhiy Storchaka in branch 'master': bpo-26544: Fixed implementation of platform.libc_ver(). (GH-7684) https://github.com/python/cpython/commit/2a9b8babf0d09946ebebfdb2931cc0d3db5a1d3d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 04:49:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Jul 2018 08:49:42 +0000 Subject: [issue31630] math.tan has poor accuracy near pi/2 on OpenBSD and NetBSD In-Reply-To: <1506675027.54.0.213398074469.issue31630@psf.upfronthosting.co.za> Message-ID: <1531126182.37.0.56676864532.issue31630@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: After fixing platform.libc_ver() in issue26544 we can use it for conditional skipping this assertion depending on the libc version. ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 04:55:29 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Jul 2018 08:55:29 +0000 Subject: [issue26544] platform.libc_ver() returns incorrect version number In-Reply-To: <1457742963.17.0.0403505576154.issue26544@psf.upfronthosting.co.za> Message-ID: <1531126529.5.0.56676864532.issue26544@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +7745 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 04:58:24 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 09 Jul 2018 08:58:24 +0000 Subject: [issue24665] CJK support for textwrap In-Reply-To: <1437276510.99.0.116072917153.issue24665@psf.upfronthosting.co.za> Message-ID: <1531126704.3.0.56676864532.issue24665@psf.upfronthosting.co.za> INADA Naoki added the comment: Thanks, Terry. I have doubt about "east asian width" support should be merged. While I agree it is "better than nothing", it may make textwrap much slower. But I didn't have courage to reject the PR. Textwrap focused on ASCII and English-like (space separated) language. "support unicode" is very hard problem. We should consider about grapheme cluster (UAX29), east asian width (UAX11) (But utf8proc is better than UAX11), and line breaking algorithm (UAX14). For wrapping text on terminal, some terminal emulators and multiplexers (e.g. tmux) implements much nicer algorithm. I think 3rd party C extension based on algorithm used by tmux is best solution. If someone really want this feature, please try it on PyPI. I understand "want it in stdlib!". But text wrapping is very hard, complicated problem. Since stdlib grows slower, and backward compatibility restrict us, I think it should be implemented in 3rd party library first. ---------- dependencies: -textwrap.wrap: add control for fonts with different character widths resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 05:20:50 2018 From: report at bugs.python.org (=?utf-8?b?QsWCYcW8ZWogTWljaGFsaWs=?=) Date: Mon, 09 Jul 2018 09:20:50 +0000 Subject: [issue28657] cmd.Cmd.get_help() implementation can't see do_*() methods added dynamically by setattr() In-Reply-To: <1478776450.68.0.870801686772.issue28657@psf.upfronthosting.co.za> Message-ID: <1531128050.06.0.56676864532.issue28657@psf.upfronthosting.co.za> B?a?ej Michalik added the comment: It seems to me as if the current implementation forces the user to violate SRP, but I'm not going to argue about that. I don't feel equipped well enough to judge. > Could this have been done with: setattr(self.__class__, "do_" + command, func)? Isn't that worse than doing that on an instance? It will work as long as there's only one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 05:23:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Jul 2018 09:23:15 +0000 Subject: [issue31353] Implement PEP 553 - built-in breakpoint() In-Reply-To: <1504644260.05.0.176716626813.issue31353@psf.upfronthosting.co.za> Message-ID: <1531128195.19.0.56676864532.issue31353@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is it needed to specify the fromlist argument for PyImport_ImportModuleLevelObject()? The only effect of this is that Python will try to import the hook as a submodule if it is not an attribute of the parent module. But I think that callable modules is very uncommon case and we should not support is specially. Getting rid of the fromlist argument will simplify the code. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 05:39:06 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 09 Jul 2018 09:39:06 +0000 Subject: [issue19660] decorator syntax: allow testlist instead of just dotted_name In-Reply-To: <1384910825.18.0.00604679093295.issue19660@psf.upfronthosting.co.za> Message-ID: <1531129146.13.0.56676864532.issue19660@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: Real world example where this actually came up: https://github.com/jupyter-widgets/ipywidgets/issues/430#issuecomment-247016263 ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 05:53:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Jul 2018 09:53:35 +0000 Subject: [issue22689] Posix getenv makes no guarantee of lifetime of returned string In-Reply-To: <1413925424.96.0.804566099113.issue22689@psf.upfronthosting.co.za> Message-ID: <1531130015.43.0.56676864532.issue22689@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +7746 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 05:55:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Jul 2018 09:55:38 +0000 Subject: [issue26544] platform.libc_ver() returns incorrect version number In-Reply-To: <1457742963.17.0.0403505576154.issue26544@psf.upfronthosting.co.za> Message-ID: <1531130138.32.0.56676864532.issue26544@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 7c43b801503c802ed6ea4b811f5bc73791249d94 by Serhiy Storchaka in branch '3.7': [3.7] bpo-26544: Fixed implementation of platform.libc_ver(). (GH-7684). (GH-8193) https://github.com/python/cpython/commit/7c43b801503c802ed6ea4b811f5bc73791249d94 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 05:56:47 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Jul 2018 09:56:47 +0000 Subject: [issue26544] platform.libc_ver() returns incorrect version number In-Reply-To: <1457742963.17.0.0403505576154.issue26544@psf.upfronthosting.co.za> Message-ID: <1531130207.35.0.56676864532.issue26544@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7747 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 06:17:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Jul 2018 10:17:15 +0000 Subject: [issue26544] platform.libc_ver() returns incorrect version number In-Reply-To: <1457742963.17.0.0403505576154.issue26544@psf.upfronthosting.co.za> Message-ID: <1531131435.56.0.56676864532.issue26544@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +7748 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 07:28:17 2018 From: report at bugs.python.org (Matej Cepl) Date: Mon, 09 Jul 2018 11:28:17 +0000 Subject: [issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc. In-Reply-To: <1515429303.77.0.467229070634.issue32521@psf.upfronthosting.co.za> Message-ID: <1531135697.51.0.56676864532.issue32521@psf.upfronthosting.co.za> Matej Cepl added the comment: > On Fedora after the fix we had also to BuildRequire libnsl2-devel and libtirpc-devel after the glibc change was implemented for the correct headers to be included within the buildroot. libnsl-devel requires libtirpc-devel here, so that isn't the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 07:38:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Jul 2018 11:38: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: <1531136310.83.0.56676864532.issue26544@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset d73497ba52171bc8f786a70ecf50d3104b596221 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-26544: Fixed implementation of platform.libc_ver(). (GH-7684). (GH-8193) (GH-8195) https://github.com/python/cpython/commit/d73497ba52171bc8f786a70ecf50d3104b596221 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 07:39:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Jul 2018 11:39:09 +0000 Subject: [issue26544] platform.libc_ver() returns incorrect version number In-Reply-To: <1457742963.17.0.0403505576154.issue26544@psf.upfronthosting.co.za> Message-ID: <1531136349.69.0.56676864532.issue26544@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b1e6e5615a8e82fcf569368fac5c5b0385929855 by Serhiy Storchaka in branch '2.7': bpo-26544: Fixed implementation of platform.libc_ver(). (GH-7684). (GH-8193) (GH-8196) https://github.com/python/cpython/commit/b1e6e5615a8e82fcf569368fac5c5b0385929855 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 08:09:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Jul 2018 12:09:38 +0000 Subject: [issue33305] Improve syntax error for numbers with leading zero In-Reply-To: <1524016031.89.0.682650639539.issue33305@psf.upfronthosting.co.za> Message-ID: <1531138178.86.0.56676864532.issue33305@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset cf7303ed2aa19fb48687d7140dbc86fc23c9fca4 by Serhiy Storchaka in branch 'master': bpo-33305: Improve SyntaxError for invalid numerical literals. (GH-6517) https://github.com/python/cpython/commit/cf7303ed2aa19fb48687d7140dbc86fc23c9fca4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 08:17:20 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 09 Jul 2018 12:17:20 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531138640.7.0.56676864532.issue33967@psf.upfronthosting.co.za> INADA Naoki added the comment: Signature mismatch should raise TypeError, not IndexError. I think this should be backported to 3.6 and 3.7. ---------- nosy: +inada.naoki versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 08:30:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Jul 2018 12:30:50 +0000 Subject: [issue33305] Improve syntax error for numbers with leading zero In-Reply-To: <1524016031.89.0.682650639539.issue33305@psf.upfronthosting.co.za> Message-ID: <1531139450.49.0.56676864532.issue33305@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 Mon Jul 9 08:40:17 2018 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 09 Jul 2018 12:40:17 +0000 Subject: [issue34066] Possible resource warning in "with open()" In-Reply-To: <1530983512.39.0.56676864532.issue34066@psf.upfronthosting.co.za> Message-ID: <1531140017.06.0.56676864532.issue34066@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 3f4d90d4d72921f16babd3f52d7df804916af224 by Nick Coghlan (Serhiy Storchaka) in branch 'master': bpo-34066: Disabled interruption before SETUP_WITH and BEFORE_ASYNC_WITH. (GH-8159) https://github.com/python/cpython/commit/3f4d90d4d72921f16babd3f52d7df804916af224 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 08:41:28 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Jul 2018 12:41:28 +0000 Subject: [issue34066] Possible resource warning in "with open()" In-Reply-To: <1530983512.39.0.56676864532.issue34066@psf.upfronthosting.co.za> Message-ID: <1531140088.37.0.56676864532.issue34066@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7749 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 08:51:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Jul 2018 12:51:37 +0000 Subject: [issue34066] Possible resource warning in "with open()" In-Reply-To: <1530983512.39.0.56676864532.issue34066@psf.upfronthosting.co.za> Message-ID: <1531140697.41.0.56676864532.issue34066@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +7750 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 08:56:23 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Jul 2018 12:56:23 +0000 Subject: [issue34072] 3.7.0 Windows embeddable zip vcruntime140.dll In-Reply-To: <1531093285.64.0.56676864532.issue34072@psf.upfronthosting.co.za> Message-ID: <1531140983.51.0.56676864532.issue34072@psf.upfronthosting.co.za> Steve Dower added the comment: It's deliberate (and documented, IIRC). You should include the C and C++ runtimes in your application installer. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 09:23:56 2018 From: report at bugs.python.org (Daniel Porteous) Date: Mon, 09 Jul 2018 13:23:56 +0000 Subject: [issue34067] Problem with contextlib.nullcontext In-Reply-To: <1530984805.95.0.56676864532.issue34067@psf.upfronthosting.co.za> Message-ID: <1531142636.56.0.56676864532.issue34067@psf.upfronthosting.co.za> Change by Daniel Porteous : ---------- keywords: +patch pull_requests: +7751 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 09:31:07 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Jul 2018 13:31:07 +0000 Subject: [issue34066] Possible resource warning in "with open()" In-Reply-To: <1530983512.39.0.56676864532.issue34066@psf.upfronthosting.co.za> Message-ID: <1531143067.21.0.56676864532.issue34066@psf.upfronthosting.co.za> miss-islington added the comment: New changeset f5197ddfd0f2c5da848af57196448810bd18bb82 by Miss Islington (bot) in branch '3.7': bpo-34066: Disabled interruption before SETUP_WITH and BEFORE_ASYNC_WITH. (GH-8159) https://github.com/python/cpython/commit/f5197ddfd0f2c5da848af57196448810bd18bb82 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 09:44:30 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 09 Jul 2018 13:44:30 +0000 Subject: [issue31623] Build MSI installer for 3.4 security releases on Windows In-Reply-To: <1506646876.94.0.213398074469.issue31623@psf.upfronthosting.co.za> Message-ID: <1531143870.16.0.56676864532.issue31623@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Larry answered on pydev. ---------- resolution: -> wont fix stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 09:47:28 2018 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 09 Jul 2018 13:47:28 +0000 Subject: [issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds In-Reply-To: <1491349378.03.0.0671954460373.issue29988@psf.upfronthosting.co.za> Message-ID: <1531144048.95.0.56676864532.issue29988@psf.upfronthosting.co.za> Nick Coghlan added the comment: While Greg Smith and I both cringed at the idea when I first raised it, I'm becoming more and more convinced that the only way we're going to be able to make resource cleanup reliable is for with statements to have the ability to disable signal handling while __enter__ and __exit__ methods are running. When a with statement switches signal handling off in a particular execution context, there'd then need to be some absolute timing deadline for switching them back on, so resource acquisition or cleanup that got stuck in an infinite loop could still be interrupted eventually. If you combined that with the signal handling approach in https://github.com/ncoghlan/cpython/pull/2/files, then I think we'd have as solid a solution as CPython is likely to be able to provide. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 09:49:33 2018 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 09 Jul 2018 13:49:33 +0000 Subject: [issue34067] Problem with contextlib.nullcontext In-Reply-To: <1530984805.95.0.56676864532.issue34067@psf.upfronthosting.co.za> Message-ID: <1531144173.56.0.56676864532.issue34067@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset c287545d62edf1a1ee65727d3c57befa8c99c13a by Nick Coghlan (Daniel Porteous) in branch 'master': bpo-34067: Include a more easily understood example for nullcontext (GH-8158) https://github.com/python/cpython/commit/c287545d62edf1a1ee65727d3c57befa8c99c13a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 09:50:41 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Jul 2018 13:50:41 +0000 Subject: [issue34067] Problem with contextlib.nullcontext In-Reply-To: <1530984805.95.0.56676864532.issue34067@psf.upfronthosting.co.za> Message-ID: <1531144241.26.0.56676864532.issue34067@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7752 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 09:52:51 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Jul 2018 13:52:51 +0000 Subject: [issue28626] Tutorial: rearrange discussion of output formatting to encourage f-strings In-Reply-To: <1478452855.22.0.932657206329.issue28626@psf.upfronthosting.co.za> Message-ID: <1531144371.3.0.56676864532.issue28626@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 80a5f04592f7d732a541d5c35a1be1e9a6472ecb by Miss Islington (bot) in branch '3.7': bpo-28626: rearrange discussion of output formatting to encourage f-strings (GH-6036) https://github.com/python/cpython/commit/80a5f04592f7d732a541d5c35a1be1e9a6472ecb ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 10:01:52 2018 From: report at bugs.python.org (Andriy Maletsky) Date: Mon, 09 Jul 2018 14:01:52 +0000 Subject: [issue34074] Asyncio breaks coroutine finalization process Message-ID: <1531144912.36.0.56676864532.issue34074@psf.upfronthosting.co.za> New submission from Andriy Maletsky : Source: https://stackoverflow.com/q/51245011/6275324 Asyncio somehow breaks coroutine finalization. I believe there may be a bug in C implementation (_asyncio) of tasks or futures. Reproducible within version 3.7.0 at python:3.7 docker container. Consider this example (except and finally blocks will never execute): import asyncio async def work(): try: print('started working') await asyncio.sleep(3600) except BaseException as e: print('caught ' + str(type(e))) finally: print('finalization completed') async def stopper(): await asyncio.sleep(5) loop.stop() loop = asyncio.get_event_loop() loop.create_task(work()) loop.create_task(stopper()) loop.run_forever() And there is asyncio-free piece of code, which works properly, catching GeneratorExit, thrown by coro destructor: import asyncio async def work(): try: print('started working') await asyncio.sleep(3600) except BaseException as e: print('caught ' + str(type(e))) finally: print('finalization completed') coro = work() coro.send(None) del coro ---------- components: asyncio messages: 321321 nosy: and800, asvetlov, yselivanov priority: normal severity: normal status: open title: Asyncio breaks coroutine finalization process type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 10:11:47 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Jul 2018 14:11:47 +0000 Subject: [issue34067] Problem with contextlib.nullcontext In-Reply-To: <1530984805.95.0.56676864532.issue34067@psf.upfronthosting.co.za> Message-ID: <1531145507.76.0.56676864532.issue34067@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 1b6e21730417c56748d500a96cafebbaa1bd0120 by Miss Islington (bot) in branch '3.7': bpo-34067: Include a more easily understood example for nullcontext (GH-8158) https://github.com/python/cpython/commit/1b6e21730417c56748d500a96cafebbaa1bd0120 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 11:22:59 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 09 Jul 2018 15:22:59 +0000 Subject: [issue34074] Asyncio breaks coroutine finalization process In-Reply-To: <1531144912.36.0.56676864532.issue34074@psf.upfronthosting.co.za> Message-ID: <1531149779.56.0.56676864532.issue34074@psf.upfronthosting.co.za> Yury Selivanov added the comment: There's no bug here. `loop.stop()` simply stops the loop, all running tasks are just paused. You can re-run the same loop, and the `work()` task will resume. In other words, `loop.stop()` does not trigger task cancellation, therefore it does not throw in any exceptions into the `work()` task. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 11:29:35 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 09 Jul 2018 15:29:35 +0000 Subject: [issue34075] We should prohibit setting a ProcessPoolExecutor in with set_default_executor Message-ID: <1531150174.99.0.56676864532.issue34075@psf.upfronthosting.co.za> New submission from Yury Selivanov : I've had a few conversations with people who were confused that asyncio starts to behave weirdly when a ProcessPoolExecutor is set as the default one. We don't really test that asyncio's built-in functionality (like DNS resolving) works well with a process-pool, which leads to bug reports like [1]. Third-party libraries also always assume that the loop is always configured to use the ThreadPoolExecutor (as it is by default), and also don't even test against ProcessPool. My idea here would be to deprecate setting ProcessPoolExecutor as a default one in 3.8 and prohibit that in 3.9. Guido, Andrew, what do you think? [1] https://bugs.python.org/issue34073 ---------- components: asyncio messages: 321324 nosy: asvetlov, gvanrossum, yselivanov priority: normal severity: normal status: open title: We should prohibit setting a ProcessPoolExecutor in with set_default_executor type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 11:57:40 2018 From: report at bugs.python.org (Andriy Maletsky) Date: Mon, 09 Jul 2018 15:57:40 +0000 Subject: [issue34074] Asyncio breaks coroutine finalization process In-Reply-To: <1531144912.36.0.56676864532.issue34074@psf.upfronthosting.co.za> Message-ID: <1531151860.68.0.56676864532.issue34074@psf.upfronthosting.co.za> Andriy Maletsky added the comment: I meant that my example is a complete python script, and after `loop.run_forever()` the interpreter stops. So I expected every python object to be destructed on interpreter shutdown, but coro's `close()` is not called. To make example more practical, let's change `loop.stop()` to `raise KeyboardInterrupt()`. Program stops without calling `close()` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 11:57:52 2018 From: report at bugs.python.org (Jan Christoph) Date: Mon, 09 Jul 2018 15:57:52 +0000 Subject: [issue34076] Nested loop in dictionary comprehension gives `global name not defined` inside class Message-ID: <1531151872.26.0.56676864532.issue34076@psf.upfronthosting.co.za> New submission from Jan Christoph : The python code: ``` class _tri(object): infts = '(+/-)inf, (+/-)infty, (+/-)infinity' strange_failing = {x+s.replace('(+/-)',''):None for x in ('+','-','') for s in infts.split(', ')} ``` gives a `global name 'infts' is not defined` exception, when normal dictionary comprehensions (without nested loops) and regular nested for-loops work perfectly well. For a complete shell session and more illustrative example in versions 2.7.15 and 3.6.4 see: https://pastebin.ubuntu.com/p/9Pg8DThbsd/ ---------- components: Interpreter Core files: what_a_dict.py messages: 321326 nosy: con-f-use priority: normal severity: normal status: open title: Nested loop in dictionary comprehension gives `global name not defined` inside class type: behavior versions: Python 2.7 Added file: https://bugs.python.org/file47678/what_a_dict.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 11:57:57 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Mon, 09 Jul 2018 15:57:57 +0000 Subject: [issue34077] doc Be explicit about mock_open created mocks not supporting __iter__ Message-ID: <1531151877.58.0.56676864532.issue34077@psf.upfronthosting.co.za> New submission from Andr?s Delfino : I've been bitten by this one, and while the docs are clear in what the created mock objects support, I think something explicit about __iter__ will help. ---------- assignee: docs at python components: Documentation messages: 321327 nosy: adelfino, docs at python priority: normal severity: normal status: open title: doc Be explicit about mock_open created mocks not supporting __iter__ type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 12:02:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Jul 2018 16:02:28 +0000 Subject: [issue34066] Possible resource warning in "with open()" In-Reply-To: <1530983512.39.0.56676864532.issue34066@psf.upfronthosting.co.za> Message-ID: <1531152148.95.0.56676864532.issue34066@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset eeaae26ce5abce56292330c29459337d6bd57aaf by Serhiy Storchaka in branch '3.6': [3.6] bpo-34066: Disabled interruption before SETUP_WITH and BEFORE_ASYNC_WITH. (GH-8159) (GH-8198) https://github.com/python/cpython/commit/eeaae26ce5abce56292330c29459337d6bd57aaf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 12:03:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Jul 2018 16:03:41 +0000 Subject: [issue34066] Possible resource warning in "with open()" In-Reply-To: <1530983512.39.0.56676864532.issue34066@psf.upfronthosting.co.za> Message-ID: <1531152221.5.0.56676864532.issue34066@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 Mon Jul 9 12:05:28 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Mon, 09 Jul 2018 16:05:28 +0000 Subject: [issue34077] doc Be explicit about mock_open created mocks not supporting __iter__ In-Reply-To: <1531151877.58.0.56676864532.issue34077@psf.upfronthosting.co.za> Message-ID: <1531152328.69.0.56676864532.issue34077@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- keywords: +patch pull_requests: +7753 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 12:05:58 2018 From: report at bugs.python.org (Joe Jevnik) Date: Mon, 09 Jul 2018 16:05:58 +0000 Subject: [issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't In-Reply-To: <1428893040.89.0.319300847517.issue23926@psf.upfronthosting.co.za> Message-ID: <1531152358.69.0.56676864532.issue23926@psf.upfronthosting.co.za> Change by Joe Jevnik : ---------- pull_requests: +7754 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 12:07:50 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 09 Jul 2018 16:07:50 +0000 Subject: [issue34074] Asyncio breaks coroutine finalization process In-Reply-To: <1531144912.36.0.56676864532.issue34074@psf.upfronthosting.co.za> Message-ID: <1531152470.97.0.56676864532.issue34074@psf.upfronthosting.co.za> Yury Selivanov added the comment: > To make example more practical, let's change `loop.stop()` to `raise KeyboardInterrupt()`. Program stops without calling `close()` Try to use the new `asyncio.run()` function (in Py 3.7) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 12:12:47 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 09 Jul 2018 16:12:47 +0000 Subject: [issue34075] We should prohibit setting a ProcessPoolExecutor in with set_default_executor In-Reply-To: <1531150174.99.0.56676864532.issue34075@psf.upfronthosting.co.za> Message-ID: <1531152767.65.0.56676864532.issue34075@psf.upfronthosting.co.za> Guido van Rossum added the comment: Yeah, that's a good idea. It was never meant for a ProcessPoolExecutor. We should warn against this in the docs right away (and backport the warning to all previous versions that have set_executor). I also support non-silent deprecation in 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 12:16:08 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 09 Jul 2018 16:16:08 +0000 Subject: [issue34075] We should prohibit setting a ProcessPoolExecutor in with set_default_executor In-Reply-To: <1531150174.99.0.56676864532.issue34075@psf.upfronthosting.co.za> Message-ID: <1531152968.7.0.56676864532.issue34075@psf.upfronthosting.co.za> Yury Selivanov added the comment: Great! Thanks for the quick reply, Guido. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 12:17:25 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 09 Jul 2018 16:17:25 +0000 Subject: [issue34073] asyncio and ProcessPoolExecutor: OSError on loop.close() In-Reply-To: <1531099820.7.0.56676864532.issue34073@psf.upfronthosting.co.za> Message-ID: <1531153045.79.0.56676864532.issue34073@psf.upfronthosting.co.za> Yury Selivanov added the comment: We plan to deprecate and later prohibit setting ProcessPoolExecutor as the default executor. See https://bugs.python.org/issue34075 for more details. ---------- resolution: -> remind stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 12:18:04 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 09 Jul 2018 16:18:04 +0000 Subject: [issue34077] doc Be explicit about mock_open created mocks not supporting __iter__ In-Reply-To: <1531151877.58.0.56676864532.issue34077@psf.upfronthosting.co.za> Message-ID: <1531153084.73.0.56676864532.issue34077@psf.upfronthosting.co.za> Berker Peksag added the comment: -1. We can't document every non-existent feature in the stdlib documentation. There is an already open issue for adding __iter__ support to mock_open(): Issue 21258 ---------- nosy: +berker.peksag resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 12:31:56 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 09 Jul 2018 16:31:56 +0000 Subject: [issue32933] mock_open does not support iteration around text files. In-Reply-To: <1519462718.87.0.467229070634.issue32933@psf.upfronthosting.co.za> Message-ID: <1531153916.71.0.56676864532.issue32933@psf.upfronthosting.co.za> Berker Peksag added the comment: This is basically a duplicate of bpo-21258, but I haven't closely look at the patches in both issues yet. We should probably consider adding support for __next__ as well. ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 12:33:31 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 09 Jul 2018 16:33:31 +0000 Subject: [issue34077] doc Be explicit about mock_open created mocks not supporting __iter__ In-Reply-To: <1531151877.58.0.56676864532.issue34077@psf.upfronthosting.co.za> Message-ID: <1531154011.01.0.56676864532.issue34077@psf.upfronthosting.co.za> Berker Peksag added the comment: There is also bpo-32933. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 13:04:01 2018 From: report at bugs.python.org (Anthony Flury) Date: Mon, 09 Jul 2018 17:04:01 +0000 Subject: [issue32933] mock_open does not support iteration around text files. In-Reply-To: <1519462718.87.0.467229070634.issue32933@psf.upfronthosting.co.za> Message-ID: <1531155841.58.0.56676864532.issue32933@psf.upfronthosting.co.za> Anthony Flury added the comment: But the __next__ is a method on the iterator; So long as __iter__ returns a valid iterator (which it does in my pull request), it will by definition support __next___ Although it is entirely possible that I have misunderstood what you are saying. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 13:47:30 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 09 Jul 2018 17:47:30 +0000 Subject: [issue31353] Implement PEP 553 - built-in breakpoint() In-Reply-To: <1504644260.05.0.176716626813.issue31353@psf.upfronthosting.co.za> Message-ID: <1531158450.92.0.56676864532.issue31353@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: It's a convenient API. I think originally I may have just don't effectively a getattr on the imported module, but I don't remember (and don't have original implementation handy - thanks, rebase!) I don't have particularly strong feelings on the matter. If you want to submit a PR, I'll take a look. I suppose technically it *is* a functional change that might not be acceptable now that 3.7.0 is released though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 14:23:53 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 09 Jul 2018 18:23:53 +0000 Subject: [issue34075] We should prohibit setting a ProcessPoolExecutor in with set_default_executor In-Reply-To: <1531150174.99.0.56676864532.issue34075@psf.upfronthosting.co.za> Message-ID: <1531160633.2.0.56676864532.issue34075@psf.upfronthosting.co.za> Yury Selivanov added the comment: > We should warn against this in the docs right away (and backport the warning to all previous versions that have set_executor). I think we'll only allow instances of c.f.ThreadPoolExecutor (and its subclasses) to be passed to set_default_executor. That's a more robust check than just guarding against ProcessPoolExecutor. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 14:24:55 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 09 Jul 2018 18:24:55 +0000 Subject: [issue34075] We should prohibit setting a ProcessPoolExecutor in with set_default_executor In-Reply-To: <1531160633.2.0.56676864532.issue34075@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Of course, that's what I meant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 14:45:29 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 09 Jul 2018 18:45:29 +0000 Subject: [issue33944] Deprecate and remove pth files In-Reply-To: <1530825786.17.0.56676864532.issue33944@psf.upfronthosting.co.za> Message-ID: <486076F2-7E7A-4619-B856-18F888D347EA@python.org> Barry A. Warsaw added the comment: On Jul 5, 2018, at 14:23, Ivan Pozdeev wrote: > > Ivan Pozdeev added the comment: > >> They are very difficult to debug because they're processed too early. > > .pth's are processed by site.py, so no more difficult than site/sitecustomize. > You can e.g. run `site.addpackage(,,None)' to debug the logic. Not really. By the time you have access to a REPL to run that, site.py has already run, so you already have an unclean environment. Running with -S really isn?t feasible either since that?s often impossible (e.g. in a zip app like shiv or pex), or that leaves you with a broken environment so you can?t get to a usable REPL. What you often have to do is actually modify Python to put a breakpoint in site.py to see what?s actually happening. Yuck. > >> They usually contain globs of inscrutable code. > > An ability to contain code is there for a reason: to allow a module do something more intelligent than adding hardcoded paths if needed (e.g. pywin32 adds a subdir with .dll dependencies to PATH). > > A chunk of code is limited to a single line -- a conscious limitation to deter misuse 'cuz search path setup code is presumed to be small. Trust me, once you can execute arbitrary code in .pth files, you?re lost. And packages *do* execute arbitrary code that is very difficult to debug. And yes, those complex lines are both inscrutable and non-standard. > If someone needs something other than path setup, they should do it upon the module's import instead. Except they often don?t. > If they insist on misusing the feature, Python's design does what it's supposed to do in such cases: "make right things easy, make wrong things hard?. The problem comes when some random module you are including in your application does something weird in their .pth files that breaks assumptions *other* libraries or code is making. It?s not as uncommon as it might seem. > If there's a valid reason to allow larger code chunks, we can introduce a different syntax -- e.g. something like bash here-documents. The size of the code chunks isn?t the only issue. Running arbitrary code in a .pth file has all kinds of negative consequences. It?s basically code that happens at import time, with all the problems that happen with that anti-pattern. > >> Exceptions in pth files can get swallowed in some cases. > > If this happens, it's a bug. A line from .pth is executed with "exec line", any exceptions should propagate up the stack as usual. > >> They are loaded in indeterminate order. > > Present a use case justifying a specific order. Interdependent namespace packages. If they get loaded in the wrong order, they can mess up __path__ settings, causing other namespace package portions to be un-importable. Yes, this does happen! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 14:46:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Jul 2018 18:46:54 +0000 Subject: [issue22689] Posix getenv makes no guarantee of lifetime of returned string In-Reply-To: <1413925424.96.0.804566099113.issue22689@psf.upfronthosting.co.za> Message-ID: <1531162014.68.0.56676864532.issue22689@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset f60bf0e168255b7675a4c049250ba6b202f8e647 by Serhiy Storchaka in branch 'master': bpo-22689: Copy the result of getenv() in sys_breakpointhook(). (GH-8194) https://github.com/python/cpython/commit/f60bf0e168255b7675a4c049250ba6b202f8e647 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 14:47:16 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Jul 2018 18:47:16 +0000 Subject: [issue22689] Posix getenv makes no guarantee of lifetime of returned string In-Reply-To: <1413925424.96.0.804566099113.issue22689@psf.upfronthosting.co.za> Message-ID: <1531162035.99.0.56676864532.issue22689@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7755 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 15:06:06 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Jul 2018 19:06:06 +0000 Subject: [issue22689] Posix getenv makes no guarantee of lifetime of returned string In-Reply-To: <1413925424.96.0.804566099113.issue22689@psf.upfronthosting.co.za> Message-ID: <1531163166.71.0.56676864532.issue22689@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 6f4fbf8ea428e13959a7aaba0ac9725ed407752a by Miss Islington (bot) in branch '3.7': bpo-22689: Copy the result of getenv() in sys_breakpointhook(). (GH-8194) https://github.com/python/cpython/commit/6f4fbf8ea428e13959a7aaba0ac9725ed407752a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 15:13:36 2018 From: report at bugs.python.org (Joe N) Date: Mon, 09 Jul 2018 19:13:36 +0000 Subject: [issue34078] Broken CRL functionality in ssl.py Message-ID: <1531163616.13.0.56676864532.issue34078@psf.upfronthosting.co.za> New submission from Joe N : CRLs in ssl.py or at the documentation is broken. Specifically I think the documentation here is wrong: https://docs.python.org/3/library/ssl.html#ssl.SSLContext.load_verify_locations Here is a stackoverflow post: https://stackoverflow.com/questions/51196492/how-to-use-crls-in-pyopenssl?noredirect=1#comment89407186_51196492 I made a very user friendly test suite of files to show how it is broken. Run the code in here (follow readme instructions) to see the bug. https://github.com/nettijoe96/bugInSSL ---------- assignee: christian.heimes components: SSL messages: 321343 nosy: Joe N, christian.heimes, docs at python priority: normal severity: normal status: open title: Broken CRL functionality in ssl.py type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 15:18:02 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 09 Jul 2018 19:18:02 +0000 Subject: [issue24459] Mention PYTHONFAULTHANDLER in the man page In-Reply-To: <1434487895.85.0.561507121326.issue24459@psf.upfronthosting.co.za> Message-ID: <1531163882.95.0.56676864532.issue24459@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 9863de0355caf23c44b708a5d68b603e135f7ae9 by Berker Peksag in branch 'master': bpo-24459: Document missing env variables in python.man (GH-4142) https://github.com/python/cpython/commit/9863de0355caf23c44b708a5d68b603e135f7ae9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 15:18:14 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Jul 2018 19:18:14 +0000 Subject: [issue24459] Mention PYTHONFAULTHANDLER in the man page In-Reply-To: <1434487895.85.0.561507121326.issue24459@psf.upfronthosting.co.za> Message-ID: <1531163894.7.0.56676864532.issue24459@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7756 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 15:37:27 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Jul 2018 19:37:27 +0000 Subject: [issue24459] Mention PYTHONFAULTHANDLER in the man page In-Reply-To: <1434487895.85.0.561507121326.issue24459@psf.upfronthosting.co.za> Message-ID: <1531165047.29.0.56676864532.issue24459@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 22fb674fa4c8343c84c25d93f23a1d6315d0f4f5 by Miss Islington (bot) in branch '3.7': bpo-24459: Document missing env variables in python.man (GH-4142) https://github.com/python/cpython/commit/22fb674fa4c8343c84c25d93f23a1d6315d0f4f5 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 15:38:34 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 09 Jul 2018 19:38:34 +0000 Subject: [issue24459] Mention PYTHONFAULTHANDLER in the man page In-Reply-To: <1434487895.85.0.561507121326.issue24459@psf.upfronthosting.co.za> Message-ID: <1531165114.7.0.56676864532.issue24459@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks, Joshua! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 15:53:43 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 09 Jul 2018 19:53:43 +0000 Subject: [issue11572] bring Lib/copy.py to 100% coverage In-Reply-To: <1300293152.7.0.733550751317.issue11572@psf.upfronthosting.co.za> Message-ID: <1531166023.1.0.56676864532.issue11572@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- pull_requests: +7757 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 16:14:57 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 09 Jul 2018 20:14:57 +0000 Subject: [issue11572] bring Lib/copy.py to 100% coverage In-Reply-To: <1300293152.7.0.733550751317.issue11572@psf.upfronthosting.co.za> Message-ID: <1531167297.59.0.56676864532.issue11572@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 2708578736d1aa15685495e9b94b827a8e185a8c by Berker Peksag in branch 'master': bpo-11572: Make minor improvements to copy module (GH-8208) https://github.com/python/cpython/commit/2708578736d1aa15685495e9b94b827a8e185a8c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 16:15:28 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 09 Jul 2018 20:15:28 +0000 Subject: [issue11572] bring Lib/copy.py to 100% coverage In-Reply-To: <1300293152.7.0.733550751317.issue11572@psf.upfronthosting.co.za> Message-ID: <1531167328.7.0.56676864532.issue11572@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks, Brandon. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 16:37:03 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 09 Jul 2018 20:37:03 +0000 Subject: [issue34078] Broken CRL functionality in ssl.py In-Reply-To: <1531163616.13.0.56676864532.issue34078@psf.upfronthosting.co.za> Message-ID: <1531168623.47.0.56676864532.issue34078@psf.upfronthosting.co.za> Christian Heimes added the comment: Cert revocation check is working fine for me. I've attached a demo script that uses badssl.com: $ curl -O http://crl3.digicert.com/ssca-sha2-g5.crl $ openssl crl -in ssca-sha2-g5.crl -inform DER -out ssca-sha2-g5.pem.crl -outform PEM $ python3.7 testcrl.py Traceback (most recent call last): File "testcrl.py", line 19, in s.connect(('revoked.badssl.com', 443)) File "/usr/lib64/python3.7/ssl.py", line 1141, in connect self._real_connect(addr, False) File "/usr/lib64/python3.7/ssl.py", line 1132, in _real_connect self.do_handshake() File "/usr/lib64/python3.7/ssl.py", line 1108, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate revoked (_ssl.c:1045) openssl s_client: $ cat /etc/pki/tls/cert.pem ssca-sha2-g5.pem.crl > combined.pem $ openssl s_client -connect revoked.badssl.com:443 -servername revoked.badssl.com -CAfile combined.pem | grep Verify Verify return code: 0 (ok) $ openssl s_client -connect revoked.badssl.com:443 -servername revoked.badssl.com -CAfile combined.pem -crl_check | grep Verify Verify return code: 23 (certificate revoked) ---------- Added file: https://bugs.python.org/file47679/testcrl.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 17:04:52 2018 From: report at bugs.python.org (Segev Finer) Date: Mon, 09 Jul 2018 21:04:52 +0000 Subject: [issue32245] OSError: raw write() returned invalid length on latest Win 10 Consoles In-Reply-To: <1512660082.17.0.213398074469.issue32245@psf.upfronthosting.co.za> Message-ID: <1531170292.15.0.56676864532.issue32245@psf.upfronthosting.co.za> Segev Finer added the comment: This should be fixed by the Windows 10 April Update (build 1803) according to https://github.com/Microsoft/vscode/issues/36630. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 17:35:03 2018 From: report at bugs.python.org (Julien Palard) Date: Mon, 09 Jul 2018 21:35:03 +0000 Subject: [issue32523] inconsistent spacing in changelog.html In-Reply-To: <1515514882.86.0.467229070634.issue32523@psf.upfronthosting.co.za> Message-ID: <1531172103.79.0.56676864532.issue32523@psf.upfronthosting.co.za> Julien Palard added the comment: Hi Ned, what do you think about https://github.com/python/cpython/pull/8154? I feel this is a bit a huge change in NEWS entry writing policy which make them less readable (in text files). Is it really worth it to change the policy to single-paragraph only just for an HTML rendering issue? Or should we silently join/trim those paragraphs only in blurb merge, maybe with an option like "--trim-paragraphs" while building the HTML documentations? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 17:37:02 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 09 Jul 2018 21:37:02 +0000 Subject: [issue11572] bring Lib/copy.py to 100% coverage In-Reply-To: <1300293152.7.0.733550751317.issue11572@psf.upfronthosting.co.za> Message-ID: <1531172222.64.0.56676864532.issue11572@psf.upfronthosting.co.za> ?ric Araujo added the comment: I realize now that calling self.fail at https://hg.python.org/cpython/rev/74e79b2c114a#l2.20 is a problem: self is an instance of the C class, not the TestCase instance. (The line is unreachable anyway so this doesn?t matter a lot. In other projects I?d use something like `__reduce__ = raiser(AssertionError)` to avoid this.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 9 19:52:23 2018 From: report at bugs.python.org (Ethan Smith) Date: Mon, 09 Jul 2018 23:52:23 +0000 Subject: [issue33351] Support compiling with clang-cl on Windows In-Reply-To: <1524631004.17.0.682650639539.issue33351@psf.upfronthosting.co.za> Message-ID: <1531180343.41.0.56676864532.issue33351@psf.upfronthosting.co.za> Ethan Smith added the comment: I just updated the PR with some more information after trying this on every VS project. It seems that clang-cl still fails on some projects/tests, but I don't think that is a big problem. I was mostly interested in getting Python core to build with clang-cl, which it does (and passes all test with it). I will keep iterating on this as time allows. I also think it would be helpful to have an idea of the expectation for review/merge. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 00:42:05 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 10 Jul 2018 04:42:05 +0000 Subject: [issue28657] cmd.Cmd.get_help() implementation can't see do_*() methods added dynamically by setattr() In-Reply-To: <1478776450.68.0.870801686772.issue28657@psf.upfronthosting.co.za> Message-ID: <1531197725.35.0.56676864532.issue28657@psf.upfronthosting.co.za> Raymond Hettinger added the comment: >> Could this have been done with: >> setattr(self.__class__, "do_" + command, func)? > Isn't that worse than doing that on an instance? It will work > as long as there's only one. Why not have multiple classes instead of multiple instances? Then use class composition to combine the components. FWIW, I just looked through the Cmd2 project (which depends on and extends the Cmd class): https://cmd2.readthedocs.io/en/latest/index.html . AFAICT, there is no precedent for the approach taken by your project. This seems to be at odds with the design of module which is class based rather than instance based. The existing class based design allows class composition which supports needs for separately maintained components. It also allows regular methods to be dynamically attached to the class or any of its parents after the class is created. Being regular methods, they would have access to the "self" instance parameter so that the application can be stateful (note that attaching functions to instances loses this advantage). In Cmd2, the instance is considered the application and only one can be run at a time (it's not really about having multiple distinct instances that vary dynamically and independently of one another). I've exhausted my triage efforts on this. It doesn't seem be bug; rather, it is a feature request to take the module in a different direction that seems to be in conflict with its core concept and normal use (and in conflict with Python norms about where to attach methods). If you would like to push forward, consider eliciting opinions and analysis from Catherine Devlin and Todd Leonhardt (the maintainers of Cmd2). If they think it is a good idea to have multiple instances with dynamically attached functions, then this feature request can go forward. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 01:36:11 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 10 Jul 2018 05:36:11 +0000 Subject: [issue34076] Nested loop in dictionary comprehension gives `global name not defined` inside class In-Reply-To: <1531151872.26.0.56676864532.issue34076@psf.upfronthosting.co.za> Message-ID: <1531200971.55.0.56676864532.issue34076@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I think this is explained in the below answers with example that the left most loop in the comprehension has access to the class variables which the nested comprehensions don't have https://stackoverflow.com/a/22692274/2610955 https://stackoverflow.com/a/13913933/2610955 Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 01:56:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Jul 2018 05:56:20 +0000 Subject: [issue8036] Interpreter crashes on invalid arg to spawnl on Windows In-Reply-To: <1267477949.48.0.216202239381.issue8036@psf.upfronthosting.co.za> Message-ID: <1531202180.41.0.56676864532.issue8036@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: All three test cases are raising a VallueError now: C:\py\cpython3.8>python -c "import os; os.spawnl(os.P_WAIT, '')" Running Debug|x64 interpreter... Traceback (most recent call last): File "", line 1, in File "C:\py\cpython3.8\\lib\os.py", line 931, in spawnl return spawnv(mode, file, args) ValueError: spawnv() arg 2 cannot be empty C:\py\cpython3.8>python -c "import os; os.spawnl(os.P_WAIT, '__not_existing_path__')" Running Debug|x64 interpreter... Traceback (most recent call last): File "", line 1, in File "C:\py\cpython3.8\\lib\os.py", line 931, in spawnl return spawnv(mode, file, args) ValueError: spawnv() arg 2 cannot be empty C:\py\cpython3.8>python -c "import os; os.spawnl(os.P_WAIT, '__not_existing_path__', '')" Running Debug|x64 interpreter... Traceback (most recent call last): File "", line 1, in File "C:\py\cpython3.8\\lib\os.py", line 931, in spawnl return spawnv(mode, file, args) ValueError: spawnv() arg 2 first element cannot be empty But the following one still causes a crash: python -c "import os; os.spawnl(os.P_WAIT, '', 'non-empty')" ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 02:28:17 2018 From: report at bugs.python.org (Eryk Sun) Date: Tue, 10 Jul 2018 06:28:17 +0000 Subject: [issue8036] Interpreter crashes on invalid arg to spawnl on Windows In-Reply-To: <1267477949.48.0.216202239381.issue8036@psf.upfronthosting.co.za> Message-ID: <1531204097.88.0.56676864532.issue8036@psf.upfronthosting.co.za> Eryk Sun added the comment: Serhiy, an empty file path shouldn't crash the interpreter. The per-thread invalid parameter handler is suppressed before calling _wspawnv, so it should raise OSError (EINVAL) if the file path is empty. That's what I observe in 3.7. Are you suggesting to raise ValueError in this case instead of calling _wspawnv? ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 03:08:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Jul 2018 07:08:13 +0000 Subject: [issue8036] Interpreter crashes on invalid arg to spawnl on Windows In-Reply-To: <1267477949.48.0.216202239381.issue8036@psf.upfronthosting.co.za> Message-ID: <1531206493.68.0.56676864532.issue8036@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Crashing happens only with the debug build. With the release mode I got OSError(EINVAL). I think it is better to raise the same error in all builds. ValueError is not new, it is already raised for paths containing NUL and too long paths. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 03:26:40 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 10 Jul 2018 07:26:40 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531207600.75.0.56676864532.issue33967@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 445f1b35ce8461268438c8a6b327ddc764287e05 by INADA Naoki (Dong-hee Na) in branch 'master': bpo-33967: Fix singledispatch raised IndexError when no args (GH-8184) https://github.com/python/cpython/commit/445f1b35ce8461268438c8a6b327ddc764287e05 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 03:27:54 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Jul 2018 07:27:54 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531207674.74.0.56676864532.issue33967@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7758 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 03:28:47 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Jul 2018 07:28:47 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531207727.72.0.56676864532.issue33967@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7759 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 03:30:35 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 10 Jul 2018 07:30:35 +0000 Subject: [issue33955] Implement PyOS_CheckStack on macOS using pthread_get_stack*_np In-Reply-To: <1529925495.69.0.56676864532.issue33955@psf.upfronthosting.co.za> Message-ID: <1531207835.28.0.56676864532.issue33955@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Sorry about the slow response. The patch looks OK, although I'm entirely happy yet about the workaround for the stack size on the main thread. Primarily because framework builds use a non-standard stack size as the default one is too small for the recursion limit (IIRC especially with debug builds). BTW. My own use case for this feature is primarily the use of python on threads created by the system (such as threads created by Cocoa APIs and libdispatch), for threads created in Python we can (and do) create them with a large enough stack (although this guard is helpful there too). My next step will be to test the patch locally. This might take a while because I will be traveling the rest of this month. Worst case is that I'll report back during EuroPython 2018 (starting at 23th of July) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 03:31:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Jul 2018 07:31:59 +0000 Subject: [issue3692] improper scope in list comprehension, when used in class declaration In-Reply-To: <1219792814.12.0.663300668565.issue3692@psf.upfronthosting.co.za> Message-ID: <1531207919.55.0.56676864532.issue3692@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Indeed, this issue is more complex than it looked to me. Technically, LOAD_FAST, which is used for reading the loop control variables in comprehensions, uses the array f->f_localsplus, while LOAD_NAME uses f->f_locals and f->f_globals. When executing class bodies, f->f_localsplus is NULL, and if executing functions f->f_locals usually is a NULL or a cached copy of a dict created from f->f_localsplus. But we can create a hybrid frame for comprehensions in class body, which will contain independent f->f_localsplus and f->f_locals. References to the loop control variables and to the class variables will work as expected, just the meaning of locals() will be changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 03:33:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Jul 2018 07:33:11 +0000 Subject: [issue34076] Nested loop in dictionary comprehension gives `global name not defined` inside class In-Reply-To: <1531151872.26.0.56676864532.issue34076@psf.upfronthosting.co.za> Message-ID: <1531207991.65.0.56676864532.issue34076@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This looks like a duplicate of issue3692. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> improper scope in list comprehension, when used in class declaration _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 03:49:02 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Jul 2018 07:49:02 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531208942.67.0.56676864532.issue33967@psf.upfronthosting.co.za> miss-islington added the comment: New changeset df9f633f94e97fc43e0235cb2be076491ea7f67f by Miss Islington (bot) in branch '3.7': bpo-33967: Fix singledispatch raised IndexError when no args (GH-8184) https://github.com/python/cpython/commit/df9f633f94e97fc43e0235cb2be076491ea7f67f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 03:50:01 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 10 Jul 2018 07:50:01 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531209001.84.0.56676864532.issue33967@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 Tue Jul 10 03:54:32 2018 From: report at bugs.python.org (Clint Allen) Date: Tue, 10 Jul 2018 07:54:32 +0000 Subject: [issue34079] Multiprocessing module fails to build on Solaris 11.3 Message-ID: <1531209271.96.0.56676864532.issue34079@psf.upfronthosting.co.za> New submission from Clint Allen : The build of this module fails with this error: In file included from /usr/include/limits.h:12:0, from /usr/gcc/5/lib/gcc/sparcv9-sun-solaris2.11/5.4.0/include-fixed/limits.h:168, from /usr/gcc/5/lib/gcc/sparcv9-sun-solaris2.11/5.4.0/include-fixed/syslimits.h:7, from /usr/gcc/5/lib/gcc/sparcv9-sun-solaris2.11/5.4.0/include-fixed/limits.h:34, from Include/Python.h:19, from /opt/apps/salt-build/Python-2.7.15/Modules/_multiprocessing/multiprocessing.h:12, from /opt/apps/salt-build/Python-2.7.15/Modules/_multiprocessing/multiprocessing.c:9: /usr/gcc/5/lib/gcc/sparcv9-sun-solaris2.11/5.4.0/include-fixed/sys/feature_tests.h:363:2: error: #error "Compiler or options invalid for pre-UNIX 03 X/Open applications and pre-2001 POSIX applications" Changing the value of _XOPEN_SOURCE from 500 to 600 in Modules/_multiprocessing/multiprocessing.h fixes it. ---------- components: Extension Modules messages: 321364 nosy: clallen priority: normal severity: normal status: open title: Multiprocessing module fails to build on Solaris 11.3 type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 03:58:07 2018 From: report at bugs.python.org (Clint Allen) Date: Tue, 10 Jul 2018 07:58:07 +0000 Subject: [issue34079] Multiprocessing module fails to build on Solaris 11.3 In-Reply-To: <1531209271.96.0.56676864532.issue34079@psf.upfronthosting.co.za> Message-ID: <1531209487.22.0.56676864532.issue34079@psf.upfronthosting.co.za> Change by Clint Allen : ---------- keywords: +patch Added file: https://bugs.python.org/file47680/Python-2.7.15-Modules_multiprocessing_h.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 04:00:43 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Jul 2018 08:00:43 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531209643.97.0.56676864532.issue33967@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 6ceab46a602c6653356d67d7479391fba0b35697 by Miss Islington (bot) in branch '3.6': bpo-33967: Fix singledispatch raised IndexError when no args (GH-8184) https://github.com/python/cpython/commit/6ceab46a602c6653356d67d7479391fba0b35697 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 04:19:58 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 10 Jul 2018 08:19:58 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1531210798.38.0.56676864532.issue33597@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 5ac9e6eee5ed18172d70d28cf438df0be4e3b83d by INADA Naoki in branch 'master': bpo-33597: Reduce PyGC_Head size (GH-7043) https://github.com/python/cpython/commit/5ac9e6eee5ed18172d70d28cf438df0be4e3b83d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 04:20:16 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 10 Jul 2018 08:20:16 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1531210816.32.0.56676864532.issue33597@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 Tue Jul 10 04:20:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Jul 2018 08:20:42 +0000 Subject: [issue34080] Memory leak in the compiler in case of errors Message-ID: <1531210842.03.0.56676864532.issue34080@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Merging PR 6517 for issue33305 exposed a leak in the compiler: https://buildbot.python.org/all/#/builders/1/builds/280 $ ./python -m test -R 3:3 test_compile test_grammar Run tests sequentially 0:00:00 load avg: 1.95 [1/2] test_compile beginning 6 repetitions 123456 ...... test_compile leaked [15, 16, 15] memory blocks, sum=46 0:00:14 load avg: 1.97 [2/2/1] test_grammar -- test_compile failed beginning 6 repetitions 123456 ...... test_grammar leaked [50, 50, 50] memory blocks, sum=150 test_grammar failed == Tests result: FAILURE == 2 tests failed: test_compile test_grammar Total duration: 15 sec 226 ms Tests result: FAILURE This branch was not common, but after issue33305 it has became more common and heavily tested. ---------- assignee: serhiy.storchaka components: Interpreter Core messages: 321367 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Memory leak in the compiler in case of errors type: resource usage versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 04:26:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Jul 2018 08:26:31 +0000 Subject: [issue34080] Memory leak in the compiler in case of errors In-Reply-To: <1531210842.03.0.56676864532.issue34080@psf.upfronthosting.co.za> Message-ID: <1531211191.01.0.56676864532.issue34080@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +7760 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 04:27:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Jul 2018 08:27:06 +0000 Subject: [issue34080] Memory leak in the compiler in case of errors In-Reply-To: <1531210842.03.0.56676864532.issue34080@psf.upfronthosting.co.za> Message-ID: <1531211226.35.0.56676864532.issue34080@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 04:32:01 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 10 Jul 2018 08:32:01 +0000 Subject: [issue34081] Sphinx duplicate label warning in docs Message-ID: <1531211521.37.0.56676864532.issue34081@psf.upfronthosting.co.za> New submission from Karthikeyan Singaravelan : While running make docs sphinx generates a warning that there are duplicate labels named `_examples`. It seems it's present in `c-api/typeobj.rst` and `distutils/examples.rst` as below : ? Doc git:(master) rg '.. _examples:' c-api/typeobj.rst 2324:.. _examples: distutils/examples.rst 1:.. _examples: # Warning 2018-07-10T07:30:36.8709047Z /opt/vsts/work/1/s/Doc/distutils/examples.rst:5: WARNING: duplicate label examples, other instance in /opt/vsts/work/1/s/Doc/c-api/typeobj.rst Sample log : https://python.visualstudio.com/cpython/cpython%20Team/_build/results?buildId=16141&view=logs There are no references to the label as far as I have checked and I suppose this is an easy fix to be done if someone wants to take it up. The effect is that in the page https://docs.python.org/3.8/c-api/typeobj.html the following text links to distutils/examples for the text "Examples" which should ideally link to https://docs.python.org/3.8/c-api/typeobj.html#examples "In addition to the following quick reference, the Examples section provides at-a-glance insight into the meaning and use of PyTypeObject." It will be also helpful if sphinx warnings are made as an error in CI so that these are caught there. Thanks ---------- assignee: docs at python components: Documentation messages: 321368 nosy: docs at python, xtreak priority: normal severity: normal status: open title: Sphinx duplicate label warning in docs versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 04:32:26 2018 From: report at bugs.python.org (Jan Christoph) Date: Tue, 10 Jul 2018 08:32:26 +0000 Subject: [issue34076] Nested loop in dictionary comprehension gives `global name not defined` inside class In-Reply-To: <1531151872.26.0.56676864532.issue34076@psf.upfronthosting.co.za> Message-ID: <1531211546.44.0.56676864532.issue34076@psf.upfronthosting.co.za> Jan Christoph added the comment: But the simpler dictionary compprehension `{s.replace('(+/-)',''):None for s in infts.split(', ')}` works perfectly. Shouldn't that also give the error if it was a scope issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 05:43:46 2018 From: report at bugs.python.org (Pav) Date: Tue, 10 Jul 2018 09:43:46 +0000 Subject: [issue34082] EnumMeta.__new__ should use enum_class.__new__ Message-ID: <1531215826.62.0.56676864532.issue34082@psf.upfronthosting.co.za> New submission from Pav : ```python class Foo: pass class Works(str, Foo, Enum): BAR = 'baz' class Fails(Foo, str, Enum): BAR = 'baz' ``` `Fails` fails to be created with an error: `TypeError: object.__new__(Fails) is not safe, use Fails.__new__()` See https://github.com/python/cpython/blob/e57f91a0f0d5700ec466c9dd0fd2d2b5323a5e76/Lib/enum.py#L205 ---------- components: Library (Lib) messages: 321370 nosy: rs2 priority: normal severity: normal status: open title: EnumMeta.__new__ should use enum_class.__new__ type: behavior versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 05:46:49 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 10 Jul 2018 09:46:49 +0000 Subject: [issue34031] [EASY] Incorrect usage of unittest.TestCase in test_urllib2_localnet In-Reply-To: <1530621349.65.0.56676864532.issue34031@psf.upfronthosting.co.za> Message-ID: <1531216009.31.0.56676864532.issue34031@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset 6b490b5db40fc29588e8e6cc23bb89c4fed74ad5 by Tal Einat (Bradley Laney) in branch 'master': bpo-34031: fix incorrect usage of self.fail in two tests (GH-8091) https://github.com/python/cpython/commit/6b490b5db40fc29588e8e6cc23bb89c4fed74ad5 ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 05:48:02 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Jul 2018 09:48:02 +0000 Subject: [issue34031] [EASY] Incorrect usage of unittest.TestCase in test_urllib2_localnet In-Reply-To: <1530621349.65.0.56676864532.issue34031@psf.upfronthosting.co.za> Message-ID: <1531216082.64.0.56676864532.issue34031@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7761 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 05:49:55 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Jul 2018 09:49:55 +0000 Subject: [issue34031] [EASY] Incorrect usage of unittest.TestCase in test_urllib2_localnet In-Reply-To: <1530621349.65.0.56676864532.issue34031@psf.upfronthosting.co.za> Message-ID: <1531216195.91.0.56676864532.issue34031@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7762 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 06:04:18 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 10 Jul 2018 10:04:18 +0000 Subject: [issue34031] [EASY] Incorrect usage of unittest.TestCase in test_urllib2_localnet In-Reply-To: <1530621349.65.0.56676864532.issue34031@psf.upfronthosting.co.za> Message-ID: <1531217058.26.0.56676864532.issue34031@psf.upfronthosting.co.za> Change by Tal Einat : ---------- pull_requests: +7763 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 06:08:46 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Jul 2018 10:08:46 +0000 Subject: [issue34031] [EASY] Incorrect usage of unittest.TestCase in test_urllib2_localnet In-Reply-To: <1530621349.65.0.56676864532.issue34031@psf.upfronthosting.co.za> Message-ID: <1531217326.26.0.56676864532.issue34031@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 125371d2c617d886e1a15b8f940ce29124cdc79c by Miss Islington (bot) in branch '3.7': bpo-34031: fix incorrect usage of self.fail in two tests (GH-8091) https://github.com/python/cpython/commit/125371d2c617d886e1a15b8f940ce29124cdc79c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 06:13:10 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Jul 2018 10:13:10 +0000 Subject: [issue34031] [EASY] Incorrect usage of unittest.TestCase in test_urllib2_localnet In-Reply-To: <1530621349.65.0.56676864532.issue34031@psf.upfronthosting.co.za> Message-ID: <1531217590.33.0.56676864532.issue34031@psf.upfronthosting.co.za> miss-islington added the comment: New changeset cb14eb7eedf36cd21aaf41c4d3eb1e6521fa7b11 by Miss Islington (bot) in branch '3.6': bpo-34031: fix incorrect usage of self.fail in two tests (GH-8091) https://github.com/python/cpython/commit/cb14eb7eedf36cd21aaf41c4d3eb1e6521fa7b11 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 06:16:32 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 10 Jul 2018 10:16:32 +0000 Subject: [issue28657] cmd.Cmd.get_help() implementation can't see do_*() methods added dynamically by setattr() In-Reply-To: <1478776450.68.0.870801686772.issue28657@psf.upfronthosting.co.za> Message-ID: <1531217792.65.0.56676864532.issue28657@psf.upfronthosting.co.za> R?mi Lapeyre added the comment: Hi Raymond, would updating the attached PR to change https://github.com/remilapeyre/cpython/blob/7c78350f8903f162e5f70ee147c0e97cb1ed5181/Lib/cmd.py#L270 (and others) from `compfunc = getattr(self, 'complete_' + cmd)` to `compfunc = getattr(self.__class__, 'complete_' + cmd)` to have a consistent behavior for the help and the complection ? Maybe the methods could all rely on `get_names` that return `dir(self.__class__)`, that way, the behavior would be more consistent and B?a?ej could override this method only to get its desired result. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 06:17:05 2018 From: report at bugs.python.org (Stig Johan Berggren) Date: Tue, 10 Jul 2018 10:17:05 +0000 Subject: [issue34083] Functional Programming HOWTO: Dictionary ordering isn't "essentially random" Message-ID: <1531217825.24.0.56676864532.issue34083@psf.upfronthosting.co.za> New submission from Stig Johan Berggren : The section about iterators in the Functional Programming HOWTO (https://docs.python.org/3/howto/functional.html#data-types-that-support-iterators) states the following about looping over dictionary keys: "Note that the order is essentially random, because it?s based on the hash ordering of the objects in the dictionary." Starting with 3.7, dictionary order is guaranteed to be the same as insertion order. ---------- assignee: docs at python components: Documentation messages: 321375 nosy: Stig Johan Berggren, docs at python priority: normal severity: normal status: open title: Functional Programming HOWTO: Dictionary ordering isn't "essentially random" versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 06:28:13 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 10 Jul 2018 10:28:13 +0000 Subject: [issue34031] [EASY] Incorrect usage of unittest.TestCase in test_urllib2_localnet In-Reply-To: <1530621349.65.0.56676864532.issue34031@psf.upfronthosting.co.za> Message-ID: <1531218493.05.0.56676864532.issue34031@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset 6f036bb67d5a20c86c29ea5aeace563e3751baab by Tal Einat in branch '2.7': [2.7] bpo-34031: fix incorrect usage of self.fail in two tests (GH-8091) (#8225) https://github.com/python/cpython/commit/6f036bb67d5a20c86c29ea5aeace563e3751baab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 06:30:04 2018 From: report at bugs.python.org (Tal Einat) Date: Tue, 10 Jul 2018 10:30:04 +0000 Subject: [issue34031] [EASY] Incorrect usage of unittest.TestCase in test_urllib2_localnet In-Reply-To: <1530621349.65.0.56676864532.issue34031@psf.upfronthosting.co.za> Message-ID: <1531218604.08.0.56676864532.issue34031@psf.upfronthosting.co.za> Tal Einat added the comment: Thanks for the PR, stoksc! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 06:53:01 2018 From: report at bugs.python.org (Jan Christoph) Date: Tue, 10 Jul 2018 10:53:01 +0000 Subject: [issue34076] Nested loop in dictionary comprehension gives `global name not defined` inside class In-Reply-To: <1531151872.26.0.56676864532.issue34076@psf.upfronthosting.co.za> Message-ID: <1531219981.69.0.56676864532.issue34076@psf.upfronthosting.co.za> Jan Christoph added the comment: Okay, so we're a in another scope inside the dictionary comprehension (all comprehensions for that matter), and only one symbol is passed to the inside. That's why `strange_reversed_working = {x+s.replace('(+/-)',''):None for x in infts.split(', ') for s in ('+','-','')}` functions, but if you reverse the order it does not. That's a real trap. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 06:56:15 2018 From: report at bugs.python.org (Jan Christoph) Date: Tue, 10 Jul 2018 10:56:15 +0000 Subject: [issue34076] Nested loop in dictionary comprehension gives `global name not defined` inside class In-Reply-To: <1531151872.26.0.56676864532.issue34076@psf.upfronthosting.co.za> Message-ID: <1531220175.36.0.56676864532.issue34076@psf.upfronthosting.co.za> Jan Christoph added the comment: Updated example with reversed variable order for reference. This really seems to be related to issue3692, but really not the same thing. IMHO both `a` and `b` should be passed in a situation like this: ```` a = range(5) b = range(3) c = [x+y for x in a for y in b] ```` ---------- Added file: https://bugs.python.org/file47681/what_a_dict.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 07:00:59 2018 From: report at bugs.python.org (Segev Finer) Date: Tue, 10 Jul 2018 11:00:59 +0000 Subject: [issue29672] `catch_warnings` context manager causes all warnings to be printed every time, even after exiting In-Reply-To: <1488234596.55.0.435492915134.issue29672@psf.upfronthosting.co.za> Message-ID: <1531220459.77.0.56676864532.issue29672@psf.upfronthosting.co.za> Segev Finer added the comment: Hmm, I originally missed the per module __warningregistry__... Need to read the code more closely... What should the behavior be? We can add a flag that will make all warning actions be "always" when catch_warnings is in effect. But that doesn't feel right with the way catch_warnings currently behaves or what is expected of it. Another idea would be to add a callback that is called whenever we set a module registry, allowing catch_warnings to backup the original registry of each module and restore them all on exit (Also the _onceregistry and _filters_version). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 07:37:01 2018 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 10 Jul 2018 11:37:01 +0000 Subject: [issue34084] possible free statically allocated string Message-ID: <1531222621.9.0.56676864532.issue34084@psf.upfronthosting.co.za> New submission from Xiang Zhang : While reviewing PR8222, I found `err_ret->text` is assigned a not malloced string, but it will finally get freed in `err_input`. ---------- keywords: easy messages: 321381 nosy: serhiy.storchaka, xiang.zhang priority: normal severity: normal status: open title: possible free statically allocated string versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 07:38:12 2018 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 10 Jul 2018 11:38:12 +0000 Subject: [issue34084] possible free statically allocated string in compiler when easter egg on In-Reply-To: <1531222621.9.0.56676864532.issue34084@psf.upfronthosting.co.za> Message-ID: <1531222692.25.0.56676864532.issue34084@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- title: possible free statically allocated string -> possible free statically allocated string in compiler when easter egg on _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 07:41:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Jul 2018 11:41:14 +0000 Subject: [issue34084] possible free statically allocated string in compiler when easter egg on In-Reply-To: <1531222621.9.0.56676864532.issue34084@psf.upfronthosting.co.za> Message-ID: <1531222874.19.0.56676864532.issue34084@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I expected it should be easy to reproduce a crash, but I failed to find an example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 07:41:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Jul 2018 11:41:30 +0000 Subject: [issue34084] possible free statically allocated string in compiler when easter egg on In-Reply-To: <1531222621.9.0.56676864532.issue34084@psf.upfronthosting.co.za> Message-ID: <1531222890.52.0.56676864532.issue34084@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 08:14:36 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 10 Jul 2018 12:14:36 +0000 Subject: [issue34033] distutils is not reproducible In-Reply-To: <1530632785.81.0.56676864532.issue34033@psf.upfronthosting.co.za> Message-ID: <1531224876.36.0.56676864532.issue34033@psf.upfronthosting.co.za> INADA Naoki added the comment: Is this issue for only known marshal issue? Or is this issue for all issues in distutils including unknowns? ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 08:23:27 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 10 Jul 2018 12:23:27 +0000 Subject: [issue34033] distutils is not reproducible In-Reply-To: <1530632785.81.0.56676864532.issue34033@psf.upfronthosting.co.za> Message-ID: <1531225407.15.0.56676864532.issue34033@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- pull_requests: +7764 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 08:51:40 2018 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 10 Jul 2018 12:51:40 +0000 Subject: [issue34008] Do we support calling Py_Main() after Py_Initialize()? In-Reply-To: <1530341921.37.0.56676864532.issue34008@psf.upfronthosting.co.za> Message-ID: <1531227100.55.0.56676864532.issue34008@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thinking about this some more, I'm inclined to go the same way we did with issue 33932: classify it as an outright regression, work out the desired requirements for a missing embedding test case, and then fix the implementation to pass the new test case. My suggestion for test commands would be: ../Lib/site.py -m site -c 'import sys; print(sys.argv)' some test data here Once those work properly, we'd consider the regression relative to Python 3.6 fixed. Those could either be 3 different test cases, or else we could run them all within a single test case, with a Py_Initialize() call before each one (since Py_Main() calls Py_Finalize() internally). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 09:04:38 2018 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 10 Jul 2018 13:04:38 +0000 Subject: [issue34009] Document Travis CI / Ubuntu 14.04 OpenSSL compatibility issues In-Reply-To: <1530350802.86.0.56676864532.issue34009@psf.upfronthosting.co.za> Message-ID: <1531227878.86.0.56676864532.issue34009@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 5fe7c98a54d127759cfce323fab831008c945964 by Nick Coghlan in branch 'master': bpo-34009: Expand on platform support changes (GH-8022) https://github.com/python/cpython/commit/5fe7c98a54d127759cfce323fab831008c945964 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 09:05:49 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Jul 2018 13:05:49 +0000 Subject: [issue34009] Document Travis CI / Ubuntu 14.04 OpenSSL compatibility issues In-Reply-To: <1530350802.86.0.56676864532.issue34009@psf.upfronthosting.co.za> Message-ID: <1531227949.34.0.56676864532.issue34009@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7765 stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 09:21:04 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 10 Jul 2018 13:21:04 +0000 Subject: [issue34083] Functional Programming HOWTO: Dictionary ordering isn't "essentially random" In-Reply-To: <1531217825.24.0.56676864532.issue34083@psf.upfronthosting.co.za> Message-ID: <1531228864.83.0.56676864532.issue34083@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks for noticing this. Do you want to contribute a patch or would you like me to just fix it up? ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 09:24:09 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Jul 2018 13:24:09 +0000 Subject: [issue34009] Document Travis CI / Ubuntu 14.04 OpenSSL compatibility issues In-Reply-To: <1530350802.86.0.56676864532.issue34009@psf.upfronthosting.co.za> Message-ID: <1531229049.7.0.56676864532.issue34009@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 5cca6f9fbead1fae27c37204f345a9465cc88959 by Miss Islington (bot) in branch '3.7': bpo-34009: Expand on platform support changes (GH-8022) https://github.com/python/cpython/commit/5cca6f9fbead1fae27c37204f345a9465cc88959 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 09:31:02 2018 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 10 Jul 2018 13:31:02 +0000 Subject: [issue34009] Document Debian 8 / Ubuntu 14.04 OpenSSL compatibility issues In-Reply-To: <1530350802.86.0.56676864532.issue34009@psf.upfronthosting.co.za> Message-ID: <1531229462.96.0.56676864532.issue34009@psf.upfronthosting.co.za> Nick Coghlan added the comment: Merged to master and 3.7 - any further wording tweaks can be handled as a trivial docs-only PR, without needing additional tracker issues. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: Document Travis CI / Ubuntu 14.04 OpenSSL compatibility issues -> Document Debian 8 / Ubuntu 14.04 OpenSSL compatibility issues _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 10:09:33 2018 From: report at bugs.python.org (Ethan Furman) Date: Tue, 10 Jul 2018 14:09:33 +0000 Subject: [issue34082] EnumMeta.__new__ should use enum_class.__new__ In-Reply-To: <1531215826.62.0.56676864532.issue34082@psf.upfronthosting.co.za> Message-ID: <1531231773.11.0.56676864532.issue34082@psf.upfronthosting.co.za> Change by Ethan Furman : ---------- assignee: -> ethan.furman nosy: +barry, eli.bendersky, ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 11:01:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Jul 2018 15:01:48 +0000 Subject: [issue28571] llist and scipy.stats conflicts, python segfault In-Reply-To: <1477948799.58.0.602345743052.issue28571@psf.upfronthosting.co.za> Message-ID: <1531234908.71.0.56676864532.issue28571@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 12:04:50 2018 From: report at bugs.python.org (Stig Johan Berggren) Date: Tue, 10 Jul 2018 16:04:50 +0000 Subject: [issue34083] Functional Programming HOWTO: Dictionary ordering isn't "essentially random" In-Reply-To: <1531217825.24.0.56676864532.issue34083@psf.upfronthosting.co.za> Message-ID: <1531238690.11.0.56676864532.issue34083@psf.upfronthosting.co.za> Stig Johan Berggren added the comment: I'll try to patch it myself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 12:33:43 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Tue, 10 Jul 2018 16:33:43 +0000 Subject: [issue34085] doc Improve wording on classmethod/staticmethod Message-ID: <1531240423.32.0.56676864532.issue34085@psf.upfronthosting.co.za> New submission from Andr?s Delfino : 1. The classmethod definition reads: """ The @classmethod form is a function decorator ? see the description of function definitions in Function definitions for details. It can be called either on the class (such as C.f()) or on an instance (such as C().f()) """ The second paragraph seems like talking about the classmethod function instead of a class method. The same goes for staticmethod. 2. The staticmethod definition reads: """ It can be called either on the class (such as C.f()) or on an instance (such as C().f()). The instance is ignored except for its class. """ "The instance is ignored except for its class." seems to have been copied from classmethod definition. 3. There is redundant text: "see the description of function definitions in Function definitions" "consult the documentation on the standard type hierarchy in The standard type hierarchy" PR fixes this. ---------- assignee: docs at python components: Documentation messages: 321390 nosy: adelfino, docs at python priority: normal severity: normal status: open title: doc Improve wording on classmethod/staticmethod type: enhancement versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 12:35:14 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Tue, 10 Jul 2018 16:35:14 +0000 Subject: [issue34085] doc Improve wording on classmethod/staticmethod In-Reply-To: <1531240423.32.0.56676864532.issue34085@psf.upfronthosting.co.za> Message-ID: <1531240514.61.0.56676864532.issue34085@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- keywords: +patch pull_requests: +7766 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 13:58:53 2018 From: report at bugs.python.org (Oren) Date: Tue, 10 Jul 2018 17:58:53 +0000 Subject: [issue34086] logging.Handler.handleError regressed in python3 Message-ID: <1531245533.0.0.56676864532.issue34086@psf.upfronthosting.co.za> New submission from Oren : In python2, calling Handler.handleError may not be strictly correct, but it doesn't raise an exception. However, this has regressed since this patch: https://hg.python.org/cpython/rev/d7b868cdd9bb $ cat logbug.py import logging class CustomHandler(logging.Handler): def transmit(self, record): return False def emit(self, record): if not self.transmit(record): self.handleError(record) def main(): logger = logging.getLogger() logger.addHandler(CustomHandler()) logger.warning('this will work in python 2.7, but not 3') if __name__ == '__main__': main() $ python2 logbug.py None Logged from file logbug.py, line 15 $ python3 logbug.py --- Logging error --- NoneType: None Call stack: Traceback (most recent call last): File "logbug.py", line 20, in main() File "logbug.py", line 15, in main logger.warning('this will work in python 2.7, but not 3') File "/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/logging/__init__.py", line 1318, in warning self._log(WARNING, msg, args, **kwargs) File "/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/logging/__init__.py", line 1442, in _log self.handle(record) File "/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/logging/__init__.py", line 1452, in handle self.callHandlers(record) File "/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/logging/__init__.py", line 1514, in callHandlers hdlr.handle(record) File "/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/logging/__init__.py", line 863, in handle self.emit(record) File "logbug.py", line 9, in emit self.handleError(record) File "/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/logging/__init__.py", line 920, in handleError frame = tb.tb_frame AttributeError: 'NoneType' object has no attribute 'tb_frame' ---------- components: Library (Lib) messages: 321391 nosy: orenl priority: normal severity: normal status: open title: logging.Handler.handleError regressed in python3 versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 14:01:10 2018 From: report at bugs.python.org (Oren) Date: Tue, 10 Jul 2018 18:01:10 +0000 Subject: [issue34086] logging.Handler.handleError regressed in python3 In-Reply-To: <1531245533.0.0.56676864532.issue34086@psf.upfronthosting.co.za> Message-ID: <1531245670.02.0.56676864532.issue34086@psf.upfronthosting.co.za> Oren added the comment: I realize that there is a legitimate argument that handleError() is being used wrong in the example, but since it used to work, it'd be nice if it still did. I came across this after converting a codebase to python3 and it took a while for this problem to appear. I propose the following fix: $ git diff diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 29a7d46..f2c3023 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -908,7 +908,7 @@ class Handler(Filterer): sys.stderr.write('Call stack:\n') # Walk the stack frame up until we're out of logging, # so as to print the calling context. - frame = tb.tb_frame + frame = tb and tb.tb_frame while (frame and os.path.dirname(frame.f_code.co_filename) == __path__[0]): frame = frame.f_back This results in: $ python3 logbug.py --- Logging error --- NoneType: None Call stack: Logged from file logbug.py, line 15 Message: 'this will work in python 2.7, but not 3' Arguments: () ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 14:49:26 2018 From: report at bugs.python.org (Erik Bray) Date: Tue, 10 Jul 2018 18:49:26 +0000 Subject: [issue29672] `catch_warnings` context manager causes all warnings to be printed every time, even after exiting In-Reply-To: <1488234596.55.0.435492915134.issue29672@psf.upfronthosting.co.za> Message-ID: <1531248566.77.0.56676864532.issue29672@psf.upfronthosting.co.za> Erik Bray added the comment: Yes, I think `catch_warnings` should back up and restore the relevant `__warningregistry__`. At which point it's not even clear to me what value there is in the _filter_version... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 15:35:35 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 10 Jul 2018 19:35:35 +0000 Subject: [issue32430] Simplify Modules/Setup{,.dist,.local} In-Reply-To: <1514373303.98.0.213398074469.issue32430@psf.upfronthosting.co.za> Message-ID: <1531251335.88.0.56676864532.issue32430@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- pull_requests: +7767 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 15:36:06 2018 From: report at bugs.python.org (=?utf-8?q?Rodrigo_Pinheiro_Marques_de_Ara=C3=BAjo?=) Date: Tue, 10 Jul 2018 19:36:06 +0000 Subject: [issue34087] Segmentation fault on visit_decref Message-ID: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> New submission from Rodrigo Pinheiro Marques de Ara?jo : * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x656d6f6e2236) frame #0: 0x000000010014c819 python3`visit_decref(op=0x0000656d6f6e222e, data=0x0000000000000000) at gcmodule.c:271 [opt] 268 visit_decref(PyObject *op, void *data) 269 { 270 assert(op != NULL); -> 271 if (PyObject_IS_GC(op)) { 272 PyGC_Head *gc = AS_GC(op); 273 /* We're only interested in gc_refs for objects in the 274 * generation being collected, which can be recognized Target 0: (python3) stopped. (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x656d6f6e2236) * frame #0: 0x000000010014c819 python3`visit_decref(op=0x0000656d6f6e222e, data=0x0000000000000000) at gcmodule.c:271 [opt] frame #1: 0x000000010003af38 python3`list_traverse(o=0x0000000116971608, visit=(python3`visit_decref at gcmodule.c:269), arg=0x0000000000000000) at listobject.c:2574 [opt] frame #2: 0x000000010014aca3 python3`collect [inlined] subtract_refs at gcmodule.c:296 [opt] frame #3: 0x000000010014ac72 python3`collect(generation=2, n_collected=0x00007ffeefbff0a8, n_uncollectable=0x00007ffeefbff0b0, nofail=0) at gcmodule.c:853 [opt] frame #4: 0x000000010014a8f5 python3`PyGC_Collect [inlined] collect_with_callback(generation=2) at gcmodule.c:1028 [opt] frame #5: 0x000000010014a8cc python3`PyGC_Collect at gcmodule.c:1573 [opt] frame #6: 0x000000010011f7a8 python3`Py_FinalizeEx at pylifecycle.c:1087 [opt] frame #7: 0x0000000100149605 python3`pymain_main(pymain=) at main.c:2664 [opt] frame #8: 0x000000010014a280 python3`_Py_UnixMain(argc=5, argv=0x00007ffeefbff4b8) at main.c:2697 [opt] frame #9: 0x00007fff5869a015 libdyld.dylib`start + 1 frame #10: 0x00007fff5869a015 libdyld.dylib`start + 1 ---------- components: Interpreter Core messages: 321394 nosy: fenrrir priority: normal severity: normal status: open title: Segmentation fault on visit_decref type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 15:41:32 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 10 Jul 2018 19:41:32 +0000 Subject: [issue32430] Simplify Modules/Setup{,.dist,.local} In-Reply-To: <1514373303.98.0.213398074469.issue32430@psf.upfronthosting.co.za> Message-ID: <1531251692.37.0.56676864532.issue32430@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 15:51:38 2018 From: report at bugs.python.org (Stig Johan Berggren) Date: Tue, 10 Jul 2018 19:51:38 +0000 Subject: [issue34083] Functional Programming HOWTO: Dictionary ordering isn't "essentially random" In-Reply-To: <1531217825.24.0.56676864532.issue34083@psf.upfronthosting.co.za> Message-ID: <1531252298.96.0.56676864532.issue34083@psf.upfronthosting.co.za> Change by Stig Johan Berggren : ---------- keywords: +patch pull_requests: +7768 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 16:00:47 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 10 Jul 2018 20:00:47 +0000 Subject: [issue32430] Simplify Modules/Setup{,.dist,.local} In-Reply-To: <1514373303.98.0.213398074469.issue32430@psf.upfronthosting.co.za> Message-ID: <1531252847.75.0.56676864532.issue32430@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've created a PR that renames Setup.dist to Setup and removes extraneous logic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 16:50:06 2018 From: report at bugs.python.org (Jussi Judin) Date: Tue, 10 Jul 2018 20:50:06 +0000 Subject: [issue34088] sndhdr.what() throws exceptions on unknown files Message-ID: <1531255806.14.0.56676864532.issue34088@psf.upfronthosting.co.za> New submission from Jussi Judin : sndhdr.what() function throws several types of exceptions on unknown files instead of returning None (as documentation says). Following code can replicate these crashes: ``` import sndhdr import sys sndhdr.what(sys.argv[1]) ``` First crash is from wave or chunk module (input data is base64 encoded in the echo command): ``` $ echo UklGRjAwMDBXQVZFZm10IDAwMDABADAwMDAwMDAwMDAwMDAw | python3.7 -mbase64 -d > in.file $ python3.7 sndhdr/test.py in.file Traceback (most recent call last): File "sndhdr/test.py", line 4, in sndhdr.what(sys.argv[1]) File "/tmp/python-3.7-bin/lib/python3.7/sndhdr.py", line 54, in what res = whathdr(filename) File "/tmp/python-3.7-bin/lib/python3.7/sndhdr.py", line 63, in whathdr res = tf(h, f) File "/tmp/python-3.7-bin/lib/python3.7/sndhdr.py", line 163, in test_wav w = wave.open(f, 'r') File "/tmp/python-3.7-bin/lib/python3.7/wave.py", line 510, in open return Wave_read(f) File "/tmp/python-3.7-bin/lib/python3.7/wave.py", line 164, in __init__ self.initfp(f) File "/tmp/python-3.7-bin/lib/python3.7/wave.py", line 153, in initfp chunk.skip() File "/tmp/python-3.7-bin/lib/python3.7/chunk.py", line 160, in skip self.file.seek(n, 1) File "/tmp/python-3.7-bin/lib/python3.7/chunk.py", line 113, in seek raise RuntimeError RuntimeError ``` Second crash comes from sndhdr module itself (again base64 encoded data is first decoded on command line): ``` $ echo AAA= | python3.7 -mbase64 -d > in.file $ python3.7 sndhdr/test.py in.fileTraceback (most recent call last): File "sndhdr/test.py", line 4, in sndhdr.what(sys.argv[1]) File "/tmp/python-3.7-bin/lib/python3.7/sndhdr.py", line 54, in what res = whathdr(filename) File "/tmp/python-3.7-bin/lib/python3.7/sndhdr.py", line 63, in whathdr res = tf(h, f) File "/tmp/python-3.7-bin/lib/python3.7/sndhdr.py", line 192, in test_sndr rate = get_short_le(h[2:4]) File "/tmp/python-3.7-bin/lib/python3.7/sndhdr.py", line 213, in get_short_le return (b[1] << 8) | b[0] IndexError: index out of range ``` ---------- components: Library (Lib) messages: 321396 nosy: Barro priority: normal severity: normal status: open title: sndhdr.what() throws exceptions on unknown files versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 17:16:53 2018 From: report at bugs.python.org (Segev Finer) Date: Tue, 10 Jul 2018 21:16:53 +0000 Subject: [issue29672] `catch_warnings` context manager causes all warnings to be printed every time, even after exiting In-Reply-To: <1488234596.55.0.435492915134.issue29672@psf.upfronthosting.co.za> Message-ID: <1531257413.91.0.56676864532.issue29672@psf.upfronthosting.co.za> Change by Segev Finer : ---------- keywords: +patch pull_requests: +7769 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 17:25:35 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Tue, 10 Jul 2018 21:25:35 +0000 Subject: [issue4260] Document that ctypes.xFUNCTYPE are decorators. In-Reply-To: <1225864263.85.0.365773038706.issue4260@psf.upfronthosting.co.za> Message-ID: <1531257935.13.0.56676864532.issue4260@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- nosy: +amaury.forgeotdarc, belopolsky, meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 18:05:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Jul 2018 22:05:36 +0000 Subject: [issue25711] Rewrite zipimport from scratch In-Reply-To: <1448296120.48.0.872112518039.issue25711@psf.upfronthosting.co.za> Message-ID: <1531260336.38.0.56676864532.issue25711@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 18:13:01 2018 From: report at bugs.python.org (Oren) Date: Tue, 10 Jul 2018 22:13:01 +0000 Subject: [issue34086] logging.Handler.handleError regressed in python3 In-Reply-To: <1531245533.0.0.56676864532.issue34086@psf.upfronthosting.co.za> Message-ID: <1531260781.54.0.56676864532.issue34086@psf.upfronthosting.co.za> Change by Oren : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 18:16:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Jul 2018 22:16:35 +0000 Subject: [issue22689] Posix getenv makes no guarantee of lifetime of returned string In-Reply-To: <1413925424.96.0.804566099113.issue22689@psf.upfronthosting.co.za> Message-ID: <1531260995.15.0.56676864532.issue22689@psf.upfronthosting.co.za> STINNER Victor added the comment: > char *_rtpypath = Py_GETENV("PYTHONPATH"); /* XXX use wide version on Windows */ Python now copies the env var. In master, Modules/main.c: int res = config_get_env_var_dup(&path, L"PYTHONPATH", "PYTHONPATH"); Moreover, bytes are decoded to Unicode (wchar_t) on UNIX. This issue is now 4 years old and Serhiy just fixed one issue, so I close the issue. Even if there is a risk of an issue, nobody came up with a concrete way to trigger a bug, so I don't think that it's a big issue. For example, the reported bug was on Py_GETENV("PYTHONPATH"), whereas this code is critical for Python: if it fails, everybody will complain. Except that since the bug has been reported, nobody ever saw an issue with this code. The code is part of the early code to initialize Python, when there is not possible to execute arbitrary code nor have a second thread, so we should be fine. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 18:18:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Jul 2018 22:18:41 +0000 Subject: [issue8036] Interpreter crashes on invalid arg to spawnl on Windows In-Reply-To: <1267477949.48.0.216202239381.issue8036@psf.upfronthosting.co.za> Message-ID: <1531261121.09.0.56676864532.issue8036@psf.upfronthosting.co.za> STINNER Victor added the comment: > Crashing happens only with the debug build. I don't understand why Python behaves differently in debug mode. For me, if Python is able to trigger an exception on EINVAL, we should also get a regular Python exception in debug mode (and not a crash). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 19:11:10 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Tue, 10 Jul 2018 23:11:10 +0000 Subject: [issue34089] Remove required (non-optional) modules from Modules/Setup.dist Message-ID: <1531264270.58.0.56676864532.issue34089@psf.upfronthosting.co.za> New submission from Neil Schemenauer : This is related to Issue32430. The behavior of Modules/Setup.dist and Modules/Setup is quirky and problematic. Issue32430 links to some of the related issues. The problem discussed in Issue24575 is also related (Py_BUILD_CORE not being defined when it should be because Modules/Setup is not updated after a git pull). I think it is better if, by default, Python does not require Module/Setup to contain anything. The modules currently listed in there are not optional anyhow as they are required to run setup.py. So, I think moving them to Makefile.pre.in and Modules/config.c.in directly is better. That way, they are contained in files tracked by the VCS and the build dependencies will work as they should. There are some downsides. First, it is more verbose in terms of source lines of code to add them directly. I suspect that is the main reason why new modules ended up in Setup.dist rather than in Makefile.pre.in (e.g. in contrast to gcmodule.c). However, a few extra lines of code seems better than a complicated build system. Modules/Setup and makesetup is complicated, for sure. For example, the Makefile depends on Setup. So, if you run "make", the Makefile can be re-generated. That is slightly crazy. Setup is created on the first run of configure but not on following runs (most people don't realize that, even I forget). Another possible downside is that perhaps someone does not want these modules to be built-in. That would be strange as these modules are quite important and you cannot run setup.py without them. After this change, they would have to edit source code rather than a config file in order to disable these modules. A third downside is that this change could break existing 3rd party build systems. E.g. if they create a Setup file that includes some of these always built-in modules. You will end up trying to link the same .o multiple times into "python". I expect that would cause a link error. However, if these 3rd party builds start with Setup.dist and then edit it, things should continue to work. Rather than this approach, I considered introducing Modules/Setup.builtin. It would contain all the modules needed to run setup.py plus whatever else people wanted to include statically. The Modules/Setup.builtin file would not get the same weird treatment as Modules/Setup. I.e. Modules/Setup.builtin would be tracked by the VCS and no copy to the build folder would be made. That would take care of some issues we currently have with the build. However, I don't like that approach because it makes it more complicated to understand how things are built. With this patch, you can look at Makefile and Modules/config.c to see what is getting built. ---------- components: Build messages: 321399 nosy: nascheme priority: low severity: normal stage: patch review status: open title: Remove required (non-optional) modules from Modules/Setup.dist type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 19:13:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Jul 2018 23:13:39 +0000 Subject: [issue34090] Python function call optimization: avoid temporary tuple to pass **kwargs Message-ID: <1531264419.35.0.56676864532.issue34090@psf.upfronthosting.co.za> New submission from STINNER Victor : On the following code, f() uses CALL_FUNCTION_EX bytecode to call g(). The bytecode loads 'kw' variable which is a dictionary. But internally, the dictionary is converted to a temporary tuple, and later a new dictionary is created. Maybe the temporary tuple could be avoided? def g(*args, **kw): ... def f(*args, **kw): g(*args, **kw) In Python 3.6, before FASTCALL, CALL_FUNCTION_EX calls: * do_call_core(): kw dict * PyObject_Call(): kw dict * function_call(): kw dict -> create a temporary tuple of keys and names: (key[0], value[0], ...) * _PyEval_EvalCodeWithName(): if CO_VARKEYWORDS, rebuild a new dictionary for keyword arguments (**kw) In Python master branch (future 3.8) with FASTCALL, CALL_FUNCTION_EX calls: * do_call_core(): kw dict * _PyFunction_FastCallDict(): kw dict -> a temporary tuple for keyword names ('kwnames') is created * _PyEval_EvalCodeWithName(): if CO_VARKEYWORDS, rebuild a new dictionary for keyword arguments (**kw) To be clear: FASTCALL didn't make this specific function call (Python => Python with **kw) worse nor better. ---------- components: Interpreter Core messages: 321400 nosy: inada.naoki, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Python function call optimization: avoid temporary tuple to pass **kwargs type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 19:14:37 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Tue, 10 Jul 2018 23:14:37 +0000 Subject: [issue34089] Remove required (non-optional) modules from Modules/Setup.dist In-Reply-To: <1531264270.58.0.56676864532.issue34089@psf.upfronthosting.co.za> Message-ID: <1531264477.49.0.56676864532.issue34089@psf.upfronthosting.co.za> Change by Neil Schemenauer : ---------- keywords: +patch pull_requests: +7770 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 19:47:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Jul 2018 23:47:44 +0000 Subject: [issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7 In-Reply-To: <1527865087.2.0.81473610881.issue33735@psf.upfronthosting.co.za> Message-ID: <1531266464.45.0.56676864532.issue33735@psf.upfronthosting.co.za> STINNER Victor added the comment: Note for myself: the commit 127bd9bfd591c8ec1a97eb7f4037c8b884eef973, fix for bpo-34042 has no impact on this issue since this issue is about memory blocks and not references. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 19:55:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Jul 2018 23:55:18 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1531266918.89.0.56676864532.issue33597@psf.upfronthosting.co.za> STINNER Victor added the comment: Would you mind to mention your optimization in What's New in Python 3.8? IHMO any enhancement of the memory footprint should be documented :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 20:11:53 2018 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 11 Jul 2018 00:11:53 +0000 Subject: [issue29342] os.posix_fadvise misreports errors In-Reply-To: <1485084017.58.0.131551905677.issue29342@psf.upfronthosting.co.za> Message-ID: <1531267913.02.0.56676864532.issue29342@psf.upfronthosting.co.za> Zackery Spytz added the comment: This was fixed in #31106. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 21:02:16 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 11 Jul 2018 01:02:16 +0000 Subject: [issue34087] Segmentation fault on visit_decref In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531270936.04.0.56676864532.issue34087@psf.upfronthosting.co.za> INADA Naoki added the comment: It's difficult to investigate without reproducible example. Do you use 3rd party extension module? Typical cause of these crash is bug in 3rd party extensions. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 21:11:05 2018 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 11 Jul 2018 01:11:05 +0000 Subject: [issue27351] Unexpected ConfigParser.read() behavior when passed fileobject In-Reply-To: <1466311827.21.0.0107030173129.issue27351@psf.upfronthosting.co.za> Message-ID: <1531271465.21.0.56676864532.issue27351@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +7771 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 21:12:56 2018 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 11 Jul 2018 01:12:56 +0000 Subject: [issue27351] Unexpected ConfigParser.read() behavior when passed fileobject In-Reply-To: <1466311827.21.0.0107030173129.issue27351@psf.upfronthosting.co.za> Message-ID: <1531271576.4.0.56676864532.issue27351@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz versions: +Python 3.7, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 21:31:05 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 11 Jul 2018 01:31:05 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1531272665.62.0.56676864532.issue33597@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- pull_requests: +7772 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 21:31:23 2018 From: report at bugs.python.org (Eryk Sun) Date: Wed, 11 Jul 2018 01:31:23 +0000 Subject: [issue8036] Interpreter crashes on invalid arg to spawnl on Windows In-Reply-To: <1267477949.48.0.216202239381.issue8036@psf.upfronthosting.co.za> Message-ID: <1531272683.01.0.56676864532.issue8036@psf.upfronthosting.co.za> Eryk Sun added the comment: > I don't understand why Python behaves differently in debug mode. > For me, if Python is able to trigger an exception on EINVAL, we > should also get a regular Python exception in debug mode (and not > a crash) The debug build's behavior isn't related to the invalid parameter handler, and it's not necessarily a crash. The default report mode for CRT_ERROR and CRT_ASSERT is CRTDBG_MODE_WNDW. This pops up a dialog asking whether to abort the process, ignore the error (fail and set errno), or retry if a debugger is attached (i.e. break into the debugger with a first-chance exception). The mode can be changed to CRTDBG_MODE_DEBUG, which writes a message to the debugger, if one is attached to the process: msvcrt.CrtSetReportMode(msvcrt.CRT_ASSERT, msvcrt.CRTDBG_MODE_DEBUG) For example, in this case a message is written about the failed assertion in exec\spawv.cpp on line 276 (in this case the debugger is cdb, sharing the same console as Python, so the failed assertion message is inlined with Python's traceback): >>> os.spawnl(os.P_WAIT, '', 'non-empty') minkernel\crts\ucrt\src\desktopcrt\exec\spawnv.cpp(276) : Assertion failed: file_name[0] != '\0' Traceback (most recent call last): File "", line 1, in File "C:\Program Files\Python37\lib\os.py", line 931, in spawnl return spawnv(mode, file, args) OSError: [Errno 22] Invalid argument or set the report mode to CRTDBG_MODE_FILE with the file set to CRTDBG_FILE_STDERR: msvcrt.CrtSetReportMode(msvcrt.CRT_ASSERT, msvcrt.CRTDBG_MODE_FILE) msvcrt.CrtSetReportFile(msvcrt.CRT_ASSERT, msvcrt.CRTDBG_FILE_STDERR) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 21:39:56 2018 From: report at bugs.python.org (=?utf-8?q?Rodrigo_Pinheiro_Marques_de_Ara=C3=BAjo?=) Date: Wed, 11 Jul 2018 01:39:56 +0000 Subject: [issue34087] Segmentation fault on visit_decref In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531273196.44.0.56676864532.issue34087@psf.upfronthosting.co.za> Rodrigo Pinheiro Marques de Ara?jo added the comment: Sorry for that. I?m not able to make a little example to reproduce this bug. It?s happens during Django tests on a very large code base. A interest thing is that not happens with ?-X dev? parameters. Please, any suggestions how I can get more details about this bug? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 21:59:39 2018 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 11 Jul 2018 01:59:39 +0000 Subject: [issue34084] possible free statically allocated string in compiler when easter egg on In-Reply-To: <1531222621.9.0.56676864532.issue34084@psf.upfronthosting.co.za> Message-ID: <1531274379.32.0.56676864532.issue34084@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 10 23:00:02 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 11 Jul 2018 03:00:02 +0000 Subject: [issue34087] Segmentation fault on visit_decref In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531278002.16.0.56676864532.issue34087@psf.upfronthosting.co.za> INADA Naoki added the comment: If example cannot be small, you can share the project on Github or other place. If your project is private, you can create OSS version of reproducer. If you can't create OSS reproducer, we can't debug it. 3rd party library list may helpful, but I'm not sure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 00:39:09 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jul 2018 04:39:09 +0000 Subject: [issue34033] distutils is not reproducible In-Reply-To: <1530632785.81.0.56676864532.issue34033@psf.upfronthosting.co.za> Message-ID: <1531283949.75.0.56676864532.issue34033@psf.upfronthosting.co.za> Benjamin Peterson added the comment: We should probably discuss the marshal issue in the pre?xisting #31377. I'm not sure if "distutils is not reproducible" is a larger issue than "pyc compilation is not reproducible". This issue could be a meta issue for either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 00:41:31 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Jul 2018 04:41:31 +0000 Subject: [issue29342] os.posix_fadvise misreports errors In-Reply-To: <1485084017.58.0.131551905677.issue29342@psf.upfronthosting.co.za> Message-ID: <1531284091.53.0.56676864532.issue29342@psf.upfronthosting.co.za> Change by Benjamin Peterson : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> os.posix_fallocate() generate exception with errno 0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 01:29:03 2018 From: report at bugs.python.org (Roland Weber) Date: Wed, 11 Jul 2018 05:29:03 +0000 Subject: [issue34050] Broken links to "OpenSSL cipher list format" in documentation In-Reply-To: <1530778661.86.0.56676864532.issue34050@psf.upfronthosting.co.za> Message-ID: <1531286943.45.0.56676864532.issue34050@psf.upfronthosting.co.za> Roland Weber added the comment: Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 02:34:33 2018 From: report at bugs.python.org (Stig Johan Berggren) Date: Wed, 11 Jul 2018 06:34:33 +0000 Subject: [issue34083] Functional Programming HOWTO: Dictionary ordering isn't "essentially random" In-Reply-To: <1531217825.24.0.56676864532.issue34083@psf.upfronthosting.co.za> Message-ID: <1531290873.59.0.56676864532.issue34083@psf.upfronthosting.co.za> Change by Stig Johan Berggren : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 02:37:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 06:37:57 +0000 Subject: [issue30774] list_repr not safe against concurrent mutation In-Reply-To: <1498507019.02.0.505462443219.issue30774@psf.upfronthosting.co.za> Message-ID: <1531291077.38.0.56676864532.issue30774@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is it possible to reproduce this issue without involving signal handlers? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 02:40:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 06:40:02 +0000 Subject: [issue31297] Unpickleable ModuleImportError in unittest patch not backported to 2.7 In-Reply-To: <1503964395.2.0.931089155502.issue31297@psf.upfronthosting.co.za> Message-ID: <1531291202.16.0.56676864532.issue31297@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 02:41:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 06:41:42 +0000 Subject: [issue21253] unittest assertSequenceEqual can lead to Difflib.compare() crashing on mostly different sequences In-Reply-To: <1397663686.19.0.71446048811.issue21253@psf.upfronthosting.co.za> Message-ID: <1531291302.54.0.56676864532.issue21253@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior versions: +Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 02:51:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 06:51:31 +0000 Subject: [issue31604] unittest.TestLoader().loadTestsFromTestCase(...) fails when adding test cases with the expectedFailure decorator In-Reply-To: <1506500204.85.0.154975027568.issue31604@psf.upfronthosting.co.za> Message-ID: <1531291891.47.0.56676864532.issue31604@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:06:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:06:32 +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: <1531292792.06.0.56676864532.issue27494@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +7773 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:07:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:07:27 +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: <1531292847.94.0.56676864532.issue27494@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior versions: +Python 3.8 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:14:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:14:38 +0000 Subject: [issue25828] PyCode_Optimize() (peephole optimizer) doesn't handle KeyboardInterrupt correctly In-Reply-To: <1449648204.19.0.769728792688.issue25828@psf.upfronthosting.co.za> Message-ID: <1531293278.04.0.56676864532.issue25828@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Can this issue be closed now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:32:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:32:32 +0000 Subject: [issue12087] install_egg_info fails with UnicodeEncodeError depending on locale In-Reply-To: <1305548495.94.0.944889224247.issue12087@psf.upfronthosting.co.za> Message-ID: <1531294352.41.0.56676864532.issue12087@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Fixed in issue9561. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> distutils: set encoding to utf-8 for input and output files type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:33:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:33:21 +0000 Subject: [issue16360] argparse: comma in metavar causes assertion failure when formatting long usage message In-Reply-To: <1351529348.85.0.0475227022594.issue16360@psf.upfronthosting.co.za> Message-ID: <1531294401.66.0.56676864532.issue16360@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:34:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:34:49 +0000 Subject: [issue17925] asynchat.async_chat.initiate_send : del deque[0] is not safe In-Reply-To: <1367934356.3.0.498041746077.issue17925@psf.upfronthosting.co.za> Message-ID: <1531294489.91.0.56676864532.issue17925@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:35:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:35:30 +0000 Subject: [issue10523] argparse has problem parsing option files containing empty rows In-Reply-To: <1290635267.13.0.585990858581.issue10523@psf.upfronthosting.co.za> Message-ID: <1531294530.0.0.56676864532.issue10523@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:35:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:35:51 +0000 Subject: [issue21567] cannot create multipart alternative message with us-ascii charset In-Reply-To: <1400885983.53.0.980235742965.issue21567@psf.upfronthosting.co.za> Message-ID: <1531294551.09.0.56676864532.issue21567@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:36:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:36:25 +0000 Subject: [issue22496] urllib2 fails against IIS (urllib2 can't parse 401 reply www-authenticate headers) In-Reply-To: <1411660131.7.0.581562777837.issue22496@psf.upfronthosting.co.za> Message-ID: <1531294585.31.0.56676864532.issue22496@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:37:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:37:27 +0000 Subject: [issue19453] pydoc.py doesn't detect IronPython, help(foo) can hang In-Reply-To: <1383153313.2.0.219850254586.issue19453@psf.upfronthosting.co.za> Message-ID: <1531294647.09.0.56676864532.issue19453@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:37:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:37:37 +0000 Subject: [issue17518] urllib2 cannnot handle https and BasicAuth via Proxy. In-Reply-To: <1363951100.05.0.959443247001.issue17518@psf.upfronthosting.co.za> Message-ID: <1531294657.97.0.56676864532.issue17518@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:38:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:38:15 +0000 Subject: [issue23389] pkgutil.find_loader raises an ImportError on PEP 420 implicit namespace packages In-Reply-To: <1422986140.16.0.155842945597.issue23389@psf.upfronthosting.co.za> Message-ID: <1531294695.53.0.56676864532.issue23389@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:38:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:38:59 +0000 Subject: [issue23443] XMLRPCLIB Exception uses str not class or instance In-Reply-To: <1423664362.4.0.817157506262.issue23443@psf.upfronthosting.co.za> Message-ID: <1531294739.3.0.56676864532.issue23443@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:39:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:39:41 +0000 Subject: [issue23837] read pipe transport tries to resume reading after loop is gone In-Reply-To: <1427882762.68.0.794378524046.issue23837@psf.upfronthosting.co.za> Message-ID: <1531294781.1.0.56676864532.issue23837@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:40:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:40:02 +0000 Subject: [issue18323] 'GzipFile' object has no attribute 'extrastart' In-Reply-To: <1372418817.06.0.791452748439.issue18323@psf.upfronthosting.co.za> Message-ID: <1531294802.23.0.56676864532.issue18323@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:41:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:41:05 +0000 Subject: [issue24691] out of memory in distutils.upload with large files In-Reply-To: <1437644652.98.0.268496303546.issue24691@psf.upfronthosting.co.za> Message-ID: <1531294865.91.0.56676864532.issue24691@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> resource usage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:41:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:41:35 +0000 Subject: [issue25640] EmailMessage should throw an error if policy is set to compat32 In-Reply-To: <1447710480.65.0.915044845124.issue25640@psf.upfronthosting.co.za> Message-ID: <1531294895.84.0.56676864532.issue25640@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:41:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:41:59 +0000 Subject: [issue25872] multithreading traceback KeyError when modifying file In-Reply-To: <1450200064.35.0.872448112145.issue25872@psf.upfronthosting.co.za> Message-ID: <1531294919.97.0.56676864532.issue25872@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:43:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:43:11 +0000 Subject: [issue23228] The tarfile module crashes when tarfile contains a symlink and unpack directory contain it too In-Reply-To: <1421139302.16.0.710158118765.issue23228@psf.upfronthosting.co.za> Message-ID: <1531294991.59.0.56676864532.issue23228@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:43:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:43:28 +0000 Subject: [issue26952] argparse help formatter crashes In-Reply-To: <1462374887.67.0.462060112057.issue26952@psf.upfronthosting.co.za> Message-ID: <1531295008.56.0.56676864532.issue26952@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:43:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:43:48 +0000 Subject: [issue18454] distutils crashes when uploading to PyPI having only the username (no pw) defined In-Reply-To: <1373822688.67.0.938925989206.issue18454@psf.upfronthosting.co.za> Message-ID: <1531295028.7.0.56676864532.issue18454@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:44:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:44:17 +0000 Subject: [issue27513] email.utils.getaddresses does not handle Header objects In-Reply-To: <1468493411.01.0.0415400585896.issue27513@psf.upfronthosting.co.za> Message-ID: <1531295057.43.0.56676864532.issue27513@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:44:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:44:41 +0000 Subject: [issue27820] Possible bug in smtplib when initial_response_ok=False In-Reply-To: <1471739698.94.0.271523306415.issue27820@psf.upfronthosting.co.za> Message-ID: <1531295081.29.0.56676864532.issue27820@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:46:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:46:05 +0000 Subject: [issue29516] shutil.copytree(symlinks=True) fails when copying symlinks cross-device and there is no alternative In-Reply-To: <1486674754.67.0.62017119203.issue29516@psf.upfronthosting.co.za> Message-ID: <1531295165.81.0.56676864532.issue29516@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:46:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:46:46 +0000 Subject: [issue26543] imaplib noop Debug In-Reply-To: <1457738623.54.0.0867122071018.issue26543@psf.upfronthosting.co.za> Message-ID: <1531295206.98.0.56676864532.issue26543@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:47:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:47:37 +0000 Subject: [issue27715] call-matcher breaks if a method is mocked with spec=True In-Reply-To: <1470710605.81.0.432461136624.issue27715@psf.upfronthosting.co.za> Message-ID: <1531295257.66.0.56676864532.issue27715@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:48:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:48:25 +0000 Subject: [issue31292] `python setup.py check --restructuredtext` fails when a include directive is present. In-Reply-To: <1503928665.81.0.590770692205.issue31292@psf.upfronthosting.co.za> Message-ID: <1531295305.36.0.56676864532.issue31292@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:48:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:48:59 +0000 Subject: [issue30566] punycode codec raises IndexError in decode_generalized_number() In-Reply-To: <1496591394.26.0.00653153658066.issue30566@psf.upfronthosting.co.za> Message-ID: <1531295339.13.0.56676864532.issue30566@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:49:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:49:08 +0000 Subject: [issue31481] telnetlib fails to read continous large output from Windows Telnet Server In-Reply-To: <1505475181.12.0.220673686741.issue31481@psf.upfronthosting.co.za> Message-ID: <1531295348.84.0.56676864532.issue31481@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:50:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:50:28 +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: <1531295428.32.0.56676864532.issue24564@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- components: +Library (Lib) type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:52:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:52:38 +0000 Subject: [issue32729] socket error handling needed In-Reply-To: <1517380649.99.0.467229070634.issue32729@psf.upfronthosting.co.za> Message-ID: <1531295558.58.0.56676864532.issue32729@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:53:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:53:35 +0000 Subject: [issue33025] urlencode produces bad output from ssl.CERT_NONE and friends that chokes decoders In-Reply-To: <1520492267.34.0.467229070634.issue33025@psf.upfronthosting.co.za> Message-ID: <1531295615.51.0.56676864532.issue33025@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:54:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:54:21 +0000 Subject: [issue33635] OSError when using pathlib.Path.rglob() to list device files In-Reply-To: <1527164127.59.0.682650639539.issue33635@psf.upfronthosting.co.za> Message-ID: <1531295661.86.0.56676864532.issue33635@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:54:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:54:46 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1531295686.96.0.56676864532.issue33729@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:55:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:55:07 +0000 Subject: [issue33808] ssl.get_server_certificate fails with openssl 1.1.0 but works with 1.0.2g for self-signed certificate In-Reply-To: <1528462754.61.0.592728768989.issue33808@psf.upfronthosting.co.za> Message-ID: <1531295707.73.0.56676864532.issue33808@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:55:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:55:24 +0000 Subject: [issue29699] shutil.rmtree should not fail with FileNotFoundError (race condition) In-Reply-To: <1488481944.03.0.0307704051627.issue29699@psf.upfronthosting.co.za> Message-ID: <1531295724.03.0.56676864532.issue29699@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:55:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:55:46 +0000 Subject: [issue33935] shutil.copyfile throws incorrect SameFileError on Google Drive File Stream In-Reply-To: <1529627906.69.0.56676864532.issue33935@psf.upfronthosting.co.za> Message-ID: <1531295746.4.0.56676864532.issue33935@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:56:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:56:14 +0000 Subject: [issue33980] SSL Error when uploading package to your own pypi In-Reply-To: <1530102486.37.0.56676864532.issue33980@psf.upfronthosting.co.za> Message-ID: <1531295774.4.0.56676864532.issue33980@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:56:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:56:34 +0000 Subject: [issue33972] AttributeError in email.message.iter_attachments() In-Reply-To: <1530024211.47.0.56676864532.issue33972@psf.upfronthosting.co.za> Message-ID: <1531295794.55.0.56676864532.issue33972@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:57:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 07:57:02 +0000 Subject: [issue34071] repr(task) raises AssertionError for coros which loop.create_task accepts; complications ensue In-Reply-To: <1531092771.84.0.56676864532.issue34071@psf.upfronthosting.co.za> Message-ID: <1531295822.63.0.56676864532.issue34071@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 03:58:22 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 11 Jul 2018 07:58:22 +0000 Subject: [issue31377] remove *_INTERNED opcodes from marshal In-Reply-To: <1504760052.67.0.425935653132.issue31377@psf.upfronthosting.co.za> Message-ID: <1531295902.23.0.56676864532.issue31377@psf.upfronthosting.co.za> INADA Naoki added the comment: I doubt that interning cause reproduciblity problem. AFAIK, all strings in code object are interned or not interned deterministically. https://bugzilla.opensuse.org/show_bug.cgi?id=1049186 This issue seems be caused by w_ref() based on object refcnt, not interning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 04:02:42 2018 From: report at bugs.python.org (Christian Heimes) Date: Wed, 11 Jul 2018 08:02:42 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1531296162.34.0.56676864532.issue33729@psf.upfronthosting.co.za> Christian Heimes added the comment: None of the hashlib functions are taking keyword arguments for data: >>> hashlib.sha256(data=b'foo') Traceback (most recent call last): File "", line 1, in TypeError: openssl_sha256() takes no keyword arguments >>> hashlib.blake2b(data=b'foo') Traceback (most recent call last): File "", line 1, in TypeError: 'data' is an invalid keyword argument for this function ---------- versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 04:43:00 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 11 Jul 2018 08:43:00 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1526972782.65.0.682650639539.issue33597@psf.upfronthosting.co.za> Message-ID: <1531298580.17.0.56676864532.issue33597@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset d5c875bbf1ef9b24349d3243b1ffaab6a9d5a78e by INADA Naoki in branch 'master': bpo-33597: Add What's New for PyGC_Head (GH-8236) https://github.com/python/cpython/commit/d5c875bbf1ef9b24349d3243b1ffaab6a9d5a78e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 04:48:54 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 11 Jul 2018 08:48:54 +0000 Subject: [issue29442] Replace optparse with argparse in setup.py In-Reply-To: <1486193188.24.0.532905655294.issue29442@psf.upfronthosting.co.za> Message-ID: <1531298934.8.0.56676864532.issue29442@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 09b2bece78f62c3d363236dce593ecfe130afd2f by INADA Naoki (Chih-Hsuan Yen) in branch 'master': bpo-29442: Replace optparse with argparse in setup.py (GH-139) https://github.com/python/cpython/commit/09b2bece78f62c3d363236dce593ecfe130afd2f ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 04:49:12 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 11 Jul 2018 08:49:12 +0000 Subject: [issue29442] Replace optparse with argparse in setup.py In-Reply-To: <1486193188.24.0.532905655294.issue29442@psf.upfronthosting.co.za> Message-ID: <1531298952.95.0.56676864532.issue29442@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- nosy: -inada.naoki resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 05:02:12 2018 From: report at bugs.python.org (=?utf-8?q?Maximilian_N=C3=B6the?=) Date: Wed, 11 Jul 2018 09:02:12 +0000 Subject: [issue34091] REPL does not work in msys2, ConEmu terminals on windows Message-ID: <1531299732.09.0.56676864532.issue34091@psf.upfronthosting.co.za> New submission from Maximilian N?the : The REPL won't start in interactive mode, it only starts when explicitly given the `-i` option. The problems IPython is having, e.g. missing syntax highlighting and no tab completion should have the same root. See this issue for mingw: https://github.com/Alexpux/MINGW-packages/issues/730 They fixed it by patching python using this patch: https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-python3/1700-cygpty-isatty.patch And this issue at msys2: https://sourceforge.net/p/msys2/tickets/32/ ---------- messages: 321417 nosy: maxnoe priority: normal severity: normal status: open title: REPL does not work in msys2, ConEmu terminals on windows 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 Jul 11 05:24:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 09:24:29 +0000 Subject: [issue34080] Memory leak in the compiler in case of errors In-Reply-To: <1531210842.03.0.56676864532.issue34080@psf.upfronthosting.co.za> Message-ID: <1531301069.41.0.56676864532.issue34080@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +7774 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 05:24:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 09:24:29 +0000 Subject: [issue34084] possible free statically allocated string in compiler when easter egg on In-Reply-To: <1531222621.9.0.56676864532.issue34084@psf.upfronthosting.co.za> Message-ID: <1531301069.5.0.665841612001.issue34084@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +7775 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 05:24:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 09:24:54 +0000 Subject: [issue34084] possible free statically allocated string in compiler when easter egg on In-Reply-To: <1531222621.9.0.56676864532.issue34084@psf.upfronthosting.co.za> Message-ID: <1531301094.62.0.56676864532.issue34084@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue is related to bpo-34080. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 05:25:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 09:25:11 +0000 Subject: [issue34080] Memory leak in the compiler in case of errors In-Reply-To: <1531210842.03.0.56676864532.issue34080@psf.upfronthosting.co.za> Message-ID: <1531301111.37.0.56676864532.issue34080@psf.upfronthosting.co.za> STINNER Victor added the comment: Related issue: bpo-34084. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 05:33:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 09:33:45 +0000 Subject: [issue34084] possible free statically allocated string in compiler when easter egg on In-Reply-To: <1531222621.9.0.56676864532.issue34084@psf.upfronthosting.co.za> Message-ID: <1531301625.0.0.56676864532.issue34084@psf.upfronthosting.co.za> STINNER Victor added the comment: > I expected it should be easy to reproduce a crash, but I failed to find an example. I don't understand how parsetok.c is supposed to handle "from __future__ import barry_as_FLUFL": * Parser/parsetok.c tests (ps->p_flags & CO_FUTURE_BARRY_AS_BDFL) * Python/future.c uses "if (strcmp(feature, FUTURE_BARRY_AS_BDFL) == 0) { ff->ff_features |= CO_FUTURE_BARRY_AS_BDFL; }" * Python/pythonrun.c: PARSER_FLAGS() copies CO_FUTURE_BARRY_AS_BDFL flag as PyPARSE_BARRY_AS_BDFL The only way to use "<>" operator seems to pass explicitly CO_FUTURE_BARRY_AS_BDFL flag to compile() flags, which is not the convenient way to use "from __future__ import barry_as_FLUFL" :-( Code: --- import inspect CO_FUTURE_BARRY_AS_BDFL = 0x40000 flags = CO_FUTURE_BARRY_AS_BDFL code = "print(1 <> 2)" try: compile(code, "filename", "exec", flags=0) except SyntaxError: print("ok") else: raise Exception("SyntaxError expected") compile(code, "filename", "exec", flags=flags) print("ok") --- Maybe we need a test for the easter egg. Or maybe we should remove it? :-p ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 05:43:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 09:43:55 +0000 Subject: [issue34084] possible free statically allocated string in compiler when easter egg on In-Reply-To: <1531222621.9.0.56676864532.issue34084@psf.upfronthosting.co.za> Message-ID: <1531302235.13.0.56676864532.issue34084@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, this easter egg is tested by Lib/test/test_flufl.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 05:45:20 2018 From: report at bugs.python.org (Martin Panter) Date: Wed, 11 Jul 2018 09:45:20 +0000 Subject: [issue34091] REPL does not work in msys2, ConEmu terminals on windows In-Reply-To: <1531299732.09.0.56676864532.issue34091@psf.upfronthosting.co.za> Message-ID: <1531302320.5.0.56676864532.issue34091@psf.upfronthosting.co.za> Martin Panter added the comment: The problem as I understand it is that Msys uses a pipe, but Python by default limits interactive REPL mode to terminals only. The same thing happens if you start Python on a pipe some other way, for instance ?cat | python? vs ?cat | python -i?. I would prefer if Python decided to use interactive mode when no file name is given, rather than by checking if the file is a terminal. But that would break compatibility. Another tip with Msys: enable unbuffered output with ?python -u?. Otherwise output gets buffered, won?t be seen immediately, and may be lost if there is an unclean exit. ---------- components: +Windows nosy: +martin.panter, paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 05:45:46 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 09:45:46 +0000 Subject: [issue34092] test_logging: SMTPHandlerTest.test_basic() fails randomly on x86 Gentoo Refleaks 3.7 Message-ID: <1531302345.99.0.56676864532.issue34092@psf.upfronthosting.co.za> New submission from STINNER Victor : https://buildbot.python.org/all/#builders/114/builds/163 1:26:51 load avg: 4.83 [117/415/1] test_logging failed -- running: test_multiprocessing_forkserver (8 min 18 sec) beginning 6 repetitions 123456 .--- Logging error --- Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/smtplib.py", line 387, in getreply line = self.file.readline(_MAXLINE + 1) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/socket.py", line 589, in readinto return self._sock.recv_into(b) socket.timeout: timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/logging/handlers.py", line 1007, in emit smtp = smtplib.SMTP(self.mailhost, port, timeout=self.timeout) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/smtplib.py", line 251, in __init__ (code, msg) = self.connect(host, port) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/smtplib.py", line 338, in connect (code, msg) = self.getreply() File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/smtplib.py", line 391, in getreply + str(e)) smtplib.SMTPServerDisconnected: Connection unexpectedly closed: timed out Call stack: File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/runpy.py", line 85, in _run_code exec(code, run_globals) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/regrtest.py", line 50, in _main() File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/regrtest.py", line 46, in _main main() File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 584, in main Regrtest().main(tests=tests, **kwargs) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 531, in main self._main(tests, kwargs) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 547, in _main run_tests_slave(self.ns.slaveargs) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest_mp.py", line 68, in run_tests_slave result = runtest(ns, testname) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 140, in runtest result = runtest_inner(ns, test, display_failure=not ns.verbose) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 177, in runtest_inner refleak = dash_R(the_module, test, test_runner, ns.huntrleaks) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/refleak.py", line 69, in dash_R indirect_test() File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py", line 1606, in inner return func(*args, **kwds) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/test_logging.py", line 4641, in test_main support.run_unittest(*tests) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py", line 1972, in run_unittest _run_suite(suite) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py", line 1882, in _run_suite result = runner.run(suite) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py", line 1781, in run test(result) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84, in __call__ return self.run(*args, **kwds) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122, in run test(result) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84, in __call__ return self.run(*args, **kwds) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122, in run test(result) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/unittest/case.py", line 663, in __call__ return self.run(*args, **kwds) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/unittest/case.py", line 615, in run testMethod() File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/test_logging.py", line 988, in test_basic h.handle(r) Message: 'Hello ?' Arguments: () test test_logging failed -- Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/test_logging.py", line 991, in test_basic self.assertTrue(self.handled.is_set()) AssertionError: False is not true (...) test_basic (test.test_logging.SMTPHandlerTest) ... --- Logging error --- Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/smtplib.py", line 387, in getreply line = self.file.readline(_MAXLINE + 1) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/socket.py", line 589, in readinto return self._sock.recv_into(b) socket.timeout: timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/logging/handlers.py", line 1007, in emit smtp = smtplib.SMTP(self.mailhost, port, timeout=self.timeout) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/smtplib.py", line 251, in __init__ (code, msg) = self.connect(host, port) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/smtplib.py", line 338, in connect (code, msg) = self.getreply() File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/smtplib.py", line 391, in getreply + str(e)) smtplib.SMTPServerDisconnected: Connection unexpectedly closed: timed out Call stack: File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/runpy.py", line 85, in _run_code exec(code, run_globals) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/__main__.py", line 2, in main() File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 584, in main Regrtest().main(tests=tests, **kwargs) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 531, in main self._main(tests, kwargs) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 570, in _main self.rerun_failed_tests() File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 286, in rerun_failed_tests ok = runtest(self.ns, test) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 140, in runtest result = runtest_inner(ns, test, display_failure=not ns.verbose) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 177, in runtest_inner refleak = dash_R(the_module, test, test_runner, ns.huntrleaks) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/refleak.py", line 69, in dash_R indirect_test() File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py", line 1606, in inner return func(*args, **kwds) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/test_logging.py", line 4641, in test_main support.run_unittest(*tests) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py", line 1972, in run_unittest _run_suite(suite) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py", line 1882, in _run_suite result = runner.run(suite) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/unittest/runner.py", line 176, in run test(result) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84, in __call__ return self.run(*args, **kwds) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122, in run test(result) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84, in __call__ return self.run(*args, **kwds) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122, in run test(result) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/unittest/case.py", line 663, in __call__ return self.run(*args, **kwds) File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/unittest/case.py", line 615, in run testMethod() File "/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.refleak/build/Lib/test/test_logging.py", line 988, in test_basic h.handle(r) Message: 'Hello ?' Arguments: () FAIL ---------- components: Tests messages: 321423 nosy: vstinner priority: normal severity: normal status: open title: test_logging: SMTPHandlerTest.test_basic() fails randomly on x86 Gentoo Refleaks 3.7 versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 05:47:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 09:47:33 +0000 Subject: [issue34092] test_logging: SMTPHandlerTest.test_basic() fails randomly on x86 Gentoo Refleaks 3.7 In-Reply-To: <1531302345.99.0.56676864532.issue34092@psf.upfronthosting.co.za> Message-ID: <1531302453.94.0.56676864532.issue34092@psf.upfronthosting.co.za> STINNER Victor added the comment: bpo-14314 added a timeout of 5 seconds in the test: - self.handled.wait()p + self.handled.wait(5.0) # 14314: don't wait forever commit 17160fd6d6d7850294a9a465a3e5e399e5028bb6 Author: Vinay Sajip Date: Thu Mar 15 12:02:08 2012 +0000 Fixes #14314: Improved SMTP timeout handling. The timeout has been increased to 8 seconds by: commit 827f5d35e592c21e4bb82afb702c6496cf77c2ad Author: Vinay Sajip Date: Tue Dec 3 11:28:55 2013 +0000 Issue #19665: Increased timeout for SMTPHandler test. I suggest to just increase the timeout to 60 seconds. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 05:48:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 09:48:56 +0000 Subject: [issue34084] possible free statically allocated string in compiler when easter egg on In-Reply-To: <1531222621.9.0.56676864532.issue34084@psf.upfronthosting.co.za> Message-ID: <1531302536.38.0.56676864532.issue34084@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could you add a test in test_flufl.py that will fail with not patched code? This issue and issue34080 look unrelated to me. They can be fixed independently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 05:51:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 09:51:18 +0000 Subject: [issue34092] test_logging: SMTPHandlerTest.test_basic() fails randomly on x86 Gentoo Refleaks 3.7 In-Reply-To: <1531302345.99.0.56676864532.issue34092@psf.upfronthosting.co.za> Message-ID: <1531302678.34.0.56676864532.issue34092@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +7776 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 05:52:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 09:52:36 +0000 Subject: [issue34092] test_logging: SMTPHandlerTest.test_basic() fails randomly on x86 Gentoo Refleaks 3.7 In-Reply-To: <1531302345.99.0.56676864532.issue34092@psf.upfronthosting.co.za> Message-ID: <1531302756.29.0.56676864532.issue34092@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 2.7 is not affected: it has no test for the SMTPHandler. ---------- versions: +Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 05:53:09 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 11 Jul 2018 09:53:09 +0000 Subject: [issue34083] Functional Programming HOWTO: Dictionary ordering isn't "essentially random" In-Reply-To: <1531217825.24.0.56676864532.issue34083@psf.upfronthosting.co.za> Message-ID: <1531302789.89.0.56676864532.issue34083@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 5e5bbbec467a1569c914a048a94e7597528f92cf by INADA Naoki (Stig Johan Berggren) in branch 'master': bpo-34083: Update dict order in Functional HOWTO (GH-8230) https://github.com/python/cpython/commit/5e5bbbec467a1569c914a048a94e7597528f92cf ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 05:54:19 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Jul 2018 09:54:19 +0000 Subject: [issue34083] Functional Programming HOWTO: Dictionary ordering isn't "essentially random" In-Reply-To: <1531217825.24.0.56676864532.issue34083@psf.upfronthosting.co.za> Message-ID: <1531302859.39.0.56676864532.issue34083@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7777 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 05:59:37 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 11 Jul 2018 09:59:37 +0000 Subject: [issue34083] Functional Programming HOWTO: Dictionary ordering isn't "essentially random" In-Reply-To: <1531217825.24.0.56676864532.issue34083@psf.upfronthosting.co.za> Message-ID: <1531303177.16.0.56676864532.issue34083@psf.upfronthosting.co.za> INADA Naoki added the comment: Thanks, Stig. And I'm sorry about I missed Raymond assigned himself. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 06:13:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 10:13:52 +0000 Subject: [issue34084] possible free statically allocated string in compiler when easter egg on In-Reply-To: <1531222621.9.0.56676864532.issue34084@psf.upfronthosting.co.za> Message-ID: <1531304032.53.0.56676864532.issue34084@psf.upfronthosting.co.za> STINNER Victor added the comment: > Could you add a test in test_flufl.py that will fail with not patched code? It seems like PyObject_FREE() is never called with the static string "with Barry as BDFL, use '<>' instead of '!='". When parsetok() goes to code path (1): err_ret->text = "with Barry as BDFL, use '<>' " "instead of '!='"; Later, it goes to code path (2) as well: if (tok->buf != NULL) { ... err_ret->text = (char *) PyObject_MALLOC(len + 1); Hum, I modified my PR to removed *dead code*: err_ret->text = "with Barry as BDFL, use '<>' " "instead of '!='"; > This issue and issue34080 look unrelated to me. They can be fixed independently. In practice, both issues are related and it seems easier to me to fix them both at the same time ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 06:15:38 2018 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 11 Jul 2018 10:15:38 +0000 Subject: [issue19453] pydoc.py doesn't detect IronPython, help(foo) can hang In-Reply-To: <1383153313.2.0.219850254586.issue19453@psf.upfronthosting.co.za> Message-ID: <1531304138.16.0.56676864532.issue19453@psf.upfronthosting.co.za> Change by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 06:16:06 2018 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 11 Jul 2018 10:16:06 +0000 Subject: [issue17518] urllib2 cannnot handle https and BasicAuth via Proxy. In-Reply-To: <1363951100.05.0.959443247001.issue17518@psf.upfronthosting.co.za> Message-ID: <1531304166.79.0.56676864532.issue17518@psf.upfronthosting.co.za> Change by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 06:17:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 10:17:58 +0000 Subject: [issue33597] Compact PyGC_Head In-Reply-To: <1531298580.17.0.56676864532.issue33597@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > bpo-33597: Add What's New for PyGC_Head (GH-8236) Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 06:18:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 10:18:53 +0000 Subject: [issue29442] Replace optparse with argparse in setup.py In-Reply-To: <1486193188.24.0.532905655294.issue29442@psf.upfronthosting.co.za> Message-ID: <1531304333.41.0.56676864532.issue29442@psf.upfronthosting.co.za> STINNER Victor added the comment: > bpo-29442: Replace optparse with argparse in setup.py (GH-139) I'm surprised that it works, but I tested manually and I confirm that it works :-) $ git clean -fdx $ ./configure --with-pydebug $ make $ ./python -c "import select" No compilation error ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 06:19:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 10:19:04 +0000 Subject: [issue23837] asyncio: read pipe transport tries to resume reading after loop is gone In-Reply-To: <1427882762.68.0.794378524046.issue23837@psf.upfronthosting.co.za> Message-ID: <1531304344.6.0.56676864532.issue23837@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: read pipe transport tries to resume reading after loop is gone -> asyncio: read pipe transport tries to resume reading after loop is gone _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 06:33:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 10:33:20 +0000 Subject: [issue34033] distutils is not reproducible In-Reply-To: <1530632785.81.0.56676864532.issue34033@psf.upfronthosting.co.za> Message-ID: <1531305200.89.0.56676864532.issue34033@psf.upfronthosting.co.za> STINNER Victor added the comment: > Is this issue for only known marshal issue? IMHO the order in which .pyc files are created on disk also matters. It changes the result of "os.listdir()": some application can rely on unsorted os.listdir(). sorted() seems simple and hardless compared to the benefit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 06:35:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 10:35:41 +0000 Subject: [issue34092] test_logging: SMTPHandlerTest.test_basic() fails randomly on x86 Gentoo Refleaks 3.7 In-Reply-To: <1531302345.99.0.56676864532.issue34092@psf.upfronthosting.co.za> Message-ID: <1531305341.25.0.56676864532.issue34092@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 31b50b8cbfbf49d5fc17c612cf0dfaa4d0c24983 by Victor Stinner in branch 'master': bpo-34092, test_logging: increase SMTPHandlerTest timeout (GH-8245) https://github.com/python/cpython/commit/31b50b8cbfbf49d5fc17c612cf0dfaa4d0c24983 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 06:36:33 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 11 Jul 2018 10:36:33 +0000 Subject: [issue34093] Reproducible pyc: FLAG_REF is not stable. Message-ID: <1531305393.76.0.56676864532.issue34093@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- components: Extension Modules nosy: inada.naoki priority: normal severity: normal status: open title: Reproducible pyc: FLAG_REF is not stable. versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 06:36:49 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Jul 2018 10:36:49 +0000 Subject: [issue34092] test_logging: SMTPHandlerTest.test_basic() fails randomly on x86 Gentoo Refleaks 3.7 In-Reply-To: <1531302345.99.0.56676864532.issue34092@psf.upfronthosting.co.za> Message-ID: <1531305409.95.0.56676864532.issue34092@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7778 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 06:36:59 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 11 Jul 2018 10:36:59 +0000 Subject: [issue34091] REPL does not work in msys2, ConEmu terminals on windows In-Reply-To: <1531299732.09.0.56676864532.issue34091@psf.upfronthosting.co.za> Message-ID: <1531305419.64.0.56676864532.issue34091@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 06:37:20 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 11 Jul 2018 10:37:20 +0000 Subject: [issue34033] distutils is not reproducible In-Reply-To: <1530632785.81.0.56676864532.issue34033@psf.upfronthosting.co.za> Message-ID: <1531305440.45.0.56676864532.issue34033@psf.upfronthosting.co.za> INADA Naoki added the comment: OK, I created sub issue for pyc. ---------- dependencies: +Reproducible pyc: FLAG_REF is not stable., remove *_INTERNED opcodes from marshal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 06:37:59 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 11 Jul 2018 10:37:59 +0000 Subject: [issue34093] Reproducible pyc: FLAG_REF is not stable. Message-ID: <1531305479.0.0.56676864532.issue34093@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- keywords: +patch pull_requests: +7779 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 06:40:08 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 11 Jul 2018 10:40:08 +0000 Subject: [issue34093] Reproducible pyc: FLAG_REF is not stable. Message-ID: <1531305608.98.0.56676864532.issue34093@psf.upfronthosting.co.za> New submission from INADA Naoki : PR-8226 makes marshal two-pass. It may have small overhead. In case of compiling module, marshal performance is negligible. But how in other cases? Should this change optional? And should we backport this to Python 3.7? Or should distributors cherrypick this? ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 06:42:09 2018 From: report at bugs.python.org (Bruce Richardson) Date: Wed, 11 Jul 2018 10:42:09 +0000 Subject: [issue34094] Porting Python 2 to Python 3 example contradicts its own advice Message-ID: <1531305729.89.0.56676864532.issue34094@psf.upfronthosting.co.za> New submission from Bruce Richardson : https://docs.python.org/3/howto/pyporting.html#use-feature-detection-instead-of-version-detection In this section, the (very good) advice is "It would be better to treat Python 2 as the exceptional case instead of Python 3 and assume that future Python versions will be more compatible with Python 3 than Python 2" However, it then goes on to present the best solution (for dealing with library imports) is this: try: from importlib import abc except ImportError: from importlib2 import abc This is literally treating Python 3 as the exception, completely contradicting the advice given a few lines earlier. Practically, it also has the effect that, as Python 3 adoption spreads, import errors and automatic retries will become *more* common and then universal, adding a small amount of delay and noise to the entire Python estate. And that's not considering the case where both libraries are installed to cope with old code relying on the old library (in which case you surely want new code to default to using the new library) If the example is simply changed to try: from importlib2 import abc except ImportError: from importlib import abc then both the contradiction and the practical problems go away ---------- assignee: docs at python components: Documentation messages: 321436 nosy: Bruce Richardson, brett.cannon, docs at python priority: normal severity: normal status: open title: Porting Python 2 to Python 3 example contradicts its own advice _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 06:43:40 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 11 Jul 2018 10:43:40 +0000 Subject: [issue34081] Sphinx duplicate label warning in docs In-Reply-To: <1531211521.37.0.56676864532.issue34081@psf.upfronthosting.co.za> Message-ID: <1531305820.25.0.56676864532.issue34081@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +7780 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 06:44:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 10:44:26 +0000 Subject: [issue34092] test_logging: SMTPHandlerTest.test_basic() fails randomly on x86 Gentoo Refleaks 3.7 In-Reply-To: <1531302345.99.0.56676864532.issue34092@psf.upfronthosting.co.za> Message-ID: <1531305866.49.0.56676864532.issue34092@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +7781 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 06:48:06 2018 From: report at bugs.python.org (=?utf-8?q?Maximilian_N=C3=B6the?=) Date: Wed, 11 Jul 2018 10:48:06 +0000 Subject: [issue34091] REPL does not work in msys2, ConEmu terminals on windows In-Reply-To: <1531299732.09.0.56676864532.issue34091@psf.upfronthosting.co.za> Message-ID: <1531306086.18.0.56676864532.issue34091@psf.upfronthosting.co.za> Maximilian N?the added the comment: Tab completion does not work in the REPL even when started with `-i -u`, so there might be a deeper problem than just the PIPE that's preventing python from starting in interactive mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 06:50:07 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 10:50:07 +0000 Subject: [issue25828] PyCode_Optimize() (peephole optimizer) doesn't handle KeyboardInterrupt correctly In-Reply-To: <1449648204.19.0.769728792688.issue25828@psf.upfronthosting.co.za> Message-ID: <1531306207.59.0.56676864532.issue25828@psf.upfronthosting.co.za> STINNER Victor added the comment: Yeah, let's close this issue. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 07:01:29 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 11 Jul 2018 11:01:29 +0000 Subject: [issue33648] unused with_c_locale_warning option in configure should be removed In-Reply-To: <1527257511.03.0.682650639539.issue33648@psf.upfronthosting.co.za> Message-ID: <1531306889.74.0.56676864532.issue33648@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset b91a3a0d61596cafb1b46c98fab65fee16a8bbbb by INADA Naoki (Eitan Adler) in branch 'master': bpo-33648: Remove PY_WARN_ON_C_LOCALE (GH-7114) https://github.com/python/cpython/commit/b91a3a0d61596cafb1b46c98fab65fee16a8bbbb ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 07:04:11 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 11 Jul 2018 11:04:11 +0000 Subject: [issue33648] unused with_c_locale_warning option in configure should be removed In-Reply-To: <1527257511.03.0.682650639539.issue33648@psf.upfronthosting.co.za> Message-ID: <1531307051.67.0.56676864532.issue33648@psf.upfronthosting.co.za> INADA Naoki added the comment: thanks ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 07:12:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 11:12:25 +0000 Subject: [issue33648] unused with_c_locale_warning option in configure should be removed In-Reply-To: <1527257511.03.0.682650639539.issue33648@psf.upfronthosting.co.za> Message-ID: <1531307545.54.0.56676864532.issue33648@psf.upfronthosting.co.za> STINNER Victor added the comment: Should we backport the change to 3.7? ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 07:13:29 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 11 Jul 2018 11:13:29 +0000 Subject: [issue33648] unused with_c_locale_warning option in configure should be removed In-Reply-To: <1527257511.03.0.682650639539.issue33648@psf.upfronthosting.co.za> Message-ID: <1531307609.13.0.56676864532.issue33648@psf.upfronthosting.co.za> INADA Naoki added the comment: Hm, it seems safe to backport. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 07:13:33 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 11 Jul 2018 11:13:33 +0000 Subject: [issue33648] unused with_c_locale_warning option in configure should be removed In-Reply-To: <1527257511.03.0.682650639539.issue33648@psf.upfronthosting.co.za> Message-ID: <1531307613.98.0.56676864532.issue33648@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 07:14:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 11:14:39 +0000 Subject: [issue34092] test_logging: SMTPHandlerTest.test_basic() fails randomly on x86 Gentoo Refleaks 3.7 In-Reply-To: <1531302345.99.0.56676864532.issue34092@psf.upfronthosting.co.za> Message-ID: <1531307679.5.0.56676864532.issue34092@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d68cb9d62c3671dd9aee5cdecb02fcb3268dacf0 by Victor Stinner in branch '3.6': bpo-34092, test_logging: increase SMTPHandlerTest timeout (GH-8245) (GH-8249) https://github.com/python/cpython/commit/d68cb9d62c3671dd9aee5cdecb02fcb3268dacf0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 07:14:58 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Jul 2018 11:14:58 +0000 Subject: [issue33648] unused with_c_locale_warning option in configure should be removed In-Reply-To: <1527257511.03.0.682650639539.issue33648@psf.upfronthosting.co.za> Message-ID: <1531307698.92.0.56676864532.issue33648@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7782 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 07:15:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 11:15:11 +0000 Subject: [issue34092] test_logging: SMTPHandlerTest.test_basic() fails randomly on x86 Gentoo Refleaks 3.7 In-Reply-To: <1531302345.99.0.56676864532.issue34092@psf.upfronthosting.co.za> Message-ID: <1531307711.89.0.56676864532.issue34092@psf.upfronthosting.co.za> STINNER Victor added the comment: I hope that the issue was just that the buildbot was slow, and that the failure didn't hide a real bug. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 07:21:54 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Jul 2018 11:21:54 +0000 Subject: [issue34083] Functional Programming HOWTO: Dictionary ordering isn't "essentially random" In-Reply-To: <1531217825.24.0.56676864532.issue34083@psf.upfronthosting.co.za> Message-ID: <1531308114.62.0.56676864532.issue34083@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 151820e7a0ebe50b3d4fa64e22623c5470f1c56f by Miss Islington (bot) in branch '3.7': bpo-34083: Update dict order in Functional HOWTO (GH-8230) https://github.com/python/cpython/commit/151820e7a0ebe50b3d4fa64e22623c5470f1c56f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 07:27:00 2018 From: report at bugs.python.org (amirjn) Date: Wed, 11 Jul 2018 11:27:00 +0000 Subject: [issue27923] PEP 467 -- Minor API improvements for binary sequences In-Reply-To: <1472691379.75.0.669592694643.issue27923@psf.upfronthosting.co.za> Message-ID: <1531308420.62.0.56676864532.issue27923@psf.upfronthosting.co.za> amirjn added the comment: Thank you Inda Naoki. It just worked for me in https://www.blogs.va.gov/ and https://aralens.ir ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 09:04:14 2018 From: report at bugs.python.org (Erich Eckner) Date: Wed, 11 Jul 2018 13:04:14 +0000 Subject: [issue34095] segfault in testsuite Message-ID: <1531314252.99.0.56676864532.issue34095@psf.upfronthosting.co.za> New submission from Erich Eckner : building python 2.7.15 on archlinux32 from source succeeds, but running the testsuite segfaults with: test_writelines (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... /usr/bin/xvfb-run: line 181: 3617 Segmentation fault (core dumped) DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1 the executed commands are: cd Python-${pkgver} # Temporary workaround for FS#22322 # See http://bugs.python.org/issue10835 for upstream report sed -i "/progname =/s/python/python${_pybasever}/" Python/pythonrun.c # Enable built-in SQLite module to load extensions (fix FS#22122) sed -i "/SQLITE_OMIT_LOAD_EXTENSION/d" setup.py # FS#23997 sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python2|" Lib/cgi.py sed -i "s/python2.3/python2/g" Lib/distutils/tests/test_build_scripts.py \ Lib/distutils/tests/test_install_scripts.py # Ensure that we are using the system copy of various libraries (expat, zlib and libffi), # rather than copies shipped in the tarball rm -r Modules/expat rm -r Modules/zlib rm -r Modules/_ctypes/{darwin,libffi}* # clean up #!s find . -name '*.py' | \ xargs sed -i "s|#[ ]*![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" # Workaround asdl_c.py/makeopcodetargets.py errors after we touched the shebangs touch Include/Python-ast.h Python/Python-ast.c Python/opcode_targets.h # FS#48761 # http://bugs.python.org/issue25750 patch -Np1 -i ../descr_ref.patch export OPT="${CFLAGS}" ./configure --prefix=/usr \ --enable-shared \ --with-threads \ --enable-optimizations \ --with-lto \ --enable-ipv6 \ --enable-unicode=ucs4 \ --with-system-expat \ --with-system-ffi \ --with-dbmliborder=gdbm:ndbm \ --without-ensurepip make LD_LIBRARY_PATH="${srcdir}/Python-${pkgver}":${LD_LIBRARY_PATH} \ xvfb-run "${srcdir}/Python-${pkgver}/python" -m test.regrtest -v -uall 2>&1 | tee log.all ---------- components: Build files: log.all messages: 321447 nosy: deep42thought priority: normal severity: normal status: open title: segfault in testsuite versions: Python 2.7 Added file: https://bugs.python.org/file47682/log.all _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 09:07:26 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 11 Jul 2018 13:07:26 +0000 Subject: [issue34093] Reproducible pyc: FLAG_REF is not stable. In-Reply-To: <1531305608.98.0.56676864532.issue34093@psf.upfronthosting.co.za> Message-ID: <1531314446.26.0.56676864532.issue34093@psf.upfronthosting.co.za> INADA Naoki added the comment: marshal: Mean +- std dev: [master] 123 us +- 7 us -> [patched] 173 us +- 2 us: 1.41x slower (+41%) compile+marshal: Mean +- std dev: [master] 5.28 ms +- 0.02 ms -> [patched] 5.47 ms +- 0.34 ms: 1.04x slower (+4%) ---------- Added file: https://bugs.python.org/file47683/bm_marshal.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 09:11:12 2018 From: report at bugs.python.org (Erich Eckner) Date: Wed, 11 Jul 2018 13:11:12 +0000 Subject: [issue34096] testsuite fails assertion Message-ID: <1531314657.47.0.56676864532.issue34096@psf.upfronthosting.co.za> New submission from Erich Eckner : building python 2.7.15 on archlinux32 (the i686 branch of archlinux) from source succeeds, but running the testsuite (with some segfaulting tests disabled - see issue34095) results in an assertion error: test_wrongsize (test.test_audioop.TestAudioop) ... test test_audioop failed -- Traceback (most recent call last): File "/home/vagrant/python2/src/Python-2.7.15/Lib/test/test_audioop.py", line 48, in test_max self.assertEqual(audioop.max(p(minvalues[w]), w), -minvalues[w]) AssertionError: -2147483648 != 2147483648L ok ====================================================================== FAIL: test_max (test.test_audioop.TestAudioop) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/vagrant/python2/src/Python-2.7.15/Lib/test/test_audioop.py", line 48, in test_max self.assertEqual(audioop.max(p(minvalues[w]), w), -minvalues[w]) AssertionError: -2147483648 != 2147483648L The commands leading to this are: cd Python-${pkgver} # Temporary workaround for FS#22322 # See http://bugs.python.org/issue10835 for upstream report sed -i "/progname =/s/python/python${_pybasever}/" Python/pythonrun.c # Enable built-in SQLite module to load extensions (fix FS#22122) sed -i "/SQLITE_OMIT_LOAD_EXTENSION/d" setup.py # FS#23997 sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python2|" Lib/cgi.py sed -i "s/python2.3/python2/g" Lib/distutils/tests/test_build_scripts.py \ Lib/distutils/tests/test_install_scripts.py # Ensure that we are using the system copy of various libraries (expat, zlib and libffi), # rather than copies shipped in the tarball rm -r Modules/expat rm -r Modules/zlib rm -r Modules/_ctypes/{darwin,libffi}* # clean up #!s find . -name '*.py' | \ xargs sed -i "s|#[ ]*![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" # Workaround asdl_c.py/makeopcodetargets.py errors after we touched the shebangs touch Include/Python-ast.h Python/Python-ast.c Python/opcode_targets.h # FS#48761 # http://bugs.python.org/issue25750 patch -Np1 -i ../descr_ref.patch export OPT="${CFLAGS}" ./configure --prefix=/usr \ --enable-shared \ --with-threads \ --enable-optimizations \ --with-lto \ --enable-ipv6 \ --enable-unicode=ucs4 \ --with-system-expat \ --with-system-ffi \ --with-dbmliborder=gdbm:ndbm \ --without-ensurepip make LD_LIBRARY_PATH="${srcdir}/Python-${pkgver}":${LD_LIBRARY_PATH} \ xvfb-run "${srcdir}/Python-${pkgver}/python" -m test.regrtest -v -uall -x test_idle test_bytes test_str test_string test_unicode test_userstring test_tuple test_tk test_ttk_guionly test_ctypes 2>&1 | tee log.reduced ---------- components: Build files: log.reduced messages: 321449 nosy: deep42thought priority: normal severity: normal status: open title: testsuite fails assertion versions: Python 2.7 Added file: https://bugs.python.org/file47684/log.reduced _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 09:27:13 2018 From: report at bugs.python.org (=?utf-8?q?Rodrigo_Pinheiro_Marques_de_Ara=C3=BAjo?=) Date: Wed, 11 Jul 2018 13:27:13 +0000 Subject: [issue34087] Segmentation fault on visit_decref In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531315633.19.0.56676864532.issue34087@psf.upfronthosting.co.za> Rodrigo Pinheiro Marques de Ara?jo added the comment: Running with `-X faulthandler` Fatal Python error: Segmentation fault Current thread 0x00007fff89cf2380 (most recent call first): File "/Users/rodrigo/root/lib/python3.7/site-packages/django/urls/resolvers.py", line 526 in resolve File "/Users/rodrigo/root/lib/python3.7/site-packages/django/urls/resolvers.py", line 500 in resolve File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/base.py", line 113 in _get_response File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner File "/Users/rodrigo/root/lib/python3.7/site-packages/reversion/views.py", line 43 in do_revision_view File "/Users/rodrigo/root/lib/python3.7/site-packages/reversion/middleware.py", line 51 in __call__ File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__ File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__ File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__ File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__ File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__ File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__ File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__ File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__ File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__ File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__ File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__ File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__ File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/base.py", line 81 in get_response File "/Users/rodrigo/root/lib/python3.7/site-packages/django/test/client.py", line 138 in __call__ File "/Users/rodrigo/root/lib/python3.7/site-packages/django/test/client.py", line 467 in request File "/Users/rodrigo/root/lib/python3.7/site-packages/django/test/client.py", line 404 in generic File "/Users/rodrigo/root/lib/python3.7/site-packages/django/test/client.py", line 332 in get File "/Users/rodrigo/root/lib/python3.7/site-packages/django/test/client.py", line 517 in get File "/Users/rodrigo/root/lib/python3.7/unittest/case.py", line 615 in run File "/Users/rodrigo/root/lib/python3.7/unittest/case.py", line 663 in __call__ File "/Users/rodrigo/root/lib/python3.7/site-packages/django/test/testcases.py", line 206 in __call__ File "/Users/rodrigo/root/lib/python3.7/unittest/suite.py", line 122 in run File "/Users/rodrigo/root/lib/python3.7/unittest/suite.py", line 84 in __call__ File "/Users/rodrigo/root/lib/python3.7/unittest/runner.py", line 176 in run File "/Users/rodrigo/root/lib/python3.7/site-packages/django/test/runner.py", line 569 in run_suite File "/Users/rodrigo/root/lib/python3.7/site-packages/django/test/runner.py", line 603 in run_tests File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/management/commands/test.py", line 59 in handle File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/management/base.py", line 335 in execute File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/management/base.py", line 288 in run_from_argv File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/management/commands/test.py", line 26 in run_from_argv File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/management/__init__.py", line 365 in execute File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/management/__init__.py", line 371 in execute_from_command_line File "manage.py", line 10 in Segmentation fault: 11 The Django code: def resolve(self, path): path = str(path) # path may be a reverse_lazy object tried = [] match = self.pattern.match(path) if match: new_path, args, kwargs = match for pattern in self.url_patterns: try: sub_match = pattern.resolve(new_path) except Resolver404 as e: sub_tried = e.args[0].get('tried') if sub_tried is not None: tried.extend([pattern] + t for t in sub_tried) else: tried.append([pattern]) else: if sub_match: # Merge captured arguments in match with submatch sub_match_dict = dict(kwargs, **self.default_kwargs) # Update the sub_match_dict with the kwargs from the sub_match. sub_match_dict.update(sub_match.kwargs) # If there are *any* named groups, ignore all non-named groups. # Otherwise, pass all non-named arguments as positional arguments. sub_match_args = sub_match.args if not sub_match_dict: sub_match_args = args + sub_match.args return ResolverMatch( sub_match.func, sub_match_args, sub_match_dict, sub_match.url_name, [self.app_name] + sub_match.app_names, [self.namespace] + sub_match.namespaces, ) tried.append([pattern]) # Segfault happens here! raise Resolver404({'tried': tried, 'path': new_path}) raise Resolver404({'path': path}) According to faulthandler the segmentation fault happens on tried.append([pattern]). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 09:56:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 13:56:49 +0000 Subject: [issue34092] test_logging: SMTPHandlerTest.test_basic() fails randomly on x86 Gentoo Refleaks 3.7 In-Reply-To: <1531302345.99.0.56676864532.issue34092@psf.upfronthosting.co.za> Message-ID: <1531317409.26.0.56676864532.issue34092@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 0a1db32949b4813e9ac04e672fcb5bc97072a428 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-34092, test_logging: increase SMTPHandlerTest timeout (GH-8245) (GH-8247) https://github.com/python/cpython/commit/0a1db32949b4813e9ac04e672fcb5bc97072a428 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:03:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 14:03:42 +0000 Subject: [issue34087] Segmentation fault on visit_decref In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531317822.18.0.56676864532.issue34087@psf.upfronthosting.co.za> STINNER Victor added the comment: Please try to set PYTHONMALLOC=debug environment variable and run again your test. I hope that Python will be able to catch a memory corruption somewhere. If it's the case, you can try: PYTHONMALLOC=debug python3 -X tracemalloc=10 (...) To see where the corrupted object has been allocated. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:04:32 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 14:04:32 +0000 Subject: [issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L In-Reply-To: <1531314657.47.0.56676864532.issue34096@psf.upfronthosting.co.za> Message-ID: <1531317872.21.0.56676864532.issue34096@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: testsuite fails assertion -> [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:06:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 14:06:04 +0000 Subject: [issue34095] [2.7] test_idle fails with: /usr/bin/xvfb-run: line 181: 3617 Segmentation fault In-Reply-To: <1531314252.99.0.56676864532.issue34095@psf.upfronthosting.co.za> Message-ID: <1531317964.34.0.56676864532.issue34095@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: segfault in testsuite -> [2.7] test_idle fails with: /usr/bin/xvfb-run: line 181: 3617 Segmentation fault _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:12:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 14:12:26 +0000 Subject: [issue34095] [2.7] test_idle fails with: /usr/bin/xvfb-run: line 181: 3617 Segmentation fault In-Reply-To: <1531314252.99.0.56676864532.issue34095@psf.upfronthosting.co.za> Message-ID: <1531318346.04.0.56676864532.issue34095@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't see how test_idle runs the /usr/bin/xvfb-run command. First, it would be interesting to see what is the argument of the xvfb-run command and check if it does crash alone. Can you please try to trace system calls using the following command and then attached the created trace file to this issue? strace -f -o trace ./python -m test test_idle > test_writelines (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... /usr/bin/xvfb-run: line 181: 3617 Segmentation fault (core dumped) DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1 What are values of DISPLAY, SERVERNUM and AUTHFILE environment variables? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:15:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 14:15:55 +0000 Subject: [issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L In-Reply-To: <1531314657.47.0.56676864532.issue34096@psf.upfronthosting.co.za> Message-ID: <1531318555.61.0.56676864532.issue34096@psf.upfronthosting.co.za> STINNER Victor added the comment: It seems like you are using [GCC 8.1.1 20180531]. Can you please run the following command and attach the created "pythoninfo" file to his issue? ./python -m test.pythoninfo > pythoninfo I'm looking for your CFLAGS. I guess that the issue is specific to 32-bit, but we have many "x86" buildbots building Python on various compilers and running the test suite, and all these buildbots are green (success). ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:17:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 14:17:01 +0000 Subject: [issue34087] django: segmentation fault on garbage collection in visit_decref() In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531318621.02.0.56676864532.issue34087@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: Segmentation fault on visit_decref -> django: segmentation fault on garbage collection in visit_decref() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:19:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 14:19:01 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1531318741.28.0.56676864532.issue33729@psf.upfronthosting.co.za> STINNER Victor added the comment: > None of the hashlib functions are taking keyword arguments for data: ... So it's just a documentation issue, no? https://docs.python.org/dev/library/hashlib.html#creating-hash-objects Juuso Lehtivarjo: do you want to write a pull request to fix the documentation? ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:19:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 14:19:39 +0000 Subject: [issue34071] asyncio: repr(task) raises AssertionError for coros which loop.create_task accepts; complications ensue In-Reply-To: <1531092771.84.0.56676864532.issue34071@psf.upfronthosting.co.za> Message-ID: <1531318779.53.0.56676864532.issue34071@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: repr(task) raises AssertionError for coros which loop.create_task accepts; complications ensue -> asyncio: repr(task) raises AssertionError for coros which loop.create_task accepts; complications ensue _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:20:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 14:20:23 +0000 Subject: [issue33980] distutils upload: SSL Error when uploading package to your own pypi In-Reply-To: <1530102486.37.0.56676864532.issue33980@psf.upfronthosting.co.za> Message-ID: <1531318823.4.0.56676864532.issue33980@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: SSL Error when uploading package to your own pypi -> distutils upload: SSL Error when uploading package to your own pypi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:23:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 14:23:10 +0000 Subject: [issue29699] shutil.rmtree should not fail with FileNotFoundError (race condition) In-Reply-To: <1488481944.03.0.0307704051627.issue29699@psf.upfronthosting.co.za> Message-ID: <1531318990.41.0.56676864532.issue29699@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:24:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 14:24:34 +0000 Subject: [issue32729] socket.readinto() doesn't catch TimeoutError In-Reply-To: <1517380649.99.0.467229070634.issue32729@psf.upfronthosting.co.za> Message-ID: <1531319074.82.0.56676864532.issue32729@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: socket error handling needed -> socket.readinto() doesn't catch TimeoutError versions: -Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:25:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 14:25:59 +0000 Subject: [issue32729] socket.readinto() doesn't catch TimeoutError In-Reply-To: <1517380649.99.0.467229070634.issue32729@psf.upfronthosting.co.za> Message-ID: <1531319159.12.0.56676864532.issue32729@psf.upfronthosting.co.za> STINNER Victor added the comment: According to the reporter, it's not a bug in Python. ---------- nosy: +vstinner resolution: fixed -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:28:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 14:28:47 +0000 Subject: [issue26543] [EASY] imaplib noop Debug: bytes vs Unicode bug in debug mode In-Reply-To: <1457738623.54.0.0867122071018.issue26543@psf.upfronthosting.co.za> Message-ID: <1531319327.3.0.56676864532.issue26543@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +easy title: imaplib noop Debug -> [EASY] imaplib noop Debug: bytes vs Unicode bug in debug mode _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:32:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 14:32:01 +0000 Subject: [issue34088] [EASY] sndhdr.what() throws exceptions on unknown files In-Reply-To: <1531255806.14.0.56676864532.issue34088@psf.upfronthosting.co.za> Message-ID: <1531319521.66.0.56676864532.issue34088@psf.upfronthosting.co.za> STINNER Victor added the comment: I agree that sndhdr.what() should return None and not raise an exception if the file format is not supported or the file is invalid. ---------- keywords: +easy nosy: +vstinner title: sndhdr.what() throws exceptions on unknown files -> [EASY] sndhdr.what() throws exceptions on unknown files _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:32:24 2018 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 11 Jul 2018 14:32:24 +0000 Subject: [issue34086] logging.Handler.handleError regressed in python3 In-Reply-To: <1531245533.0.0.56676864532.issue34086@psf.upfronthosting.co.za> Message-ID: <1531319544.86.0.56676864532.issue34086@psf.upfronthosting.co.za> Change by Vinay Sajip : ---------- versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:32:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 14:32:37 +0000 Subject: [issue29699] shutil.rmtree should not fail with FileNotFoundError (race condition) In-Reply-To: <1488481944.03.0.0307704051627.issue29699@psf.upfronthosting.co.za> Message-ID: <1531319557.53.0.56676864532.issue29699@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Shouldn't this be considered as a new feature? There are no guaranties that shutil.rmtree() should work if files or directories are concurrently removed, or created, or made read-only in other threads or processes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:33:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 14:33:26 +0000 Subject: [issue34075] asyncio: We should prohibit setting a ProcessPoolExecutor in with set_default_executor In-Reply-To: <1531150174.99.0.56676864532.issue34075@psf.upfronthosting.co.za> Message-ID: <1531319606.03.0.56676864532.issue34075@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: We should prohibit setting a ProcessPoolExecutor in with set_default_executor -> asyncio: We should prohibit setting a ProcessPoolExecutor in with set_default_executor _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:34:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 14:34:44 +0000 Subject: [issue34075] asyncio: We should prohibit setting a ProcessPoolExecutor in with set_default_executor In-Reply-To: <1531150174.99.0.56676864532.issue34075@psf.upfronthosting.co.za> Message-ID: <1531319684.46.0.56676864532.issue34075@psf.upfronthosting.co.za> STINNER Victor added the comment: > I think we'll only allow instances of c.f.ThreadPoolExecutor (and its subclasses) to be passed to set_default_executor. That's a more robust check than just guarding against ProcessPoolExecutor. I suggest to only reject ProcessPoolExecutor, instead of having a very specific test on ThreadPoolExecutor which might fail with funky but valid thread executor. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:35:58 2018 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 11 Jul 2018 14:35:58 +0000 Subject: [issue34097] ZIP does not support timestamps before 1980 Message-ID: <1531319758.26.0.56676864532.issue34097@psf.upfronthosting.co.za> New submission from Petr Viktorin : The ZIP format cannot handle times before 1980. Issue6090 provided a nice error message for trying to add such files. I'm seeing a system for reproducible builds that sets mtime to 1970 (zero UNIX timestamp), resulting in files that Python can't package into (zip-based) wheels. At least here on Fedora, the `zip` command-line utility silently bumps old timestamps to 1980-01-01. Of course, silently corrupting data would not be good default behavior for Python. But in many cases timestamps don't matter. It would be nice to give ZipFile and ZipFile.write() a `strict_timestamps=True` keyword argument that could be turned off. ---------- components: Library (Lib) messages: 321460 nosy: petr.viktorin priority: normal severity: normal status: open title: ZIP does not support timestamps before 1980 versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:37:48 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 14:37:48 +0000 Subject: [issue34067] Problem with contextlib.nullcontext In-Reply-To: <1530984805.95.0.56676864532.issue34067@psf.upfronthosting.co.za> Message-ID: <1531319868.27.0.56676864532.issue34067@psf.upfronthosting.co.za> STINNER Victor added the comment: Can we close this issue? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:39:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 14:39:39 +0000 Subject: [issue26544] platform.libc_ver() returns incorrect version number In-Reply-To: <1457742963.17.0.0403505576154.issue26544@psf.upfronthosting.co.za> Message-ID: <1531319979.46.0.56676864532.issue26544@psf.upfronthosting.co.za> STINNER Victor added the comment: Can we close this issue? It seems like the bug has been fixed, no? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:39:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 14:39:42 +0000 Subject: [issue34067] Problem with contextlib.nullcontext In-Reply-To: <1530984805.95.0.56676864532.issue34067@psf.upfronthosting.co.za> Message-ID: <1531319982.2.0.56676864532.issue34067@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: No, the merged PR is not directly related to the original issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:40:11 2018 From: report at bugs.python.org (Marcel Plch) Date: Wed, 11 Jul 2018 14:40:11 +0000 Subject: [issue34097] ZIP does not support timestamps before 1980 In-Reply-To: <1531319758.26.0.56676864532.issue34097@psf.upfronthosting.co.za> Message-ID: <1531320011.42.0.56676864532.issue34097@psf.upfronthosting.co.za> Marcel Plch added the comment: I'm going to have a closer look at this and try to add the option. ---------- nosy: +Dormouse759 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:41:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 14:41:46 +0000 Subject: [issue23927] getargs.c skipitem() doesn't skip 'w*' In-Reply-To: <1428893068.41.0.966263121411.issue23927@psf.upfronthosting.co.za> Message-ID: <1531320106.53.0.56676864532.issue23927@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 504373c59b48f1ea12132d515459022730db6047 by Serhiy Storchaka in branch 'master': bpo-23927: Make getargs.c skipitem() skipping 'w*'. (GH-8192) https://github.com/python/cpython/commit/504373c59b48f1ea12132d515459022730db6047 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:42:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 14:42:14 +0000 Subject: [issue23927] getargs.c skipitem() doesn't skip 'w*' In-Reply-To: <1428893068.41.0.966263121411.issue23927@psf.upfronthosting.co.za> Message-ID: <1531320134.45.0.56676864532.issue23927@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:42:59 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Jul 2018 14:42:59 +0000 Subject: [issue23927] getargs.c skipitem() doesn't skip 'w*' In-Reply-To: <1428893068.41.0.966263121411.issue23927@psf.upfronthosting.co.za> Message-ID: <1531320179.31.0.56676864532.issue23927@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7783 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:43:36 2018 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 11 Jul 2018 14:43:36 +0000 Subject: [issue34086] logging.Handler.handleError regressed in python3 In-Reply-To: <1531245533.0.0.56676864532.issue34086@psf.upfronthosting.co.za> Message-ID: <1531320216.85.0.56676864532.issue34086@psf.upfronthosting.co.za> Vinay Sajip added the comment: It seems innocuous enough, but the documentation for handleError() does say: "This method should be called from handlers when an exception is encountered during an emit() call." That documentation is the same for 2.x and 3.x. This is not how you are using it. What happens if you just raise an Exception from your transmit() method, and just call transmit() from within emit() without making a condition of the return value? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:44:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 14:44:27 +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: <1531320267.54.0.56676864532.issue30400@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: Race condition in shutil.copyfile() -> Race condition in shutil.copyfile(): source file replaced file during copy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:44:56 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Jul 2018 14:44:56 +0000 Subject: [issue23927] getargs.c skipitem() doesn't skip 'w*' In-Reply-To: <1428893068.41.0.966263121411.issue23927@psf.upfronthosting.co.za> Message-ID: <1531320296.44.0.56676864532.issue23927@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7784 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:48:45 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Jul 2018 14:48:45 +0000 Subject: [issue33648] unused with_c_locale_warning option in configure should be removed In-Reply-To: <1527257511.03.0.682650639539.issue33648@psf.upfronthosting.co.za> Message-ID: <1531320525.84.0.56676864532.issue33648@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 020f5ab7170836b277ac8fef2ce7438ae0145caf by Miss Islington (bot) in branch '3.7': bpo-33648: Remove PY_WARN_ON_C_LOCALE (GH-7114) https://github.com/python/cpython/commit/020f5ab7170836b277ac8fef2ce7438ae0145caf ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:50:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 14:50:14 +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: <1531320614.86.0.56676864532.issue30400@psf.upfronthosting.co.za> STINNER Victor added the comment: > The definitive solution to this problem would theoretically be to have all these interconnected functions pass fds instead of "paths" but of course that is hardly possible. I agree that it's the way to go. Python makes little difference between a path and file descriptor. For example, os.stat() accepts both a filename (string) or a file descriptor (integer). Even if we cannot fix everything, it makes sense to me to try to fix at least shutil.copyfile(). Even we cannot modify existing other public copy*() functions to handle file descriptors, maybe we can add private helper functions accepting file descriptors, and modify existing public functions to reuse them? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:51:21 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 14:51:21 +0000 Subject: [issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. In-Reply-To: <1531031682.19.0.56676864532.issue34068@psf.upfronthosting.co.za> Message-ID: <1531320681.1.0.56676864532.issue34068@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: Assertion failure in _PyType_Lookup -> traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:53:02 2018 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 11 Jul 2018 14:53:02 +0000 Subject: [issue34075] asyncio: We should prohibit setting a ProcessPoolExecutor in with set_default_executor In-Reply-To: <1531319684.46.0.56676864532.issue34075@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: I disagree. Other than subclasses of thread executor, what are you going to pass in? A mock? On Wed, Jul 11, 2018 at 7:34 AM STINNER Victor wrote: > > STINNER Victor added the comment: > > > I think we'll only allow instances of c.f.ThreadPoolExecutor (and its > subclasses) to be passed to set_default_executor. That's a more robust > check than just guarding against ProcessPoolExecutor. > > I suggest to only reject ProcessPoolExecutor, instead of having a very > specific test on ThreadPoolExecutor which might fail with funky but valid > thread executor. > > ---------- > nosy: +vstinner > > _______________________________________ > Python tracker > > _______________________________________ > -- --Guido (mobile) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:53:20 2018 From: report at bugs.python.org (Eli Schwartz) Date: Wed, 11 Jul 2018 14:53:20 +0000 Subject: [issue34095] [2.7] test_idle fails with: /usr/bin/xvfb-run: line 181: 3617 Segmentation fault In-Reply-To: <1531314252.99.0.56676864532.issue34095@psf.upfronthosting.co.za> Message-ID: <1531320800.13.0.56676864532.issue34095@psf.upfronthosting.co.za> Eli Schwartz added the comment: Note the last line, which shows that the testsuite itself is executed using xvfb-run. The archlinux32 build script is based off the original PKGBUILD for archlinux: https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/python2 xvfb-run is only involved, because the testsuite depends on being run in a GUI environment in order to test GUI components... ---------- nosy: +eschwartz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 10:53:51 2018 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 11 Jul 2018 14:53:51 +0000 Subject: [issue34011] Default preference not given to venv DLL's In-Reply-To: <1530353263.14.0.56676864532.issue34011@psf.upfronthosting.co.za> Message-ID: <1531320831.46.0.56676864532.issue34011@psf.upfronthosting.co.za> Change by Vinay Sajip : ---------- keywords: +patch pull_requests: +7785 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 11:00:31 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 15:00:31 +0000 Subject: [issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. In-Reply-To: <1531031682.19.0.56676864532.issue34068@psf.upfronthosting.co.za> Message-ID: <1531321231.92.0.56676864532.issue34068@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm able to reproduce the bug on my Fedora using: vstinner at apu$ gdb -args ENV/bin/python -m coverage run --pylib -m test --fail-env-changed -uall,-cpu test_urllib -F (gdb) run python: Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. Program received signal SIGABRT, Aborted. 0x00007ffff7093f2b in raise () from /lib64/libc.so.6 (gdb) py-bt Traceback (most recent call first): File "/home/vstinner/prog/python/master/Lib/http/client.py", line 405, in close super().close() # set "closed" flag File "/home/vstinner/prog/python/master/Lib/traceback.py", line 216, in clear_frames tb.tb_frame.clear() File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 205, in __exit__ traceback.clear_frames(tb) File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 178, in handle callable_obj(*args, **kwargs) File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 743, in assertRaises return context.handle('assertRaises', args, kwargs) File "/home/vstinner/prog/python/master/Lib/test/test_urllib.py", line 382, in test_redirect_limit_independent "http://something") (...) (gdb) where #0 0x00007ffff7093f2b in raise () from /lib64/libc.so.6 #1 0x00007ffff707e561 in abort () from /lib64/libc.so.6 #2 0x00007ffff707e431 in __assert_fail_base.cold.0 () from /lib64/libc.so.6 #3 0x00007ffff708c692 in __assert_fail () from /lib64/libc.so.6 #4 0x00000000004aa2ea in _PyType_Lookup (type=0xdc1b30, name='__IOBase_closed') at Objects/typeobject.c:3086 #5 0x00000000004883ff in _PyObject_GenericSetAttrWithDict ( obj=, debuglevel=0, _method='GET', headers=, _headers=[('Location', 'file://guidocomputer.athome.com:/python/license'), ('Connection', 'close')], _unixfrom=None, _payload='', _charset=None, preamble=None, epilogue=None, defects=[], _default_type='text/plain') at remote 0x7fffe542f4d0>, msg=<...>, version=11, status=302, reason='Found', chunked=False, chunk_left='UNKNOWN', length=None, will_close=True, code=302, _finalizing=True) at remote 0x7fffe581ff50>, name='__IOBase_closed', value=True, dict=0x0) at Objects/object.c:1292 #6 0x000000000048871a in PyObject_GenericSetAttr ( obj=, debuglevel=0, _method='GET', headers=, _headers=[('Location', 'file://guidocomputer.athome.com:/python/license'), ('Connection', 'close')], _unixfrom=None, _payload='', _charset=None, preamble=None, epilogue=None, defects=[], _default_type='text/plain') at remote 0x7fffe542f4d0>, msg=<...>, version=11, status=302, reason='Found', chunked=False, chunk_left='UNKNOWN', length=None, will_close=True, code=302, _finalizing=True) at remote 0x7fffe581ff50>, name='__IOBase_closed', value=True) at Objects/object.c:1340 #7 0x00000000004873a0 in PyObject_SetAttr ( v=, debuglevel=0, _method='GET', headers=, _headers=[('Location', 'file://guidocomputer.athome.com:/python/license'), ('Connection', 'close')], _unixfrom=None, _payload='', _charset=None, preamble=None, epilogue=None, defects=[], _default_type='text/plain') at remote 0x7fffe542f4d0>, msg=<...>, version=11, status=302, reason='Found', chunked=False, chunk_left='UNKNOWN', length=None, will_close=True, code=302, _finalizing=True) at remote 0x7fffe581ff50>, name='__IOBase_closed', value=True) at Objects/object.c:977 #8 0x0000000000486f03 in _PyObject_SetAttrId ( v=, debuglevel=0, _method='GET', headers=, _headers=[('Location', 'file://guidocomputer.athome.com:/python/license'), ('Connection', 'close')], _unixfrom=None, _payload='', _charset=None, preamble=None, epilogue=None, defects=[], _default_type='text/plain') at remote 0x7fffe542f4d0>, msg=<...>, version=11, status=302, reason='Found', chunked=False, chunk_left='UNKNOWN', length=None, will_close=True, code=302, _finalizing=True) at remote 0x7fffe581ff50>, name=0x9d4330 , w=True) at Objects/object.c:857 #9 0x0000000000625d9c in _io__IOBase_close_impl ( self=, debuglevel=0, _method='GET', headers=, _headers=[('Location', 'file://guidocomputer.athome.com:/python/license'), ('Connection', 'close')], _unixfrom=None, _payload='', _charset=None, preamble=None, epilogue=None, defects=[], _default_type='text/plain') at remote 0x7fffe542f4d0>, msg=<...>, version=11, status=302, reason='Found', chunked=False, chunk_left='UNKNOWN', length=None, will_close=True, code=302, _finalizing=---T---Type ---Type ---Type ---Type to ---Type ---Type ---T---Type ---Type ---T---Type to continue, or q to quit--- ) at remote 0x7fffe581ff50>) at ./Modules/_io/iobase.c:239 #10 0x0000000000627e12 in _io__IOBase_close ( self=, debuglevel=0, _method='GET', headers=, _headers=[('Location', 'file://guidocomputer.athome.com:/python/license'), ('Connection', 'close')], _unixfrom=None, _payload='', _charset=None, preamble=None, epilogue=None, defects=[], _default_type='text/plain') at remote 0x7fffe542f4d0>, msg=<...>, version=11, status=302, reason='Found', chunked=False, chunk_left='UNKNOWN', length=None, will_close=True, code=302, _finalizing=True) at remote 0x7fffe581ff50>, _unused_ignored=0x0) at ./Modules/_io/clinic/iobase.c.h:60 #11 0x0000000000438cb3 in _PyMethodDef_RawFastCallKeywords (method=0x9d4d40 , self=, debuglevel=0, _method='GET', headers=, _headers=[('Location', 'file://guidocomputer.athome.com:/python/license'), ('Connection', 'close')], _unixfrom=None, _payload='', _charset=None, preamble=None, epilogue=None, defects=[], _default_type='text/plain') at remote 0x7fffe542f4d0>, msg=<...>, version=11, status=302, reason='Found', chunked=False, chunk_left='UNKNOWN', length=None, will_close=True, code=302, _finalizing=True) at remote 0x7fffe581ff50>, args=0x7fffe4e793e8, nargs=0, kwnames=0x0) at Objects/call.c:629 #12 0x000000000043910d in _PyCFunction_FastCallKeywords (func=, args=0x7fffe4e793e8, nargs=0, kwnames=0x0) at Objects/call.c:730 #13 0x00000000005500e9 in call_function (pp_stack=0x7ffffffb7da0, oparg=0, kwnames=0x0) at Python/ceval.c:4565 #14 0x0000000000548e1d in _PyEval_EvalFrameDefault ( f=Frame 0x7fffe4e79250, for file /home/vstinner/prog/python/master/Lib/http/client.py, line 405, in close (self=, debuglevel=0, _method='GET', headers=, _headers=[('Location', 'file://guidocomputer.athome.com:/python/license'), ('Connection', 'close')], _unixfrom=None, _payload='', _charset=None, preamble=None, epilogue=None, defects=[], _default_type='text/plain') at remote 0x7fffe542f4d0>, msg=<...>, version=11, status=302, reason='Found', chunked=False, chunk_left='UNKNOWN', length=None, will_close=True, code=302, _finalizing=True) at remote 0x7fffe581ff50>), throwflag=0) at Python/ceval.c:3159 (...) The bug is in _io__IOBase_close_impl(). I modified the code: assert(!PyErr_Occurred()); res = PyObject_CallMethodObjArgs(self, _PyIO_str_flush, NULL); assert(!PyErr_Occurred()); /* <---- THIS ASSERTION FAILS */ if (_PyObject_SetAttrId(self, &PyId___IOBase_closed, Py_True) < 0) { Py_XDECREF(res); return NULL; } The problem is that _PyObject_SetAttrId() is called while the flush() method raised an exception. We need something like PyErr_Fetch/PyErr_Store to set the attribute. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 11:03:41 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 11 Jul 2018 15:03:41 +0000 Subject: [issue34067] Problem with contextlib.nullcontext In-Reply-To: <1530984805.95.0.56676864532.issue34067@psf.upfronthosting.co.za> Message-ID: <1531321421.82.0.56676864532.issue34067@psf.upfronthosting.co.za> Nick Coghlan added the comment: Right, the merged PR adds a simpler example that handles "ignore exceptions or not" by selecting between suppress() and nullcontext(). The documentation still needs updating to improve or remove the file-based example, and point out that for resources that get acquired on construction, you either need to delay construction to the start of the with statement, or else use ExitStack instead of nullcontext. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 11:05:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 15:05:06 +0000 Subject: [issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. In-Reply-To: <1531031682.19.0.56676864532.issue34068@psf.upfronthosting.co.za> Message-ID: <1531321506.6.0.56676864532.issue34068@psf.upfronthosting.co.za> STINNER Victor added the comment: Stefan Behnel: "I added this assertion exactly for the purpose of finding this kind of bug. It means that some code tried to look up an attribute with a live exception set, which previously could swallow the exception in certain situations, and even if not, it is always the wrong thing to do." The assertion failure is a little bit "far" from the bug: would it make sense to add "assert(!PyErr_Occurred());" to the entry point of: * PyObject_HasAttr() * PyObject_SetAttr() * PyObject_SetAttrString() * _PyObject_SetAttrId() * type_getattro() * slot_tp_getattr_hook() * and other similar functions? A few years ago, I added "assert(!PyErr_Occurred());" to the entry point of C functions which can call arbitrary code like _PyEval_EvalFrameDefault(), PyObject_Call(), etc. It helped to find many bugs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 11:05:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 15:05:56 +0000 Subject: [issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. In-Reply-To: <1531031682.19.0.56676864532.issue34068@psf.upfronthosting.co.za> Message-ID: <1531321556.92.0.56676864532.issue34068@psf.upfronthosting.co.za> STINNER Victor added the comment: > res = PyObject_CallMethodObjArgs(self, _PyIO_str_flush, NULL); > assert(!PyErr_Occurred()); /* <---- THIS ASSERTION FAILS */ Using this additional assertion, test_io also fails on test_flush_error_on_close(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 11:06:04 2018 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 11 Jul 2018 15:06:04 +0000 Subject: [issue33155] Use super().method instead in Logging In-Reply-To: <1522149768.39.0.467229070634.issue33155@psf.upfronthosting.co.za> Message-ID: <1531321564.59.0.56676864532.issue33155@psf.upfronthosting.co.za> Vinay Sajip added the comment: See the comments on bpo-31853. I agree with the consensus there that these changes aren't worth doing: msg314518 msg314520 msg314521 So, I propose to close this as "not a bug" which in this context means "not an enhancement that's worth doing". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 11:08:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 15:08:56 +0000 Subject: [issue34075] asyncio: We should prohibit setting a ProcessPoolExecutor in with set_default_executor In-Reply-To: <1531150174.99.0.56676864532.issue34075@psf.upfronthosting.co.za> Message-ID: <1531321736.02.0.56676864532.issue34075@psf.upfronthosting.co.za> STINNER Victor added the comment: > Other than subclasses of thread executor, what are you going to pass in? I don't see why asyncio should prevent people to experiment their own custom executor. You can imagine a custom "green executor" which inherit from Executor but uses its own black magic like greenlet. People like to do crazy things to implement asynchronous programming :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 11:09:24 2018 From: report at bugs.python.org (Zachary Ware) Date: Wed, 11 Jul 2018 15:09:24 +0000 Subject: [issue34094] Porting Python 2 to Python 3 example contradicts its own advice In-Reply-To: <1531305729.89.0.56676864532.issue34094@psf.upfronthosting.co.za> Message-ID: <1531321764.35.0.56676864532.issue34094@psf.upfronthosting.co.za> Zachary Ware added the comment: I don't agree with your conclusion here: importlib2 is a PyPI package that backports Python 3's importlib to Python 2, thus the ImportError will only be raised on Python 2 with the example as written. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 11:10:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 15:10:56 +0000 Subject: [issue34095] [2.7] test_idle fails with: /usr/bin/xvfb-run: line 181: 3617 Segmentation fault In-Reply-To: <1531314252.99.0.56676864532.issue34095@psf.upfronthosting.co.za> Message-ID: <1531321856.15.0.56676864532.issue34095@psf.upfronthosting.co.za> STINNER Victor added the comment: Ah, I see. Can you try to get the Python traceback and/or C traceback using gdb? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 11:14:35 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 11 Jul 2018 15:14:35 +0000 Subject: [issue34075] asyncio: We should prohibit setting a ProcessPoolExecutor in with set_default_executor In-Reply-To: <1531150174.99.0.56676864532.issue34075@psf.upfronthosting.co.za> Message-ID: <1531322075.6.0.56676864532.issue34075@psf.upfronthosting.co.za> Yury Selivanov added the comment: > I don't see why asyncio should prevent people to experiment their own custom executor. You can imagine a custom "green executor" which inherit from Executor but uses its own black magic like greenlet. Because asyncio and its ecosystem is built around the fact that the default executor is a ThreadPoolExecutor. asyncio users are free to: 1. Pass any kind of executor as a first argument to `loop.run_in_executor()` -- no restrictions there. 2. Pass a subclass of ThreadPoolExecutor to `loop.set_default_executor()` -- that's how people can experiment. Mind that (2) also covers exotic use cases like using greenlets under the hood (although I don't think it's possible), as long as they subclass ThreadPoolExecutor. My plan so far: * in 3.8 add a DeprecationWarning if an executor other than ThreadPoolExecutor is set as a default one. * during 3.8 see what kind of feedback we get. * if all goes great, in 3.9 we'll only allow subclasses of ThreadPoolExecutor. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 11:20:31 2018 From: report at bugs.python.org (Guilherme Salgado) Date: Wed, 11 Jul 2018 15:20:31 +0000 Subject: [issue34098] multiprocessing.Server swallows original exception traceback Message-ID: <1531322431.82.0.56676864532.issue34098@psf.upfronthosting.co.za> New submission from Guilherme Salgado : multiprocessing.Server swallows original exception traceback, making it hard to debug. For example, the following code: ``` from multiprocessing.managers import BaseManager class FooBar(object): def m(self): self._raise() def _raise(self): raise ValueError class MyManager(BaseManager): pass MyManager.register('Foo', callable=FooBar) manager = MyManager() manager.start() manager.Foo()._callmethod('m') manager.shutdown() ``` Gives me the following exception: ``` Traceback (most recent call last): File "/tmp/foo.py", line 15, in manager.Foo()._callmethod('m') File "/usr/lib/python3.6/multiprocessing/managers.py", line 772, in _callmethod raise convert_to_error(kind, result) ValueError ``` Ideally, I'd like to get something like this: ``` multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/home/salgado/src/cpython/Lib/multiprocessing/managers.py", line 254, in serve_client res = function(*args, **kwds) File "/tmp/foo.py", line 5, in m self._raise() File "/tmp/foo.py", line 7, in _raise raise ValueError ValueError """ The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/tmp/foo.py", line 15, in manager.Foo()._callmethod('m') File "/home/salgado/src/cpython/Lib/multiprocessing/managers.py", line 811, in _callmethod raise convert_to_error(kind, result) ValueError ``` ---------- components: Library (Lib) messages: 321480 nosy: salgado priority: normal severity: normal status: open title: multiprocessing.Server swallows original exception traceback type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 11:24:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 15:24:15 +0000 Subject: [issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. In-Reply-To: <1531031682.19.0.56676864532.issue34068@psf.upfronthosting.co.za> Message-ID: <1531322655.61.0.56676864532.issue34068@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: _PyType_Lookup doesn't set an exception. But if an exception was raised inside, it will be cleared, and this will clear an exception if it was raised before _PyType_Lookup. assert() is needed for guaranteeing that no exception will be lost. I'm +1 for saving/restoring (or rather chaining) the exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 11:35:29 2018 From: report at bugs.python.org (Oren) Date: Wed, 11 Jul 2018 15:35:29 +0000 Subject: [issue34086] logging.Handler.handleError regressed in python3 In-Reply-To: <1531245533.0.0.56676864532.issue34086@psf.upfronthosting.co.za> Message-ID: <1531323329.33.0.56676864532.issue34086@psf.upfronthosting.co.za> Oren added the comment: I totally agree that this involves misusing handleError. I ended up fixing the code that originally caused the problem, since it was wrong in the first place. The reason I filed this bug and that I think it's worth fixing is that in previous versions, the problem would be that something might not get logged as expected; now the problem turns into a crash. Not only is it now a crash, but the code that crashes requires something else to go wrong (we're not calling handleError() because everything went right), which means that applications that previously tolerated something going wrong, now break. If the necessary fix was complicated, I could see the wisdom in not fixing it, but since it's simple, why not? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 11:37:03 2018 From: report at bugs.python.org (Roundup Robot) Date: Wed, 11 Jul 2018 15:37:03 +0000 Subject: [issue34098] multiprocessing.Server swallows original exception traceback In-Reply-To: <1531322431.82.0.56676864532.issue34098@psf.upfronthosting.co.za> Message-ID: <1531323423.66.0.56676864532.issue34098@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +7786 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 12:16:42 2018 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 11 Jul 2018 16:16:42 +0000 Subject: [issue34086] logging.Handler.handleError regressed in python3 In-Reply-To: <1531245533.0.0.56676864532.issue34086@psf.upfronthosting.co.za> Message-ID: <1531325802.11.0.56676864532.issue34086@psf.upfronthosting.co.za> Vinay Sajip added the comment: For the crash to occur, it would have to be a handleError() called wrongly, when something didn't apparently go wrong (i.e. a call from outside an exception handling clause). So I'm not sure I follow your logic. I agree the change you propose is simple, but that's an orthogonal concern, IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 12:35:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 16:35:56 +0000 Subject: [issue23927] getargs.c skipitem() doesn't skip 'w*' In-Reply-To: <1428893068.41.0.966263121411.issue23927@psf.upfronthosting.co.za> Message-ID: <1531326956.36.0.56676864532.issue23927@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +7788 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 12:46:38 2018 From: report at bugs.python.org (Bruce Richardson) Date: Wed, 11 Jul 2018 16:46:38 +0000 Subject: [issue34094] Porting Python 2 to Python 3 example contradicts its own advice In-Reply-To: <1531321764.35.0.56676864532.issue34094@psf.upfronthosting.co.za> Message-ID: Bruce Richardson added the comment: Ah, doh. my bad. On 11 July 2018 at 16:09, Zachary Ware wrote: > > Zachary Ware added the comment: > > I don't agree with your conclusion here: importlib2 is a PyPI package that > backports Python 3's importlib to Python 2, thus the ImportError will only > be raised on Python 2 with the example as written. > > ---------- > nosy: +zach.ware > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 12:49:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Jul 2018 16:49:20 +0000 Subject: [issue23927] getargs.c skipitem() doesn't skip 'w*' In-Reply-To: <1428893068.41.0.966263121411.issue23927@psf.upfronthosting.co.za> Message-ID: <1531327760.88.0.56676864532.issue23927@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset ef19fd200d0768919f1658466f8b6080b191fba0 by Serhiy Storchaka in branch '2.7': [2.7] bpo-23927: Make getargs.c skipitem() skipping 'w*'. (GH-8192). (GH-8255) https://github.com/python/cpython/commit/ef19fd200d0768919f1658466f8b6080b191fba0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 12:56:08 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Jul 2018 16:56:08 +0000 Subject: [issue23927] getargs.c skipitem() doesn't skip 'w*' In-Reply-To: <1428893068.41.0.966263121411.issue23927@psf.upfronthosting.co.za> Message-ID: <1531328168.94.0.56676864532.issue23927@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 48d2aeb009f8e58b1efae00ee0e225951b58737e by Miss Islington (bot) in branch '3.7': bpo-23927: Make getargs.c skipitem() skipping 'w*'. (GH-8192) https://github.com/python/cpython/commit/48d2aeb009f8e58b1efae00ee0e225951b58737e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 13:05:29 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 11 Jul 2018 17:05:29 +0000 Subject: [issue34084] possible free statically allocated string in compiler when easter egg on In-Reply-To: <1531222621.9.0.56676864532.issue34084@psf.upfronthosting.co.za> Message-ID: <1531328729.12.0.56676864532.issue34084@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: AFAICT, that future only works in the REPL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 13:06:36 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 11 Jul 2018 17:06:36 +0000 Subject: [issue33155] Use super().method instead in Logging In-Reply-To: <1522149768.39.0.467229070634.issue33155@psf.upfronthosting.co.za> Message-ID: <1531328796.08.0.56676864532.issue33155@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I agree that this shouldn't be done for logging and that likely it shouldn't be done for most modules. ---------- nosy: +rhettinger resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 13:10:45 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Jul 2018 17:10:45 +0000 Subject: [issue23927] getargs.c skipitem() doesn't skip 'w*' In-Reply-To: <1428893068.41.0.966263121411.issue23927@psf.upfronthosting.co.za> Message-ID: <1531329045.96.0.56676864532.issue23927@psf.upfronthosting.co.za> miss-islington added the comment: New changeset ec7562068fd123969ab4d27e11f4070271c72e16 by Miss Islington (bot) in branch '3.6': bpo-23927: Make getargs.c skipitem() skipping 'w*'. (GH-8192) https://github.com/python/cpython/commit/ec7562068fd123969ab4d27e11f4070271c72e16 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 13:18:05 2018 From: report at bugs.python.org (Oren) Date: Wed, 11 Jul 2018 17:18:05 +0000 Subject: [issue34086] logging.Handler.handleError regressed in python3 In-Reply-To: <1531245533.0.0.56676864532.issue34086@psf.upfronthosting.co.za> Message-ID: <1531329485.65.0.56676864532.issue34086@psf.upfronthosting.co.za> Oren added the comment: The code that was causing this problem looked something like: -- def emit(self, record): ... response = requests.post(...) if not response.ok: self.handleError(record) ... -- In this case, something does apparently go wrong, but it doesn't actually involve an exception. I assume that I'm not the only person in the world dealing with a code base where handleError was misused like this. Here's some evidence that this is true: https://www.programcreek.com/python/example/619/logging.Handler (search for handleError in the page) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 13:40:36 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Wed, 11 Jul 2018 17:40:36 +0000 Subject: [issue34089] Remove required (non-optional) modules from Modules/Setup.dist In-Reply-To: <1531264270.58.0.56676864532.issue34089@psf.upfronthosting.co.za> Message-ID: <1531330836.48.0.56676864532.issue34089@psf.upfronthosting.co.za> Change by Chih-Hsuan Yen : ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 13:41:12 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Wed, 11 Jul 2018 17:41:12 +0000 Subject: [issue32430] Simplify Modules/Setup{,.dist,.local} In-Reply-To: <1514373303.98.0.213398074469.issue32430@psf.upfronthosting.co.za> Message-ID: <1531330872.95.0.56676864532.issue32430@psf.upfronthosting.co.za> Change by Chih-Hsuan Yen : ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 13:43:50 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Wed, 11 Jul 2018 17:43:50 +0000 Subject: [issue18971] Use argparse in the profile/cProfile modules In-Reply-To: <1378651735.34.0.106872134579.issue18971@psf.upfronthosting.co.za> Message-ID: <1531331030.23.0.56676864532.issue18971@psf.upfronthosting.co.za> Change by Chih-Hsuan Yen : ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 14:02:20 2018 From: report at bugs.python.org (=?utf-8?q?Rodrigo_Pinheiro_Marques_de_Ara=C3=BAjo?=) Date: Wed, 11 Jul 2018 18:02:20 +0000 Subject: [issue34087] django: segmentation fault on garbage collection in visit_decref() In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531332140.16.0.56676864532.issue34087@psf.upfronthosting.co.za> Rodrigo Pinheiro Marques de Ara?jo added the comment: Unfortunately with 'PYTHONMALLOC=debug' the segmentation fault do not happen. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 14:07:01 2018 From: report at bugs.python.org (Fabio Zadrozny) Date: Wed, 11 Jul 2018 18:07:01 +0000 Subject: [issue34099] Provide debuggers with a way to know that a function is exiting with an unhandled exception. Message-ID: <1531332421.42.0.56676864532.issue34099@psf.upfronthosting.co.za> New submission from Fabio Zadrozny : Right now, debuggers can deal with handled exceptions by detecting the 'exception' event, but it's hard to know if the exception is handled or unhandled at that point (so, debuggers end up checking if it happens in a top-level function, but this isn't good if the user started the code and did a remote attach later on, where the top-level code is still user code). My suggestion would be creating another event type (such as 'exception_return') which would be issued after the 'return' event with the same information passed on the 'exception' info so that debuggers can detect that some exception is unhandled (the 'return' would still be issued as usual to minimize breakage to existing debuggers). Another option could be adding that information to the frame itself during a 'return' event (and then removing right after calling the debugger to avoid any cycles) -- although I think the other option is better to avoid making the frame bigger. ---------- components: Interpreter Core messages: 321492 nosy: fabioz priority: normal severity: normal status: open title: Provide debuggers with a way to know that a function is exiting with an unhandled exception. type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 14:12:59 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Wed, 11 Jul 2018 18:12:59 +0000 Subject: [issue32430] Simplify Modules/Setup{,.dist,.local} In-Reply-To: <1514373303.98.0.213398074469.issue32430@psf.upfronthosting.co.za> Message-ID: <1531332779.16.0.56676864532.issue32430@psf.upfronthosting.co.za> Neil Schemenauer added the comment: PR 8229 doesn't work if the build dir is separate from the src dir (mentioned in the PR comments). The attached patch (makesetup_fallback_dist.txt) changes makesetup to fallback to using $srcdir/Modules/Setup.dist if Modules/Setup doesn't exist. I removed the copying of Setup.dist to Setup. Also, I removed the dependencies in the makefile that look for an out-of-date Setup file and the ones that automatically run makesetup. There is now a "makesetup" target with no deps. You would have to run "make makesetup" if you want to regenerate config.c and the Makefile. Otherwise, running "configure" would also do the job. One possible issue with the patch: I expect that some build systems expect that, after configure, Modules/Setup will exist in the build dir and can be modified. For that reason, I think a better fix is to make 'configure' unconditionally create Modules/Setup from $srcdir/Modules/Setup.dist. I'm attaching as a patch as I'm not sure about creating a bunch of half-baked PRs to show ideas. It seems to me that a small patch as a text attachment is better. Maybe I'm a dinosaur. ;-P ---------- nosy: +nascheme -yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 14:13:42 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Wed, 11 Jul 2018 18:13:42 +0000 Subject: [issue32430] Simplify Modules/Setup{,.dist,.local} In-Reply-To: <1514373303.98.0.213398074469.issue32430@psf.upfronthosting.co.za> Message-ID: <1531332822.73.0.56676864532.issue32430@psf.upfronthosting.co.za> Change by Neil Schemenauer : Added file: https://bugs.python.org/file47685/makesetup_fallback_dist.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 14:47:32 2018 From: report at bugs.python.org (Brett Cannon) Date: Wed, 11 Jul 2018 18:47:32 +0000 Subject: [issue34094] Porting Python 2 to Python 3 example contradicts its own advice In-Reply-To: <1531305729.89.0.56676864532.issue34094@psf.upfronthosting.co.za> Message-ID: <1531334852.19.0.56676864532.issue34094@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 14:57:50 2018 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 11 Jul 2018 18:57:50 +0000 Subject: [issue34086] logging.Handler.handleError regressed in python3 In-Reply-To: <1531245533.0.0.56676864532.issue34086@psf.upfronthosting.co.za> Message-ID: <1531335470.45.0.56676864532.issue34086@psf.upfronthosting.co.za> Vinay Sajip added the comment: > Here's some evidence that this is true I'm not sure that's evidence. That example page you linked to has 4 instances of handleError: 2 are definitions of overrides, and the other two are calls to the superclass method from those overriding methods, which would execute in an exception context if the subclass called handleError() correctly (i.e. from an exception handler). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 15:08:31 2018 From: report at bugs.python.org (Dan Rose) Date: Wed, 11 Jul 2018 19:08:31 +0000 Subject: [issue34100] Python doesn't intern integers in a tuple of constant literals Message-ID: <1531336111.06.0.56676864532.issue34100@psf.upfronthosting.co.za> New submission from Dan Rose : In the Python 3.7.0 interpreter, the following evaluates to False. In 3.6.4, it was True: c,d = 500,500 c is d This seems to be because, in some cases, Python 3.7 fails to intern integers inside tuples: a = (500,500) print(a[0] is a[1]) # False a = (500,500,42) print(a[0] is a[1]) # False a = (500,500,'42') print(a[0] is a[1]) # False answer = 42 a = (500,500,answer) print(a[0] is a[1]) # True a = (500,500,[42]) print(a[0] is a[1]) # True a = [500,500] print(a[0] is a[1]) # True I believe the above should all return True. ---------- messages: 321495 nosy: Dan Rose priority: normal severity: normal status: open title: Python doesn't intern integers in a tuple of constant literals type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 15:12:56 2018 From: report at bugs.python.org (michael kearney) Date: Wed, 11 Jul 2018 19:12:56 +0000 Subject: [issue33897] Add a restart option to logging.basicConfig() In-Reply-To: <1529354357.8.0.56676864532.issue33897@psf.upfronthosting.co.za> Message-ID: <1531336376.74.0.56676864532.issue33897@psf.upfronthosting.co.za> michael kearney added the comment: Thank you! I just stumbled into this problem with logging.basicConfig. In the course of trying to find an acceptable workaround I discovered issue 33897 . I downloaded 3.8.0 and voila my problem is solved. So, I'll tread lightly, advance to 3.7.0, and keep the latest 3.8.* around for surprises. Regards to you-all in the development front lines. -m Is it acceptable to express appreciation in here? ---------- nosy: +michael.kearney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 15:32:57 2018 From: report at bugs.python.org (Dan Rose) Date: Wed, 11 Jul 2018 19:32:57 +0000 Subject: [issue34100] Python doesn't intern integers in a tuple of constant literals In-Reply-To: <1531336111.06.0.56676864532.issue34100@psf.upfronthosting.co.za> Message-ID: <1531337577.35.0.56676864532.issue34100@psf.upfronthosting.co.za> Dan Rose added the comment: Another curious case: a = (500,500); b = (500,500) print(a[0] is b[0]) # True print(a[0] is b[1]) # False print(a[1] is b[0]) # False print(a[1] is b[1]) # True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 15:39:46 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 11 Jul 2018 19:39:46 +0000 Subject: [issue34099] Provide debuggers with a way to know that a function is exiting with an unhandled exception. In-Reply-To: <1531332421.42.0.56676864532.issue34099@psf.upfronthosting.co.za> Message-ID: <1531337986.13.0.56676864532.issue34099@psf.upfronthosting.co.za> Change by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 16:38:14 2018 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 11 Jul 2018 20:38:14 +0000 Subject: [issue34100] Python doesn't intern integers in a tuple of constant literals In-Reply-To: <1531336111.06.0.56676864532.issue34100@psf.upfronthosting.co.za> Message-ID: <1531341494.9.0.56676864532.issue34100@psf.upfronthosting.co.za> Mark Dickinson added the comment: This was a side-effect of #29469. ---------- nosy: +inada.naoki, mark.dickinson, serhiy.storchaka, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 16:54:32 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 20:54:32 +0000 Subject: [issue34100] Python doesn't intern integers in a tuple of constant literals In-Reply-To: <1531336111.06.0.56676864532.issue34100@psf.upfronthosting.co.za> Message-ID: <1531342472.01.0.56676864532.issue34100@psf.upfronthosting.co.za> STINNER Victor added the comment: Should the AST optimizer "interns" constants? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 17:18:03 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 21:18:03 +0000 Subject: [issue34080] Memory leak in the compiler in case of errors In-Reply-To: <1531210842.03.0.56676864532.issue34080@psf.upfronthosting.co.za> Message-ID: <1531343883.94.0.56676864532.issue34080@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 993030aac576710a46b3dd0b4864f819d4a94145 by Victor Stinner (Serhiy Storchaka) in branch 'master': bpo-34080: Fix a memory leak in the compiler. (GH-8222) https://github.com/python/cpython/commit/993030aac576710a46b3dd0b4864f819d4a94145 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 17:18:26 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Jul 2018 21:18:26 +0000 Subject: [issue34080] Memory leak in the compiler in case of errors In-Reply-To: <1531210842.03.0.56676864532.issue34080@psf.upfronthosting.co.za> Message-ID: <1531343906.68.0.56676864532.issue34080@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7789 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 17:19:05 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Jul 2018 21:19:05 +0000 Subject: [issue34080] Memory leak in the compiler in case of errors In-Reply-To: <1531210842.03.0.56676864532.issue34080@psf.upfronthosting.co.za> Message-ID: <1531343945.52.0.56676864532.issue34080@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7790 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 17:20:07 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Jul 2018 21:20:07 +0000 Subject: [issue34080] Memory leak in the compiler in case of errors In-Reply-To: <1531210842.03.0.56676864532.issue34080@psf.upfronthosting.co.za> Message-ID: <1531344007.34.0.56676864532.issue34080@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7791 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 17:22:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 21:22:04 +0000 Subject: [issue34084] possible free statically allocated string in compiler when easter egg on In-Reply-To: <1531222621.9.0.56676864532.issue34084@psf.upfronthosting.co.za> Message-ID: <1531344124.36.0.56676864532.issue34084@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +7792 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 17:45:07 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 21:45:07 +0000 Subject: [issue23770] Rework how exceptions are handled in the parser module (in validate_repeating_list()) In-Reply-To: <1427243360.96.0.274103044553.issue23770@psf.upfronthosting.co.za> Message-ID: <1531345507.56.0.56676864532.issue23770@psf.upfronthosting.co.za> STINNER Victor added the comment: I just lost interest in this old patch, I abandon it. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 17:46:40 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 21:46:40 +0000 Subject: [issue23859] asyncio: document behaviour of wait() cancellation In-Reply-To: <1428073997.46.0.438809738394.issue23859@psf.upfronthosting.co.za> Message-ID: <1531345600.84.0.56676864532.issue23859@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 Wed Jul 11 17:47:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 21:47:39 +0000 Subject: [issue27838] test_os.test_chown() failure on koobs-freebsd-{current, 9} In-Reply-To: <1471959658.26.0.0626423066304.issue27838@psf.upfronthosting.co.za> Message-ID: <1531345659.76.0.56676864532.issue27838@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see this failrue since one year, so I close the issue. ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 17:49:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 21:49:45 +0000 Subject: [issue30316] test_default_timeout() of test_threading.BarrierTests: random failures on AMD64 FreeBSD CURRENT Debug 3.x In-Reply-To: <1494344975.72.0.584129176678.issue30316@psf.upfronthosting.co.za> Message-ID: <1531345785.6.0.56676864532.issue30316@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see these failures since 1 year, so I close the issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 17:53:20 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Jul 2018 21:53:20 +0000 Subject: [issue34080] Memory leak in the compiler in case of errors In-Reply-To: <1531210842.03.0.56676864532.issue34080@psf.upfronthosting.co.za> Message-ID: <1531346000.91.0.56676864532.issue34080@psf.upfronthosting.co.za> miss-islington added the comment: New changeset a45fa39d85fc500d530d05d3ec7b36eb5d286f5e by Miss Islington (bot) in branch '2.7': bpo-34080: Fix a memory leak in the compiler. (GH-8222) https://github.com/python/cpython/commit/a45fa39d85fc500d530d05d3ec7b36eb5d286f5e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 17:54:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 21:54:08 +0000 Subject: [issue30331] TestPOP3_TLSClass: socket.timeout: timed out on AMD64 FreeBSD 10.x Shared 3.x In-Reply-To: <1494426662.88.0.428519662658.issue30331@psf.upfronthosting.co.za> Message-ID: <1531346048.07.0.56676864532.issue30331@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see these failures recently, so I close the issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 17:54:31 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Jul 2018 21:54:31 +0000 Subject: [issue34080] Memory leak in the compiler in case of errors In-Reply-To: <1531210842.03.0.56676864532.issue34080@psf.upfronthosting.co.za> Message-ID: <1531346071.67.0.56676864532.issue34080@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 9beed0c36f4ce990ded095575ba3124e2264dbbe by Miss Islington (bot) in branch '3.7': bpo-34080: Fix a memory leak in the compiler. (GH-8222) https://github.com/python/cpython/commit/9beed0c36f4ce990ded095575ba3124e2264dbbe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 18:05:32 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 22:05:32 +0000 Subject: [issue34080] Memory leak in the compiler in case of errors In-Reply-To: <1531210842.03.0.56676864532.issue34080@psf.upfronthosting.co.za> Message-ID: <1531346732.85.0.56676864532.issue34080@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3b06285d2b7963d9d06b60e85712d5ecc6540deb by Victor Stinner (Miss Islington (bot)) in branch '3.6': bpo-34080: Fix a memory leak in the compiler. (GH-8222) (GH-8257) https://github.com/python/cpython/commit/3b06285d2b7963d9d06b60e85712d5ecc6540deb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 18:06:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 22:06:11 +0000 Subject: [issue34080] Memory leak in the compiler in case of errors In-Reply-To: <1531210842.03.0.56676864532.issue34080@psf.upfronthosting.co.za> Message-ID: <1531346771.82.0.56676864532.issue34080@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Serhiy for the fix! It seems that new tests helped to find a real bug ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 18:15:08 2018 From: report at bugs.python.org (Oren) Date: Wed, 11 Jul 2018 22:15:08 +0000 Subject: [issue34086] logging.Handler.handleError regressed in python3 In-Reply-To: <1531245533.0.0.56676864532.issue34086@psf.upfronthosting.co.za> Message-ID: <1531347308.2.0.56676864532.issue34086@psf.upfronthosting.co.za> Oren added the comment: You're right - I misread those examples, sorry about that. It looks like my former colleague may have invented the bad code in question. I'm ok with closing as "not a bug" - I do think not fixing it adds a small potential friction for people upgrading their version of python, but maybe raising an exception is an improvement over silently doing the wrong thing? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 18:19:31 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 22:19:31 +0000 Subject: [issue33697] test_zipfile.test_write_filtered_python_package() failed on AppVeyor, Python 3.6 In-Reply-To: <1527690659.62.0.682650639539.issue33697@psf.upfronthosting.co.za> Message-ID: <1531347571.0.0.56676864532.issue33697@psf.upfronthosting.co.za> STINNER Victor added the comment: I only saw the failure once. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 18:19:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 22:19:54 +0000 Subject: [issue33715] test_multiprocessing_spawn.test_wait_result() failed on x86 Windows7 3.x In-Reply-To: <1527770205.15.0.682650639539.issue33715@psf.upfronthosting.co.za> Message-ID: <1531347594.73.0.56676864532.issue33715@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 Wed Jul 11 18:26:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 22:26:00 +0000 Subject: [issue33937] [3.6] test_socket: SendmsgSCTPStreamTest.testSendmsgTimeout() failed on Travis CI In-Reply-To: <1529652776.13.0.56676864532.issue33937@psf.upfronthosting.co.za> Message-ID: <1531347960.71.0.56676864532.issue33937@psf.upfronthosting.co.za> STINNER Victor added the comment: Recent failure (17 days ago) on the master branch: https://travis-ci.org/python/cpython/jobs/396258134 ====================================================================== ERROR: testSendmsgTimeout (test.test_socket.SendmsgSCTPStreamTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 314, in _tearDown raise exc File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 332, in clientRun test_func() File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 2648, in _testSendmsgTimeout self.sendmsgToServer([b"a"*512]) File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 2337, in sendmsgToServer *(args + self.sendmsg_to_server_defaults[len(args):])) OSError: [Errno 12] Cannot allocate memory ====================================================================== FAIL: testSendmsgDontWait (test.test_socket.SendmsgSCTPStreamTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 314, in _tearDown raise exc File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 332, in clientRun test_func() File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 2672, in _testSendmsgDontWait (errno.EAGAIN, errno.EWOULDBLOCK)) AssertionError: 12 not found in (11, 11) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 18:28:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Jul 2018 22:28:57 +0000 Subject: [issue33937] test_socket: SendmsgSCTPStreamTest.testSendmsgTimeout() failed on Travis CI with: [Errno 12] Cannot allocate memory In-Reply-To: <1529652776.13.0.56676864532.issue33937@psf.upfronthosting.co.za> Message-ID: <1531348137.72.0.56676864532.issue33937@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: [3.6] test_socket: SendmsgSCTPStreamTest.testSendmsgTimeout() failed on Travis CI -> test_socket: SendmsgSCTPStreamTest.testSendmsgTimeout() failed on Travis CI with: [Errno 12] Cannot allocate memory _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 20:53:34 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 12 Jul 2018 00:53:34 +0000 Subject: [issue32430] Simplify Modules/Setup{,.dist,.local} In-Reply-To: <1514373303.98.0.213398074469.issue32430@psf.upfronthosting.co.za> Message-ID: <1531356814.21.0.56676864532.issue32430@psf.upfronthosting.co.za> Change by Neil Schemenauer : ---------- pull_requests: +7793 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 22:09:16 2018 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 12 Jul 2018 02:09:16 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531361356.31.0.56676864532.issue33967@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- pull_requests: +7794 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 22:53:43 2018 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 12 Jul 2018 02:53:43 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531364023.93.0.56676864532.issue33967@psf.upfronthosting.co.za> Zackery Spytz added the comment: The test added in this change uses the deprecated method assertRaisesRegexp(), so -Werror will cause test_functools to fail. PR 8261 fixes this. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 23:00:07 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Thu, 12 Jul 2018 03:00:07 +0000 Subject: [issue32430] Simplify Modules/Setup{,.dist,.local} In-Reply-To: <1514373303.98.0.213398074469.issue32430@psf.upfronthosting.co.za> Message-ID: <1531364407.18.0.56676864532.issue32430@psf.upfronthosting.co.za> Change by Chih-Hsuan Yen : ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 23:11:37 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 12 Jul 2018 03:11:37 +0000 Subject: [issue34100] Python doesn't intern integers in a tuple of constant literals In-Reply-To: <1531336111.06.0.56676864532.issue34100@psf.upfronthosting.co.za> Message-ID: <1531365097.31.0.56676864532.issue34100@psf.upfronthosting.co.za> INADA Naoki added the comment: Thank you for finding it. I had worked on constant merging. [1] It didn't fix this case for now. I'll continue the suspended work. [1]: https://github.com/methane/cpython/pull/14/files But it may be a too big to fix only this regression. How is this regression critical? If it's important, I'll try to create minimal version of the patch to backport. ---------- assignee: -> inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 11 23:57:08 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 12 Jul 2018 03:57:08 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531367828.41.0.56676864532.issue33967@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 9e9b2c32a34594e901b5b9a03c561a2a2bf63ece by INADA Naoki (Zackery Spytz) in branch 'master': bpo-33967: Remove use of deprecated assertRaisesRegexp() (GH-8261) https://github.com/python/cpython/commit/9e9b2c32a34594e901b5b9a03c561a2a2bf63ece ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 00:00:53 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 12 Jul 2018 04:00:53 +0000 Subject: [issue34100] Same integers in a tuple of constant literals are not merged In-Reply-To: <1531336111.06.0.56676864532.issue34100@psf.upfronthosting.co.za> Message-ID: <1531368053.0.0.56676864532.issue34100@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- components: +Interpreter Core keywords: +3.7regression title: Python doesn't intern integers in a tuple of constant literals -> Same integers in a tuple of constant literals are not merged type: behavior -> resource usage versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 00:52:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 12 Jul 2018 04:52:16 +0000 Subject: [issue34100] Same integers in a tuple of constant literals are not merged In-Reply-To: <1531336111.06.0.56676864532.issue34100@psf.upfronthosting.co.za> Message-ID: <1531371136.95.0.56676864532.issue34100@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is not only with integers. >>> a = ((1, 2), (1, 2)) >>> a[0] is a[1] False >>> a = ('@#$', '@#$') >>> a[0] is a[1] False >>> a = (1.0, 1.0) >>> a[0] is a[1] False The only exception is short ASCII identifier-like strings (as a side effect of interning them): >>> a = ('foo', 'foo') >>> a[0] is a[1] True I'm not sure this is a problem which should be resolved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 00:58:10 2018 From: report at bugs.python.org (Tim Peters) Date: Thu, 12 Jul 2018 04:58:10 +0000 Subject: [issue34100] Same integers in a tuple of constant literals are not merged In-Reply-To: <1531336111.06.0.56676864532.issue34100@psf.upfronthosting.co.za> Message-ID: <1531371490.0.0.56676864532.issue34100@psf.upfronthosting.co.za> Tim Peters added the comment: The language doesn't define anything about this - any program relying on accidental identity is in error itself. Still, it's nice if a code object's co_consts vector is as short as reasonably possible. That's a matter of pragmatics, not of correctness. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 01:02:26 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 12 Jul 2018 05:02:26 +0000 Subject: [issue34100] Same integers in a tuple of constant literals are not merged In-Reply-To: <1531336111.06.0.56676864532.issue34100@psf.upfronthosting.co.za> Message-ID: <1531371746.33.0.56676864532.issue34100@psf.upfronthosting.co.za> INADA Naoki added the comment: OK, unless example code this regression affects seriously is shown, I target only 3.8. ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 01:08:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 12 Jul 2018 05:08:56 +0000 Subject: [issue34100] Same integers in a tuple of constant literals are not merged In-Reply-To: <1531336111.06.0.56676864532.issue34100@psf.upfronthosting.co.za> Message-ID: <1531372136.22.0.56676864532.issue34100@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The co_consts vector is already as short as possible, except cases when tuples are created at code generation time, but this is not related to this issue (see issue33318 and issue33325). >>> def f(): ... a = (1.0, 1.0) ... b = (1.0, 1.0) ... >>> f.__code__.co_consts (None, (1.0, 1.0)) >>> f.__code__.co_consts[1][0] is f.__code__.co_consts[1][1] False ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 01:21:04 2018 From: report at bugs.python.org (Tim Peters) Date: Thu, 12 Jul 2018 05:21:04 +0000 Subject: [issue34100] Same integers in a tuple of constant literals are not merged In-Reply-To: <1531336111.06.0.56676864532.issue34100@psf.upfronthosting.co.za> Message-ID: <1531372864.0.0.56676864532.issue34100@psf.upfronthosting.co.za> Tim Peters added the comment: Fine, Serhiy, so reword it a tiny bit: it's nice if a code object's co_consts vector references as few distinct objects as possible. Still a matter of pragmatics, not of correctness. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 01:22:53 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 12 Jul 2018 05:22:53 +0000 Subject: [issue34100] Same integers in a tuple of constant literals are not merged In-Reply-To: <1531336111.06.0.56676864532.issue34100@psf.upfronthosting.co.za> Message-ID: <1531372973.69.0.56676864532.issue34100@psf.upfronthosting.co.za> INADA Naoki added the comment: FYI, same constants are shared even when they are in different tuples on 3.6. For modules having large constant table containing large integer or floats, non name-like string, and bytes are affected significantly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 01:29:02 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 12 Jul 2018 05:29:02 +0000 Subject: [issue34093] Reproducible pyc: FLAG_REF is not stable. In-Reply-To: <1531305608.98.0.56676864532.issue34093@psf.upfronthosting.co.za> Message-ID: <1531373342.9.0.56676864532.issue34093@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- nosy: +benjamin.peterson, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 02:17:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 12 Jul 2018 06:17:08 +0000 Subject: [issue34093] Reproducible pyc: FLAG_REF is not stable. In-Reply-To: <1531305608.98.0.56676864532.issue34093@psf.upfronthosting.co.za> Message-ID: <1531376228.63.0.56676864532.issue34093@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Look also at alternate patches for issue20416. Some of them can solve this problem for simple types. If they have better performance, using them for simple types could save a time. But this will complicate a code, and I'm not sure it is worth. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 03:15:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 12 Jul 2018 07:15:13 +0000 Subject: [issue34084] possible free statically allocated string in compiler when easter egg on In-Reply-To: <1531222621.9.0.56676864532.issue34084@psf.upfronthosting.co.za> Message-ID: <1531379713.54.0.56676864532.issue34084@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +7795 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 03:22:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 12 Jul 2018 07:22:31 +0000 Subject: [issue34084] possible free statically allocated string in compiler when easter egg on In-Reply-To: <1531222621.9.0.56676864532.issue34084@psf.upfronthosting.co.za> Message-ID: <1531380151.17.0.56676864532.issue34084@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 8262 fixes the intended setting of error message for the "Barry as BDFL" easter egg. >>> from __future__ import barry_as_FLUFL >>> 1 != 2 File "", line 1 1 != 2 ^ SyntaxError: with Barry as BDFL, use '<>' instead of '!=' But there is other problem. As was exposed in the private communication with Victor and Barry, this easter egg works only in REPL (or if explicitly pass __future__.CO_FUTURE_BARRY_AS_BDFL to compile()). I'll try to fix this too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 03:55:33 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 12 Jul 2018 07:55:33 +0000 Subject: [issue34101] PyBuffer_GetPointer() not documented Message-ID: <1531382133.01.0.56676864532.issue34101@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- assignee: docs at python components: Documentation nosy: docs at python, pitrou, skrah priority: normal severity: normal status: open title: PyBuffer_GetPointer() not documented type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 04:00:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 08:00:41 +0000 Subject: [issue34093] Reproducible pyc: FLAG_REF is not stable. In-Reply-To: <1531305608.98.0.56676864532.issue34093@psf.upfronthosting.co.za> Message-ID: <1531382440.99.0.56676864532.issue34093@psf.upfronthosting.co.za> STINNER Victor added the comment: According to Serhiy Storchaka, currently marshal.dumps() writes frozenset in arbitrary order, and so frozenset serialization is not reproducible: https://mail.python.org/pipermail/python-dev/2018-July/154604.html ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 04:02:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 08:02:49 +0000 Subject: [issue34093] Reproducible pyc: FLAG_REF is not stable. In-Reply-To: <1531305608.98.0.56676864532.issue34093@psf.upfronthosting.co.za> Message-ID: <1531382569.17.0.56676864532.issue34093@psf.upfronthosting.co.za> STINNER Victor added the comment: What is the time spent in marshal.dumps() at Python startup when Python has to create all .pyc files? For example "./python -c pass" in the master branch with no external dependency? My question is if the PR makes Python startup 5% slower or less than 1% slower. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 04:03:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 12 Jul 2018 08:03:34 +0000 Subject: [issue34084] possible free statically allocated string in compiler when easter egg on In-Reply-To: <1531222621.9.0.56676864532.issue34084@psf.upfronthosting.co.za> Message-ID: <1531382614.72.0.56676864532.issue34084@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The problem is that 'from __future__ import' is parsed after converting the sources to the AST. But this flag affects the behavior of the tokenizer, before an AST is created. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 04:27:46 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 08:27:46 +0000 Subject: [issue34100] Same integers in a tuple of constant literals are not merged In-Reply-To: <1531336111.06.0.56676864532.issue34100@psf.upfronthosting.co.za> Message-ID: <1531384066.13.0.56676864532.issue34100@psf.upfronthosting.co.za> STINNER Victor added the comment: Honestly, I don't think that it's a bug. We might enhance Python 3.8 to reduce constants duplication, but there is no need to "fix" Python 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 04:31:29 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 12 Jul 2018 08:31:29 +0000 Subject: [issue34093] Reproducible pyc: FLAG_REF is not stable. In-Reply-To: <1531382440.99.0.56676864532.issue34093@psf.upfronthosting.co.za> Message-ID: INADA Naoki added the comment: > STINNER Victor added the comment: > > According to Serhiy Storchaka, currently marshal.dumps() writes frozenset in arbitrary order, and so frozenset serialization is not reproducible: > https://mail.python.org/pipermail/python-dev/2018-July/154604.html PYTHONHASHSEED can be used to stable frozenset order. On the other hand, refcnt based approach is more unstable. Even when x is y, dumps(x) == dumps(y) is not guaranteed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 04:34:42 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 12 Jul 2018 08:34:42 +0000 Subject: [issue34093] Reproducible pyc: FLAG_REF is not stable. In-Reply-To: <1531382569.17.0.56676864532.issue34093@psf.upfronthosting.co.za> Message-ID: INADA Naoki added the comment: > STINNER Victor added the comment: > > What is the time spent in marshal.dumps() at Python startup when Python has to create all .pyc files? For example "./python -c pass" in the master branch with no external dependency? My question is if the PR makes Python startup 5% slower or less than 1% slower. When startup, Python does more than compile()+marshal.dumps(). And as I wrote above, it makes compile()+marshal.dumps() only 4% slower. So startup must not be slower than 4%. Additionally, it happens only once if pyc can be writable. (I don't know if marshal.dumps() is called when open(cache_path, 'wb') failed) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 04:35:29 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 12 Jul 2018 08:35:29 +0000 Subject: [issue34100] Same constants in tuples are not merged while compile() In-Reply-To: <1531336111.06.0.56676864532.issue34100@psf.upfronthosting.co.za> Message-ID: <1531384529.55.0.56676864532.issue34100@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- title: Same integers in a tuple of constant literals are not merged -> Same constants in tuples are not merged while compile() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 04:41:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 08:41:22 +0000 Subject: [issue34093] Reproducible pyc: FLAG_REF is not stable. In-Reply-To: <1531305608.98.0.56676864532.issue34093@psf.upfronthosting.co.za> Message-ID: <1531384882.13.0.56676864532.issue34093@psf.upfronthosting.co.za> STINNER Victor added the comment: > So startup must not be slower than 4%. I know. But Python does more than compile()+dumps() at the first run. I'm curious if it is feasible to measure this cost. But it may be hard to get reliable benchmarks, since I expect that the difference will be very small, and I know very well that measuring Python startup is hard since it depends a lot of on the filesystem which is hard to measure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 04:46:54 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Jul 2018 08:46:54 +0000 Subject: [issue33716] test_concurrent_futures.test_crash() failed on x86 Windows7 3.7 In-Reply-To: <1527770473.78.0.682650639539.issue33716@psf.upfronthosting.co.za> Message-ID: <1531385214.0.0.56676864532.issue33716@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7796 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 04:52:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 08:52:49 +0000 Subject: [issue33716] test_concurrent_futures.test_crash() failed on x86 Windows7 3.7 In-Reply-To: <1527770473.78.0.682650639539.issue33716@psf.upfronthosting.co.za> Message-ID: <1531385569.36.0.56676864532.issue33716@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +7797 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 05:06:00 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Jul 2018 09:06:00 +0000 Subject: [issue33716] test_concurrent_futures.test_crash() failed on x86 Windows7 3.7 In-Reply-To: <1527770473.78.0.682650639539.issue33716@psf.upfronthosting.co.za> Message-ID: <1531386360.13.0.56676864532.issue33716@psf.upfronthosting.co.za> miss-islington added the comment: New changeset b89776fb1b000f73a62850bea78e5b3434bd7e9a by Miss Islington (bot) in branch '3.7': bpo-33716, test_concurrent_futures: increase timeout (GH-7828) https://github.com/python/cpython/commit/b89776fb1b000f73a62850bea78e5b3434bd7e9a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 05:11:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 09:11:34 +0000 Subject: [issue33716] test_concurrent_futures.test_crash() failed on x86 Windows7 3.7 In-Reply-To: <1527770473.78.0.682650639539.issue33716@psf.upfronthosting.co.za> Message-ID: <1531386694.57.0.56676864532.issue33716@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8df4770e8d2c9ebd49c5e4d073eef3a5bc805cfc by Victor Stinner in branch '3.6': bpo-33716, test_concurrent_futures: increase timeout (GH-7828) (GH-8264) https://github.com/python/cpython/commit/8df4770e8d2c9ebd49c5e4d073eef3a5bc805cfc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 05:12:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 09:12:17 +0000 Subject: [issue33716] test_concurrent_futures.test_crash() failed on x86 Windows7 3.7 In-Reply-To: <1527770473.78.0.682650639539.issue33716@psf.upfronthosting.co.za> Message-ID: <1531386737.84.0.56676864532.issue33716@psf.upfronthosting.co.za> STINNER Victor added the comment: The issue has been working around by increasing the timeout from 1 minute to 5 minutes. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 06:05:00 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 12 Jul 2018 10:05:00 +0000 Subject: [issue34087] django: segmentation fault on garbage collection in visit_decref() In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531389900.01.0.56676864532.issue34087@psf.upfronthosting.co.za> INADA Naoki added the comment: Would you provide list of extension modules? What happens when removing some of them? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 06:20:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 10:20:53 +0000 Subject: [issue34037] test_asyncio: test_run_in_executor_cancel() leaked a dangling thread on AMD64 FreeBSD 10.x Shared 3.7 In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1531390853.07.0.56676864532.issue34037@psf.upfronthosting.co.za> STINNER Victor added the comment: It's easy to reproduce the issue on Linux: diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index 11cd950df1..df4c2b9849 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -359,7 +359,7 @@ class EventLoopTestsMixin: called = True def run(): - time.sleep(0.05) + time.sleep(1.0) f2 = self.loop.run_in_executor(None, run) f2.cancel() The problem is that BaseEventLoop.close() shutdowns its default executor without waiting: def close(self): ... executor = self._default_executor if executor is not None: self._default_executor = None executor.shutdown(wait=True) I fixed a similar issue in socketserver: * bpo-31233: for socketserver.ThreadingMixIn * bpo-31151: for socketserver.ForkingMixIn * bpo-33540: add block_on_close attr to socketserver I suggest to wait by default, but maybe also add a block_on_close attribute to BaseEventLoop (default: False) just for backward compatibility. What do you think Yury, Andrew, and Guido? ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 06:21:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 10:21:26 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1531390886.36.0.56676864532.issue34037@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: test_asyncio: test_run_in_executor_cancel() leaked a dangling thread on AMD64 FreeBSD 10.x Shared 3.7 -> asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 06:30:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 10:30:37 +0000 Subject: [issue33911] [EASY] test_docxmlrpc fails when run with -Werror In-Reply-To: <1529488615.5.0.56676864532.issue33911@psf.upfronthosting.co.za> Message-ID: <1531391437.31.0.56676864532.issue33911@psf.upfronthosting.co.za> STINNER Victor added the comment: > Slightly off topic but while trying to look at the code I can see a space between function name and parenthesis as below. (...) Usually we don't accept changes which only changes the coding style. One reason is to keep a simple history in Git. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 06:32:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 10:32:06 +0000 Subject: [issue33965] [Windows WSL] Fatal Python error: _Py_InitializeMainInterpreter: can't initialize time, after year 2038 In-Reply-To: <1530000340.86.0.56676864532.issue33965@psf.upfronthosting.co.za> Message-ID: <1531391526.8.0.56676864532.issue33965@psf.upfronthosting.co.za> STINNER Victor added the comment: Petter S: If you don't provide further information, I will close the issue in one week. I tried all possible ways to compile Python on Windows and I failed to reproduce the bug. I'm not saying that there is no bug, just that the bug cannot fixed it if I fail to reproduce it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 06:43:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 10:43:51 +0000 Subject: [issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x In-Reply-To: <1527803116.79.0.682650639539.issue33723@psf.upfronthosting.co.za> Message-ID: <1531392231.61.0.56676864532.issue33723@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +7799 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 06:43:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 10:43:51 +0000 Subject: [issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x In-Reply-To: <1527803116.79.0.682650639539.issue33723@psf.upfronthosting.co.za> Message-ID: <1531392231.74.0.56676864532.issue33723@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch, patch pull_requests: +7798, 7799 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 06:44:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 10:44:02 +0000 Subject: [issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x In-Reply-To: <1527803116.79.0.682650639539.issue33723@psf.upfronthosting.co.za> Message-ID: <1531392242.2.0.56676864532.issue33723@psf.upfronthosting.co.za> STINNER Victor added the comment: The following test failed: # thread_time() should include CPU time spent in current thread... start = time.thread_time() busy_wait(0.100) stop = time.thread_time() self.assertGreaterEqual(stop - start, 0.020) # machine busy? def busy_wait(duration): deadline = time.monotonic() + duration while time.monotonic() < deadline: pass Do we really have to have functional tests on Python block functions? These tests seem very fragile... I proposed the PR 8265 to remove these fragile tests. I chose to keep time.process_time() functional test. We can remove it later if it starts failing on a buildbot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 06:51:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 10:51:05 +0000 Subject: [issue33073] Add as_integer_ratio() to int() objects In-Reply-To: <1520976305.18.0.467229070634.issue33073@psf.upfronthosting.co.za> Message-ID: <1531392665.47.0.56676864532.issue33073@psf.upfronthosting.co.za> STINNER Victor added the comment: I remove the "easy (C)" keyword since the feature seems to be controversal (at least, not so easy). ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 06:51:51 2018 From: report at bugs.python.org (Petter S) Date: Thu, 12 Jul 2018 10:51:51 +0000 Subject: [issue33965] [Windows WSL] Fatal Python error: _Py_InitializeMainInterpreter: can't initialize time, after year 2038 In-Reply-To: <1530000340.86.0.56676864532.issue33965@psf.upfronthosting.co.za> Message-ID: <1531392711.94.0.56676864532.issue33965@psf.upfronthosting.co.za> Petter S added the comment: Makes sense. I fail to reproduce it myself. :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 06:52:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 10:52:06 +0000 Subject: [issue15670] PEP 3121, 384 Refactoring applied to ssl module In-Reply-To: <1345041029.57.0.223670432026.issue15670@psf.upfronthosting.co.za> Message-ID: <1531392726.7.0.56676864532.issue15670@psf.upfronthosting.co.za> STINNER Victor added the comment: Honestly, the ssl module is complex, and the conversion to PEP 3121 and PEP 384 are not straighforward, so I removed the "easy (C)" keyword. ---------- keywords: -easy (C) nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 06:56:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 10:56:55 +0000 Subject: [issue32560] inherit the py launcher's STARTUPINFO In-Reply-To: <1516051515.58.0.467229070634.issue32560@psf.upfronthosting.co.za> Message-ID: <1531393015.82.0.56676864532.issue32560@psf.upfronthosting.co.za> STINNER Victor added the comment: "inherit the py launcher's STARTUPINFO" I read the issue twice, and honestly I have no idea how to implement that. So I removed the "easy (C)" keyword. If you still consider that it's an "easy (C)" issue, please describe step by step how to implement it: * which files should be modified? * which function can be used? * how is STARTUPINFO supposed by inherited? * do you want to expose STARTUPINFO at Python level? If you plan to use a pipe, it's tricky to make sure that the pipe is closed properly on both sides once STARTUPINFO is transferred. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 07:01:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 11:01:09 +0000 Subject: [issue33965] [Windows WSL] Fatal Python error: _Py_InitializeMainInterpreter: can't initialize time, after year 2038 In-Reply-To: <1530000340.86.0.56676864532.issue33965@psf.upfronthosting.co.za> Message-ID: <1531393269.07.0.56676864532.issue33965@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, no problem, I close the issue. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 08:09:08 2018 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 12 Jul 2018 12:09:08 +0000 Subject: [issue34088] [EASY] sndhdr.what() throws exceptions on unknown files In-Reply-To: <1531255806.14.0.56676864532.issue34088@psf.upfronthosting.co.za> Message-ID: <1531397348.77.0.56676864532.issue34088@psf.upfronthosting.co.za> Lysandros Nikolaou added the comment: Will you make a PR or shall I try to fix this? ---------- nosy: +lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 08:13:49 2018 From: report at bugs.python.org (Sagi (Sergey) Shnaidman) Date: Thu, 12 Jul 2018 12:13:49 +0000 Subject: [issue34102] local variable 'parts' referenced before assignment in feedparser in email module Message-ID: <1531397629.91.0.56676864532.issue34102@psf.upfronthosting.co.za> New submission from Sagi (Sergey) Shnaidman : sudo pip install ansible-lint Requirement already satisfied: ansible-lint in /usr/lib/python2.7/site-packages (3.4.21) Exception: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pip/_internal/basecommand.py", line 228, in main status = self.run(options, args) File "/usr/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 291, in run resolver.resolve(requirement_set) File "/usr/lib/python2.7/site-packages/pip/_internal/resolve.py", line 103, in resolve self._resolve_one(requirement_set, req) File "/usr/lib/python2.7/site-packages/pip/_internal/resolve.py", line 262, in _resolve_one check_dist_requires_python(dist) File "/usr/lib/python2.7/site-packages/pip/_internal/utils/packaging.py", line 46, in check_dist_requires_python feed_parser.feed(metadata) File "/usr/lib64/python2.7/email/feedparser.py", line 178, in feed self._input.push(data) File "/usr/lib64/python2.7/email/feedparser.py", line 99, in push print(parts) UnboundLocalError: local variable 'parts' referenced before assignment pip2 --version pip 10.0.1 from /usr/lib/python2.7/site-packages/pip (python 2.7) ---------- components: email messages: 321544 nosy: barry, r.david.murray, sshnaidm priority: normal severity: normal status: open title: local variable 'parts' referenced before assignment in feedparser in email module type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 08:19:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 12:19:55 +0000 Subject: [issue34088] [EASY] sndhdr.what() throws exceptions on unknown files In-Reply-To: <1531255806.14.0.56676864532.issue34088@psf.upfronthosting.co.za> Message-ID: <1531397995.83.0.56676864532.issue34088@psf.upfronthosting.co.za> STINNER Victor added the comment: If someone writes a PR, I can review it ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 08:25:06 2018 From: report at bugs.python.org (Sagi (Sergey) Shnaidman) Date: Thu, 12 Jul 2018 12:25:06 +0000 Subject: [issue34102] local variable 'parts' referenced before assignment in feedparser in email module In-Reply-To: <1531397629.91.0.56676864532.issue34102@psf.upfronthosting.co.za> Message-ID: <1531398306.18.0.56676864532.issue34102@psf.upfronthosting.co.za> Change by Sagi (Sergey) Shnaidman : ---------- keywords: +patch pull_requests: +7800 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 08:26:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 12:26:11 +0000 Subject: [issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x In-Reply-To: <1527803116.79.0.682650639539.issue33723@psf.upfronthosting.co.za> Message-ID: <1531398371.83.0.56676864532.issue33723@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +7802 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 09:04:15 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 12 Jul 2018 13:04:15 +0000 Subject: [issue32560] inherit the py launcher's STARTUPINFO In-Reply-To: <1516051515.58.0.467229070634.issue32560@psf.upfronthosting.co.za> Message-ID: <1531400655.95.0.56676864532.issue32560@psf.upfronthosting.co.za> Steve Dower added the comment: The "for example" line is the fix, it really is very simple. That said, we have no automatic validation for the launcher, and coming up with a good set of manual tests to check it is certainly not easy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 09:23:58 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Jul 2018 13:23:58 +0000 Subject: [issue34102] local variable 'parts' referenced before assignment in feedparser in email module In-Reply-To: <1531397629.91.0.56676864532.issue34102@psf.upfronthosting.co.za> Message-ID: <1531401838.24.0.56676864532.issue34102@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Hi, I couldn't see the print statement in Lib/email/feedparser.py with latest 2.7 branch and also `git log -p Lib/email/feedparser.py | grep print` doesn't return me anything. `pip install ansible-lint` also works fine with Python 2.7. I think this statement was added by mistake for debugging by the developer before `parts = data.splitlines(True)`. Can you please point me to the commit where the print statement was added or a test case to reproduce this? Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 09:25:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 13:25:33 +0000 Subject: [issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x In-Reply-To: <1527803116.79.0.682650639539.issue33723@psf.upfronthosting.co.za> Message-ID: <1531401933.63.0.56676864532.issue33723@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d6345def68d3a0227253da26213dadb247f786db by Victor Stinner in branch 'master': bpo-33723: Fix test_time.test_thread_time() (GH-8267) https://github.com/python/cpython/commit/d6345def68d3a0227253da26213dadb247f786db ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 09:26:43 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Jul 2018 13:26:43 +0000 Subject: [issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x In-Reply-To: <1527803116.79.0.682650639539.issue33723@psf.upfronthosting.co.za> Message-ID: <1531402003.77.0.56676864532.issue33723@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7803 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 09:36:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 13:36:54 +0000 Subject: [issue32560] [EASY C] inherit the py launcher's STARTUPINFO In-Reply-To: <1516051515.58.0.467229070634.issue32560@psf.upfronthosting.co.za> Message-ID: <1531402614.06.0.56676864532.issue32560@psf.upfronthosting.co.za> STINNER Victor added the comment: Ah, so the task is just open PC/launcher.c and replaced "si.cb = sizeof(si)" with "GetStartupInfoW(&si)". Ok, I agree, that's easy and I would be happy to review such PR ;-) I add the "[EASY C]" tag to the issue title in this case. ---------- title: inherit the py launcher's STARTUPINFO -> [EASY C] inherit the py launcher's STARTUPINFO _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 09:37:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 13:37:59 +0000 Subject: [issue1100942] Add datetime.time.strptime and datetime.date.strptime Message-ID: <1531402679.47.0.56676864532.issue1100942@psf.upfronthosting.co.za> STINNER Victor added the comment: I removed the easy keyword from this issue: it's open since 2005, it has 12 patches and 1 PR attached, and a lot of discussion. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 09:48:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 13:48:53 +0000 Subject: [issue33289] tkinter askcolor returning floats for r, g, b values instead of ints In-Reply-To: <1523915381.82.0.682650639539.issue33289@psf.upfronthosting.co.za> Message-ID: <1531403333.69.0.56676864532.issue33289@psf.upfronthosting.co.za> STINNER Victor added the comment: Is this issue a regression of Python 3? red/256 gave an integer on Python 2? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 09:50:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 13:50:50 +0000 Subject: [issue33865] [EASY] Missing code page aliases: "unknown encoding: 874" In-Reply-To: <1529023151.32.0.947875510639.issue33865@psf.upfronthosting.co.za> Message-ID: <1531403450.75.0.56676864532.issue33865@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- resolution: -> third party stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 09:54:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 13:54:02 +0000 Subject: [issue33687] uu.py calls os.path.chmod which doesn't exist In-Reply-To: <1527631327.84.0.682650639539.issue33687@psf.upfronthosting.co.za> Message-ID: <1531403642.49.0.56676864532.issue33687@psf.upfronthosting.co.za> STINNER Victor added the comment: Is there really an use case which requires to set the permission of the file created by uu.decode()? It is already possible to call uu.decode() with an open file which has been created with the expected permission. Moreover, it's also possible to explicitly call chmod() *after* uu.decode(). I would suggest to deprecate the mode parameter in Python 3.7 and remove it from Python 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 09:55:34 2018 From: report at bugs.python.org (Sagi (Sergey) Shnaidman) Date: Thu, 12 Jul 2018 13:55:34 +0000 Subject: [issue34102] local variable 'parts' referenced before assignment in feedparser in email module In-Reply-To: <1531397629.91.0.56676864532.issue34102@psf.upfronthosting.co.za> Message-ID: <1531403734.61.0.56676864532.issue34102@psf.upfronthosting.co.za> Sagi (Sergey) Shnaidman added the comment: @xtreak , sorry, you're right, I pasted a wrong traceback. This is original traceback: Exception: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 346, in run requirement_set.prepare_files(finder) File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files ignore_dependencies=self.ignore_dependencies)) File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 666, in _prepare_file check_dist_requires_python(dist) File "/usr/lib/python2.7/site-packages/pip/utils/packaging.py", line 48, in check_dist_requires_python feed_parser.feed(metadata) File "/usr/lib64/python2.7/email/feedparser.py", line 177, in feed self._input.push(data) File "/usr/lib64/python2.7/email/feedparser.py", line 99, in push parts = data.splitlines(True) AttributeError: 'NoneType' object has no attribute 'splitlines' And I pasted by mistake the one I used to debug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 10:02:13 2018 From: report at bugs.python.org (Poul-Henning Kamp) Date: Thu, 12 Jul 2018 14:02:13 +0000 Subject: [issue33687] uu.py calls os.path.chmod which doesn't exist In-Reply-To: <1527631327.84.0.682650639539.issue33687@psf.upfronthosting.co.za> Message-ID: <1531404133.19.0.56676864532.issue33687@psf.upfronthosting.co.za> Poul-Henning Kamp added the comment: Please note that the mode is not just a parameter, it is also a data field inside the encoded input. See: https://en.wikipedia.org/wiki/Uuencoding (search for "mode") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 10:05:48 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Jul 2018 14:05:48 +0000 Subject: [issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x In-Reply-To: <1527803116.79.0.682650639539.issue33723@psf.upfronthosting.co.za> Message-ID: <1531404348.4.0.56676864532.issue33723@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 4ada0cff5315627eae8208adf0209b479f497b8d by Miss Islington (bot) in branch '3.7': bpo-33723: Fix test_time.test_thread_time() (GH-8267) https://github.com/python/cpython/commit/4ada0cff5315627eae8208adf0209b479f497b8d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 10:05:53 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Jul 2018 14:05:53 +0000 Subject: [issue34102] local variable 'parts' referenced before assignment in feedparser in email module In-Reply-To: <1531397629.91.0.56676864532.issue34102@psf.upfronthosting.co.za> Message-ID: <1531404353.36.0.56676864532.issue34102@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks @sshnaidm. The patch makes sense. Can you add a test case for this that fails without the patch? I have tried `pip install ansible-lint` and it works fine for me in Python 2.7. I think a NEWS entry will help too : https://devguide.python.org/committing/#what-s-new-and-news-entries Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 10:18:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 14:18:55 +0000 Subject: [issue33687] uu.py calls os.path.chmod which doesn't exist In-Reply-To: <1527631327.84.0.682650639539.issue33687@psf.upfronthosting.co.za> Message-ID: <1531405134.99.0.56676864532.issue33687@psf.upfronthosting.co.za> STINNER Victor added the comment: > Please note that the mode is not just a parameter, it is also a data field inside the encoded input. Oh... right... " is the file's Unix file permissions as three octal digits (e.g. 644, 744). This is typically only significant to unix-like operating systems." Ok, in that case, it's maybe better to fix the bug instead of removing the parameter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 10:23:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 14:23:24 +0000 Subject: [issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x In-Reply-To: <1527803116.79.0.682650639539.issue33723@psf.upfronthosting.co.za> Message-ID: <1531405404.26.0.56676864532.issue33723@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 10:41:59 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Jul 2018 14:41:59 +0000 Subject: [issue34090] Python function call optimization: avoid temporary tuple to pass **kwargs In-Reply-To: <1531264419.35.0.56676864532.issue34090@psf.upfronthosting.co.za> Message-ID: <1531406519.85.0.56676864532.issue34090@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Related issues with similar discussion in the past : https://bugs.python.org/issue27840 https://bugs.python.org/issue29318 - Similar discussion where PyDict_Copy was proposed Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 10:53:11 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 12 Jul 2018 14:53:11 +0000 Subject: [issue33289] tkinter askcolor returning floats for r, g, b values instead of ints In-Reply-To: <1523915381.82.0.682650639539.issue33289@psf.upfronthosting.co.za> Message-ID: <1531407191.31.0.56676864532.issue33289@psf.upfronthosting.co.za> Terry J. Reedy added the comment: It appears so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 10:54:04 2018 From: report at bugs.python.org (Jonas H.) Date: Thu, 12 Jul 2018 14:54:04 +0000 Subject: [issue34087] django: segmentation fault on garbage collection in visit_decref() In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531407244.57.0.56676864532.issue34087@psf.upfronthosting.co.za> Jonas H. added the comment: I also have a segfault that goes away with malloc debugging. Not sure if it's the same issue. My extension modules are venv/lib/python3.7/site-packages//_yaml.cpython-37m-darwin.so venv/lib/python3.7/site-packages//netifaces.cpython-37m-darwin.so venv/lib/python3.7/site-packages//PIL/_webp.cpython-37m-darwin.so venv/lib/python3.7/site-packages//PIL/_imagingft.cpython-37m-darwin.so venv/lib/python3.7/site-packages//PIL/_imagingcms.cpython-37m-darwin.so venv/lib/python3.7/site-packages//PIL/_imaging.cpython-37m-darwin.so venv/lib/python3.7/site-packages//PIL/_imagingmath.cpython-37m-darwin.so venv/lib/python3.7/site-packages//PIL/_imagingtk.cpython-37m-darwin.so venv/lib/python3.7/site-packages//PIL/_imagingmorph.cpython-37m-darwin.so venv/lib/python3.7/site-packages//lxml/builder.cpython-37m-darwin.so venv/lib/python3.7/site-packages//lxml/_elementpath.cpython-37m-darwin.so venv/lib/python3.7/site-packages//lxml/html/diff.cpython-37m-darwin.so venv/lib/python3.7/site-packages//lxml/html/clean.cpython-37m-darwin.so venv/lib/python3.7/site-packages//lxml/etree.cpython-37m-darwin.so venv/lib/python3.7/site-packages//lxml/objectify.cpython-37m-darwin.so venv/lib/python3.7/site-packages//coverage/tracer.cpython-37m-darwin.so Unfortunately I can't test the application without any of these, but maybe we can match my list with fenrrir's. ---------- nosy: +jonash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 10:54:47 2018 From: report at bugs.python.org (Jonas H.) Date: Thu, 12 Jul 2018 14:54:47 +0000 Subject: [issue34087] django: segmentation fault on garbage collection in visit_decref() In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531407287.63.0.56676864532.issue34087@psf.upfronthosting.co.za> Jonas H. added the comment: Btw my segfault is from Django too, but that may just be a coincidence ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 11:05:54 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 12 Jul 2018 15:05:54 +0000 Subject: [issue34102] local variable 'parts' referenced before assignment in feedparser in email module In-Reply-To: <1531397629.91.0.56676864532.issue34102@psf.upfronthosting.co.za> Message-ID: <1531407954.55.0.56676864532.issue34102@psf.upfronthosting.co.za> R. David Murray added the comment: This appears to be a bug in pip or the ansible-lint package, similar, and possibly identical, to issue 31361. I believe None is being passed in as the argument to feed_parser.feed, which is an invalid use of that API and so correctly results in an error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 11:06:11 2018 From: report at bugs.python.org (AndreasPK) Date: Thu, 12 Jul 2018 15:06:11 +0000 Subject: [issue34103] Python3.7 places cwd instead of a scripts path in sys.path. Message-ID: <1531407971.94.0.56676864532.issue34103@psf.upfronthosting.co.za> New submission from AndreasPK : Andi at Horzube MINGW64 ~/tmp $ python3.7 ../pyTest.py ['', 'C:/ghc/msys64/mingw64/lib/python37.zip', 'C:/ghc/msys64/home/Andi/tmp', 'C:/ghc/msys64/mingw64/lib/python3.7', 'C:/ghc/msys64/mingw64/bin', 'C:/ghc/msys64/mingw64/lib/python3.7/lib-dynload', 'C:/ghc/msys64/mingw64/lib/python3.7/site-packages'] Andi at Horzube MINGW64 ~/tmp $ python3.6 ../pyTest.py ['/home/Andi', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/usr/lib/python3.6/site-packages'] Ignore the path prefix differences, they comes from slight differences how I installed these two versions. 3.6 lists '/home/Andi', path of the script 3.7 lists /home/Andi/tmp , path of cwd This breaks existing code looking for files (imports primarily) relative to a scripts path. If a file is placed in the right relative path to cwd it will be picked up over the intended file. This should be at least mentioned in breaking changes. ---------- messages: 321563 nosy: AndreasPK priority: normal severity: normal status: open title: Python3.7 places cwd instead of a scripts path in sys.path. type: security versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 11:22:48 2018 From: report at bugs.python.org (Bryan Oakley) Date: Thu, 12 Jul 2018 15:22:48 +0000 Subject: [issue33289] tkinter askcolor returning floats for r, g, b values instead of ints In-Reply-To: <1531403333.69.0.56676864532.issue33289@psf.upfronthosting.co.za> Message-ID: Bryan Oakley added the comment: yes, this is a well known backwards incompatibility. In python 2, the division operator returns an integer if both operands are integers. In python 3 it returns a float. https://www.python.org/dev/peps/pep-0238/ On Thu, Jul 12, 2018 at 8:48 AM STINNER Victor wrote: > > STINNER Victor added the comment: > > Is this issue a regression of Python 3? red/256 gave an integer on Python > 2? > > ---------- > nosy: +vstinner > > _______________________________________ > Python tracker > > _______________________________________ > ---------- title: tkinter askcolor returning floats for r,g,b values instead of ints -> tkinter askcolor returning floats for r, g, b values instead of ints _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 11:27:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 15:27:04 +0000 Subject: [issue34008] Do we support calling Py_Main() after Py_Initialize()? In-Reply-To: <1530341921.37.0.56676864532.issue34008@psf.upfronthosting.co.za> Message-ID: <1531409224.57.0.56676864532.issue34008@psf.upfronthosting.co.za> STINNER Victor added the comment: I tested fontforge. It became clear to me that the fontforge must be able to call Py_Initialize() and only later call Py_Main(). fontforge calls Py_Initialize() and then uses the Python API: /* This is called to start up the embedded python interpreter */ void FontForge_InitializeEmbeddedPython(void) { // static int python_initialized is declared above. if ( python_initialized ) return; SetPythonProgramName("fontforge"); RegisterAllPyModules(); Py_Initialize(); python_initialized = 1; /* The embedded python interpreter is now functionally * "running". We can modify it to our needs. */ CreateAllPyModules(); InitializePythonMainNamespace(); } Py_Main() is called after FontForge_InitializeEmbeddedPython(). To be clear, Py_Main() must be fixed in Python 3.7 to apply properly the new configuration, or *at least* define sys.argv. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 11:31:38 2018 From: report at bugs.python.org (=?utf-8?q?Rodrigo_Pinheiro_Marques_de_Ara=C3=BAjo?=) Date: Thu, 12 Jul 2018 15:31:38 +0000 Subject: [issue34087] django: segmentation fault on garbage collection in visit_decref() In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531409498.0.0.56676864532.issue34087@psf.upfronthosting.co.za> Rodrigo Pinheiro Marques de Ara?jo added the comment: Extensions: ./_cffi_backend.cpython-37m-darwin.so ./_mssql.cpython-37m-darwin.so ./_yaml.cpython-37m-darwin.so ./Crypto/Cipher/_AES.cpython-37m-darwin.so ./Crypto/Cipher/_ARC2.cpython-37m-darwin.so ./Crypto/Cipher/_ARC4.cpython-37m-darwin.so ./Crypto/Cipher/_Blowfish.cpython-37m-darwin.so ./Crypto/Cipher/_CAST.cpython-37m-darwin.so ./Crypto/Cipher/_DES.cpython-37m-darwin.so ./Crypto/Cipher/_DES3.cpython-37m-darwin.so ./Crypto/Cipher/_XOR.cpython-37m-darwin.so ./Crypto/Hash/_MD2.cpython-37m-darwin.so ./Crypto/Hash/_MD4.cpython-37m-darwin.so ./Crypto/Hash/_RIPEMD160.cpython-37m-darwin.so ./Crypto/Hash/_SHA224.cpython-37m-darwin.so ./Crypto/Hash/_SHA256.cpython-37m-darwin.so ./Crypto/Hash/_SHA384.cpython-37m-darwin.so ./Crypto/Hash/_SHA512.cpython-37m-darwin.so ./Crypto/PublicKey/_fastmath.cpython-37m-darwin.so ./Crypto/Util/_counter.cpython-37m-darwin.so ./Crypto/Util/strxor.cpython-37m-darwin.so ./cryptography/hazmat/bindings/_constant_time.abi3.so ./cryptography/hazmat/bindings/_openssl.abi3.so ./cryptography/hazmat/bindings/_padding.abi3.so ./Cython/Compiler/Code.cpython-37m-darwin.so ./Cython/Compiler/FlowControl.cpython-37m-darwin.so ./Cython/Compiler/FusedNode.cpython-37m-darwin.so ./Cython/Compiler/Lexicon.cpython-37m-darwin.so ./Cython/Compiler/Parsing.cpython-37m-darwin.so ./Cython/Compiler/Pythran.cpython-37m-darwin.so ./Cython/Compiler/Scanning.cpython-37m-darwin.so ./Cython/Compiler/Visitor.cpython-37m-darwin.so ./Cython/Plex/Actions.cpython-37m-darwin.so ./Cython/Plex/Scanners.cpython-37m-darwin.so ./Cython/Runtime/refnanny.cpython-37m-darwin.so ./Cython/StringIOTree.cpython-37m-darwin.so ./Cython/Tempita/_tempita.cpython-37m-darwin.so ./lazy_object_proxy/cext.cpython-37m-darwin.so ./lxml/_elementpath.cpython-37m-darwin.so ./lxml/builder.cpython-37m-darwin.so ./lxml/etree.cpython-37m-darwin.so ./lxml/html/clean.cpython-37m-darwin.so ./lxml/html/diff.cpython-37m-darwin.so ./lxml/objectify.cpython-37m-darwin.so ./markupsafe/_speedups.cpython-37m-darwin.so ./PIL/_imaging.cpython-37m-darwin.so ./PIL/_imagingcms.cpython-37m-darwin.so ./PIL/_imagingmath.cpython-37m-darwin.so ./PIL/_imagingmorph.cpython-37m-darwin.so ./PIL/_imagingtk.cpython-37m-darwin.so ./psycopg2/_psycopg.cpython-37m-darwin.so ./pymssql.cpython-37m-darwin.so ./reportlab/graphics/_renderPM.cpython-37m-darwin.so ./reportlab/lib/_rl_accel.cpython-37m-darwin.so ./setproctitle.cpython-37m-darwin.so ./simplejson/_speedups.cpython-37m-darwin.so ./wrapt/_wrappers.cpython-37m-darwin.so requirements.txt alabaster==0.7.11 amqp==2.2.2 appnope==0.1.0 arrow==0.12.0 asn1crypto==0.24.0 astroid==1.6.5 Babel==2.6.0 beautifulsoup4==4.6.0 billiard==3.5.0.3 boto3==1.7.24 botocore==1.10.24 celery==4.1.0 certifi==2018.4.16 cffi==1.11.2 chardet==3.0.4 colorama==0.3.9 colorful==0.4.0 configparser==3.5.0 coreapi==2.3.3 coreschema==0.0.4 cryptography==2.2.2 cssselect==1.0.3 Cython==0.28.2 decorator==4.3.0 dj-database-url==0.4.2 Django==2.0.6 django-braces==1.12.0 django-celery-beat==1.1.1 django-celery-results==1.0.1 django-ckeditor==5.2.1 django-colorful==1.2 django-crispy-forms==1.6.1 django-extensions==1.9.8 django-extra-views==0.9.0 django-filter==1.0.4 django-filters==0.2.1 django-formset-js==0.5.0 django-formtools==2.1 django-fsm==2.6.0 django-jquery-js==3.1.1 django-js-asset==1.1.0 django-localflavor==1.6.2 django-model-utils==3.1.1 django-mptt==0.9.0 django-pagination==1.0.10 django-querysetsequence==0.8 django-recaptcha2==1.0.3 django-rest-swagger==2.1.2 django-reversion==2.0.13 django-reversion-compare==0.8.4 django-storages==1.6.6 django-tables2==1.17.1 django-tables2-reports==0.1.3 django-taggit==0.22.1 django-wkhtmltopdf==3.1.0 djangorestframework==3.7.3 djangorestframework-filters==0.10.2 djangorestframework-jwt==1.11.0 docutils==0.14 feedparser==5.2.1 google-api-python-client==1.6.4 gunicorn==19.7.1 html5lib==1.0.1 httplib2==0.10.3 idna==2.6 imagesize==0.7.1 ipaddress==1.0.19 ipdb==0.10.3 ipython==6.2.1 ipython-genutils==0.2.0 isort==4.2.15 itypes==1.1.0 jedi==0.12.1 Jinja2==2.10 jmespath==0.9.3 kombu==4.2.1 lazy-object-proxy==1.3.1 ldap3==2.4 lxml==4.1.1 MarkupSafe==1.0 mccabe==0.6.1 MechanicalSoup==0.10.0 minio==4.0.0 model-mommy==1.5.0 oauth2client==4.1.2 olefile==0.45.1 openapi-codec==1.3.2 parso==0.3.1 pathlib2==2.3.0 pbr==3.1.1 pdfrw==0.4 pexpect==4.3.1 pickleshare==0.7.4 Pillow==4.3.0 prompt-toolkit==1.0.15 psycopg2==2.7.3.2 ptyprocess==0.5.2 pyasn1==0.4.2 pyasn1-modules==0.2.1 pycparser==2.18 pycpfcnpj==1.2 pycrypto==2.6.1 Pygments==2.2.0 PyJWT==1.6.4 pylint==1.8.1 pyOpenSSL==17.5.0 PyPDF2==1.26.0 pyquery==1.3.0 python-dateutil==2.6.1 python-logstash==0.4.6 python-magic==0.4.15 python-memcached==1.58 pytz==2018.4 PyYAML==3.13 qrcode==5.3 raven==6.4.0 reportlab==3.4.0 requests==2.18.4 rsa==3.4.2 s3transfer==0.1.13 setproctitle==1.1.10 simplegeneric==0.8.1 simplejson==3.13.2 six==1.11.0 snowballstemmer==1.2.1 Sphinx==1.6.5 sphinxcontrib-websupport==1.1.0 suds-py3==1.3.3.0 traitlets==4.3.2 typing==3.6.4 Unidecode==0.4.21 uritemplate==3.0.0 urllib3==1.22 vine==1.1.4 wcwidth==0.1.7 webencodings==0.5.1 wrapt==1.10.11 xlrd==1.1.0 xlutils==2.0.0 xlwt==1.3.0 xmljson==0.1.9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 11:32:16 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 12 Jul 2018 15:32:16 +0000 Subject: [issue34087] django: segmentation fault on garbage collection in visit_decref() In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531409536.05.0.56676864532.issue34087@psf.upfronthosting.co.za> INADA Naoki added the comment: Hmm, all segfault are happend on macOS? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 12:04:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Jul 2018 16:04:36 +0000 Subject: [issue34090] Python function call optimization: avoid temporary tuple to pass **kwargs In-Reply-To: <1531264419.35.0.56676864532.issue34090@psf.upfronthosting.co.za> Message-ID: <1531411476.42.0.56676864532.issue34090@psf.upfronthosting.co.za> STINNER Victor added the comment: Yeah, I recall these issues since I wrote them :-D The fix for bpo-29318 was to document that we must copy the kwargs dict ;-) But this issue is not about the copy of the kwargs dict, but about two useless conversions: kwargs dict -> kwnames tuple -> kwargs dict. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 12:32:09 2018 From: report at bugs.python.org (Eric N. Vander Weele) Date: Thu, 12 Jul 2018 16:32:09 +0000 Subject: [issue34103] Python3.7 places cwd instead of a scripts path in sys.path. In-Reply-To: <1531407971.94.0.56676864532.issue34103@psf.upfronthosting.co.za> Message-ID: <1531413129.29.0.56676864532.issue34103@psf.upfronthosting.co.za> Change by Eric N. Vander Weele : ---------- nosy: +ericvw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 12:44:05 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 12 Jul 2018 16:44:05 +0000 Subject: [issue32430] Simplify Modules/Setup{,.dist,.local} In-Reply-To: <1514373303.98.0.213398074469.issue32430@psf.upfronthosting.co.za> Message-ID: <1531413845.08.0.56676864532.issue32430@psf.upfronthosting.co.za> Change by Neil Schemenauer : Removed file: https://bugs.python.org/file47685/makesetup_fallback_dist.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 12:44:32 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 12 Jul 2018 16:44:32 +0000 Subject: [issue34103] Python3.7 places cwd instead of a scripts path in sys.path. In-Reply-To: <1531407971.94.0.56676864532.issue34103@psf.upfronthosting.co.za> Message-ID: <1531413872.87.0.56676864532.issue34103@psf.upfronthosting.co.za> INADA Naoki added the comment: inada-n at rinrin:~/t$ ../pyenv/versions/3.7.0/bin/python ../fset.py ['/home/inada-n', '/home/inada-n/pyenv/versions/3.7.0/lib/python37.zip', '/home/inada-n/pyenv/versions/3.7.0/lib/python3.7', '/home/inada-n/pyenv/versions/3.7.0/lib/python3.7/lib-dynload', '/home/inada-n/.local/lib/python3.7/site-packages', '/home/inada-n/pyenv/versions/3.7.0/lib/python3.7/site-packages'] inada-n at rinrin:~/t$ ../pyenv/versions/3.6.5/bin/python ../fset.py ['/home/inada-n', '/home/inada-n/pyenv/versions/3.6.5/lib/python36.zip', '/home/inada-n/pyenv/versions/3.6.5/lib/python3.6', '/home/inada-n/pyenv/versions/3.6.5/lib/python3.6/lib-dynload', '/home/inada-n/pyenv/versions/3.6.5/lib/python3.6/site-packages'] Both 3.6 and 3.7 use script directory, not cwd. I don't know what's wrong on your environment. Your Python 3.6 and 3.7 are build by exactly same way except prefix? ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 12:45:41 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 12 Jul 2018 16:45:41 +0000 Subject: [issue32430] Simplify Modules/Setup{,.dist,.local} In-Reply-To: <1514373303.98.0.213398074469.issue32430@psf.upfronthosting.co.za> Message-ID: <1531413941.79.0.56676864532.issue32430@psf.upfronthosting.co.za> Neil Schemenauer added the comment: I removed the "makesetup_fallback_dist.txt". PR-8260 is a more polished implementation of the same idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 13:37:13 2018 From: report at bugs.python.org (AndreasPK) Date: Thu, 12 Jul 2018 17:37:13 +0000 Subject: [issue34103] Python3.7 places cwd instead of a scripts path in sys.path. In-Reply-To: <1531407971.94.0.56676864532.issue34103@psf.upfronthosting.co.za> Message-ID: <1531417033.71.0.56676864532.issue34103@psf.upfronthosting.co.za> AndreasPK added the comment: Thank you for the fast response! Both versions are distributed via msys I did not build them myself and installed 3.7 via pacman (today). $ python3.7 Python 3.7.0 (default, Jul 12 2018, 11:44:33) [GCC 7.3.0 64 bit (AMD64)] on win32 I only found out about this issue after someone else complained that GHC's testsuite was broken with 3.7. After upgrading mine it broke for me as well and we narrowed it down to this issue. I've tested the version from python.org in a windows shell as well which works so I can confirm your results there. Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. I've also tried running the version from python.org but in the msys shell which also works. So it seems to be an issue with the version distributed by msys! I'm not familiar with the details of how msys composes their packages. (If they distribute an official build, build their own or what not). But this seems related: https://github.com/Alexpux/MINGW-packages/issues/4062 I will link this thread there and hope this leads somewhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 13:51:53 2018 From: report at bugs.python.org (AndreasPK) Date: Thu, 12 Jul 2018 17:51:53 +0000 Subject: [issue34103] Python3.7 places cwd instead of a scripts path in sys.path. In-Reply-To: <1531407971.94.0.56676864532.issue34103@psf.upfronthosting.co.za> Message-ID: <1531417913.4.0.56676864532.issue34103@psf.upfronthosting.co.za> AndreasPK added the comment: I've learned that msys builds their own Python binary which is the one broken. So I'm closing this as it's my undestanding that it is not a bug in the official distribution. Thanks for the quick responses. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 14:20:48 2018 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 12 Jul 2018 18:20:48 +0000 Subject: [issue34088] [EASY] sndhdr.what() throws exceptions on unknown files In-Reply-To: <1531255806.14.0.56676864532.issue34088@psf.upfronthosting.co.za> Message-ID: <1531419648.07.0.56676864532.issue34088@psf.upfronthosting.co.za> Lysandros Nikolaou added the comment: Upon checking to see where the RuntimeError is coming from, I noticed that there is some notorious behaviour in chunk.py. If one runs python with the exact same parameters as Jussi Judin did in their first case and after stepping through the call stack until Chunk/skip is reached, there is a call to Chunk/seek. On the time of the call size_read has the value 16, whereas within the seek method it has the value 28. Is this intended? If so, where is that implemented? I cannot figure out why this is happening. The following is my pdb output. > cpython/Lib/chunk.py(160)skip() -> self.file.seek(n, 1) (Pdb) p self.size_read 16 (Pdb) s --Call-- > cpython/Lib/chunk.py(98)seek() -> def seek(self, pos, whence=0): (Pdb) p self.size_read 28 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 14:25:22 2018 From: report at bugs.python.org (Serge Droz) Date: Thu, 12 Jul 2018 18:25:22 +0000 Subject: [issue34104] email.message.get_payload should enforce correct encoding Message-ID: <1531419922.51.0.56676864532.issue34104@psf.upfronthosting.co.za> New submission from Serge Droz : The issue is really this: https://noxxi.de/research/mime-5-easy-steps-to-bypass-av.html get_payload should with decode=Treu should check the validity of the syntax and throw an error if it is not. This would happen if the underlying call to base64.decode would be called with validate=True ---------- messages: 321574 nosy: droz priority: normal severity: normal status: open title: email.message.get_payload should enforce correct encoding _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 14:25:32 2018 From: report at bugs.python.org (Serge Droz) Date: Thu, 12 Jul 2018 18:25:32 +0000 Subject: [issue34104] email.message.get_payload should enforce correct encoding In-Reply-To: <1531419922.51.0.56676864532.issue34104@psf.upfronthosting.co.za> Message-ID: <1531419932.86.0.56676864532.issue34104@psf.upfronthosting.co.za> Change by Serge Droz : ---------- type: -> security _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 14:49:51 2018 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 12 Jul 2018 18:49:51 +0000 Subject: [issue34105] test_socket.test_host_resolution_bad_address fails on Mac OS X 10.13.6 Message-ID: <1531421390.98.0.56676864532.issue34105@psf.upfronthosting.co.za> New submission from Lysandros Nikolaou : On my Mac OS X 10.13.6 system test_socket.test_host_resolution_bad_address fails with the following error: ====================================================================== FAIL: test_host_resolution_bad_address (test.test_socket.GeneralModuleTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/path/to/cpython/Lib/test/test_socket.py", line 897, in test_host_resolution_bad_address socket.gethostbyname(addr) AssertionError: OSError not raised : 0.1.1.~1 ---------------------------------------------------------------------- Ran 555 tests in 24.950s FAILED (failures=1, skipped=141) /path/to/cpython/Lib/test/test_socket.py:2345: RuntimeWarning: received malformed or improperly-truncated ancillary data result = sock.recvmsg(bufsize, *args) /path/to/cpython/Lib/test/test_socket.py:2436: RuntimeWarning: received malformed or improperly-truncated ancillary data result = sock.recvmsg_into([buf], *args) test test_socket failed == Tests result: FAILURE == 1 test failed: test_socket Total duration: 25 sec 423 ms Tests result: FAILURE When I manually run socket.gethostbyname('0.1.1.~1'), it returns an IP address, no exception thrown. ---------- components: Tests messages: 321575 nosy: lys.nikolaou priority: normal severity: normal status: open title: test_socket.test_host_resolution_bad_address fails on Mac OS X 10.13.6 type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 14:56:15 2018 From: report at bugs.python.org (Brett Cannon) Date: Thu, 12 Jul 2018 18:56:15 +0000 Subject: [issue34100] Same constants in tuples are not merged while compile() In-Reply-To: <1531336111.06.0.56676864532.issue34100@psf.upfronthosting.co.za> Message-ID: <1531421775.12.0.56676864532.issue34100@psf.upfronthosting.co.za> Brett Cannon added the comment: I also agree that there's no bug here, so I'm marking this an enhancement and removing the regression label. ---------- nosy: +brett.cannon type: resource usage -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 15:07:07 2018 From: report at bugs.python.org (Jonas H.) Date: Thu, 12 Jul 2018 19:07:07 +0000 Subject: [issue34087] django: segmentation fault on garbage collection in visit_decref() In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531422427.35.0.56676864532.issue34087@psf.upfronthosting.co.za> Jonas H. added the comment: I can reproduce this on Ubuntu 18.04. INADA, I have a full gdb backtrace with Python 3.7 development build. I'd like to share it with you privately as I'm concerned it may contain sensible information. I know that's a bit unconventional; if you have other suggestions I'm happy to follow along. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 15:14:07 2018 From: report at bugs.python.org (=?utf-8?q?Rodrigo_Pinheiro_Marques_de_Ara=C3=BAjo?=) Date: Thu, 12 Jul 2018 19:14:07 +0000 Subject: [issue34087] django: segmentation fault on garbage collection in visit_decref() In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531422847.95.0.56676864532.issue34087@psf.upfronthosting.co.za> Rodrigo Pinheiro Marques de Ara?jo added the comment: I did remove PyYAML, lxml and Pillow here but segfault still happen ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 15:54:35 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 12 Jul 2018 19:54:35 +0000 Subject: [issue34104] email.message.get_payload should enforce correct encoding In-Reply-To: <1531419922.51.0.56676864532.issue34104@psf.upfronthosting.co.za> Message-ID: <1531425275.54.0.56676864532.issue34104@psf.upfronthosting.co.za> R. David Murray added the comment: It looks like the virus checkers are not doing robust decoding that the email RFCs recommend, and that thunderbird is. This is obviously a bug in the virus scanners. By default, like thunderbird, the email library does its best to decode attachments. If you want your application to reject such attachments, then in python3 you can check for defects after doing the get_payload, or you can set the policy to 'strict' (that is, raise_on_defect=True) when parsing the email. ---------- nosy: +r.david.murray resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 15:56:39 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 12 Jul 2018 19:56:39 +0000 Subject: [issue34106] Add --with-module-config= to 'configure' script Message-ID: <1531425399.74.0.56676864532.issue34106@psf.upfronthosting.co.za> New submission from Neil Schemenauer : This patch is based on top of GH-8229 but could be changed to work without it. ---------- components: Build messages: 321580 nosy: nascheme priority: normal severity: normal stage: patch review status: open title: Add --with-module-config= to 'configure' script type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 16:03:09 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 12 Jul 2018 20:03:09 +0000 Subject: [issue34106] Add --with-module-config= to 'configure' script In-Reply-To: <1531425399.74.0.56676864532.issue34106@psf.upfronthosting.co.za> Message-ID: <1531425789.7.0.56676864532.issue34106@psf.upfronthosting.co.za> Change by Neil Schemenauer : ---------- keywords: +patch pull_requests: +7804 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 18:18:13 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 12 Jul 2018 22:18:13 +0000 Subject: [issue34087] django: segmentation fault on garbage collection in visit_decref() In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531433893.21.0.56676864532.issue34087@psf.upfronthosting.co.za> INADA Naoki added the comment: @jonash, Thank you. Would you share core file too? You can get core file when reproducing it after `ulimit -c unlimited`. My mail address is "songofacandy [at] gmail.com". Please share it via Dropbox or Google Drive. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 12 20:25:05 2018 From: report at bugs.python.org (Michael Kearney) Date: Fri, 13 Jul 2018 00:25:05 +0000 Subject: [issue34107] root.warning('msg') output format modified by logging.warning('msg') Message-ID: <1531441505.36.0.56676864532.issue34107@psf.upfronthosting.co.za> New submission from Michael Kearney : 0 >>> import logging 1 >>> root=logging.getLogger(name='root') 2 >>> root.warning('msg') 3 msg <----- Compare this line 4 >>> logging.warning('msg') 5 WARNING:root:msg 6 >>> root.warning('msg') 7 WARNING:root:msg <------ with this line Specifically, I was surprised to see line 7 response to line 6 given line 3 response to line 2 logger methods log(),critical(),error(),info() act the same way. A workaround from issue 33897 fixes things logging.basicConfig(level=logging.DEBUG, force=True) I discovered this when exploring "logging" module defaults, It is the sort of thing someone new to the module might encounter. I did. Slightly more comprehensive unittest example attached. This may be my first real submission. Feedback appreciated ---------- files: logTest.py messages: 321582 nosy: Michael Kearney priority: normal severity: normal status: open title: root.warning('msg') output format modified by logging.warning('msg') type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file47686/logTest.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 00:02:11 2018 From: report at bugs.python.org (Ned Deily) Date: Fri, 13 Jul 2018 04:02:11 +0000 Subject: [issue34107] root.warning('msg') output format modified by logging.warning('msg') In-Reply-To: <1531441505.36.0.56676864532.issue34107@psf.upfronthosting.co.za> Message-ID: <1531454531.05.0.56676864532.issue34107@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 05:02:11 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 13 Jul 2018 09:02:11 +0000 Subject: [issue34107] root.warning('msg') output format modified by logging.warning('msg') In-Reply-To: <1531441505.36.0.56676864532.issue34107@psf.upfronthosting.co.za> Message-ID: <1531472531.39.0.56676864532.issue34107@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 05:09:50 2018 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 13 Jul 2018 09:09:50 +0000 Subject: [issue34107] root.warning('msg') output format modified by logging.warning('msg') In-Reply-To: <1531441505.36.0.56676864532.issue34107@psf.upfronthosting.co.za> Message-ID: <1531472990.55.0.56676864532.issue34107@psf.upfronthosting.co.za> Vinay Sajip added the comment: This behaviour is as expected. If no handlers are configured for logging, an internal "handler of last resort" is used, with just the message output. See: https://docs.python.org/3/howto/logging.html#what-happens-if-no-configuration-is-provided If you call logging.warning(...), and if no handlers are configured, then basicConfig() is internally called to set up a handler with a basic format string. See: https://docs.python.org/3/library/logging.html#logging.log So, what you've described is as it should be. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 05:11:51 2018 From: report at bugs.python.org (Erich Eckner) Date: Fri, 13 Jul 2018 09:11:51 +0000 Subject: [issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L In-Reply-To: <1531314657.47.0.56676864532.issue34096@psf.upfronthosting.co.za> Message-ID: <1531473111.37.0.56676864532.issue34096@psf.upfronthosting.co.za> Erich Eckner added the comment: yes, I'm using gcc (GCC) 8.1.1 20180531 I attached the created pythoninfo ---------- Added file: https://bugs.python.org/file47687/pythoninfo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 05:22:15 2018 From: report at bugs.python.org (Segev Finer) Date: Fri, 13 Jul 2018 09:22:15 +0000 Subject: [issue34091] REPL does not work in msys2, ConEmu terminals on windows In-Reply-To: <1531299732.09.0.56676864532.issue34091@psf.upfronthosting.co.za> Message-ID: <1531473735.88.0.56676864532.issue34091@psf.upfronthosting.co.za> Segev Finer added the comment: I'd assume this is using ConEmu's ChildGui which means it hacks up a MinTTY window to appear inside ConEmu's GUI. MinTTY doesn't use a real terminal but rather pipes as the processes stdio. Any native (non-MSYS2) Windows program would have a problem with this. The known workaround is to launch such programs using WinPTY (Available in the MSYS2 pacman), which creates a real console for the program in the background and communicates it's input/output so that it appear in the original console. Sadly that is a limitation of Windows, as Windows does not supply a proper PTY interface and MSYS2/MinTTY choose not to use something like WinPTY by default. ---------- nosy: +Segev Finer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 05:42:16 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 13 Jul 2018 09:42:16 +0000 Subject: [issue34087] django: segmentation fault on garbage collection in visit_decref() In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531474936.28.0.56676864532.issue34087@psf.upfronthosting.co.za> INADA Naoki added the comment: I received two core files ("core" and "core.23") from fenrrir, thank you. But I can't investigate well, sorry. I think someone breaks memory, and SEGV happened later. I need to reproduce it on my machine... In core.23, SEGV happens in kill() syscall. I can't get how it can happened. (gdb) bt 10 #0 0x00007ffff6c10187 in kill () at ../sysdeps/unix/syscall-template.S:78 #1 0x0000555555778f71 in os_kill_impl (module=, signal=, pid=) at ../Modules/posixmodule.c:6749 #2 os_kill (module=, args=, nargs=) at ../Modules/clinic/posixmodule.c.h:2672 #3 0x00005555555dd4ba in _PyMethodDef_RawFastCallKeywords (kwnames=0x0, nargs=140737353236984, args=0x7ffff7ee7e60, self=, method=0x555555c007a0 ) at ../Objects/call.c:651 In "core", SEGV happens in pymalloc. Pool is broken and I suppose some buffer overflow breaks the pool, but I'm not sure. #0 pymalloc_alloc (ptr_p=ptr_p at entry=0x7fffee81a640, nbytes=40, ctx=) at ../Objects/obmalloc.c:1398 #1 0x000055555562ed78 in pymalloc_alloc (ctx=, nbytes=40, ptr_p=0x7fffee81a640) at ../Objects/obmalloc.c:1565 #2 _PyObject_Malloc (ctx=, nbytes=40) at ../Objects/obmalloc.c:1555 #3 0x000055555561d5d5 in new_dict_with_shared_keys (keys=0x7ffff4e4c2d0) at ../Objects/dictobject.c:607 #4 _PyObjectDict_SetItem (tp=tp at entry=0x555555e8b338, dictptr=0x7fffedfe4250, key=key at entry='s', value=value at entry='\n

') at ../Objects/dictobject.c:4311 #5 0x000055555562b2d4 in _PyObject_GenericSetAttrWithDict (dict=0x0, value='\n

', name='s', obj=) at ../Objects/object.c:1319 #6 PyObject_GenericSetAttr (obj=, name='s', value='\n

') at ../Objects/object.c:1341 #7 0x000055555562a09f in PyObject_SetAttr (v=v at entry=, name=, value=value at entry='\n

') at ../Objects/object.c:978 #8 0x00005555555c67d8 in _PyEval_EvalFrameDefault (f=, throwflag=) at ../Python/ceval.c:2002 #9 0x00005555555c1787 in function_code_fastcall (co=co at entry=0x7ffff4e90930, args=, args at entry=0x7fffee81a930, nargs=2, globals=globals at entry={'__name__': 'django.template.base', '__doc__': "\nThis is the Django template system... ../Objects/call.c:283 (gdb) p pool $1 = (poolp) 0x7fffee861000 (gdb) p bp $2 = (block *) 0x7a672f (gdb) p *pool $3 = {ref = {_padding = 0x2c , count = 44}, freeblock = 0x7a672f , nextpool = 0x555555ba1fd0 , prevpool = 0x555555ba1fd0 , arenaindex = 170, szidx = 4, nextoffset = 1768, maxnextoffset = 4056} (gdb) p *(pool->nextpool) $4 = {ref = {_padding = 0x7fffeec2a000 "}", count = 4005732352}, freeblock = 0x7fffeea8e000 "\006", nextpool = 0x7fffee861000, prevpool = 0x7fffee861000, arenaindex = 4004200448, szidx = 32767, nextoffset = 4004200448, maxnextoffset = 32767} ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 05:43:16 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 13 Jul 2018 09:43:16 +0000 Subject: [issue34087] django: segmentation fault on random places In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531474996.56.0.56676864532.issue34087@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- title: django: segmentation fault on garbage collection in visit_decref() -> django: segmentation fault on random places _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 05:51:19 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 13 Jul 2018 09:51:19 +0000 Subject: [issue33859] Spelling mistakes found using aspell In-Reply-To: <1528978179.87.0.947875510639.issue33859@psf.upfronthosting.co.za> Message-ID: <1531475479.73.0.56676864532.issue33859@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Closing this since the related PRs are merged. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 06:41:49 2018 From: report at bugs.python.org (Jonas H.) Date: Fri, 13 Jul 2018 10:41:49 +0000 Subject: [issue34087] django: segmentation fault on random places In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531478509.15.0.56676864532.issue34087@psf.upfronthosting.co.za> Jonas H. added the comment: Reduced it to something that seems unicode related? No extension modules involved. Vanilla Django project with a single url + template. See testproj/urls.py and tmpl/index.html ---------- Added file: https://bugs.python.org/file47688/testproj.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 06:42:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Jul 2018 10:42:08 +0000 Subject: [issue34087] django: segmentation fault on random places In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531478528.37.0.56676864532.issue34087@psf.upfronthosting.co.za> STINNER Victor added the comment: If someone expects progress on these issues, we need to get a repository that we can clone to reproduce the bug. Then the code must be simplified as much as possible to reduce the code base. The best is when you still trigger the crash with less than 1000 lines of code and no or very few dependencies. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 06:57:51 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 13 Jul 2018 10:57:51 +0000 Subject: [issue34087] django: segmentation fault on random places In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531479471.86.0.56676864532.issue34087@psf.upfronthosting.co.za> INADA Naoki added the comment: @jonash Thanks! Would you give me concrete step to run the project and reproduce the segfault? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 07:00:19 2018 From: report at bugs.python.org (Jonas H.) Date: Fri, 13 Jul 2018 11:00:19 +0000 Subject: [issue34087] django: segmentation fault on random places In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531479619.03.0.56676864532.issue34087@psf.upfronthosting.co.za> Jonas H. added the comment: Sure. Unpack archive, create new 3.7 venv with Django (latest version is fine), ./manage.py runserver, curl localhost:8000. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 07:00:46 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Jul 2018 11:00:46 +0000 Subject: [issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L In-Reply-To: <1531314657.47.0.56676864532.issue34096@psf.upfronthosting.co.za> Message-ID: <1531479646.71.0.56676864532.issue34096@psf.upfronthosting.co.za> STINNER Victor added the comment: Extract of attached test.pythoninfo output: sys.maxsize: 2147483647 sysconfig[PY_CFLAGS]: -fno-strict-aliasing -march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -DNDEBUG -march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -I. -IInclude -I./Include -D_FORTIFY_SOURCE=2 -fPIC -DPy_BUILD_CORE I tried to reproduce the issue on my x86_64 Fedora 28 (64-bit) using: ./configure CFLAGS="-m32" LDFLAGS="-m32" && make But I failed to reproduce the issue. I also tried to add "-fstack-protector-strong -fno-plt" but I still fail to reproduce the bug. On interesting thing is that your CFLAGS don't contain -fwrapv. You can try the following command to check if gcc -v --help contains -fwrapv? "gcc -v --help|grep -- -fwrapv" With my french locale, for example, I see: -fwrapv Supposer que le d?bordement de l'arithm?tique sign?e boucle sur la plage accessible. You may try to force -fwrapv using ./configure CFLAGS="-fwrapv" or directly by adding directly the option to the OPT variable in Makefile. Example of options on my x86_64 Fedora and "./configure": OPT= -DNDEBUG -g -fwrapv -O3 -Wall BASECFLAGS= -Wno-unused-result -Wsign-compare CONFIGURE_CFLAGS_NODIST= -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration Note: When Python is compiled with --with-pydebug, -fwrapv is not used. Note: Your CFLAGS use -O2 whereas Python uses -O3 by default in release mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 07:14:43 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 13 Jul 2018 11:14:43 +0000 Subject: [issue34087] django: segmentation fault on random places In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531480483.36.0.56676864532.issue34087@psf.upfronthosting.co.za> INADA Naoki added the comment: I tried it but I can't reproduce... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 07:30:51 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 13 Jul 2018 11:30:51 +0000 Subject: [issue34087] django: segmentation fault on random places In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531481451.3.0.56676864532.issue34087@psf.upfronthosting.co.za> INADA Naoki added the comment: @jonash What Python binary do you use? * OS (distro and version) * Installed from package? if so, complete package name and version. * Installed from source? if so, step you used to install Python 3.7 (e.g. pyenv install 3.7) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 07:43:45 2018 From: report at bugs.python.org (Marcel Plch) Date: Fri, 13 Jul 2018 11:43:45 +0000 Subject: [issue34097] ZIP does not support timestamps before 1980 In-Reply-To: <1531319758.26.0.56676864532.issue34097@psf.upfronthosting.co.za> Message-ID: <1531482225.48.0.56676864532.issue34097@psf.upfronthosting.co.za> Change by Marcel Plch : ---------- keywords: +patch pull_requests: +7805 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 07:45:19 2018 From: report at bugs.python.org (Marcel Plch) Date: Fri, 13 Jul 2018 11:45:19 +0000 Subject: [issue34097] ZIP does not support timestamps before 1980 In-Reply-To: <1531319758.26.0.56676864532.issue34097@psf.upfronthosting.co.za> Message-ID: <1531482319.26.0.56676864532.issue34097@psf.upfronthosting.co.za> Marcel Plch added the comment: I have created a PR for this: https://github.com/python/cpython/pull/8270 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 07:48:23 2018 From: report at bugs.python.org (Jonas H.) Date: Fri, 13 Jul 2018 11:48:23 +0000 Subject: [issue34087] django: segmentation fault on random places In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531482503.74.0.56676864532.issue34087@psf.upfronthosting.co.za> Jonas H. added the comment: Here's a Docker image that reproduces the bug. FROM ubuntu:18.04 RUN apt update && apt install -y python3.7-dbg python3.7-venv python3-venv wget RUN python3.7 -m venv venv RUN venv/bin/pip install django RUN wget https://bugs.python.org/file47688/testproj.tar.gz -O - | tar xfz - CMD cd /testproj && /venv/bin/python manage.py runserver & sleep 5; wget -t1 localhost:8000 >/dev/null 2>/dev/null Of course this also works outside Docker. I have reproduced with macOS 10.13.5 (17F77) and Ubuntu 18.04 (Docker). On macOS it's Python 3.7.0 (default, Jun 29 2018, 20:13:13) [Clang 9.1.0 (clang-902.0.39.2)] on darwin, installed from Homebrew. On Ubuntu it's whatever is in the 18.04 repositories. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 08:03:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 13 Jul 2018 12:03:05 +0000 Subject: [issue17681] Work with an extra field of gzip and zip files In-Reply-To: <1365519781.38.0.309194725625.issue17681@psf.upfronthosting.co.za> Message-ID: <1531483385.98.0.56676864532.issue17681@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- versions: +Python 3.8 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 08:04:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 13 Jul 2018 12:04:25 +0000 Subject: [issue34097] ZIP does not support timestamps before 1980 In-Reply-To: <1531319758.26.0.56676864532.issue34097@psf.upfronthosting.co.za> Message-ID: <1531483465.1.0.56676864532.issue34097@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There are ZIP extensions which allow to save timestamps before 1980 and with better than 2-seconds resolution. It would be better to use this feature. But first we need to resolve issue17681. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 08:22:14 2018 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 13 Jul 2018 12:22:14 +0000 Subject: [issue34097] ZIP does not support timestamps before 1980 In-Reply-To: <1531319758.26.0.56676864532.issue34097@psf.upfronthosting.co.za> Message-ID: <1531484534.93.0.56676864532.issue34097@psf.upfronthosting.co.za> Petr Viktorin added the comment: I'm not sure the extensions will solve this problem fully. If an implementation that doesn't support these extensions, how does it handle them? For example, if Python 3.8 implements the extensions, I use py3.8 to create a zipfile containing old timestamps, and then want to uncompress the file using Python 2.7, how do I avoid losing the timestamp information? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 08:31:21 2018 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 13 Jul 2018 12:31:21 +0000 Subject: [issue34108] 2to3 munges new lines on Windows Message-ID: <1531485081.25.0.56676864532.issue34108@psf.upfronthosting.co.za> New submission from Jason R. Coombs : In issue11594, we attempted to solve the newlines issue but inadvertently introduced extraneous CR before CRLF newlines when running on Windows. See https://github.com/python/cpython/pull/6483#issuecomment-401957049 for more details. ---------- assignee: jason.coombs keywords: 3.7regression messages: 321599 nosy: jason.coombs priority: high severity: normal stage: commit review status: open title: 2to3 munges new lines on Windows type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 08:35:37 2018 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 13 Jul 2018 12:35:37 +0000 Subject: [issue34108] 2to3 munges new lines on Windows In-Reply-To: <1531485081.25.0.56676864532.issue34108@psf.upfronthosting.co.za> Message-ID: <1531485337.48.0.56676864532.issue34108@psf.upfronthosting.co.za> Change by Jason R. Coombs : ---------- keywords: +patch pull_requests: +7806 stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 08:37:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 13 Jul 2018 12:37:48 +0000 Subject: [issue34097] ZIP does not support timestamps before 1980 In-Reply-To: <1531319758.26.0.56676864532.issue34097@psf.upfronthosting.co.za> Message-ID: <1531485468.43.0.56676864532.issue34097@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You can't, because Python 2.7 doesn't support it. But you will be able to pack files in a ZIP archive and extract them without a loss on 3.8 and with a loss of a timestamp on 2.7. And you will be able to use a third-party utilities for extracting files without a loss. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 08:50:23 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 13 Jul 2018 12:50:23 +0000 Subject: [issue4260] Document that ctypes.xFUNCTYPE are decorators. In-Reply-To: <1225864263.85.0.365773038706.issue4260@psf.upfronthosting.co.za> Message-ID: <1531486223.28.0.56676864532.issue4260@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 379e9d639a52766f79c7a206c5096c8333d1896f by Berker Peksag (Andr?s Delfino) in branch 'master': bpo-4260: Document that ctypes.xFUNCTYPE are decorators (GH-7924) https://github.com/python/cpython/commit/379e9d639a52766f79c7a206c5096c8333d1896f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 08:50:47 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Jul 2018 12:50:47 +0000 Subject: [issue4260] Document that ctypes.xFUNCTYPE are decorators. In-Reply-To: <1225864263.85.0.365773038706.issue4260@psf.upfronthosting.co.za> Message-ID: <1531486247.46.0.56676864532.issue4260@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7807 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 08:50:55 2018 From: report at bugs.python.org (=?utf-8?q?Rodrigo_Pinheiro_Marques_de_Ara=C3=BAjo?=) Date: Fri, 13 Jul 2018 12:50:55 +0000 Subject: [issue34087] django: segmentation fault on random places In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531486255.31.0.56676864532.issue34087@psf.upfronthosting.co.za> Rodrigo Pinheiro Marques de Ara?jo added the comment: I can reproduce the segmentation fault using 'testproj.tar.gz' with homebrew and compiled from source. MacOS X High Sierra 10.13.5 (17F77). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 08:51:35 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Jul 2018 12:51:35 +0000 Subject: [issue4260] Document that ctypes.xFUNCTYPE are decorators. In-Reply-To: <1225864263.85.0.365773038706.issue4260@psf.upfronthosting.co.za> Message-ID: <1531486295.22.0.56676864532.issue4260@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7808 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 08:56:10 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 13 Jul 2018 12:56:10 +0000 Subject: [issue34087] float(unicode) may cause segmentation fault In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531486570.09.0.56676864532.issue34087@psf.upfronthosting.co.za> INADA Naoki added the comment: Very thanks! I found I set `export PYTHONMALLOC=pymalloc_debug`. That's why I can't reproduce it. Now I can reproduce and I get where memory is broken, and understood what cause: Python traceback is: Traceback (most recent call first): File "/home/inada-n/t/bpo34087/testproj/v38/lib/python3.8/site-packages/django/template/base.py", line 767, in __init__ self.literal = float(var) File "/home/inada-n/t/bpo34087/testproj/v38/lib/python3.8/site-packages/django/template/base.py", line 646, in __init__ var_obj = Variable(constant).resolve({}) File "/home/inada-n/t/bpo34087/testproj/v38/lib/python3.8/site-packages/django/template/base.py", line 568, in compile_filter return FilterExpression(token, self) File "/home/inada-n/t/bpo34087/testproj/v38/lib/python3.8/site-packages/django/templatetags/i18n.py", line 368, in do_translate message_string = parser.compile_filter(bits[1]) File "/home/inada-n/t/bpo34087/testproj/v38/lib/python3.8/site-packages/django/template/base.py", line 481, in parse compiled_result = compile_func(self, token) File "/home/inada-n/t/bpo34087/testproj/v38/lib/python3.8/site-packages/django/template/loader_tags.py", line 233, in do_block nodelist = parser.parse(('endblock',)) File "/home/inada-n/t/bpo34087/testproj/v38/lib/python3.8/site-packages/django/template/base.py", line 481, in parse compiled_result = compile_func(self, token) File "/home/inada-n/t/bpo34087/testproj/v38/lib/python3.8/site-packages/django/template/base.py", line 198, in compile_nodelist return parser.parse() File "/home/inada-n/t/bpo34087/testproj/v38/lib/python3.8/site-packages/django/template/base.py", line 160, in __init__ self.nodelist = self.compile_nodelist() File "/home/inada-n/t/bpo34087/testproj/v38/lib/python3.8/site-packages/django/template/loaders/base.py", line 30, in get_template C traceback is: #0 0x0000557880378c95 in _Py_string_to_number_with_underscores (s=0x7ff07d8e7bc0 "\"So erstellen Sie einen Zahlungslink f?ded_blocks'", orig_len=39, what=0x55788046d60a "float", obj='"So erstellen Sie einen Zahlungslink f?r Ihre Rechnung"', arg=0x7ff07d9368b0, innerfunc=0x557880276b10 ) at Python/pystrtod.c:410 #1 0x0000557880279b23 in PyFloat_FromString (v='"So erstellen Sie einen Zahlungslink f?r Ihre Rechnung"') at Objects/floatobject.c:208 #2 0x0000557880279cd5 in float_new_impl (x=, type=0x5578806e4ee0 ) at Objects/floatobject.c:1627 #3 float_new (type=, args=('"So erstellen Sie einen Zahlungslink f?r Ihre Rechnung"',), kwargs=) at Objects/clinic/floatobject.c.h:181 #4 0x00005578802cfdc5 in type_call (type=type at entry=0x5578806e4ee0 , args=args at entry=('"So erstellen Sie einen Zahlungslink f?r Ihre Rechnung"',), kwds=kwds at entry=0x0) at Objects/typeobject.c:929 #5 0x000055788026b3bf in _PyObject_FastCallKeywords (callable=callable at entry=, stack=, nargs=nargs at entry=1, kwnames=kwnames at entry=0x0) at Objects/call.c:199 #6 0x00005578802526f4 in call_function (kwnames=0x0, oparg=, pp_stack=) at Python/ceval.c:4600 #7 _PyEval_EvalFrameDefault (f=, throwflag=) at Python/ceval.c:3183 #8 0x000055788024fb17 in function_code_fastcall (co=co at entry=0x7ff07ec4f0c0, args=, args at entry=0x7ffc786f2330, nargs=2, globals=globals at entry={'__name__': 'django.template.base', '__doc__': "\nThis is the Django template system.\n\nHow it works:\n\nThe Lexer.tokenize() function converts a template string (i.e., a string containing\nmarkup with custom template tags) to tokens, which can be either plain text\n(TOKEN_TEXT), variables (TOKEN_VAR) or block statements (TOKEN_BLOCK).\n\nThe Parser( ) class takes a list of tokens in its constructor, and its parse()\nmethod returns a compiled template -- which is, under the hood, a list of\nNode objects.\n\nEach Node is responsible for c reating some sort of output -- e.g. simple text\n(TextNode), variable values in a given context (VariableNode), results of basic\nlogic (IfNode), results of looping (ForNode), or anything el se. The core Node\ntypes are TextNode, VariableNode, IfNode and ForNode, but plugin modules can\ndefine their own custom node types.\n\nEach Node has a render() method, which takes a Context and returns a string of\nthe rendered node. For example, the render() method of a Variable Node ret...(truncated)) at Objects/call.c:283 #9 0x000055788026ad87 in _PyFunction_FastCallDict (func=, args=0x7ffc786f2330, nargs=, kwargs=0x0) at Objects/call.c:322 #10 0x000055788026ddc1 in _PyObject_FastCallDict (kwargs=0x0, nargs=2, args=0x7ffc786f2330, callable=) at Objects/call.c:98 ---------- title: django: segmentation fault on random places -> float(unicode) may cause segmentation fault _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 08:59:30 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Jul 2018 12:59:30 +0000 Subject: [issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L In-Reply-To: <1531314657.47.0.56676864532.issue34096@psf.upfronthosting.co.za> Message-ID: <1531486770.81.0.56676864532.issue34096@psf.upfronthosting.co.za> STINNER Victor added the comment: I installed Fedora 28 in 32-bit (GCC 8.1.1) in a VM to try to reproduce the bug, but I failed to reproduce it. Erich Eckner: IMHO your issue comes from a C flag. Try to loop on: touch Modules/audioop.c && make && ./python -m test test_audioop And remove flags from PY_CFLAGS in Makefile, one by one, until the bug goes away, to try to identify which C flags causes your issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 09:00:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Jul 2018 13:00:52 +0000 Subject: [issue34087] float(unicode) may cause segmentation fault In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531486852.75.0.56676864532.issue34087@psf.upfronthosting.co.za> STINNER Victor added the comment: It might be a duplicate of bpo-33954: bug in _PyUnicode_InsertThousandsGrouping(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 09:01:54 2018 From: report at bugs.python.org (Erich Eckner) Date: Fri, 13 Jul 2018 13:01:54 +0000 Subject: [issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L In-Reply-To: <1531314657.47.0.56676864532.issue34096@psf.upfronthosting.co.za> Message-ID: <1531486914.99.0.56676864532.issue34096@psf.upfronthosting.co.za> Erich Eckner added the comment: yes, indeed, I just tested with your three flags-variables set and the build+test succeeded - I'll have to figure out what the minimal change is, though :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 09:05:01 2018 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 13 Jul 2018 13:05:01 +0000 Subject: [issue34097] ZIP does not support timestamps before 1980 In-Reply-To: <1531319758.26.0.56676864532.issue34097@psf.upfronthosting.co.za> Message-ID: <1531487101.91.0.56676864532.issue34097@psf.upfronthosting.co.za> Petr Viktorin added the comment: Which third-party utilities support these? As I said, AFAIK `zip` on my system does not. I assume the loss of data is the reason we have an error now -- if that wasn't a concern, zipfile could just silently bump the timestamp to 1980. When the extensions are implemented, `strict_timestamps=False` should *additionally* use the extension, but default should still be to raise the error (to prevent metadata loss when decompressing with older/simpler tools). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 09:08:43 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 13 Jul 2018 13:08:43 +0000 Subject: [issue34087] int(s), float(s) and others may cause segmentation fault In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531487323.03.0.56676864532.issue34087@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- title: float(unicode) may cause segmentation fault -> int(s), float(s) and others may cause segmentation fault _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 09:12:17 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 13 Jul 2018 13:12:17 +0000 Subject: [issue34087] int(s), float(s) and others may cause segmentation fault In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531487537.68.0.56676864532.issue34087@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- keywords: +patch pull_requests: +7809 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 09:12:17 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 13 Jul 2018 13:12:17 +0000 Subject: [issue31979] Simplify converting non-ASCII strings to int, float and complex In-Reply-To: <1510143681.24.0.213398074469.issue31979@psf.upfronthosting.co.za> Message-ID: <1531487537.78.0.665841612001.issue31979@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- pull_requests: +7810 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 09:27:18 2018 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 13 Jul 2018 13:27:18 +0000 Subject: [issue32046] 2to3 fix for operator.isCallable() In-Reply-To: <1510823372.85.0.213398074469.issue32046@psf.upfronthosting.co.za> Message-ID: <1531488438.2.0.56676864532.issue32046@psf.upfronthosting.co.za> Dong-hee Na added the comment: @serhiy.storchaka If we don't have plans with backporting patches than we can close this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 09:32:36 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 13 Jul 2018 13:32:36 +0000 Subject: [issue21446] Update reload fixer to use importlib instead of imp In-Reply-To: <1399369899.96.0.959859751651.issue21446@psf.upfronthosting.co.za> Message-ID: <1531488756.69.0.56676864532.issue21446@psf.upfronthosting.co.za> Berker Peksag added the comment: Brett, what do you think about this issue since Python 3.4 is pretty old now. Should I convert my patch to GitHub PR or close this issue as 'wontfix'? ---------- type: -> enhancement versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 09:35:34 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Jul 2018 13:35:34 +0000 Subject: [issue4260] Document that ctypes.xFUNCTYPE are decorators. In-Reply-To: <1225864263.85.0.365773038706.issue4260@psf.upfronthosting.co.za> Message-ID: <1531488934.69.0.56676864532.issue4260@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 08c1da71030e0d6019b3493e0ffaf060a6aa5d8e by Miss Islington (bot) in branch '3.7': bpo-4260: Document that ctypes.xFUNCTYPE are decorators (GH-7924) https://github.com/python/cpython/commit/08c1da71030e0d6019b3493e0ffaf060a6aa5d8e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 09:52:50 2018 From: report at bugs.python.org (Christian Tismer) Date: Fri, 13 Jul 2018 13:52:50 +0000 Subject: [issue34093] Reproducible pyc: FLAG_REF is not stable. In-Reply-To: <1531305608.98.0.56676864532.issue34093@psf.upfronthosting.co.za> Message-ID: <1531489970.05.0.56676864532.issue34093@psf.upfronthosting.co.za> Christian Tismer added the comment: Why must this become slower? To my knowledge, many projects prefer marshal over pickle for suitable simple objects because it is so very fast. I would not throw that away: Would it not be easy to add a named optional keyword argument, like "stable=True"? ---------- nosy: +Christian.Tismer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 09:54:23 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Jul 2018 13:54:23 +0000 Subject: [issue4260] Document that ctypes.xFUNCTYPE are decorators. In-Reply-To: <1225864263.85.0.365773038706.issue4260@psf.upfronthosting.co.za> Message-ID: <1531490063.35.0.56676864532.issue4260@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 083a836937b734fcc81b2482d2c52825caff0115 by Miss Islington (bot) in branch '3.6': bpo-4260: Document that ctypes.xFUNCTYPE are decorators (GH-7924) https://github.com/python/cpython/commit/083a836937b734fcc81b2482d2c52825caff0115 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 09:57:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 13 Jul 2018 13:57:26 +0000 Subject: [issue34087] int(s), float(s) and others may cause segmentation fault In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531490246.47.0.56676864532.issue34087@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is it possible to write a reproducer in Python? The string returned by _PyUnicode_TransformDecimalAndSpaceToASCII() is still a NUL-terminated, but the NUL can be far past the end of the string. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 10:05:29 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 13 Jul 2018 14:05:29 +0000 Subject: [issue4260] Document that ctypes.xFUNCTYPE are decorators. In-Reply-To: <1225864263.85.0.365773038706.issue4260@psf.upfronthosting.co.za> Message-ID: <1531490729.88.0.56676864532.issue4260@psf.upfronthosting.co.za> Berker Peksag added the comment: I think we can now close this one. Thanks for the report, David, and thanks for the PR Andreas. (And thanks for creating and maintaining this awesome module for years, Thomas :)) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 10:17:24 2018 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 13 Jul 2018 14:17:24 +0000 Subject: [issue34108] 2to3 munges new lines on Windows In-Reply-To: <1531485081.25.0.56676864532.issue34108@psf.upfronthosting.co.za> Message-ID: <1531491444.41.0.56676864532.issue34108@psf.upfronthosting.co.za> Jason R. Coombs added the comment: The regression never got to 3.6, so this issue likely only affects 3.7+. ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 10:46:27 2018 From: report at bugs.python.org (Jonas H.) Date: Fri, 13 Jul 2018 14:46:27 +0000 Subject: [issue34087] int(s), float(s) and others may cause segmentation fault In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531493187.36.0.56676864532.issue34087@psf.upfronthosting.co.za> Jonas H. added the comment: I don't think this can be tested with Python code, unless you can make sure the target buffer _PyUnicode_TransformDecimalAndSpaceToASCII operates on is initialised with garbage bytes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 10:52:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Jul 2018 14:52:34 +0000 Subject: [issue34087] int(s), float(s) and others may cause segmentation fault In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531493554.36.0.56676864532.issue34087@psf.upfronthosting.co.za> STINNER Victor added the comment: > I don't think this can be tested with Python code, unless you can make sure the target buffer _PyUnicode_TransformDecimalAndSpaceToASCII operates on is initialised with garbage bytes. We just have to call float() with a non-ASCII string, no? An assertion must fail without the fix when Python is compiled in debug mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 10:54:19 2018 From: report at bugs.python.org (Jonas H.) Date: Fri, 13 Jul 2018 14:54:19 +0000 Subject: [issue34087] int(s), float(s) and others may cause segmentation fault In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531493659.2.0.56676864532.issue34087@psf.upfronthosting.co.za> Jonas H. added the comment: The assertion in the patched code, yes. The segfault in the unpatched code, no. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 11:13:43 2018 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 13 Jul 2018 15:13:43 +0000 Subject: [issue32046] 2to3 fix for operator.isCallable() In-Reply-To: <1510823372.85.0.213398074469.issue32046@psf.upfronthosting.co.za> Message-ID: <1531494823.93.0.56676864532.issue32046@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 11:26:06 2018 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 13 Jul 2018 15:26:06 +0000 Subject: [issue34108] 2to3 munges new lines on Windows In-Reply-To: <1531485081.25.0.56676864532.issue34108@psf.upfronthosting.co.za> Message-ID: <1531495566.28.0.56676864532.issue34108@psf.upfronthosting.co.za> Jason R. Coombs added the comment: New changeset cafaf0447b950fd4f59edd8cbde040c61ae528f8 by Jason R. Coombs in branch 'master': bpo-34108: Fix double carriage return in 2to3 on Windows (#8271) https://github.com/python/cpython/commit/cafaf0447b950fd4f59edd8cbde040c61ae528f8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 11:27:22 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Jul 2018 15:27:22 +0000 Subject: [issue34108] 2to3 munges new lines on Windows In-Reply-To: <1531485081.25.0.56676864532.issue34108@psf.upfronthosting.co.za> Message-ID: <1531495642.51.0.56676864532.issue34108@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7811 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 11:29:21 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 13 Jul 2018 15:29:21 +0000 Subject: [issue34075] asyncio: We should prohibit setting a ProcessPoolExecutor in with set_default_executor In-Reply-To: <1531150174.99.0.56676864532.issue34075@psf.upfronthosting.co.za> Message-ID: <1531495761.11.0.56676864532.issue34075@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Agree, restricting to ThreadPoolExecutor sounds reasonable. A custom executor may have the same problem as ProcessPoolExecutor. Moreover it can work under same scenarios but crash with other third-party libs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 11:34:49 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 13 Jul 2018 15:34:49 +0000 Subject: [issue34087] int(s), float(s) and others may cause segmentation fault In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531496089.91.0.56676864532.issue34087@psf.upfronthosting.co.za> INADA Naoki added the comment: When I commented out the fix: $ ./python -c 'int("?????")' python: Objects/unicodeobject.c:484: _PyUnicode_CheckConsistency: Assertion `PyUnicode_READ(kind, data, ascii->length) == 0' failed. Aborted I added this to test cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 11:38:53 2018 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 13 Jul 2018 15:38:53 +0000 Subject: [issue34087] int(s), float(s) and others may cause segmentation fault In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531496333.15.0.56676864532.issue34087@psf.upfronthosting.co.za> Change by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 11:52:08 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 13 Jul 2018 15:52:08 +0000 Subject: [issue34093] Reproducible pyc: FLAG_REF is not stable. In-Reply-To: <1531305608.98.0.56676864532.issue34093@psf.upfronthosting.co.za> Message-ID: <1531497128.21.0.56676864532.issue34093@psf.upfronthosting.co.za> INADA Naoki added the comment: > Would it not be easy to add a named optional keyword > argument, like "stable=True"? My pull request did it. But for now, I get hint on ML and overwrote my PR with another way: Use FLAG_REF for all interned strings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 12:19:58 2018 From: report at bugs.python.org (Jakub Wilk) Date: Fri, 13 Jul 2018 16:19:58 +0000 Subject: [issue34066] Possible resource warning in "with open()" In-Reply-To: <1530983512.39.0.56676864532.issue34066@psf.upfronthosting.co.za> Message-ID: <1531498798.65.0.56676864532.issue34066@psf.upfronthosting.co.za> Change by Jakub Wilk : ---------- nosy: +jwilk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 12:54:16 2018 From: report at bugs.python.org (Victor Pires) Date: Fri, 13 Jul 2018 16:54:16 +0000 Subject: [issue34109] Accumulator bug Message-ID: <1531500850.33.0.56676864532.issue34109@psf.upfronthosting.co.za> New submission from Victor Pires : A function to return a number from 1 to 5 (inclusive) sometimes returns -1 when called thousands of times. from random import randint import sys def rand5(): """Returns a random integer from 1 to 5 (inclusive)""" r5 = -5 # This *should* accumulate from zero to 24 for _ in range(4): r5 += randint(1, 7) for i in range(5): if (r5 == -1): # BUG: This should never happen, r5 = [0; 24] return r5 if (r5 in [(i + j*5) for j in range(5)]): return (i + 1) d = {key: 0 for key in range(-1, 6)} # Should only be range(1, 6)... for _ in range(int(1e6)): # One million d[rand5()] += 1 print(sys.version) for key in d: print(key, d[key]) $ python2.7 Bug.py 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] (0, 0) (1, 200514) (2, 200273) (3, 200689) (4, 199588) (5, 198543) (-1, 393) $ python3.5 Bug.py 3.5.2 (default, Nov 23 2017, 16:37:01) [GCC 5.4.0 20160609] 0 0 1 200956 2 200529 3 200017 4 199047 5 199030 -1 421 $ python3.6 Bug.py 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 17:14:51) [GCC 7.2.0] -1 421 0 0 1 200562 2 202025 3 200116 4 198899 5 197977 $ python3.7 Bug.py 3.7.0 (default, Jun 28 2018, 13:15:42) [GCC 7.2.0] -1 433 0 0 1 200039 2 200676 3 200629 4 199322 5 198901 ---------- components: Interpreter Core files: Bug.html messages: 321623 nosy: vicpires priority: normal severity: normal status: open title: Accumulator bug type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 Added file: https://bugs.python.org/file47689/Bug.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 13:04:13 2018 From: report at bugs.python.org (Tim Peters) Date: Fri, 13 Jul 2018 17:04:13 +0000 Subject: [issue34109] Accumulator bug In-Reply-To: <1531500850.33.0.56676864532.issue34109@psf.upfronthosting.co.za> Message-ID: <1531501453.89.0.56676864532.issue34109@psf.upfronthosting.co.za> Tim Peters added the comment: ? I expect your code to return -1 about once per 7**4 = 2401 times, which would be about 400 times per million tries, which is what your output shows. If you start with -5, and randint(1, 7) returns 1 four times in a row, r5 is left at -5 + 4 = -1. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 13:14:19 2018 From: report at bugs.python.org (Victor Pires) Date: Fri, 13 Jul 2018 17:14:19 +0000 Subject: [issue34109] Accumulator bug In-Reply-To: <1531500850.33.0.56676864532.issue34109@psf.upfronthosting.co.za> Message-ID: <1531502059.49.0.56676864532.issue34109@psf.upfronthosting.co.za> Change by Victor Pires : Removed file: https://bugs.python.org/file47689/Bug.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 13:17:15 2018 From: report at bugs.python.org (Victor Pires) Date: Fri, 13 Jul 2018 17:17:15 +0000 Subject: [issue34109] Accumulator bug In-Reply-To: <1531500850.33.0.56676864532.issue34109@psf.upfronthosting.co.za> Message-ID: <1531502235.87.0.56676864532.issue34109@psf.upfronthosting.co.za> Victor Pires added the comment: Sorry, you are right ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 14:12:41 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 13 Jul 2018 18:12:41 +0000 Subject: [issue34063] binhex REASONABLY_LARGE = 32768 so what is 128000 In-Reply-To: <1530913345.39.0.56676864532.issue34063@psf.upfronthosting.co.za> Message-ID: <1531505561.17.0.56676864532.issue34063@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I tried changing it to REASONABLY_LARGE and could see no test failures. It seems the literal was added as part of a220e67a9ed94d66b81e393a3bb9e6acd10068c1 (23/03/1996) and REASONABLY_LARGE was before that as added part of fcdffeaaa144147f43224a641b668df539ffb6fe (07/08/1995) ? cpython git:(master) time ./python -Werror -m unittest -v test.test_binhex test_binhex (test.test_binhex.BinHexTestCase) ... ok test_binhex_error_on_long_filename (test.test_binhex.BinHexTestCase) ... ok ---------------------------------------------------------------------- Ran 2 tests in 0.002s OK ./python -Werror -m unittest -v test.test_binhex 0.23s user 0.03s system 93% cpu 0.279 total ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 14:40:08 2018 From: report at bugs.python.org (Guoqiang Zhang) Date: Fri, 13 Jul 2018 18:40:08 +0000 Subject: [issue34110] cPickle may raise AttributeError when loading concurrently in threads Message-ID: <1531507208.03.0.56676864532.issue34110@psf.upfronthosting.co.za> New submission from Guoqiang Zhang : If two threads use cPickle to load objects simultaneously, one thread may raise an AttributeError. This problem is caused by the partially loaded module. To reproduce, create a file 'foo.py': import time time.sleep(0.1) class foo(): pass Then in main.py: import threading import cPickle threads = [threading.Thread(target=cPickle.loads, args=('cfoo\nfoo\np0\n.',)) for _ in range(2)] [thread.start() for thread in threads] [thread.join() for thread in threads] Run main.py, there should be a crash: Exception in thread Thread-2: Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run self.__target(*self.__args, **self.__kwargs) AttributeError: 'module' object has no attribute 'foo' ---------- components: Library (Lib) messages: 321627 nosy: sangongs priority: normal severity: normal status: open title: cPickle may raise AttributeError when loading concurrently in threads type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 14:49:29 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 13 Jul 2018 18:49:29 +0000 Subject: [issue27741] datetime.datetime.strptime functionality description incorrect In-Reply-To: <1470941311.19.0.0562450492824.issue27741@psf.upfronthosting.co.za> Message-ID: <1531507769.95.0.56676864532.issue27741@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: The same part repeated at https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior can also be corrected. It seems both of them use _strptime which returns microseconds but only datetime.datetime.strptime uses it with time.strptime ignoring it. Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 14:57:32 2018 From: report at bugs.python.org (Guoqiang Zhang) Date: Fri, 13 Jul 2018 18:57:32 +0000 Subject: [issue34110] cPickle may raise AttributeError when loading concurrently in threads In-Reply-To: <1531507208.03.0.56676864532.issue34110@psf.upfronthosting.co.za> Message-ID: <1531508252.35.0.56676864532.issue34110@psf.upfronthosting.co.za> Change by Guoqiang Zhang : ---------- keywords: +patch pull_requests: +7812 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 15:24:21 2018 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 13 Jul 2018 19:24:21 +0000 Subject: [issue34108] 2to3 munges new lines on Windows In-Reply-To: <1531485081.25.0.56676864532.issue34108@psf.upfronthosting.co.za> Message-ID: <1531509861.99.0.56676864532.issue34108@psf.upfronthosting.co.za> Jason R. Coombs added the comment: New changeset cf21d0031dd84544d4108765553c2b03dfe726c5 by Jason R. Coombs (Miss Islington (bot)) in branch '3.7': bpo-34108: Fix double carriage return in 2to3 on Windows (GH-8271) (#8275) https://github.com/python/cpython/commit/cf21d0031dd84544d4108765553c2b03dfe726c5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 15:25:33 2018 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 13 Jul 2018 19:25:33 +0000 Subject: [issue34108] 2to3 munges new lines on Windows In-Reply-To: <1531485081.25.0.56676864532.issue34108@psf.upfronthosting.co.za> Message-ID: <1531509933.71.0.56676864532.issue34108@psf.upfronthosting.co.za> Change by Jason R. Coombs : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 15:28:10 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 13 Jul 2018 19:28:10 +0000 Subject: [issue21446] Update reload fixer to use importlib instead of imp In-Reply-To: <1399369899.96.0.959859751651.issue21446@psf.upfronthosting.co.za> Message-ID: <1531510090.11.0.56676864532.issue21446@psf.upfronthosting.co.za> Brett Cannon added the comment: I would still fix it as I suspect there will be a burst of users of this come 2020 and at this point it won't be a compatibility issue going forward since 3.4 is so old. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 15:42:36 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 13 Jul 2018 19:42:36 +0000 Subject: [issue34095] [2.7] test_idle fails with: /usr/bin/xvfb-run: line 181: 3617 Segmentation fault In-Reply-To: <1531314252.99.0.56676864532.issue34095@psf.upfronthosting.co.za> Message-ID: <1531510956.23.0.56676864532.issue34095@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think we should first determine whether xvfb is required to get the segfault, and second, where it fails. Does -m test.regrtest -v -m test_io test_idle fail and fail in the same place, the 11th and last test run in the module? If not, what about xvfb-run -m ...? In either case, inserting prints in 'test_writelines', which has multiple asserts, should determine where it fails. Test.test_idle checks that tkinter can imported, which in turn imports _tkinter, which tries to connect to a windowing system. Running with xvfb satisfies this. Test_idle finds and run the test modules in idlelib.idle_test. Individual modules and classes somewhat redundantly import test.support and check "requires('gui')". So IDLE gui tests, and, I am fairly sure, the tkinter gui tests, also require -ugui or -uall to run. Test_io is not a gui test, so does not need or run "requires('gui')", and hence does not need -ugui. On the other hand, it imports PyShell, which imports tkinter and _tkinter, and hence would need xvfb-run on a headless server, as opposed to a workstation with screen. Erich, I assume you are running on the latter. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 16:03:39 2018 From: report at bugs.python.org (Michael Kearney) Date: Fri, 13 Jul 2018 20:03:39 +0000 Subject: [issue34107] root.warning('msg') output format modified by logging.warning('msg') In-Reply-To: <1531441505.36.0.56676864532.issue34107@psf.upfronthosting.co.za> Message-ID: <1531512219.38.0.56676864532.issue34107@psf.upfronthosting.co.za> Michael Kearney added the comment: Thanks for the clarification and doc pointers. I saw "lastResort" attribute in the code but had not fully understood what was going on. I am not certain I really do now, but that's ok. That's why we read docs, read and write code. Eventually it starts making sense. It appears that there is history to contend with or complications provoked by threads. I had not yet read the lastResort discussion in the documentation. That's deep in the advanced tutorial, I was getting tripped up by simple examples that I concocted from very simple cases, which can be on the fringes of actual usage. I wonder why "lastResort" differs from the built-in default. I was playing with basicConfig because I wanted to experiment with formatting and level, and I managed to generate messages that seemed unrelated to formating I had specified. For now it appears that after import logging I can add logging.warning('') and achieve what I want. I get the default format where I expect rather than lastResort format. I prefer the default format that I get from the internal call to basicConfig. I can imagine the there will be a situation where I want the even simpler "last resort format". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 16:06:24 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 13 Jul 2018 20:06:24 +0000 Subject: [issue34100] Same constants in tuples are not merged while compile() In-Reply-To: <1531336111.06.0.56676864532.issue34100@psf.upfronthosting.co.za> Message-ID: <1531512384.3.0.56676864532.issue34100@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think (space) 'performance' would be a better label, as this is strictly an implementation improvement, not a language change. But we often (usually? sometimes?) limit performance improvements to the 'next version' so we have the alpha/beta/candidate releases to discover possible regressions. I think this is worth considering just because the pattern is so odd. But if this is ironed out as part of a broader and better patch, great. ---------- nosy: +terry.reedy stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 17:05:39 2018 From: report at bugs.python.org (Diego Argueta) Date: Fri, 13 Jul 2018 21:05:39 +0000 Subject: [issue33361] readline() + seek() on codecs.EncodedFile breaks next readline() In-Reply-To: <1524704763.78.0.682650639539.issue33361@psf.upfronthosting.co.za> Message-ID: <1531515939.51.0.56676864532.issue33361@psf.upfronthosting.co.za> Diego Argueta added the comment: Bug still present in 3.7.0, now seeing it in 3.8.0a0 as well. ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 17:34:39 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 13 Jul 2018 21:34:39 +0000 Subject: [issue34102] local variable 'parts' referenced before assignment in feedparser in email module In-Reply-To: <1531397629.91.0.56676864532.issue34102@psf.upfronthosting.co.za> Message-ID: <1531517679.43.0.56676864532.issue34102@psf.upfronthosting.co.za> Terry J. Reedy added the comment: An exception is not a crash. An intended exception is not even a bug. A bug is a discrepancy between behavior and doc. In this case, email.parser.Feedparser is imported from email.feedparser. Its doc https://docs.python.org/2.7/library/email.parser.html#feedparser-api says "feed(data) Feed the FeedParser some more data. data should be a string containing one or more lines." In addition, html.parser.HTMLParser.feed(data) say "data must be str." For either, behavior upon passing anything else is undefined. Defining the behavior for None, and defining it to be 'return something' rather than 'raise something', would be an enhancement. Such enhancements are only added, if deemed desirable, in future versions. (Note: I recommend against resubmitting this for 3.8. Masking bugs in 3rd party code is contrary to policy. There would have to be a positive use-case of benefit large enough to multiple users to overcome the masking deficit.) ---------- nosy: +terry.reedy resolution: -> not a bug stage: patch review -> resolved status: open -> closed type: crash -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 17:36:24 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 13 Jul 2018 21:36:24 +0000 Subject: [issue34102] None.splitlines raises AttributeError in email.feedparser In-Reply-To: <1531397629.91.0.56676864532.issue34102@psf.upfronthosting.co.za> Message-ID: <1531517784.86.0.56676864532.issue34102@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- title: local variable 'parts' referenced before assignment in feedparser in email module -> None.splitlines raises AttributeError in email.feedparser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 17:44:17 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 13 Jul 2018 21:44:17 +0000 Subject: [issue34102] None.splitlines raises AttributeError in email.feedparser In-Reply-To: <1531397629.91.0.56676864532.issue34102@psf.upfronthosting.co.za> Message-ID: <1531518257.26.0.56676864532.issue34102@psf.upfronthosting.co.za> Terry J. Reedy added the comment: What you can do is report to pip and ansible-lint that there is a bug somewhere in one of the two packages, or try to figure out which and report it to one of them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 17:46:20 2018 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 13 Jul 2018 21:46:20 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1531518380.33.0.56676864532.issue34037@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 17:49:09 2018 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 13 Jul 2018 21:49:09 +0000 Subject: [issue33073] Add as_integer_ratio() to int() objects In-Reply-To: <1520976305.18.0.467229070634.issue33073@psf.upfronthosting.co.za> Message-ID: <1531518549.14.0.56676864532.issue33073@psf.upfronthosting.co.za> Guido van Rossum added the comment: I assume it's decided what to do -- it may not be easy to do it, but I wouldn't call it controversial at this point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 17:49:15 2018 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 13 Jul 2018 21:49:15 +0000 Subject: [issue33073] Add as_integer_ratio() to int() objects In-Reply-To: <1520976305.18.0.467229070634.issue33073@psf.upfronthosting.co.za> Message-ID: <1531518555.24.0.56676864532.issue33073@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 18:42:22 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 13 Jul 2018 22:42:22 +0000 Subject: [issue32584] Uninitialized free_extra in code_dealloc In-Reply-To: <1516203304.77.0.467229070634.issue32584@psf.upfronthosting.co.za> Message-ID: <1531521742.77.0.56676864532.issue32584@psf.upfronthosting.co.za> Brett Cannon added the comment: co_extra_freefuncs is an array of pointers, so there's no way for it to be uninitialized unless you didn't initialize the interpreter state (https://github.com/python/cpython/blob/b193fa996a746111252156f11fb14c12fd6267e6/Include/pystate.h#L155). And looking at your gdb session it shows the memory wipeout pattern which means you're accessing an interpreter state that has already been freed itself. IOW I don't think this is a PEP 523 issue specifically. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 19:00:00 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 13 Jul 2018 23:00:00 +0000 Subject: [issue34110] cPickle may raise AttributeError when loading concurrently in threads In-Reply-To: <1531507208.03.0.56676864532.issue34110@psf.upfronthosting.co.za> Message-ID: <1531522800.24.0.56676864532.issue34110@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: This behaviour also happens on the current master. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 19:00:16 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 13 Jul 2018 23:00:16 +0000 Subject: [issue34110] cPickle may raise AttributeError when loading concurrently in threads In-Reply-To: <1531507208.03.0.56676864532.issue34110@psf.upfronthosting.co.za> Message-ID: <1531522816.93.0.56676864532.issue34110@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- versions: +Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 19:48:04 2018 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 13 Jul 2018 23:48:04 +0000 Subject: [issue32430] Simplify Modules/Setup{,.dist,.local} In-Reply-To: <1514373303.98.0.213398074469.issue32430@psf.upfronthosting.co.za> Message-ID: <1531525684.18.0.56676864532.issue32430@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 20:17:48 2018 From: report at bugs.python.org (Preston Moore) Date: Sat, 14 Jul 2018 00:17:48 +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: <1531527468.95.0.56676864532.issue30400@psf.upfronthosting.co.za> Preston Moore added the comment: I like Victor's idea for updating public functions to support file descriptors. I could submit a patch for this instead if desired. In the meantime, I've updated the pull request for this issue so the patch I originally created that compares inode numbers applies to 3.8. I've included a test case as well. I think Victor's idea may be superior to the inode comparison. It is in the same spirit as glibc preferring openat() rather than open() (https://lwn.net/Articles/738694/) to counter directories changing during an operation. Alternatively, coreutils (https://github.com/coreutils/coreutils/blob/439741053256618eb651e6d43919df29625b8714/src/copy.c#L1051) deals with this issue using inode comparison. Perhaps this is because they don't have a clean way of supporting both paths and fds like we do with Python. This overall issue has extra cause for concern because it can be exploited by an attacker as a security vulnerability (https://wiki.sei.cmu.edu/confluence/display/c/FIO45-C.+Avoid+TOCTOU+race+conditions+while+accessing+files). Additionally, Python projects have encountered similar bugs when re-implementing file operations themselves (https://code.djangoproject.com/ticket/8479) I would be happy to fix this bug in any other spots identified using whichever strategy is preferred. If it is possible to get functions operating on file descriptors without breaking public functions I think that is the strategy we should prefer. If that is not possible, the above inode comparison strategy provides improvement if not a complete fix. Should I submit additional bug reports for these other cases or should I just follow on here? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 20:20:38 2018 From: report at bugs.python.org (Ammar Askar) Date: Sat, 14 Jul 2018 00:20:38 +0000 Subject: [issue33361] readline() + seek() on codecs.EncodedFile breaks next readline() In-Reply-To: <1524704763.78.0.682650639539.issue33361@psf.upfronthosting.co.za> Message-ID: <1531527638.04.0.56676864532.issue33361@psf.upfronthosting.co.za> Change by Ammar Askar : ---------- keywords: +patch pull_requests: +7813 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 23:06:52 2018 From: report at bugs.python.org (INADA Naoki) Date: Sat, 14 Jul 2018 03:06:52 +0000 Subject: [issue34087] int(s), float(s) and others may cause segmentation fault In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531537612.02.0.56676864532.issue34087@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 16dfca4d829e45f36e71bf43f83226659ce49315 by INADA Naoki in branch 'master': bpo-34087: Fix buffer overflow in int(s) and similar functions (GH-8274) https://github.com/python/cpython/commit/16dfca4d829e45f36e71bf43f83226659ce49315 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 23:07:17 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 14 Jul 2018 03:07:17 +0000 Subject: [issue34087] int(s), float(s) and others may cause segmentation fault In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531537637.8.0.56676864532.issue34087@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7814 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 23:58:16 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 14 Jul 2018 03:58:16 +0000 Subject: [issue34087] int(s), float(s) and others may cause segmentation fault In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531540696.43.0.56676864532.issue34087@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c721472fb83d1f7c7606bcf33ba2d42d6127a764 by Miss Islington (bot) in branch '3.7': bpo-34087: Fix buffer overflow in int(s) and similar functions (GH-8274) https://github.com/python/cpython/commit/c721472fb83d1f7c7606bcf33ba2d42d6127a764 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 13 23:59:56 2018 From: report at bugs.python.org (INADA Naoki) Date: Sat, 14 Jul 2018 03:59:56 +0000 Subject: [issue34087] int(s), float(s) and others may cause segmentation fault In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531540796.08.0.56676864532.issue34087@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 00:17:56 2018 From: report at bugs.python.org (INADA Naoki) Date: Sat, 14 Jul 2018 04:17:56 +0000 Subject: [issue34087] int(s), float(s) and others may cause segmentation fault In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531541876.95.0.56676864532.issue34087@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- pull_requests: +7815 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 00:49:12 2018 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 14 Jul 2018 04:49:12 +0000 Subject: [issue33955] Implement PyOS_CheckStack on macOS using pthread_get_stack*_np In-Reply-To: <1529925495.69.0.56676864532.issue33955@psf.upfronthosting.co.za> Message-ID: <1531543752.53.0.56676864532.issue33955@psf.upfronthosting.co.za> Dong-hee Na added the comment: FYI, I've updated the patch to use rlim_cur() on the main thread when pthread_get_stacksize_np() is not accurate. This way works pretty well on my local machine. Enjoy your travel! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 03:11:51 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 14 Jul 2018 07:11:51 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531552311.95.0.56676864532.issue34060@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 03:25:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 14 Jul 2018 07:25:24 +0000 Subject: [issue18295] Possible integer overflow in PyCode_New() In-Reply-To: <1372108745.44.0.114375127897.issue18295@psf.upfronthosting.co.za> Message-ID: <1531553124.78.0.56676864532.issue18295@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since 3.7 the number of arguments no longer limited by 255 (see issue12844 and issue18896). ---------- versions: +Python 2.7, Python 3.6 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 03:38:21 2018 From: report at bugs.python.org (INADA Naoki) Date: Sat, 14 Jul 2018 07:38:21 +0000 Subject: [issue34087] int(s), float(s) and others may cause segmentation fault In-Reply-To: <1531251366.29.0.56676864532.issue34087@psf.upfronthosting.co.za> Message-ID: <1531553901.8.0.56676864532.issue34087@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset b2f8aa0c998d331ab2b4c701756a6427c0e91d48 by INADA Naoki in branch '3.6': bpo-34087: Backport tests for int/float/complex (GH-8274) https://github.com/python/cpython/commit/b2f8aa0c998d331ab2b4c701756a6427c0e91d48 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 03:52:49 2018 From: report at bugs.python.org (Ammar Askar) Date: Sat, 14 Jul 2018 07:52:49 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531554769.36.0.56676864532.issue34060@psf.upfronthosting.co.za> Ammar Askar added the comment: Annoyingly, it looks like Windows does not provide an API that gives an average value. There is a counter exposed called "System \ Processor Queue Length" which does what the equivalent of unix's load https://blogs.technet.microsoft.com/askperf/2008/01/15/an-overview-of-processor-bottlenecks/ But we're gonna have to average it ourselves if we want this information. ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 03:54:39 2018 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 14 Jul 2018 07:54:39 +0000 Subject: [issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. In-Reply-To: <1531031682.19.0.56676864532.issue34068@psf.upfronthosting.co.za> Message-ID: <1531554879.82.0.56676864532.issue34068@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +7816 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 03:55:44 2018 From: report at bugs.python.org (Ammar Askar) Date: Sat, 14 Jul 2018 07:55:44 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531554944.23.0.56676864532.issue34060@psf.upfronthosting.co.za> Ammar Askar added the comment: Taking a shot at this, should take a day or so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 05:33:45 2018 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 14 Jul 2018 09:33:45 +0000 Subject: [issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. In-Reply-To: <1531031682.19.0.56676864532.issue34068@psf.upfronthosting.co.za> Message-ID: <1531560825.19.0.56676864532.issue34068@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 06:31:59 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 14 Jul 2018 10:31:59 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531564319.14.0.56676864532.issue34060@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: There is an old ticket for this in psutil with some (possible useful) references in it: https://github.com/giampaolo/psutil/issues/604 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 06:58:25 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 14 Jul 2018 10:58:25 +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: <1531565905.98.0.56676864532.issue30400@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > For example, os.stat() accepts both a filename (string) or a file descriptor (integer). Interesting. I never realized that. Other functions involved in file copy are: os.lchmod os.chmod os.listxattr os.getxattr I checked and it appears they all support fd args (this is not documented and it should). os.path.* all use os.stat() internally so they can easily be replaced. I wonder whether this can introduce any change in semantic though: >>> import os >>> os.stat('foobar') Traceback (most recent call last): File "", line 1, in FileNotFoundError: [Errno 2] No such file or directory: 'foobar' >>> os.stat(333) Traceback (most recent call last): File "", line 1, in OSError: [Errno 9] Bad file descriptor: 333 Also wonder it this would play nice on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 07:05:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 14 Jul 2018 11:05:22 +0000 Subject: [issue24618] Invalid read in PyCode_New In-Reply-To: <1436723206.75.0.0338800196723.issue24618@psf.upfronthosting.co.za> Message-ID: <1531566322.01.0.56676864532.issue24618@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +7817 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 07:21:51 2018 From: report at bugs.python.org (tobik) Date: Sat, 14 Jul 2018 11:21:51 +0000 Subject: [issue34111] python-config breaks when symlinked to another location Message-ID: <1531567311.02.0.56676864532.issue34111@psf.upfronthosting.co.za> New submission from tobik : When symlinking python3.6-config to another location, it starts outputting bogus paths. It's convenient to symlink the system python3.6-config to somewhere else in PATH to make sure the build of an application with a hardcoded use of python3-config is using the right Python version. This is something that we would like to do in FreeBSD Ports instead of having to patch build files. It works fine with python2.7-config. However when I try a similar thing with python3.6-config it starts outputting bogus paths. For example $ pwd /home/tobias $ python2.7-config --includes -I/usr/local/include/python2.7 -I/usr/local/include/python2.7 $ ln -s /usr/local/bin/python2.7-config python2-config $ ./python2-config --includes -I/usr/local/include/python2.7 -I/usr/local/include/python2.7 $ python3.6-config --includes -I/usr/local/include/python3.6m -I/usr/local/include/python3.6m $ ln -s /usr/local/bin/python3.6-config python3-config $ ./python3-config --includes -I/home/include/python3.6m -I/home/include/python3.6m It would be nice if this could just work. This was on FreeBSD but the same problem exists on e.g. Void Linux too. The problem seems to be that the path to the original script is not resolved properly when trying to determine the install prefix. Adding realpath(1) to python-config seems to solve it. ---------- files: patch-Misc__python-config.sh.in messages: 321650 nosy: tobik priority: normal severity: normal status: open title: python-config breaks when symlinked to another location type: behavior versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 Added file: https://bugs.python.org/file47690/patch-Misc__python-config.sh.in _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 08:44:18 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 14 Jul 2018 12:44:18 +0000 Subject: [issue8525] Display exceptions' subclasses in help() In-Reply-To: <1272150602.3.0.323796636819.issue8525@psf.upfronthosting.co.za> Message-ID: <1531572258.04.0.56676864532.issue8525@psf.upfronthosting.co.za> Nick Coghlan added the comment: Reviewing the builtins in 3.7, I get the following results for builtin objects that have defined subclasses immediately after interpreter startup: ============= >>> for name, obj in vars(builtins).items(): ... if isinstance(obj, type) and name in str(obj): ... subclasses = type(obj).__subclasses__(obj) ... if subclasses: ... print(f"{obj}: {len(subclasses)}") ... : 1 : 1 : 1 : 1 : 132 : 1 : 16 : 1 : 4 : 19 : 2 : 13 : 3 : 1 : 1 : 1 : 3 : 2 : 3 : 3 : 1 : 10 : 4 ============= So rather than special-casing exceptions or builtins in general, my inclination would be to include a section that lists up to 4 subclasses inline, and then adds a "... and NNN additional subclasses" trailing when there are more than 4 (or when there are less than 4 subclasses with public names, but additional private subclasses). So in a class like "int", for example, we'd see: Currently imported subclasses: bool While in a class like OSError we'd see: Currently imported subclasses: BlockingIOError ChildProcessError ConnectionError FileExistsError ... and 9 other subclasses And in "help(object)" we'd see something like: Currently imported subclasses: async_generator BaseException builtin_function_or_method bytearray ... and 215 other subclasses The initial list of subclasses to show would be restricted to public builtins: `sorted((str(cls) for cls in object.__subclasses__() if not cls.__name__.startswith("_") and cls.__module__ == "builtins"), key=str.lower)` If that gives less then four names, then the list of names would be expanded to subclasses with public names in public modules (i.e. neither __qualname__ nor __module__ starts with "_", neither of those contains "._", and qualname doesn't contain ".."). The full count of currently imported subclasses would ignore whether the subclass names were public or not. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 09:09:01 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 14 Jul 2018 13:09:01 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1531573741.07.0.56676864532.issue29710@psf.upfronthosting.co.za> Nick Coghlan added the comment: I think we have a fairly different notion of what clarity means here - I have no mental concept whatsoever of how to do two's complement arithmetic with an infinite number of sign bits (I learned most of what I know about two's complement by working with fixed point 16-bit and 32-bit microprocessors), so the infinite bits explanation provides me with very little useful insight, whereas I can readily cope with the notion of storing a single extra sign extension bit beyond the minimum required to hold the operands' two's complement representations. That said, I do like the idea of using infinite precision arithmetic as the formal definition of the intended language semantics, which would lead to wording like the following: ================= Each bitwise operation has the same result as though carried out in two's complement with an infinite number of sign bits. In practice, performing the calculation with one extra sign extension bit (a bit-width of ``1 + max(x.bit_length(), y.bit_length()``) is sufficient to get the expected result. ================= ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 11:03:37 2018 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 14 Jul 2018 15:03:37 +0000 Subject: [issue33668] Wrong behavior of help function on module In-Reply-To: <1527517343.16.0.682650639539.issue33668@psf.upfronthosting.co.za> Message-ID: <1531580617.19.0.56676864532.issue33668@psf.upfronthosting.co.za> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +7818 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 11:04:46 2018 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 14 Jul 2018 15:04:46 +0000 Subject: [issue33668] Wrong behavior of help function on module In-Reply-To: <1527517343.16.0.682650639539.issue33668@psf.upfronthosting.co.za> Message-ID: <1531580686.66.0.56676864532.issue33668@psf.upfronthosting.co.za> Dong-hee Na added the comment: This script works well on Python2 but not on Python3. I've submitted a PR. Please take a look. ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 11:57:19 2018 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 14 Jul 2018 15:57:19 +0000 Subject: [issue33668] Wrong behavior of help function on module In-Reply-To: <1527517343.16.0.682650639539.issue33668@psf.upfronthosting.co.za> Message-ID: <1531583839.49.0.56676864532.issue33668@psf.upfronthosting.co.za> Dong-hee Na added the comment: I've checked both cases are now working on my patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 12:25:50 2018 From: report at bugs.python.org (Jayanth Koushik) Date: Sat, 14 Jul 2018 16:25:50 +0000 Subject: [issue34112] 3.7.0 build error with --enable-optimizations Message-ID: <1531585541.57.0.56676864532.issue34112@psf.upfronthosting.co.za> New submission from Jayanth Koushik : I'm trying to build 3.7.0 locally (not as superuser) on a server. I am able to successfully build without `--enable-optimizations` enabled, but the build fails with it enabled. I have dependencies installed in custom locations as well, and this is my environment. PREF=/scratch export LC_ALL=C export CC=gcc export CXX=g++ export PATH=/opt/gcc/4.9.2/bin:$PREF/binutils/bin:/bin:/usr/bin export LD_LIBRARY_PATH=/opt/gcc/4.9.2/lib64:/opt/gcc/4.9.2/lib:$PREF/bzip2/lib:$PREF/gdbm/lib:$PREF/libffi/lib64:$PREF/ncurses/lib:$PREF/openmpi/lib:$PREF/openssl/lib:$PREF/readline/lib:$PREF/sqlite/lib:$PREF/util-linux/lib:$PREF/xz/lib:$PREF/zlib/lib:/usr/lib64 export CPATH=/opt/gcc/4.9.2/include:$PREF/bzip2/include:$PREF/gdbm/include:$PREF/libffi/include:$PREF/ncurse s/include:$PREF/openmpi/include:$PREF/openssl/include:$PREF/readline/include:$PREF/sqlite/include:$PREF/util -linux/include:$PREF/xz/include:$PREF/zlib/include I also have to update setup.py to point to the right locations for dependencies. This is the diff, and I've attached the full file. 46c46 < disabled_module_list = ["_tkinter", "_uuid"] --- > disabled_module_list = [] 544,567c544,545 < add_dir_to_list(self.compiler.library_dirs, < '/scratch/readline/lib') < add_dir_to_list(self.compiler.include_dirs, < '/scratch/readline/include') < add_dir_to_list(self.compiler.library_dirs, < '/scratch/bzip2/lib') < add_dir_to_list(self.compiler.include_dirs, < '/scratch/bzip2/include') < add_dir_to_list(self.compiler.library_dirs, < '/scratch/ncurses/lib') < add_dir_to_list(self.compiler.include_dirs, < '/scratch/ncurses/include') < add_dir_to_list(self.compiler.library_dirs, < '/scratch/xz/lib') < add_dir_to_list(self.compiler.include_dirs, < '/scratch/xz/include') < add_dir_to_list(self.compiler.library_dirs, < '/scratch/gdbm/lib') < add_dir_to_list(self.compiler.include_dirs, < '/scratch/gdbm/include') < add_dir_to_list(self.compiler.library_dirs, < '/scratch/libffi/lib64') < add_dir_to_list(self.compiler.include_dirs, < '/scratch/libffi/include') --- > add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') > add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') 835,836c813,814 < #elif self.compiler.find_library_file(lib_dirs, 'ncursesw'): < # curses_library = 'ncursesw' --- > elif self.compiler.find_library_file(lib_dirs, 'ncursesw'): > curses_library = 'ncursesw' 1152c1130,1136 < sqlite_inc_paths = [ '/scratch/sqlite/include' ] --- > sqlite_inc_paths = [ '/usr/include', > '/usr/include/sqlite', > '/usr/include/sqlite3', > '/usr/local/include', > '/usr/local/include/sqlite', > '/usr/local/include/sqlite3', > ] 1195a1180 > os.path.join(sqlite_incdir, '..', 'lib64'), 1196a1182,1183 > os.path.join(sqlite_incdir, '..', '..', 'lib64'), > os.path.join(sqlite_incdir, '..', '..', 'lib'), This is my build process. mkdir build && cd build LDFLAGS="-Wl,--rpath=$PREF/glibc/lib -Wl,--rpath=$PREF/bzip2/lib -Wl,--rpath=$PREF/gdbm/lib -Wl,--rpath=$PRE F/ncurses/lib -Wl,--rpath=$PREF/openssl/lib -Wl,--rpath=$PREF/readline/lib -Wl,--rpath=$PREF/sqlite/lib -Wl, --rpath=$PREF/xz/lib -Wl,--rpath=$PREF/zlib/lib -Wl,--rpath=$PREF/libffi/lib64 -Wl,--rpath=$PREF/openmpi/lib -Wl,--rpath=$PREF/util-linux/lib -Wl,--dynamic-linker=$PREF/glibc/lib/ld-linux-x86-64.so.2" ../configure -- enable-shared --prefix=$PREF/python-latest --with-openssl=$PREF/openssl --enable-optimizations make -j 8 And this is the error that I get. It's when rebuilding with optimizations. Rebuilding with profile guided optimizations: rm -f profile-clean-stamp make build_all CFLAGS_NODIST=" -fprofile-use -fprofile-correction" LDFLAGS="" make[1]: Entering directory `/scratch/src/Python-latest/build' LD_LIBRARY_PATH=/scratch/src/Python-latest/build:/opt/gcc/4.9.2/lib64:/opt/gcc/4.9.2/lib:/scratch/bzip2/lib:/scratch/gdbm/lib:/scratch/libffi/lib64:/scratch/ncurses/lib:/scratch/openmpi/lib:/scratch/openssl/lib:/scratch/readline/lib:/scratch/sqlite/lib:/scratch/util-linux/lib:/scratch/xz/lib:/scratch/zlib/lib:/usr/lib64 ./python -E -S -m sysconfig --generate-posix-vars ;\ if test $? -ne 0 ; then \ echo "generate-posix-vars failed" ; \ rm -f ./pybuilddir.txt ; \ exit 1 ; \ fi Could not import runpy module Traceback (most recent call last): File "/scratch/src/Python-latest/build/../Lib/runpy.py", line 15, in import importlib.util File "/scratch/src/Python-latest/build/../Lib/importlib/util.py", line 14, in from contextlib import contextmanager File "/scratch/src/Python-latest/build/../Lib/contextlib.py", line 4, in import _collections_abc SystemError: returned NULL without setting an error generate-posix-vars failed make[1]: *** [pybuilddir.txt] Error 1 make[1]: Leaving directory `/scratch/src/Python-latest/build' make: *** [profile-opt] Error 2 I tried searching for the error, and there seem to be similar errors related to improper PYTHONHOME, but I couldn't find anything related to build. I was able to build 3.6 with the same procedure, so I'm not sure if I'm doing something wrong. ---------- components: Build files: setup.py messages: 321655 nosy: jayanthkoushik priority: normal severity: normal status: open title: 3.7.0 build error with --enable-optimizations type: compile error versions: Python 3.7 Added file: https://bugs.python.org/file47691/setup.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 14:30:49 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Jul 2018 18:30:49 +0000 Subject: [issue33111] Merely importing tkinter breaks parallel code (multiprocessing, sharedmem) In-Reply-To: <1521573656.32.0.467229070634.issue33111@psf.upfronthosting.co.za> Message-ID: <1531593049.35.0.56676864532.issue33111@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On MacOS, 3.7.0 is compiled for and the installer loads tcl/tk 8.6.8. The same is true for the 3.6.6 64-bit installer. Do tkinter and multiprocessing work together better with these installations? I want to consider using multiprocessing and pipes instead subprocess and socket for IDLE's user-code execution process, started from and communicating with the initial tkinter gui process. idlelib.run, which runs in the execution process to communicae with the gui process and supervise running user code, imports tkinter. Besides which, users have to be able to import tkinter in their programs. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 14:33:47 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 14 Jul 2018 18:33:47 +0000 Subject: [issue34112] 3.7.0 build error with --enable-optimizations In-Reply-To: <1531585541.57.0.56676864532.issue34112@psf.upfronthosting.co.za> Message-ID: <1531593227.85.0.56676864532.issue34112@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It's look you're using a fairly old toolchain. I wouldn't reccomend using fancy modern compiler optimizations with GCC 4. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 14:39:07 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Jul 2018 18:39:07 +0000 Subject: [issue20353] Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only) In-Reply-To: <1390415067.55.0.719190169135.issue20353@psf.upfronthosting.co.za> Message-ID: <1531593547.37.0.56676864532.issue20353@psf.upfronthosting.co.za> Terry J. Reedy added the comment: #33111 claims that importing tkinter is enough to hang multiprocessing on MacOS up through 3.6. ---------- components: +macOS nosy: +ronaldoussoren, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 15:31:10 2018 From: report at bugs.python.org (Jayanth Koushik) Date: Sat, 14 Jul 2018 19:31:10 +0000 Subject: [issue34112] 3.7.0 build error with --enable-optimizations In-Reply-To: <1531585541.57.0.56676864532.issue34112@psf.upfronthosting.co.za> Message-ID: <1531596670.52.0.56676864532.issue34112@psf.upfronthosting.co.za> Jayanth Koushik added the comment: Hi. Do you mean turning of `--enable-optimizations` or reducing GCC optimization level (O3 etc)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 16:44:51 2018 From: report at bugs.python.org (girts) Date: Sat, 14 Jul 2018 20:44:51 +0000 Subject: [issue30618] readlink for pathlib paths In-Reply-To: <1497052559.7.0.422106710991.issue30618@psf.upfronthosting.co.za> Message-ID: <1531601091.46.0.56676864532.issue30618@psf.upfronthosting.co.za> Change by girts : ---------- keywords: +patch pull_requests: +7819 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 16:46:36 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Sat, 14 Jul 2018 20:46:36 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531601196.05.0.56676864532.issue34060@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Also prior conversation: https://bugs.python.org/issue30263#msg296311 ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 16:54:22 2018 From: report at bugs.python.org (Andrew Valencia) Date: Sat, 14 Jul 2018 20:54:22 +0000 Subject: [issue34113] LLTRACE segv Message-ID: <1531601662.45.0.56676864532.issue34113@psf.upfronthosting.co.za> New submission from Andrew Valencia : Build with -DLLTRACE, then: >>> __lltrace__ = 1 >>> a = [1, 2, 3] 0: 100, 0 push 1 3: 100, 1 push 2 6: 100, 2 push 3 9: 103, 3 pop 3 pop 2 pop 1 push [1, 2, 3] 12: 90, 0 pop [1, 2, 3] 15: 100, 3 push None 18: 83 pop None >>> a[0] = 1 0: 100, 0 push 1 3: 101, 0 push [1, 2, 3] 6: 100, 1 push 0 9: 60Program received signal SIGSEGV, Segmentation fault. 0x004535ae in internal_print (op=0x84002364, fp=0xb7f3bd60 <_IO_2_1_stdout_>, flags=0, nesting=0) at Objects/object.c:293 293 if (op->ob_refcnt <= 0) (gdb) bt #0 0x004535ae in internal_print (op=0x84002364, fp=0xb7f3bd60 <_IO_2_1_stdout_>, flags=0, nesting=0) at Objects/object.c:293 #1 0x0045370a in PyObject_Print (op=0x84002364, fp=0xb7f3bd60 <_IO_2_1_stdout_>, flags=0) at Objects/object.c:330 #2 0x004ada11 in prtrace (v=0x84002364, str=0x54b61d "stackadj") at Python/ceval.c:3979 #3 0x004a505b in PyEval_EvalFrameEx (f=0xb7d11994, throwflag=0) at Python/ceval.c:1919 #4 0x004ace97 in PyEval_EvalCodeEx (co=0xb7ce7bf0, globals=0xb7d7c714, locals=0xb7d7c714, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3604 #5 0x004a0671 in PyEval_EvalCode (co=0xb7ce7bf0, globals=0xb7d7c714, locals=0xb7d7c714) at Python/ceval.c:669 #6 0x004d26ab in run_mod (mod=0x646d78, filename=0x53ddfe "", globals=0xb7d7c714, locals=0xb7d7c714, flags=0xbffff568, arena=0x5f2b10) at Python/pythonrun.c:1385 #7 0x004d1106 in PyRun_InteractiveOneFlags (fp=0xb7f3b5a0 <_IO_2_1_stdin_>, filename=0x53ddfe "", flags=0xbffff568) at Python/pythonrun.c:866 #8 0x004d0e72 in PyRun_InteractiveLoopFlags (fp=0xb7f3b5a0 <_IO_2_1_stdin_>, filename=0x53ddfe "", flags=0xbffff568) at Python/pythonrun.c:786 #9 0x004d0d1a in PyRun_AnyFileExFlags (fp=0xb7f3b5a0 <_IO_2_1_stdin_>, filename=0x53ddfe "", closeit=0, flags=0xbffff568) at Python/pythonrun.c:755 #10 0x0041d798 in Py_Main (argc=1, argv=0xbffff694) at Modules/main.c:645 #11 0x0041c5eb in main (argc=1, argv=0xbffff694) at ./Modules/python.c:20 ---------- components: Interpreter Core messages: 321661 nosy: vandyswa priority: normal severity: normal status: open title: LLTRACE segv type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 17:11:56 2018 From: report at bugs.python.org (Sanyam Khurana) Date: Sat, 14 Jul 2018 21:11:56 +0000 Subject: [issue34114] Build failing: use of undeclared identifier '_Py_END_SUPPRESS_IPH' & '_Py_BEGIN_SUPPRESS_IPH' Message-ID: <1531602716.1.0.56676864532.issue34114@psf.upfronthosting.co.za> New submission from Sanyam Khurana : The step for configuration works correctly and gives a makefile. On running `./make` the following traceback is produced: ``` $ make ----------------------------------------------- Modules/Setup.dist is newer than Modules/Setup; check to make sure you have all the updates you need in your Modules/Setup file. Usually, copying Modules/Setup.dist to Modules/Setup will work. ----------------------------------------------- gcc -Wno-unused-result -Wsign-compare -g -O0 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -I. -I./Include -c ./Modules/posixmodule.c -o Modules/posixmodule.o ./Modules/posixmodule.c:1548:9: error: use of undeclared identifier '_Py_BEGIN_SUPPRESS_IPH' _Py_BEGIN_SUPPRESS_IPH ^ ./Modules/posixmodule.c:1550:9: error: use of undeclared identifier '_Py_END_SUPPRESS_IPH' _Py_END_SUPPRESS_IPH ^ ./Modules/posixmodule.c:4356:5: error: use of undeclared identifier '_Py_BEGIN_SUPPRESS_IPH' _Py_BEGIN_SUPPRESS_IPH ^ ./Modules/posixmodule.c:4364:5: error: expected expression else ^ ./Modules/posixmodule.c:4368:5: error: use of undeclared identifier '_Py_END_SUPPRESS_IPH' _Py_END_SUPPRESS_IPH ^ ./Modules/posixmodule.c:5075:5: error: use of undeclared identifier '_Py_BEGIN_SUPPRESS_IPH' _Py_BEGIN_SUPPRESS_IPH ^ ./Modules/posixmodule.c:5081:5: error: use of undeclared identifier '_Py_END_SUPPRESS_IPH' _Py_END_SUPPRESS_IPH ^ ./Modules/posixmodule.c:5146:5: error: use of undeclared identifier '_Py_BEGIN_SUPPRESS_IPH' _Py_BEGIN_SUPPRESS_IPH ^ ./Modules/posixmodule.c:5157:5: error: use of undeclared identifier '_Py_END_SUPPRESS_IPH' _Py_END_SUPPRESS_IPH ^ ./Modules/posixmodule.c:5376:5: error: use of undeclared identifier '_Py_BEGIN_SUPPRESS_IPH' _Py_BEGIN_SUPPRESS_IPH ^ ./Modules/posixmodule.c:5379:5: error: use of undeclared identifier '_Py_END_SUPPRESS_IPH' _Py_END_SUPPRESS_IPH ^ ./Modules/posixmodule.c:7996:5: error: use of undeclared identifier '_Py_BEGIN_SUPPRESS_IPH' _Py_BEGIN_SUPPRESS_IPH ^ ./Modules/posixmodule.c:8011:5: error: use of undeclared identifier '_Py_END_SUPPRESS_IPH' _Py_END_SUPPRESS_IPH ^ ./Modules/posixmodule.c:8048:5: error: use of undeclared identifier '_Py_BEGIN_SUPPRESS_IPH' _Py_BEGIN_SUPPRESS_IPH ^ ./Modules/posixmodule.c:8050:5: error: use of undeclared identifier '_Py_END_SUPPRESS_IPH' _Py_END_SUPPRESS_IPH ^ ./Modules/posixmodule.c:8074:5: error: use of undeclared identifier '_Py_BEGIN_SUPPRESS_IPH' _Py_BEGIN_SUPPRESS_IPH ^ ./Modules/posixmodule.c:8077:5: error: use of undeclared identifier '_Py_END_SUPPRESS_IPH' _Py_END_SUPPRESS_IPH ^ ./Modules/posixmodule.c:8265:5: error: use of undeclared identifier '_Py_BEGIN_SUPPRESS_IPH' _Py_BEGIN_SUPPRESS_IPH ^ ./Modules/posixmodule.c:8271:5: error: use of undeclared identifier '_Py_END_SUPPRESS_IPH' _Py_END_SUPPRESS_IPH ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make: *** [Modules/posixmodule.o] Error 1 ``` ---------- components: Interpreter Core messages: 321662 nosy: CuriousLearner priority: high severity: normal stage: needs patch status: open title: Build failing: use of undeclared identifier '_Py_END_SUPPRESS_IPH' & '_Py_BEGIN_SUPPRESS_IPH' type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 17:52:48 2018 From: report at bugs.python.org (ppperry) Date: Sat, 14 Jul 2018 21:52:48 +0000 Subject: [issue29199] test_regrtest fails if PCBuild directory doesn't exist In-Reply-To: <1483838095.77.0.195289202994.issue29199@psf.upfronthosting.co.za> Message-ID: <1531605168.89.0.56676864532.issue29199@psf.upfronthosting.co.za> ppperry added the comment: This issue seems to have been fixed in 3.7 ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 17:53:53 2018 From: report at bugs.python.org (Sanyam Khurana) Date: Sat, 14 Jul 2018 21:53:53 +0000 Subject: [issue34114] Build failing: use of undeclared identifier '_Py_END_SUPPRESS_IPH' & '_Py_BEGIN_SUPPRESS_IPH' In-Reply-To: <1531602716.1.0.56676864532.issue34114@psf.upfronthosting.co.za> Message-ID: <1531605233.94.0.56676864532.issue34114@psf.upfronthosting.co.za> Sanyam Khurana added the comment: This is strange. I cloned the repo again at some other location, and I can build it successfully. In my older clone, however, it shows me this error, despite running a `make clean`. Any idea on what is the problem here? ---------- nosy: +vstinner priority: high -> stage: needs patch -> type: compile error -> versions: -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 17:55:28 2018 From: report at bugs.python.org (ppperry) Date: Sat, 14 Jul 2018 21:55:28 +0000 Subject: [issue29199] test_regrtest fails if PCBuild directory doesn't exist In-Reply-To: <1483838095.77.0.195289202994.issue29199@psf.upfronthosting.co.za> Message-ID: <1531605328.41.0.56676864532.issue29199@psf.upfronthosting.co.za> ppperry added the comment: To be precise, fixed as part of issue33352 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 18:49:43 2018 From: report at bugs.python.org (Yonatan Zunger) Date: Sat, 14 Jul 2018 22:49:43 +0000 Subject: [issue34115] code.InteractiveConsole.interact() closes stdin Message-ID: <1531608583.62.0.56676864532.issue34115@psf.upfronthosting.co.za> New submission from Yonatan Zunger : code.InteractiveConsole.interact() closes stdin on exit, which can be very surprising to successive code, not least future calls to interact(). A simple repro with a workaround is: import code import io import os import sys def run(): print(sys.stdin.buffer.raw) dupstdin = os.dup(0) try: code.InteractiveConsole().interact() except SystemExit: pass finally: # Workaround: Without this line, the second call to run() will fail with a ValueError when # it tries to call input(). sys.stdin = io.TextIOWrapper( io.BufferedReader(io.FileIO(dupstdin, mode='rb', closefd=False)), encoding='utf8') run() run() - The exciting behavior appears to happen inside the exec() of a 'quit()' command, and I haven't searched it out further. - That behavior inside exec() is likely there for a good reason, in which case the best fix is probably to just save and restore stdin in the code library. ---------- components: Library (Lib) messages: 321666 nosy: Yonatan Zunger priority: normal severity: normal status: open title: code.InteractiveConsole.interact() closes stdin type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 20:07:30 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Sun, 15 Jul 2018 00:07:30 +0000 Subject: [issue34116] Move all bytes/bytearray/int/float/complex documentation to Built-in Types Message-ID: <1531613250.34.0.56676864532.issue34116@psf.upfronthosting.co.za> New submission from Andr?s Delfino : Right now, bytearray, bytes, complex, float and int documentation is splitted into stdtypes.rst and functions.rst. I think stdtypes.rst should be the only source with all documentation, and functions.rst should just point out to stdtypes.rst. This would make it easier to get the complete picture of a given type without having to jump between pages. This is how the documentation of dict, frozenset, list, memoryview, range, set, str and tuple works. I believe bool() is more useful in functions.rst, as it's really short. ---------- assignee: docs at python components: Documentation messages: 321667 nosy: adelfino, docs at python priority: normal severity: normal status: open title: Move all bytes/bytearray/int/float/complex documentation to Built-in Types type: enhancement versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 20:14:02 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 15 Jul 2018 00:14:02 +0000 Subject: [issue34112] 3.7.0 build error with --enable-optimizations In-Reply-To: <1531596670.52.0.56676864532.issue34112@psf.upfronthosting.co.za> Message-ID: <1531613636.683896.1440958744.302215E1@webmail.messagingengine.com> Benjamin Peterson added the comment: --enable-optimizations On Sat, Jul 14, 2018, at 12:31, Jayanth Koushik wrote: > > Jayanth Koushik added the comment: > > Hi. Do you mean turning of `--enable-optimizations` or reducing GCC > optimization level (O3 etc)? > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 20:22:45 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Sun, 15 Jul 2018 00:22:45 +0000 Subject: [issue34116] Move all bytes/bytearray/int/float/complex documentation to Built-in Types In-Reply-To: <1531613250.34.0.56676864532.issue34116@psf.upfronthosting.co.za> Message-ID: <1531614165.51.0.56676864532.issue34116@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- keywords: +patch pull_requests: +7820 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 20:24:23 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Sun, 15 Jul 2018 00:24:23 +0000 Subject: [issue34116] Move all bytes/bytearray/int/float/complex documentation to Built-in Types In-Reply-To: <1531613250.34.0.56676864532.issue34116@psf.upfronthosting.co.za> Message-ID: <1531614263.93.0.56676864532.issue34116@psf.upfronthosting.co.za> Andr?s Delfino added the comment: See talk at: https://python.zulipchat.com/#narrow/stream/116633-documentation/subject/Gather.20all.20type.20documentation.20in.20stdtypes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 20:27:14 2018 From: report at bugs.python.org (Brett Cannon) Date: Sun, 15 Jul 2018 00:27:14 +0000 Subject: [issue34117] Rename "generator expressions" to "generator comprehensions" Message-ID: <1531614433.94.0.56676864532.issue34117@psf.upfronthosting.co.za> New submission from Brett Cannon : The idea came up on python-dev to tweak the names of generator expressions to "generator comprehensions" to align more with list|set|dict comprehensions. This would be strictly a doc change (for now). A reference to generator expressions should be left if nothing else than to point to the new name. ---------- assignee: docs at python components: Documentation messages: 321670 nosy: brett.cannon, docs at python priority: low severity: normal status: open title: Rename "generator expressions" to "generator comprehensions" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 20:36:55 2018 From: report at bugs.python.org (INADA Naoki) Date: Sun, 15 Jul 2018 00:36:55 +0000 Subject: [issue34114] Build failing: use of undeclared identifier '_Py_END_SUPPRESS_IPH' & '_Py_BEGIN_SUPPRESS_IPH' In-Reply-To: <1531602716.1.0.56676864532.issue34114@psf.upfronthosting.co.za> Message-ID: <1531615015.07.0.56676864532.issue34114@psf.upfronthosting.co.za> INADA Naoki added the comment: Sometime, you need to run `make distclean` or `git clean -fdx` to remove wrong caches. ---------- nosy: +inada.naoki resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 22:57:01 2018 From: report at bugs.python.org (Ammar Askar) Date: Sun, 15 Jul 2018 02:57:01 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531623421.59.0.56676864532.issue34060@psf.upfronthosting.co.za> Ammar Askar added the comment: Thanks a lot for that link Jeremy, it was really helpful. After reading up on it, my take is that winapi is the most appropriate place for this, it is a non public api that's used in the stdlib. I've used Windows APIs in a way that we don't need to manually start up a thread and call a calc_load function, instead using a callback invoked by windows. Internally this uses a thread pool, but it means we don't have to worry about managing the thread ourselves. The load is stored as a global but the winapi module is already marked as "-1" indicating it has global state, so that shouldn't be a problem. https://docs.python.org/3/c-api/module.html#c.PyModuleDef.m_size Like Jeremy noted, using WMI does add a 5mb overhead or so to the calling process. One more caveat is that the PdhAddEnglishCounterW function is only available in Vista+. I'm not sure if we still support Windows XP, but the alternative is to use PdhAddCounter, which breaks if the system language is not english because the counter paths are localized. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 22:57:06 2018 From: report at bugs.python.org (Ammar Askar) Date: Sun, 15 Jul 2018 02:57:06 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531623426.37.0.56676864532.issue34060@psf.upfronthosting.co.za> Change by Ammar Askar : ---------- keywords: +patch pull_requests: +7821 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 23:00:14 2018 From: report at bugs.python.org (Ammar Askar) Date: Sun, 15 Jul 2018 03:00:14 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531623614.88.0.56676864532.issue34060@psf.upfronthosting.co.za> Ammar Askar added the comment: Opened up a PR with a proof of concept to get feedback on if this approach is reasonable. Giampaolo, on your psutil issue you specifically said, "(possibly without using WMI)" Is there any particular problem with using WMI? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 23:04:38 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 15 Jul 2018 03:04:38 +0000 Subject: [issue34118] Fix some class entries entries in 'Built-in Functions' Message-ID: <1531623878.78.0.56676864532.issue34118@psf.upfronthosting.co.za> New submission from Terry J. Reedy : The Library Reference 'Built-in Functions' chapter includes build-in classes because classes are functions in the sense of being callable with arguments and returning objects. A proposal to change the name to Built-in Functions and Classes was rejected (by Raymond, as I remember). I suspect that 'Built-in Callables' has also been proposed. Some of the current entries need one or both of two fixes. 1. Most, but not all, of the classes are tagged with '*class*' before the class name. Classes classmethod and staticmethed are instead tagged with '@' since they are mostly used as decorators, although property is tagged *class*. Classes enumerate, filter, map, memoryview, range, reversed, tuple, and zip are untagged. I think, to be consistent, that they should all get the *class* tag. 2. Nearly all entries fully describe the arguments and return values. The exceptions are those for 6 collection classes. The first 3 have an abbreviated description of the result and a reference for further details on the relationship of input to result. class dict(iterable, **kwarg) Create a new dictionary. The dict object is the dictionary class. See dict and Mapping Types ? dict for documentation about this class. For other containers see the built-in list, set, and tuple classes, as well as the collections module. class frozenset([iterable]) Return a new frozenset object, optionally with elements taken from iterable. frozenset is a built-in class. See frozenset and Set Types ? set, frozenset for documentation about this class. For other containers see the built-in set, list, tuple, and dict classes, as well as the collections module. class set([iterable]) Return a new set object, optionally with elements taken from iterable. set is a built-in class. See set and Set Types ? set, frozenset for documentation about this class. For other containers see the built-in frozenset, list, tuple, and dict classes, as well as the collections module. The next 3 replace 'Return a ___' with 'Rather than being a function'. (This is from Nick's patch 6 years ago. https://github.com/python/cpython/commit/83c0ae5de642145ec225d29e7b239aa410229539.) I object to this because it is wrong if one uses the broad definition of function used in the chapter title. It is also wrong in the implication there is anything special about these classes in regard to being functions verses classess. class list([iterable]) Rather than being a function, list is actually a mutable sequence type, as documented in Lists and Sequence Types ? list, tuple, range. range(start, stop[, step]) Rather than being a function, range is actually an immutable sequence type, as documented in Ranges and Sequence Types ? list, tuple, range. tuple([iterable]) Rather than being a function, tuple is actually an immutable sequence type, as documented in Tuples and Sequence Types ? list, tuple, range. I propose that the 2nd 3 follow the model of the 1st 3, except that the final line should be: "For other collections see the built-in range, tuple, list, frozenset, set, and dict classes, as well as the collections module." (with 1 of the 6 omitted as appropriate). (Range represents a collection, but is not a container in the sense that the others are.) ---------- assignee: docs at python components: Documentation messages: 321674 nosy: docs at python, ncoghlan, rhettinger, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Fix some class entries entries in 'Built-in Functions' type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 23:16:28 2018 From: report at bugs.python.org (Rob Cliffe) Date: Sun, 15 Jul 2018 03:16:28 +0000 Subject: [issue8525] Display exceptions' subclasses in help() In-Reply-To: <1531572258.04.0.56676864532.issue8525@psf.upfronthosting.co.za> Message-ID: Rob Cliffe added the comment: On 14/07/2018 13:44, Nick Coghlan wrote: > Nick Coghlan added the comment: > > Reviewing the builtins in 3.7, I get the following results for builtin objects that have defined subclasses immediately after interpreter startup: > > ============= >>>> for name, obj in vars(builtins).items(): > .. if isinstance(obj, type) and name in str(obj): > .. subclasses = type(obj).__subclasses__(obj) > .. if subclasses: > .. print(f"{obj}: {len(subclasses)}") > .. > : 1 > : 1 > : 1 > : 1 > : 132 > : 1 > : 16 > : 1 > : 4 > : 19 > : 2 > : 13 > : 3 > : 1 > : 1 > : 1 > : 3 > : 2 > : 3 > : 3 > : 1 > : 10 > : 4 > ============= > > So rather than special-casing exceptions or builtins in general, my inclination would be to include a section that lists up to 4 subclasses inline, and then adds a "... and NNN additional subclasses" trailing when there are more than 4 (or when there are less than 4 subclasses with public names, but additional private subclasses). > > My 2 cents: ??? To use Exceptions optimally (e.g. to make the errors you trap neither too specific nor too general), you often need to know (and understand) the relevant part of the Exception hierarchy.? In particular you may know the name of an Exception that covers a particular use case, but not the names of its subclasses, one of which might be more appropriate.? Exceptions are exceptional* in that the "issubclass" relationship is vital to the way that they work.? So it is USEFUL to know ALL subclasses of a given Exception class (not just 4; in practice there won't be more than a dozen or two).? I have found myself in just this position; in fact it impelled me to adding a "show subclasses" feature to help() in my then current version of Python 2.? (An alternative might be a handy way of showing the complete built-in Exception hierarchy.) I question whether it is really useful to know all subclasses of ANY class, or whether YAGNI.? I think that, for non-Exception classes, typically when you look at a class you may want to know its inheritance (to understand its functionality better), but it is rare that you will want to know what subclasses it has, if any.? No doubt there are exceptions* (perhaps you monkey-patch a class and want to know what subclasses might be affected). Regards Rob Cliffe * Pun not intended ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 14 23:28:58 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 15 Jul 2018 03:28:58 +0000 Subject: [issue34117] Rename "generator expressions" to "generator comprehensions" In-Reply-To: <1531614433.94.0.56676864532.issue34117@psf.upfronthosting.co.za> Message-ID: <1531625338.4.0.56676864532.issue34117@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Guido asked me to try this out on students. I'll report back after next week's class. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 01:05:50 2018 From: report at bugs.python.org (Tim Peters) Date: Sun, 15 Jul 2018 05:05:50 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1531631150.7.0.56676864532.issue29710@psf.upfronthosting.co.za> Tim Peters added the comment: Nick, that seems a decent compromise. "Infinite string of sign bits" is how Guido & I both thought of it when the semantics of longs were first defined, and others in this report apparently find it natural enough too. It also applies to all 6 operations in the table as-is. It appears that a bit-width of ``1 + max(x.bit_length(), y.bit_length()`` only applies as-is to 3 (~ has only one operand, while the bit length of the RHS doesn't matter for << and >>). Provided that's clarified, I'd only suggest inserting "at least" before "one extra sign extension bit" and after "a bit-width of". That's a bridge between the "infinite" and "fixed-albeit-variable-width" views: "plus 1" is the smallest approximation to infinity that works, but anything at least that large works too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 01:40:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 15 Jul 2018 05:40:11 +0000 Subject: [issue34117] Rename "generator expressions" to "generator comprehensions" In-Reply-To: <1531614433.94.0.56676864532.issue34117@psf.upfronthosting.co.za> Message-ID: <1531633211.77.0.56676864532.issue34117@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There are also few differences between comprehensions and generator expressions. The author of the patch should not just replace all occurrences of "generator expression" with "generator comprehension", but analyze all occurrences of the sole "comprehension" and replace it with "non-generator comprehension" if needed. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 01:43:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 15 Jul 2018 05:43:22 +0000 Subject: [issue34118] Fix some class entries in 'Built-in Functions' In-Reply-To: <1531623878.78.0.56676864532.issue34118@psf.upfronthosting.co.za> Message-ID: <1531633402.28.0.56676864532.issue34118@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- title: Fix some class entries entries in 'Built-in Functions' -> Fix some class entries in 'Built-in Functions' _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 01:55:01 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 15 Jul 2018 05:55:01 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1531634101.64.0.56676864532.issue29710@psf.upfronthosting.co.za> Nick Coghlan added the comment: The restriction of the footnote to ``x & y``, ``x | y``, and ``x ^ y`` was going to come from the fact that only those rows in the table will reference the new note. However, it likely makes sense to repeat the relevant expressions in the footnote as well, since that makes it clearer what ``x`` and ``y`` refer to in the second sentence. Latest proposal: ================= The results of ``x | y``, ``x ^ y``, and ``x & y`` are calculated as though carried out in two's complement with an infinite number of sign bits. In practice, performing the calculation with at least one extra sign extension bit (a working bit-width of ``1 + max(x.bit_length(), y.bit_length()`` or more) is sufficient to get the expected result. ================= ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 02:11:28 2018 From: report at bugs.python.org (Kishore Aadada) Date: Sun, 15 Jul 2018 06:11:28 +0000 Subject: [issue34119] Able to name a variable as 'input'. This creates problem when using input() function. Message-ID: <1531635088.28.0.56676864532.issue34119@psf.upfronthosting.co.za> New submission from Kishore Aadada : When i used input as a variable name, there is no error provided. After that I am calling input() function to read data. In such case, below error is reported. Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 17:26:49) [MSC v.1900 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> input = "Test input" >>> data = input("Please enter some input") Traceback (most recent call last): File "", line 1, in data = input("Please enter some input") TypeError: 'str' object is not callable >>> ---------- components: IO files: inputError.png messages: 321680 nosy: kishoreaadada priority: normal severity: normal status: open title: Able to name a variable as 'input'. This creates problem when using input() function. type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file47692/inputError.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 02:40:57 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 15 Jul 2018 06:40:57 +0000 Subject: [issue34119] Able to name a variable as 'input'. This creates problem when using input() function. In-Reply-To: <1531635088.28.0.56676864532.issue34119@psf.upfronthosting.co.za> Message-ID: <1531636857.87.0.56676864532.issue34119@psf.upfronthosting.co.za> Raymond Hettinger added the comment: While "shadowing a builtin" was irritating in your case, it is an unavoidable part of how Python works and is in some cases considered a feature. FWIW, there is a workaround. You can reference the real input() function directly in the __builtins__ namespace: >>> input = 'x' >>> __builtins__.input('Enter your name: ') Enter your name: Becky 'Becky' >>> input 'x' Also, consider using tools like pylint and flake8 which give warnings in cases like this. ---------- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 03:32:52 2018 From: report at bugs.python.org (Tim Peters) Date: Sun, 15 Jul 2018 07:32:52 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1531639972.62.0.56676864532.issue29710@psf.upfronthosting.co.za> Tim Peters added the comment: Well, all 6 operations "are calculated as though carried out in two's complement with an infinite number of sign bits", so I'd float that part out of the footnote and into the main text. When, e.g., you're thinking of ints _as_ bitstrings, it's essentially useless to think of `n >> 13` as being equivalent to `n // 2**13`. Quick: what's ~0 >> 13? Well, ~0 is an infinite string of 1 bits, so shifting it right by any finite number of bits doesn't change it. That, mathematically, floor(~0 / 8192) = -1 is only interesting if you're thinking of ~0 as being an integer instead. And, if you are, _then_ you need to know that the infinite string of 1 bits ~0 represents is viewed as being a 2's-complement representation of -1. But so long as you're sticking to the bitstring view, the "2's complement" part is irrelevant to anything these 6 operations do. Indeed, in the very earliest versions of Python, longs (but not ints!) were viewed as being 1's-complement infinite bitstrings, but "infinite string of sign bits" was just as applicable to what these operations did then. The meaning of what these operations compute _as bitstrings_ is independent of how bitstrings are mapped to and from integers. When longs changed from 1's-comp to 2's-comp only the latter changed; code using longs as bitstrings wasn't affected. So, in all, there's quite a bit of background these telegraphic docs are glossing over. You (Nick) don't seem to ever think of them as being bitstrings, but what the "bitwise operators" do was driven by the bitstring view. That some of them can also be defined by arithmetic (+ - * /) is secondary. It may well take more text to get that all across than is suitable here, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 04:20:26 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 15 Jul 2018 08:20:26 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1531642826.22.0.56676864532.issue29710@psf.upfronthosting.co.za> Nick Coghlan added the comment: OK, that makes sense to me. Given that, there'd be two changes proposed. 1. Replace the opening paragraph of https://docs.python.org/3/library/stdtypes.html#bitwise-operations-on-integer-types (the one I originally quoted when opening this issue) with the text: ===================== Bitwise operations only make sense for integers. The result of bitwise operations is calculated as though carried out in two's complement with an infinite number of sign bits. ===================== 2. Add a new footnote ``(4)`` to the table for the ``|``, ``^``, and ``&`` entries that reads: ===================== 4. Performing these calculations with at least one extra sign extension bit in the internal representation (a working bit-width of ``1 + max(x.bit_length(), y.bit_length()`` or more) is sufficient to get the same result as if there were an infinite number of sign bits. ===================== ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 05:29:00 2018 From: report at bugs.python.org (Jayanth Koushik) Date: Sun, 15 Jul 2018 09:29:00 +0000 Subject: [issue34112] 3.7.0 build error with --enable-optimizations In-Reply-To: <1531585541.57.0.56676864532.issue34112@psf.upfronthosting.co.za> Message-ID: <1531646940.12.0.56676864532.issue34112@psf.upfronthosting.co.za> Jayanth Koushik added the comment: Updating gcc to 8.1.0 fixed the problem. ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 05:36:29 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Sun, 15 Jul 2018 09:36: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: <1531647389.92.0.56676864532.issue34047@psf.upfronthosting.co.za> Vlad Tudorache added the comment: I can reproduce this problem only with Tk 8.6.7, both compiled by myself or installed from ActiveState (Python 3.7 and 3.6 compiled by myself, too). I can't see it with Tk 8.6.8 provided with the installers, nor with Tk 8.5.18. ---------- nosy: +vtudorache _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 05:53:29 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Sun, 15 Jul 2018 09:53:29 +0000 Subject: [issue34120] IDLE Caret/Focus Lost Message-ID: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> New submission from Vlad Tudorache : When closing the IDLE's Preferences dialog the IDLE's Console window and/or Editor window (whichever was active before) doesn't show cursor/caret any more. One must click on Desktop or another window then click again in the IDLE's window in order to regain cursor/caret. This problem shows on macOS High Sierra, Python 3.6.N and 3.7.N (and even 3.5.N), with the provided installers (64 bit, 64/32 bit, Tk 8.6.8) and with self-compiled Python(s). After a number of openings IDLE will crash with an @autoreleasepool issue. I've compiled Tcl/Tk and Python with CC=clang CXX=clang++ MACOSX_DEPLOYMENT_TARGET=10.9 (10.10, 10.12 also), Tcl/Tk with and without --enable-threads, always with --enable-64bit --enable-framework and --enable-dtrace, clang 902.0.39.2 (Apple LLVM version 9.1.0), Python was compiled with and without --enable-dtrace and --enable-optimizations, with --enable-framework. ---------- assignee: terry.reedy components: IDLE messages: 321686 nosy: terry.reedy, vtudorache priority: normal severity: normal status: open title: IDLE Caret/Focus Lost type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 06:01:36 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 15 Jul 2018 10:01:36 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531648896.96.0.56676864532.issue34060@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > Giampaolo, on your psutil issue you specifically said, "(possibly without using WMI)" Is there any particular problem with using WMI? Performance. In general WMI is (a lot) slower than the Windows API counterpart (psutil never uses WMI except in unit tests). Don't know if this matters for this specific issue though, or whether a correspondent Windows API for doing the same thing exists. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 06:10:42 2018 From: report at bugs.python.org (Ammar Askar) Date: Sun, 15 Jul 2018 10:10:42 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531649442.36.0.56676864532.issue34060@psf.upfronthosting.co.za> Ammar Askar added the comment: Aah, yeah I don't think there's a good way of doing it purely from the windows API. There might be a way to enumerate through all the processes and see if they're queued up but I didn't look into it. In this case it should be fine, we just pay a bit of WMI cost to initialize the query, all the updating and retrieval is done asynchronously to the python code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 06:52:41 2018 From: report at bugs.python.org (Farhaan Bukhsh) Date: Sun, 15 Jul 2018 10:52:41 +0000 Subject: [issue27741] datetime.datetime.strptime functionality description incorrect In-Reply-To: <1470941311.19.0.0562450492824.issue27741@psf.upfronthosting.co.za> Message-ID: <1531651960.99.0.56676864532.issue27741@psf.upfronthosting.co.za> Farhaan Bukhsh added the comment: Hey I would like to remove this bug I was going through the discussion so does that mean remove the about mentioned lines from https://docs.python.org/3/library/datetime.html#datetime.datetime.strptime will fix this issue? Or should we add some more information there? ---------- nosy: +fhackdroid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 08:40:32 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Sun, 15 Jul 2018 12:40:32 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531658432.74.0.56676864532.issue34060@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Not that it matters all that much, but from a terminology standpoint, WMI != PDH != Performance Counters. Performance counters (the objects, not the topic) are provided by DLLs registered in the HKLM\SYSTEM\CurrentControlSet\Services key. Their data is accessed via registry API functions using the HKEY_PERFORMANCE_DATA root key. PDH (Performance Data Helper) provides an abstraction layer that can access those values among other things like a GUI or writing to log files. WMI (Windows Management Instrumentation) is yet another layer on top of PDH and raw Performance Counters. In this case of the "System" performance counter object, it is provided by a performance DLL (perfos.dll in the case of Win10 1803). If overhead (memory and/or CPU) is a concern, then accessing the counter data via the registry is the way to go. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 08:57:42 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 15 Jul 2018 12:57:42 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531659462.2.0.56676864532.issue34060@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I suppose there is no way to emulate os.getloadavg() on Windows because that would necessarily imply using a thread to call the necessary routine (WMI, PDH, whatever...) every X secs or something, correct? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 10:26:59 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Sun, 15 Jul 2018 14:26:59 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531664819.9.0.56676864532.issue34060@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Correct. Windows provides the building blocks for implementing getloadavg(), but does not provide an interface that does the averaging. That is deferred to a per application basis. The best that an application can do for that is to use thread pools. You can think of thread pools as kernel-managed threads (different from user-managed threads via CreateThread()). As of Win10 1703, any process linked with DLLs automatically have thread pools created for them (to parallel-ize the loading of said DLLs). Leveraging that feature would minimize the costs incurred to do the running average. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 14:54:30 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 15 Jul 2018 18:54:30 +0000 Subject: [issue33111] Merely importing tkinter breaks parallel code (multiprocessing, sharedmem) In-Reply-To: <1531593049.35.0.56676864532.issue33111@psf.upfronthosting.co.za> Message-ID: <25F35AB3-8194-4464-93E0-A1D4DB6D54DE@mac.com> Ronald Oussoren added the comment: As I mentioned in msg314304 this is almost certainly expected behavior on macOS because Apple?s GUI frameworks are not fork()-safe. There is nothing we can do about this other than changing the default spawn mechanism for multiprocessing on macOS. -- On the road, hence brief. Op 14 jul. 2018 om 19:30 heeft Terry J. Reedy het volgende geschreven: > > Terry J. Reedy added the comment: > > On MacOS, 3.7.0 is compiled for and the installer loads tcl/tk 8.6.8. The same is true for the 3.6.6 64-bit installer. Do tkinter and multiprocessing work together better with these installations? > > I want to consider using multiprocessing and pipes instead subprocess and socket for IDLE's user-code execution process, started from and communicating with the initial tkinter gui process. idlelib.run, which runs in the execution process to communicae with the gui process and supervise running user code, imports tkinter. Besides which, users have to be able to import tkinter in their programs. > > ---------- > nosy: +pitrou > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 15:07:18 2018 From: report at bugs.python.org (Ammar Askar) Date: Sun, 15 Jul 2018 19:07:18 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531681638.22.0.56676864532.issue34060@psf.upfronthosting.co.za> Ammar Askar added the comment: Is the function I used for the callback, RegisterWaitForSingleObject https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-registerwaitforsingleobject using the thread pooling system you're talking about underneath? The documentation seems to suggest so, but I'll wait for your opinion on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 15:11:06 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 15 Jul 2018 19:11:06 +0000 Subject: [issue33111] Merely importing tkinter breaks parallel code (multiprocessing, sharedmem) In-Reply-To: <1521573656.32.0.467229070634.issue33111@psf.upfronthosting.co.za> Message-ID: <1531681866.68.0.56676864532.issue33111@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I was uncertain from Ethan's post what does work best. "endless errors with both 'spawn", "Only 'fork' works...but without graphics", "method='spawn'and ... does work". Do the 1st and 3rd sentences mean that spawn + graphics fails without the proper additional code but does work with it? Should the 2nd sentence be "fork only works without graphics" rather than starting with 'only fork'? If so, this would suggest that the default should depend on whether there is a graphic import ;-). In any case, how to use successfully use multiprocessing with graphics on Mac should be documented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 15:25:47 2018 From: report at bugs.python.org (ppperry) Date: Sun, 15 Jul 2018 19:25:47 +0000 Subject: [issue33120] infinite loop in inspect.unwrap(unittest.mock.call) In-Reply-To: <1521725801.92.0.467229070634.issue33120@psf.upfronthosting.co.za> Message-ID: <1531682747.87.0.56676864532.issue33120@psf.upfronthosting.co.za> Change by ppperry : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 18:01:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 15 Jul 2018 22:01:13 +0000 Subject: [issue30400] Race condition in shutil.copyfile(): source file replaced file during copy In-Reply-To: <1531527468.95.0.56676864532.issue30400@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Python doesn't use FD of directories by default because it introduces issues of FD limit with deep directory tree, issue of managing FD lifetime, etc. That's why some API have one flavor for path and another for FD. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 19:47:57 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 15 Jul 2018 23:47:57 +0000 Subject: [issue34121] configure fails to detect C11 atomic support on clang Message-ID: <1531698477.65.0.56676864532.issue34121@psf.upfronthosting.co.za> New submission from Benjamin Peterson : clang supports C11 atomic APIs just fine but Python's configure fails to detect it: configure:16529: checking for stdatomic.h configure:16545: clang -pthread -o conftest conftest.c -lpthread -ldl -lutil >&5 conftest.c:389:5: error: _Atomic cannot be applied to incomplete type 'void' _Atomic void *py_atomic_address = (void*) &value; ^ 1 error generated. Indeed, the atomic uninhabited type is not very useful. If we wanted an atomic pointer, we should write _Atomic(void *). ---------- components: Interpreter Core messages: 321697 nosy: benjamin.peterson priority: normal severity: normal status: open title: configure fails to detect C11 atomic support on clang versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 19:48:06 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 15 Jul 2018 23:48:06 +0000 Subject: [issue34121] configure fails to detect C11 atomic support on clang In-Reply-To: <1531698477.65.0.56676864532.issue34121@psf.upfronthosting.co.za> Message-ID: <1531698486.77.0.56676864532.issue34121@psf.upfronthosting.co.za> Change by Benjamin Peterson : ---------- components: +Build -Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 19:49:57 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 15 Jul 2018 23:49:57 +0000 Subject: [issue34121] configure fails to detect C11 atomic support on clang In-Reply-To: <1531698477.65.0.56676864532.issue34121@psf.upfronthosting.co.za> Message-ID: <1531698597.97.0.56676864532.issue34121@psf.upfronthosting.co.za> Change by Benjamin Peterson : ---------- keywords: +patch pull_requests: +7822 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 20:01:45 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 16 Jul 2018 00:01:45 +0000 Subject: [issue34121] configure fails to detect C11 atomic support on clang In-Reply-To: <1531698477.65.0.56676864532.issue34121@psf.upfronthosting.co.za> Message-ID: <1531699305.51.0.56676864532.issue34121@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset 15c7b2abdfb93f8902dd72474818aee2bf97fa66 by Benjamin Peterson in branch 'master': bpo-34121: Fix detection of C11 atomic support on clang. (GH-8288) https://github.com/python/cpython/commit/15c7b2abdfb93f8902dd72474818aee2bf97fa66 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 20:02:13 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Jul 2018 00:02:13 +0000 Subject: [issue34121] configure fails to detect C11 atomic support on clang In-Reply-To: <1531698477.65.0.56676864532.issue34121@psf.upfronthosting.co.za> Message-ID: <1531699333.33.0.56676864532.issue34121@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7823 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 20:04:15 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 16 Jul 2018 00:04:15 +0000 Subject: [issue34121] configure fails to detect C11 atomic support on clang In-Reply-To: <1531698477.65.0.56676864532.issue34121@psf.upfronthosting.co.za> Message-ID: <1531699455.65.0.56676864532.issue34121@psf.upfronthosting.co.za> Change by Benjamin Peterson : ---------- pull_requests: +7824 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 20:05:26 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 16 Jul 2018 00:05:26 +0000 Subject: [issue34121] configure fails to detect C11 atomic support on clang In-Reply-To: <1531698477.65.0.56676864532.issue34121@psf.upfronthosting.co.za> Message-ID: <1531699526.68.0.56676864532.issue34121@psf.upfronthosting.co.za> Change by Benjamin Peterson : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 20:13:17 2018 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 16 Jul 2018 00:13:17 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531699997.93.0.56676864532.issue34060@psf.upfronthosting.co.za> Jeremy Kloth added the comment: The RegisterWaitForSingleObject() function does use the thread pool API: https://docs.microsoft.com/en-us/windows/desktop/ProcThread/thread-pool-api However, PdhCollectQueryDataEx() also creates a user-space thread to handle its work of setting the event whenever the timeout elapses. I would think that it should be preferable to use a single thread pool worker to retrieve the queue length and calculate the average. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 20:24:37 2018 From: report at bugs.python.org (Ammar Askar) Date: Mon, 16 Jul 2018 00:24:37 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531700677.56.0.56676864532.issue34060@psf.upfronthosting.co.za> Ammar Askar added the comment: Roger, personally I don't think its worth it to complicate the code in order to use the thread pool API. Especially considering this is just a private API and the only consumer will be the test suite runner. Let's see what the core devs think when this gets reviewed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 20:25:31 2018 From: report at bugs.python.org (Michael Forbes) Date: Mon, 16 Jul 2018 00:25:31 +0000 Subject: [issue21617] importlib reload can fail with AttributeError if module removed from sys.path In-Reply-To: <1401501396.28.0.0719854991231.issue21617@psf.upfronthosting.co.za> Message-ID: <1531700731.48.0.56676864532.issue21617@psf.upfronthosting.co.za> Michael Forbes added the comment: What is the status of this issue? Is there a work-around? The 3.7 codebase raises an exception, but what is the correct solution for reloading a module that was loaded dynamically without modifying `sys.path`? ---------- nosy: +mforbes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 20:32:18 2018 From: report at bugs.python.org (Michael Forbes) Date: Mon, 16 Jul 2018 00:32:18 +0000 Subject: [issue21617] importlib reload can fail with AttributeError if module removed from sys.path In-Reply-To: <1401501396.28.0.0719854991231.issue21617@psf.upfronthosting.co.za> Message-ID: <1531701138.27.0.56676864532.issue21617@psf.upfronthosting.co.za> Michael Forbes added the comment: It seems that a reasonable workaround (if you generate your own `spec`) is to call `spec.loader.exec_module(mod)`. This seems to reload the module into the same namespace. (I was afraid that it might replace the namespace hence the desire to use `importlib.reload()` explicitly.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 20:36:57 2018 From: report at bugs.python.org (Brett Cannon) Date: Mon, 16 Jul 2018 00:36:57 +0000 Subject: [issue21617] importlib reload can fail with AttributeError if module removed from sys.path In-Reply-To: <1401501396.28.0.0719854991231.issue21617@psf.upfronthosting.co.za> Message-ID: <1531701417.18.0.56676864532.issue21617@psf.upfronthosting.co.za> Brett Cannon added the comment: If there's no spec, Michael, then your work-around is the next best option (and reloading never actually replaces the actual module object or it's dict/global namespace because we don't know who is holding on to a reference). ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 20:44:14 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Jul 2018 00:44:14 +0000 Subject: [issue34121] configure fails to detect C11 atomic support on clang In-Reply-To: <1531698477.65.0.56676864532.issue34121@psf.upfronthosting.co.za> Message-ID: <1531701854.59.0.56676864532.issue34121@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 3fc12f0e2ad9ba49243f5a43a8803018b2ff5904 by Miss Islington (bot) in branch '3.7': bpo-34121: Fix detection of C11 atomic support on clang. (GH-8288) https://github.com/python/cpython/commit/3fc12f0e2ad9ba49243f5a43a8803018b2ff5904 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 15 20:48:48 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 16 Jul 2018 00:48:48 +0000 Subject: [issue34121] configure fails to detect C11 atomic support on clang In-Reply-To: <1531698477.65.0.56676864532.issue34121@psf.upfronthosting.co.za> Message-ID: <1531702128.47.0.56676864532.issue34121@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset 8487ef61dea9fb0579f0be8f01d74fa20d3b8ed1 by Benjamin Peterson in branch '3.6': [3.6] bpo-34121: Fix detection of C11 atomic support on clang. (GH-8290) https://github.com/python/cpython/commit/8487ef61dea9fb0579f0be8f01d74fa20d3b8ed1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 00:12:50 2018 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 16 Jul 2018 04:12:50 +0000 Subject: [issue34122] inspect.getmembers does not retrive dataclass's __dataclass_fields__ properly Message-ID: <1531714370.47.0.56676864532.issue34122@psf.upfronthosting.co.za> New submission from Dong-hee Na : When I execute this script. import inspect from dataclasses import * import enum @dataclass class SimpleDataObject(object): field_a: int = field() field_b: str = "asdad" print([a[0] for a in inspect.getmembers(SimpleDataObject)]) I expected ['__annotations__', '__class__', '__dataclass_fields__', '__dataclass_params__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'field_a', 'field_b'] but got ['__annotations__', '__class__', '__dataclass_fields__', '__dataclass_params__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'field_b'] If this behavior is not intended, I propose a new patch with providing Inspect.isdataclass for Python 3.8 and Inspect._is_dataclss for Python 3.7 https://github.com/corona10/cpython/commit/c2665176ce836a7b328ddc09c6c7d3de0a2b29a0 ---------- components: Library (Lib) files: inspect_dataclass.py messages: 321706 nosy: corona10, eric.smith, serhiy.storchaka, yselivanov priority: normal severity: normal status: open title: inspect.getmembers does not retrive dataclass's __dataclass_fields__ properly versions: Python 3.7, Python 3.8 Added file: https://bugs.python.org/file47693/inspect_dataclass.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 01:36:00 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 16 Jul 2018 05:36:00 +0000 Subject: [issue34122] inspect.getmembers does not retrive dataclass's __dataclass_fields__ properly In-Reply-To: <1531714370.47.0.56676864532.issue34122@psf.upfronthosting.co.za> Message-ID: <1531719360.0.0.56676864532.issue34122@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 01:53:53 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 16 Jul 2018 05:53:53 +0000 Subject: [issue34122] inspect.getmembers does not retrive dataclass's __dataclass_fields__ properly In-Reply-To: <1531714370.47.0.56676864532.issue34122@psf.upfronthosting.co.za> Message-ID: <1531720433.14.0.56676864532.issue34122@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I think there is some note about this on the doc as below : https://docs.python.org/3/library/dataclasses.html#dataclasses.field . Relevant commit : 98d50cb8f57eb227c373cb94b8680b12ec8aade5 If the default value of a field is specified by a call to field(), then the class attribute for this field will be replaced by the specified default value. If no default is provided, then the class attribute will be deleted. The intent is that after the dataclass() decorator runs, the class attributes will all contain the default values for the fields, just as if the default value itself were specified. Using a default value returns the parameter in the inspect module as below : ? cpython git:(master) ? cat foo.py import inspect from dataclasses import * import enum @dataclass class SimpleDataObject(object): field_a: int = field(default=10) field_b: str = "asdad" print([a[0] for a in inspect.getmembers(SimpleDataObject)]) ? cpython git:(master) ? ./python foo.py ['__annotations__', '__class__', '__dataclass_fields__', '__dataclass_params__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'field_a', 'field_b'] I think this is an intended behavior as above and a test case could be added or docs could be improved about this with the inspect example? Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 02:00:27 2018 From: report at bugs.python.org (Dan Snider) Date: Mon, 16 Jul 2018 06:00:27 +0000 Subject: [issue34123] ambiguous documentation for dict.popitem Message-ID: <1531720827.11.0.56676864532.issue34123@psf.upfronthosting.co.za> New submission from Dan Snider : https://docs.python.org/3/library/stdtypes.html#dict.popitem `dict.popitem` no longer returns an "arbitrary" (key, value) pair as the documentation suggests. Rather, it always returns the pair whose key was most recently *inserted* (ie., the last entry in `dk_entries`). Perhaps the docs could reflect that this method is now always LIFO rather arbitrary now that insertion order is guaranteed? ---------- assignee: docs at python components: Documentation messages: 321708 nosy: bup, docs at python priority: normal severity: normal status: open title: ambiguous documentation for dict.popitem versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 02:07:09 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 16 Jul 2018 06:07:09 +0000 Subject: [issue34123] ambiguous documentation for dict.popitem In-Reply-To: <1531720827.11.0.56676864532.issue34123@psf.upfronthosting.co.za> Message-ID: <1531721229.33.0.56676864532.issue34123@psf.upfronthosting.co.za> INADA Naoki added the comment: I think it is implementation detail yet. Only iteration order is guaranteed. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 02:10:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 16 Jul 2018 06:10:23 +0000 Subject: [issue24618] Invalid read in PyCode_New In-Reply-To: <1436723206.75.0.0338800196723.issue24618@psf.upfronthosting.co.za> Message-ID: <1531721423.25.0.56676864532.issue24618@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset bd47384e07bde38a8f18b90b4cea02a505d95c75 by Serhiy Storchaka in branch 'master': bpo-24618: Add a check in the code constructor. (GH-8283) https://github.com/python/cpython/commit/bd47384e07bde38a8f18b90b4cea02a505d95c75 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 02:11:54 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Jul 2018 06:11:54 +0000 Subject: [issue24618] Invalid read in PyCode_New In-Reply-To: <1436723206.75.0.0338800196723.issue24618@psf.upfronthosting.co.za> Message-ID: <1531721514.95.0.56676864532.issue24618@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7825 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 02:13:42 2018 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 16 Jul 2018 06:13:42 +0000 Subject: [issue34122] inspect.getmembers does not retrive dataclass's __dataclass_fields__ properly In-Reply-To: <1531714370.47.0.56676864532.issue34122@psf.upfronthosting.co.za> Message-ID: <1531721622.98.0.56676864532.issue34122@psf.upfronthosting.co.za> Dong-hee Na added the comment: @xtreak Yeah... It looks like intended. Closing this issue! ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 02:52:14 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 16 Jul 2018 06:52:14 +0000 Subject: [issue34123] ambiguous documentation for dict.popitem In-Reply-To: <1531720827.11.0.56676864532.issue34123@psf.upfronthosting.co.za> Message-ID: <1531723934.81.0.56676864532.issue34123@psf.upfronthosting.co.za> Raymond Hettinger added the comment: My opinion is that it is in fact guaranteed. It makes no sense for all other aspects of the dict behavior to be guaranteed and not this one. This is what PyPy and CPython already do and there is no scenario where an implementation would be able to append a new pair at the end but unable to reverse the operation. IMO, leaving this in an ambiguous state would created problems unnecessarily and it would preclude reasonable uses of the the ordering feature. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 02:58:25 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 16 Jul 2018 06:58:25 +0000 Subject: [issue34123] ambiguous documentation for dict.popitem In-Reply-To: <1531720827.11.0.56676864532.issue34123@psf.upfronthosting.co.za> Message-ID: <1531724305.68.0.56676864532.issue34123@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 03:09:47 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Jul 2018 07:09:47 +0000 Subject: [issue24618] Invalid read in PyCode_New In-Reply-To: <1436723206.75.0.0338800196723.issue24618@psf.upfronthosting.co.za> Message-ID: <1531724987.01.0.56676864532.issue24618@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 5594f1dfbe214151b75405be042e9420a3649241 by Miss Islington (bot) in branch '3.7': bpo-24618: Add a check in the code constructor. (GH-8283) https://github.com/python/cpython/commit/5594f1dfbe214151b75405be042e9420a3649241 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 03:12:10 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 16 Jul 2018 07:12:10 +0000 Subject: [issue34123] ambiguous documentation for dict.popitem In-Reply-To: <1531720827.11.0.56676864532.issue34123@psf.upfronthosting.co.za> Message-ID: <1531725130.05.0.56676864532.issue34123@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +7826 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 03:15:43 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 16 Jul 2018 07:15:43 +0000 Subject: [issue34123] ambiguous documentation for dict.popitem In-Reply-To: <1531720827.11.0.56676864532.issue34123@psf.upfronthosting.co.za> Message-ID: <1531725343.72.0.56676864532.issue34123@psf.upfronthosting.co.za> INADA Naoki added the comment: @Armin Rigo How do you think about this? Is there no possible optimizations by breaking LIFO dict.popitem()? ---------- nosy: +arigo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 03:28:09 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 16 Jul 2018 07:28:09 +0000 Subject: [issue34093] Reproducible pyc: FLAG_REF is not stable. In-Reply-To: <1531305608.98.0.56676864532.issue34093@psf.upfronthosting.co.za> Message-ID: <1531726089.45.0.56676864532.issue34093@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- pull_requests: +7827 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 03:39:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Jul 2018 07:39:10 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531726750.61.0.56676864532.issue34060@psf.upfronthosting.co.za> STINNER Victor added the comment: Logging the current value can be an acceptable compromise. When we run tests in subprocesses (python3 -m test -jN), we can run a test every N milliseconds with no thread. It's ok if the average is not accurate. Most buildbots use -jN for performance but also to isolate the main processes from crashes and hard timeouts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 03:57:49 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 16 Jul 2018 07:57:49 +0000 Subject: [issue34123] ambiguous documentation for dict.popitem In-Reply-To: <1531720827.11.0.56676864532.issue34123@psf.upfronthosting.co.za> Message-ID: <1531727869.8.0.56676864532.issue34123@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Is there no possible optimizations by breaking LIFO dict.popitem()? Even if there were a possible optimization, we wouldn't care. The API is too desirable to forgo in the name of micro-optimization. We don't design our APIs that way -- trading the relevant and actionable for ethereal and unknown. Also, it is common sense that addition of a key/value pair at the end is a readily undoable operation (no more expensive to remove than it was to add). There will be a dummy entry in the hash array just like there is now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 04:46:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Jul 2018 08:46:17 +0000 Subject: [issue33911] [EASY] test_docxmlrpc fails when run with -Werror In-Reply-To: <1529488615.5.0.56676864532.issue33911@psf.upfronthosting.co.za> Message-ID: <1531730777.6.0.56676864532.issue33911@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 35c0809158be7feae4c4f877a08b93baea2d8291 by Victor Stinner (Nicolas No?) in branch 'master': bpo-33911: Fixed deprecation warning in xmlrpc.server (GH-7847) https://github.com/python/cpython/commit/35c0809158be7feae4c4f877a08b93baea2d8291 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 04:49:31 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Jul 2018 08:49:31 +0000 Subject: [issue33911] [EASY] test_docxmlrpc fails when run with -Werror In-Reply-To: <1529488615.5.0.56676864532.issue33911@psf.upfronthosting.co.za> Message-ID: <1531730971.01.0.56676864532.issue33911@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7828 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 04:53:32 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Jul 2018 08:53:32 +0000 Subject: [issue33911] [EASY] test_docxmlrpc fails when run with -Werror In-Reply-To: <1529488615.5.0.56676864532.issue33911@psf.upfronthosting.co.za> Message-ID: <1531731212.96.0.56676864532.issue33911@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 3.7 is affected as well: vstinner at apu$ ./python -Werror -m test test_docxmlrpc ---------------------------------------- Exception happened during processing of request from ('127.0.0.1', 46636) Traceback (most recent call last): (...) File "/home/vstinner/prog/python/3.7/Lib/xmlrpc/server.py", line 828, in docserver contents.append(self.docroutine(value, key, funcs=fdict)) File "/home/vstinner/prog/python/3.7/Lib/xmlrpc/server.py", line 791, in docroutine formatvalue=self.formatvalue) File "/home/vstinner/prog/python/3.7/Lib/inspect.py", line 1225, in formatargspec stacklevel=2) DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly ---------------------------------------- Warning -- threading._dangling was modified by test_docxmlrpc Before: <_weakrefset.WeakSet object at 0x7fc84da8f810> After: <_weakrefset.WeakSet object at 0x7fc84da8f538> test test_docxmlrpc failed -- multiple errors occurred; run in verbose mode for details test_docxmlrpc failed I generated PR 8294 backport to fix Python 3.7 as well. Since the HTML output is unchanged, IMHO it's safe to backport the change. In the documentation, inspect.formatargspec() is also deprecated in Python 3.6, but the code doesn't emit a DeprecationWarning. I don't think that it's worth it to backport the change to Python 3.6. ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 04:58:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Jul 2018 08:58:36 +0000 Subject: [issue33073] Add as_integer_ratio() to int() objects In-Reply-To: <1520976305.18.0.467229070634.issue33073@psf.upfronthosting.co.za> Message-ID: <1531731516.8.0.56676864532.issue33073@psf.upfronthosting.co.za> STINNER Victor added the comment: > I assume it's decided what to do -- it may not be easy to do it, but I wouldn't call it controversial at this point. Ok, I delete "controversal" from my comment :-) To tag an issue as "easy" (or "easy C"), please describe step by step how you would implement the feature: modified files, modified functions, etc. It's ok to not give these explanation, but in that case, it's a regular issue, not an easy one. Note: I'm triagging old "easy" issues. I remove the keyword when I consider that the issue is not easy enough for a newcomer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 04:59:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Jul 2018 08:59:14 +0000 Subject: [issue33073] Add as_integer_ratio() to int() objects In-Reply-To: <1520976305.18.0.467229070634.issue33073@psf.upfronthosting.co.za> Message-ID: <1531731554.01.0.56676864532.issue33073@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: -easy (C) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 05:02:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Jul 2018 09:02:34 +0000 Subject: [issue33911] [EASY] test_docxmlrpc fails when run with -Werror In-Reply-To: <1529488615.5.0.56676864532.issue33911@psf.upfronthosting.co.za> Message-ID: <1531731754.69.0.56676864532.issue33911@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset bbddd667a9087f5cfb9e8f9d81fb6d2f75465ba1 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-33911: Fixed deprecation warning in xmlrpc.server (GH-7847) (GH-8294) https://github.com/python/cpython/commit/bbddd667a9087f5cfb9e8f9d81fb6d2f75465ba1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 05:03:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Jul 2018 09:03:25 +0000 Subject: [issue33911] [EASY] test_docxmlrpc fails when run with -Werror In-Reply-To: <1529488615.5.0.56676864532.issue33911@psf.upfronthosting.co.za> Message-ID: <1531731805.47.0.56676864532.issue33911@psf.upfronthosting.co.za> STINNER Victor added the comment: Nicolas No?: Thank you for your change! I merged it in master, and backported it to Python 3.7. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 05:04:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Jul 2018 09:04:09 +0000 Subject: [issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L In-Reply-To: <1531314657.47.0.56676864532.issue34096@psf.upfronthosting.co.za> Message-ID: <1531731849.63.0.56676864532.issue34096@psf.upfronthosting.co.za> STINNER Victor added the comment: > yes, indeed, I just tested with your three flags-variables set and the build+test succeeded - I'll have to figure out what the minimal change is, though :-) Yeah, it would be great if you can find the C flag which fixes your issue. I bet on -fwrapv. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 05:12:18 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Jul 2018 09:12:18 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531732338.76.0.56676864532.issue33967@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7829 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 05:13:29 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Jul 2018 09:13:29 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531732409.39.0.56676864532.issue33967@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7830 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 05:24:25 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 16 Jul 2018 09:24:25 +0000 Subject: [issue33111] Merely importing tkinter breaks parallel code (multiprocessing, sharedmem) In-Reply-To: <1521573656.32.0.467229070634.issue33111@psf.upfronthosting.co.za> Message-ID: <1531733065.54.0.56676864532.issue33111@psf.upfronthosting.co.za> Antoine Pitrou added the comment: macOS users, feel free to propose a doc PR for multiprocessing. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python versions: +Python 3.7, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 05:26:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Jul 2018 09:26:41 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531733201.21.0.56676864532.issue34060@psf.upfronthosting.co.za> STINNER Victor added the comment: https://docs.microsoft.com/en-us/sql/relational-databases/performance-monitor/monitor-cpu-usage?view=sql-server-2017 Processor Queue Length: Corresponds to the number of threads waiting for processor time. A processor bottleneck develops when threads of a process require more processor cycles than are available. If more than a few processes attempt to utilize the processor's time, you might need to install a faster processor. Or, if you have a multiprocessor system, you could add a processor. When you examine processor usage, consider the type of work that the instance of SQL Server performs. If SQL Server performs many calculations, such as queries involving aggregates or memory-bound queries that require no disk I/O, 100 percent of the processor's time can be used. If this causes the performance of other applications to suffer, try changing the workload. For example, dedicate the computer to running the instance of SQL Server. Usage rates around 100 percent, where many client requests are being processed, may indicate that processes are queuing up, waiting for processor time, and causing a bottleneck. Resolve the problem by adding faster processors. -- Is it exactly the same thing on Unix (load average)? If not, I would prefer to use a different name in regrtest and "loadavg". Maybe "PQL avg"? What is the impact of the number of CPUs on this value? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 05:26:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Jul 2018 09:26:52 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531733212.68.0.56676864532.issue33967@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 336c9539a90e0f5df5bcc5b444b8400a58820583 by Victor Stinner (Miss Islington (bot)) in branch '3.6': bpo-33967: Remove use of deprecated assertRaisesRegexp() (GH-8261) (GH-8295) https://github.com/python/cpython/commit/336c9539a90e0f5df5bcc5b444b8400a58820583 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 05:36:43 2018 From: report at bugs.python.org (Ammar Askar) Date: Mon, 16 Jul 2018 09:36:43 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531733803.29.0.56676864532.issue34060@psf.upfronthosting.co.za> Ammar Askar added the comment: I don't think taking instantaneous values instead of averaging will work out too well. For reference I've attached a screenshot. It has sampled values at every second on an unloaded computer and then with running prime95 for cpu stress testing. The load tends to peak and fall. >Is it exactly the same thing on Unix (load average)? Indeed it is: https://en.wikipedia.org/wiki/Load_(computing)#Unix-style_load_calculation "An idle computer has a load number of 0 (the idle process isn't counted). Each process using or waiting for CPU (the ready queue or run queue) increments the load number by 1." >From what I can tell, the number of processors are dealt with the same way as on Linux, that is, a single core processor is overloaded when the load is >1 and a quad core processor is overloaded when the load is >4 ---------- Added file: https://bugs.python.org/file47694/benchmark.PNG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 05:40:15 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Jul 2018 09:40:15 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531734015.46.0.56676864532.issue33967@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 0a820a203032e3b1b9413afba45acd8f79f27f81 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-33967: Remove use of deprecated assertRaisesRegexp() (GH-8261) (GH-8296) https://github.com/python/cpython/commit/0a820a203032e3b1b9413afba45acd8f79f27f81 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 05:53:26 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 16 Jul 2018 09:53:26 +0000 Subject: [issue34116] Move all bytes/bytearray/int/float/complex documentation to Built-in Types In-Reply-To: <1531613250.34.0.56676864532.issue34116@psf.upfronthosting.co.za> Message-ID: <1531734806.94.0.56676864532.issue34116@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I disagree that this would be an improvement. The current organization has worked well for us. In particular, some of the these types sometimes used like functions that produce a type (this is where the builtin functions docs do a good job). In the stdtypes docs, we go into detail about what the types do and have them grouped in a way that can be compared and contrasted. As a Python instructor, I ask newcomers to read the built-in functions section because it tells them a lot of what they need to know to get up and running with the language (indeed, that is why these are all builitins rather than relegated to modules). The stdtypes section is more voluminous and rarely read start to finish (mostly just used as a reference). ---------- nosy: +rhettinger resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 05:59:36 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 16 Jul 2018 09:59:36 +0000 Subject: [issue33073] Add as_integer_ratio() to int() objects In-Reply-To: <1520976305.18.0.467229070634.issue33073@psf.upfronthosting.co.za> Message-ID: <1531735176.1.0.56676864532.issue33073@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I put the easy tag here because it was suitable for our mentees and because it is isn't a very difficult task (literally, this is the definition of "easy"). FWIW, it is not "triaging" when the tag was set by a seasoned core developer who was familiar with the issue and already working with a mentee. Triaging is making an initial assessment when no one else has looked at an issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 06:30:42 2018 From: report at bugs.python.org (Carl Banks) Date: Mon, 16 Jul 2018 10:30:42 +0000 Subject: [issue32780] ctypes: memoryview gives incorrect PEP3118 format strings for both packed and unpacked structs In-Reply-To: <1517894879.39.0.467229070634.issue32780@psf.upfronthosting.co.za> Message-ID: <1531737042.74.0.56676864532.issue32780@psf.upfronthosting.co.za> Carl Banks added the comment: I guess I'll weigh in since I was pinged. I agree with the approach in the patch. All the memoryview does is to use the format field verbatim from the underlying buffer, so if the format field is inaccurate then the only thing to do is to fix the object providing the buffer. Since the format field is only there for interpretation of the data, and is not used to calculate of itemsizes or strides anywhere as far as I know, it's a fairly low-risk change. However, the patch still leaves ctypes inaccurate for the case of unions. It should be fairly simple to modify the code to use a format of "B" for unions, so that it at least matches the itemsize, even if the type information is lost. (As an aside, let me point out that I did not actually write or advocate for the PEP; for some reason my name was added to it even though I all I did was to provide feedback.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 06:39:50 2018 From: report at bugs.python.org (Erich Eckner) Date: Mon, 16 Jul 2018 10:39:50 +0000 Subject: [issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L In-Reply-To: <1531314657.47.0.56676864532.issue34096@psf.upfronthosting.co.za> Message-ID: <1531737590.0.0.56676864532.issue34096@psf.upfronthosting.co.za> Erich Eckner added the comment: yes, you were absolutely right: just adding "-fwrapv" to $OPT is enough. Ok, is this something, we at archlinux32 need to opt in for, or is this something, that the configure script should add for x86? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 06:41:34 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 16 Jul 2018 10:41:34 +0000 Subject: [issue34118] Fix some class entries in 'Built-in Functions' In-Reply-To: <1531623878.78.0.56676864532.issue34118@psf.upfronthosting.co.za> Message-ID: <1531737694.32.0.56676864532.issue34118@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I propose that the 2nd 3 follow the model of the 1st 3, This makes sense and would read a little better. > Classes enumerate, filter, map, memoryview, range, reversed, > tuple, and zip are untagged. I think, to be consistent, > that they should all get the *class* tag. To me, that makes the most sense for: memoryview, range and tuple. The rest are used like functions. Even though they are technically classes, it is confusing to think of them as such (we don't call map() to get an instance of a mapobject and do a dir() to what interesting methods it may have). Tools like map() and filter() actually were functions at one time. The substantive change was that they were made to be lazy. The implementation detail was that they were implemented as classes -- they could have been generators instead. Accordingly, I think tagging these as classes is pedantically correct but actually makes the docs a little less usable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 07:39:16 2018 From: report at bugs.python.org (Jon Ribbens) Date: Mon, 16 Jul 2018 11:39:16 +0000 Subject: [issue34124] email.message_from_binary_file documentation is broken Message-ID: <1531741156.21.0.56676864532.issue34124@psf.upfronthosting.co.za> New submission from Jon Ribbens : The documentation for email.message_from_binary_file is missing a line-continuation backslash at the end of the `.. function::` line which means the output formatting is mangled and it has no permalink. ---------- assignee: docs at python components: Documentation messages: 321733 nosy: docs at python, jribbens priority: normal severity: normal status: open title: email.message_from_binary_file documentation is broken type: compile error versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 07:48:23 2018 From: report at bugs.python.org (Amin Radjabov) Date: Mon, 16 Jul 2018 11:48:23 +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: <1531741703.81.0.56676864532.issue32545@psf.upfronthosting.co.za> Amin Radjabov added the comment: log ---------- Added file: https://bugs.python.org/file47695/Python 3.7.0 (32-bit)_20180628184532.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 07:50:35 2018 From: report at bugs.python.org (Jon Ribbens) Date: Mon, 16 Jul 2018 11:50:35 +0000 Subject: [issue34124] email.message_from_binary_file documentation is broken In-Reply-To: <1531741156.21.0.56676864532.issue34124@psf.upfronthosting.co.za> Message-ID: <1531741835.84.0.56676864532.issue34124@psf.upfronthosting.co.za> Change by Jon Ribbens : ---------- keywords: +patch pull_requests: +7831 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 08:15:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Jul 2018 12:15:51 +0000 Subject: [issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L In-Reply-To: <1531314657.47.0.56676864532.issue34096@psf.upfronthosting.co.za> Message-ID: <1531743351.21.0.56676864532.issue34096@psf.upfronthosting.co.za> STINNER Victor added the comment: Mark, Serhiy, Gregory and other fanboys of Undefined Behaviour: it seems like audioop is miscompiled on x86 (32-bit) without -fwrapv :-) ---------- nosy: +gregory.p.smith, mark.dickinson, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 08:39:09 2018 From: report at bugs.python.org (Erich Eckner) Date: Mon, 16 Jul 2018 12:39:09 +0000 Subject: [issue34095] [2.7] test_idle fails with: /usr/bin/xvfb-run: line 181: 3617 Segmentation fault In-Reply-To: <1531314252.99.0.56676864532.issue34095@psf.upfronthosting.co.za> Message-ID: <1531744749.25.0.56676864532.issue34095@psf.upfronthosting.co.za> Erich Eckner added the comment: > Can you try to get the Python traceback and/or C traceback using gdb? Sry, I can't - I don't know how to use gdb :-( Is there some one-line command which makes gdb start xvfb-run and attach to it? Or do I need to start xvfb-run and separately attach gdb to it? (how do I do this?) > ... and hence would need xvfb-run on a headless server, as opposed to a workstation with screen. Erich, I assume you are running on the latter. I'm running this on a headless box (packaging for archlinux32). Setting up a desktop on the test box would be some effort, but should be possible in principle. In the original PKGBUILD which Eli posted, there is a comment about when the tests started failing - which suggests, the problem is connected to xvfb-run. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 08:57:24 2018 From: report at bugs.python.org (Erich Eckner) Date: Mon, 16 Jul 2018 12:57:24 +0000 Subject: [issue34095] [2.7] test_idle fails with: /usr/bin/xvfb-run: line 181: 3617 Segmentation fault In-Reply-To: <1531314252.99.0.56676864532.issue34095@psf.upfronthosting.co.za> Message-ID: <1531745843.99.0.56676864532.issue34095@psf.upfronthosting.co.za> Erich Eckner added the comment: ok, some update: 1st: running the complete test suite with xvfb fails (as already reported): > LD_LIBRARY_PATH="${srcdir}/Python-${pkgver}":${LD_LIBRARY_PATH} \ xvfb-run "${srcdir}/Python-${pkgver}/python" -m test.regrtest -v -uall ... 0:02:14 load avg: 0.90 [174/403/1] test_idle test_close (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok test_misc (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok test_read (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok test_readline (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok test_readlines (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok test_unsupported (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok test_close (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok test_misc (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok test_unsupported (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok test_write (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok test_writelines (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok /usr/bin/xvfb-run: line 181: 13491 Segmentation fault (core dumped) DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1 running w/o xvfb-run succeeds: > LD_LIBRARY_PATH="${srcdir}/Python-${pkgver}":${LD_LIBRARY_PATH} ${srcdir}/Python-${pkgver}/python -m test.regrtest -v -m test_io test_idle == CPython 2.7.15 (default, Jul 16 2018, 12:22:58) [GCC 8.1.1 20180531] == Linux-4.17.4-1.0-ARCH-i686-with-glibc2.1.3 little-endian == /home/vagrant/python2/src/Python-2.7.15/build/test_python_14208 == CPU count: 2 Run tests sequentially 0:00:00 load avg: 0.26 [1/1] test_idle test_close (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok test_misc (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok test_read (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok test_readline (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok test_readlines (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok test_unsupported (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok test_close (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok test_misc (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok test_unsupported (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok test_write (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok test_writelines (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok ---------------------------------------------------------------------- Ran 11 tests in 0.003s OK 1 test OK. Total duration: 150 ms Tests result: SUCCESS running only these tests with xvfb-run _succeeds_: > LD_LIBRARY_PATH="${srcdir}/Python-${pkgver}":${LD_LIBRARY_PATH} xvfb-run ${srcdir}/Python-${pkgver}/python -m test.regrtest -v -m test_io test_idle == CPython 2.7.15 (default, Jul 16 2018, 12:22:58) [GCC 8.1.1 20180531] == Linux-4.17.4-1.0-ARCH-i686-with-glibc2.1.3 little-endian == /home/vagrant/python2/src/Python-2.7.15/build/test_python_14226 == CPU count: 2 Run tests sequentially 0:00:00 load avg: 0.15 [1/1] test_idle test_close (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok test_misc (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok test_read (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok test_readline (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok test_readlines (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok test_unsupported (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok test_close (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok test_misc (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok test_unsupported (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok test_write (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok test_writelines (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok ---------------------------------------------------------------------- Ran 11 tests in 0.004s OK 1 test OK. Total duration: 144 ms Tests result: SUCCESS ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 09:22:27 2018 From: report at bugs.python.org (Ammar Askar) Date: Mon, 16 Jul 2018 13:22:27 +0000 Subject: [issue34088] [EASY] sndhdr.what() throws exceptions on unknown files In-Reply-To: <1531255806.14.0.56676864532.issue34088@psf.upfronthosting.co.za> Message-ID: <1531747347.2.0.56676864532.issue34088@psf.upfronthosting.co.za> Ammar Askar added the comment: Hey Lysandros. Take a look at https://github.com/python/cpython/blob/master/Lib/wave.py#L126-L139 Notice how there's a Chunk made from the `file` argument but then another Chunk created using the previous chunk as a file. While it might seem like self.size_read is magically changing between the steps, the thing to realize there is that self.file is another chunk and when you step, you're stepping into the seek of another Chunk instance, which has its own self.size_read ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 10:48:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Jul 2018 14:48:11 +0000 Subject: [issue33073] Add as_integer_ratio() to int() objects In-Reply-To: <1520976305.18.0.467229070634.issue33073@psf.upfronthosting.co.za> Message-ID: <1531752491.26.0.56676864532.issue33073@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 11:03:00 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 16 Jul 2018 15:03:00 +0000 Subject: [issue34124] email.message_from_binary_file documentation is broken In-Reply-To: <1531741156.21.0.56676864532.issue34124@psf.upfronthosting.co.za> Message-ID: <1531753380.97.0.56676864532.issue34124@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- type: compile error -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 11:25:21 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 16 Jul 2018 15:25:21 +0000 Subject: [issue33073] Add as_integer_ratio() to int() objects In-Reply-To: <1520976305.18.0.467229070634.issue33073@psf.upfronthosting.co.za> Message-ID: <1531754721.14.0.56676864532.issue33073@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Nofar, do you want to continue to work on this or should I reassign? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 11:44:30 2018 From: report at bugs.python.org (Bryan) Date: Mon, 16 Jul 2018 15:44:30 +0000 Subject: [issue31652] make install fails: no module _ctypes In-Reply-To: <1506812661.87.0.213398074469.issue31652@psf.upfronthosting.co.za> Message-ID: <1531755870.53.0.56676864532.issue31652@psf.upfronthosting.co.za> Bryan added the comment: Similar error on CentOS 7 ModuleNotFoundError: No module named '_ctypes' Install -- yum install libffi-devel Repeat: ./configure --enable-optimizations make altinstall Results: Collecting setuptools Collecting pip Installing collected packages: setuptools, pip Successfully installed pip-10.0.1 setuptools-39.0.1 NOTE: The error did not stop python3.7 from operating as noted on this page. # python3.7 Python 3.7.0 (default, Jul 16 2018, 11:25:12) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> print ("Hello Python") Hello Python >>> ---------- nosy: +bryanf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 12:02:02 2018 From: report at bugs.python.org (Armin Rigo) Date: Mon, 16 Jul 2018 16:02:02 +0000 Subject: [issue34123] ambiguous documentation for dict.popitem In-Reply-To: <1531720827.11.0.56676864532.issue34123@psf.upfronthosting.co.za> Message-ID: <1531756922.0.0.56676864532.issue34123@psf.upfronthosting.co.za> Armin Rigo added the comment: Agreed with Raymond. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 12:15:00 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 16 Jul 2018 16:15:00 +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: <1531757700.93.0.56676864532.issue32545@psf.upfronthosting.co.za> Steve Dower added the comment: Amin, it looks like you are trying to upgrade an all-users install of an earlier version of Python 3.7 (one of the betas?) to a just-for-me install. If you know which older version you have installed, or you can find it in Programs and Features, I'd suggest uninstalling it first. If you can't find it, installing 3.7.0 for all users (go through the Advanced install section) should succeed, and then you can uninstall it if you specifically want a just-for-me install. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 13:02:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 16 Jul 2018 17:02:10 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531760530.25.0.56676864532.issue33967@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The purpose of using assertRaisesRegexp() was testing the error message. assertRaises() doesn't do this. Needed to restore the appropriate assertion method, but using a non-deprecated alias: assertRaisesRegex(). ---------- nosy: +serhiy.storchaka resolution: fixed -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 13:03:13 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 16 Jul 2018 17:03:13 +0000 Subject: [issue32430] Simplify Modules/Setup{,.dist,.local} In-Reply-To: <1514373303.98.0.213398074469.issue32430@psf.upfronthosting.co.za> Message-ID: <1531760593.56.0.56676864532.issue32430@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 961d54c5c1916c09883ebcf7191babc969e5a5cf by Antoine Pitrou in branch 'master': bpo-32430: Rename Modules/Setup.dist to Modules/Setup (GH-8229) https://github.com/python/cpython/commit/961d54c5c1916c09883ebcf7191babc969e5a5cf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 13:04:41 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 16 Jul 2018 17:04:41 +0000 Subject: [issue32430] Simplify Modules/Setup{,.dist,.local} In-Reply-To: <1514373303.98.0.213398074469.issue32430@psf.upfronthosting.co.za> Message-ID: <1531760681.15.0.56676864532.issue32430@psf.upfronthosting.co.za> Antoine Pitrou added the comment: With PR #8229 pushed the distinction between Setup.dist and Setup has disappeared: you have a Modules/Setup file in the source tree and that's where you do any changes, which you are responsible to track yourself (e.g. using a patch file or a git fork). ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 13:16:00 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 16 Jul 2018 17:16:00 +0000 Subject: [issue34125] Profiling depends on whether **kwargs is given Message-ID: <1531761360.51.0.56676864532.issue34125@psf.upfronthosting.co.za> New submission from Jeroen Demeyer : Enable profiling for C functions: >>> def prof(frame, typ, arg): ... if typ.startswith("c_"): ... print(arg, typ) >>> import sys; sys.setprofile(prof) and notice how profiling depends on **kwargs: >>> list.append([], None) c_call c_return >>> list.append([], None, **{}) There is no specification of what should be profiled and what not, so it's not clear what is the "correct" behavior. For the record: in Python 3.6, neither of these were profiled. ---------- components: Interpreter Core messages: 321746 nosy: jdemeyer priority: normal severity: normal status: open title: Profiling depends on whether **kwargs is given versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 13:17:10 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 16 Jul 2018 17:17:10 +0000 Subject: [issue34126] Profiling dict.get() crashes Python Message-ID: <1531761430.57.0.56676864532.issue34126@psf.upfronthosting.co.za> New submission from Jeroen Demeyer : >>> import sys; sys.setprofile(lambda *args:None) >>> dict.get() Segmentation fault ---------- components: Interpreter Core messages: 321747 nosy: jdemeyer priority: normal severity: normal status: open title: Profiling dict.get() crashes Python versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 13:19:47 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 16 Jul 2018 17:19:47 +0000 Subject: [issue34124] email.message_from_binary_file documentation is broken In-Reply-To: <1531741156.21.0.56676864532.issue34124@psf.upfronthosting.co.za> Message-ID: <1531761587.46.0.56676864532.issue34124@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset c9265c1534b7e62bb9b15460d0420c0c3bb57ff9 by Berker Peksag (Jon Ribbens) in branch 'master': bpo-34124: Fix markup of message_from_binary_file() signature (GH-8297) https://github.com/python/cpython/commit/c9265c1534b7e62bb9b15460d0420c0c3bb57ff9 ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 13:19:58 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 16 Jul 2018 17:19:58 +0000 Subject: [issue34126] Profiling dict.get() crashes Python In-Reply-To: <1531761430.57.0.56676864532.issue34126@psf.upfronthosting.co.za> Message-ID: <1531761598.48.0.56676864532.issue34126@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: Simple patch coming up... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 13:21:24 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Jul 2018 17:21:24 +0000 Subject: [issue34124] email.message_from_binary_file documentation is broken In-Reply-To: <1531741156.21.0.56676864532.issue34124@psf.upfronthosting.co.za> Message-ID: <1531761683.99.0.56676864532.issue34124@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7832 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 13:21:57 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Jul 2018 17:21:57 +0000 Subject: [issue34124] email.message_from_binary_file documentation is broken In-Reply-To: <1531741156.21.0.56676864532.issue34124@psf.upfronthosting.co.za> Message-ID: <1531761717.92.0.56676864532.issue34124@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7833 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 13:56:54 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Mon, 16 Jul 2018 17:56:54 +0000 Subject: [issue28643] Broken makefile depends for profile-opt target In-Reply-To: <1478634995.26.0.389156722395.issue28643@psf.upfronthosting.co.za> Message-ID: <1531763814.78.0.56676864532.issue28643@psf.upfronthosting.co.za> Neil Schemenauer added the comment: Closing this as the current makefile works much better in this regard, at least based on my experience. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 14:30:52 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 16 Jul 2018 18:30:52 +0000 Subject: [issue34126] Profiling certain invalid calls crash Python In-Reply-To: <1531761430.57.0.56676864532.issue34126@psf.upfronthosting.co.za> Message-ID: <1531765852.19.0.56676864532.issue34126@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: Also: >>> import sys; sys.setprofile(lambda *args: None) >>> dict.get([], "foo") Segmentation fault ---------- title: Profiling dict.get() crashes Python -> Profiling certain invalid calls crash Python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 14:38:33 2018 From: report at bugs.python.org (ppperry) Date: Mon, 16 Jul 2018 18:38:33 +0000 Subject: [issue34127] Gramatically incorrect error message for some descriptor calls with wrong number of arguments Message-ID: <1531766313.86.0.56676864532.issue34127@psf.upfronthosting.co.za> New submission from ppperry : `{}.get()` Traceback (most recent call last): File "", line 1, in TypeError: get expected at least 1 arguments, got 0 Shouldn't that be "TypeError: get expected at least 1 argument, got 0" instead? ---------- components: Interpreter Core messages: 321752 nosy: ppperry priority: normal severity: normal status: open title: Gramatically incorrect error message for some descriptor calls with wrong number of arguments versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 14:43:46 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 16 Jul 2018 18:43:46 +0000 Subject: [issue34124] email.message_from_binary_file documentation is broken In-Reply-To: <1531741156.21.0.56676864532.issue34124@psf.upfronthosting.co.za> Message-ID: <1531766626.12.0.56676864532.issue34124@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 43c2fabb2fe7760be462e008b39169cf16c28b4c by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-34124: Fix markup of message_from_binary_file() signature (GH-8297) https://github.com/python/cpython/commit/43c2fabb2fe7760be462e008b39169cf16c28b4c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 14:44:39 2018 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 16 Jul 2018 18:44:39 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1531766679.64.0.56676864532.issue29710@psf.upfronthosting.co.za> Mark Dickinson added the comment: The wording for change 1 looks fine to me. For change 2, the mention of the internal representation is misleading, since the internal representation of (long) integers in current CPython is effectively sign-magnitude, and so there are some shenanigans to make the operations behave *as though* the internal representation were some form of two's complement [1]. The previously proposed wording (in msg321679) (with the "infinite sign bits" extracted into the main text as Tim suggests) looks fine to me. [1] https://github.com/python/cpython/blob/c9265c1534b7e62bb9b15460d0420c0c3bb57ff9/Objects/longobject.c#L4415-L4429 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 14:46:19 2018 From: report at bugs.python.org (ppperry) Date: Mon, 16 Jul 2018 18:46:19 +0000 Subject: [issue34126] Profiling certain invalid calls crash Python In-Reply-To: <1531761430.57.0.56676864532.issue34126@psf.upfronthosting.co.za> Message-ID: <1531766779.25.0.56676864532.issue34126@psf.upfronthosting.co.za> Change by ppperry : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 14:55:37 2018 From: report at bugs.python.org (Martin Bammer) Date: Mon, 16 Jul 2018 18:55:37 +0000 Subject: [issue34128] Do not block threads when pickle/unpickle Message-ID: <1531767337.85.0.56676864532.issue34128@psf.upfronthosting.co.za> New submission from Martin Bammer : Hi, the old and slow python implementation of pickle didn't block background thread. But the newer C-implementation blocks other threads while dump/load is running. Wouldn't it be possible to allow other threads during this time? Especially could load/loads release the GIL, because Python objects are not available to the Python code until these functions have finished? Regards, Martin ---------- components: Interpreter Core messages: 321755 nosy: Martin Bammer priority: normal severity: normal status: open title: Do not block threads when pickle/unpickle type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 15:02:19 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 16 Jul 2018 19:02:19 +0000 Subject: [issue34126] Profiling certain invalid calls crash Python In-Reply-To: <1531761430.57.0.56676864532.issue34126@psf.upfronthosting.co.za> Message-ID: <1531767739.73.0.56676864532.issue34126@psf.upfronthosting.co.za> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +7834 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 15:03:26 2018 From: report at bugs.python.org (Tim Peters) Date: Mon, 16 Jul 2018 19:03:26 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1531767806.01.0.56676864532.issue29710@psf.upfronthosting.co.za> Tim Peters added the comment: Ya, Mark's got a point there. Perhaps s/the internal/a finite two's complement/ ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 15:04:19 2018 From: report at bugs.python.org (Pavel Jurkas) Date: Mon, 16 Jul 2018 19:04:19 +0000 Subject: [issue34129] CGITB does not mangle variables names Message-ID: <1531767859.43.0.56676864532.issue34129@psf.upfronthosting.co.za> New submission from Pavel Jurkas : CGITB does not mangle private variables names. So they are displayed as undefined even though they are defined. Example: self.__core undefined ---------- messages: 321757 nosy: pjurkas priority: normal severity: normal status: open title: CGITB does not mangle variables names _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 15:11:11 2018 From: report at bugs.python.org (Pavel Jurkas) Date: Mon, 16 Jul 2018 19:11:11 +0000 Subject: [issue34129] CGITB does not mangle variables names In-Reply-To: <1531767859.43.0.56676864532.issue34129@psf.upfronthosting.co.za> Message-ID: <1531768271.43.0.56676864532.issue34129@psf.upfronthosting.co.za> Change by Pavel Jurkas : ---------- keywords: +patch pull_requests: +7835 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 15:18:29 2018 From: report at bugs.python.org (Pavel Jurkas) Date: Mon, 16 Jul 2018 19:18:29 +0000 Subject: [issue34129] CGITB does not mangle variables names In-Reply-To: <1531767859.43.0.56676864532.issue34129@psf.upfronthosting.co.za> Message-ID: <1531768709.41.0.56676864532.issue34129@psf.upfronthosting.co.za> Pavel Jurkas added the comment: https://github.com/python/cpython/pull/8301 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 15:25:12 2018 From: report at bugs.python.org (Lee Griffiths) Date: Mon, 16 Jul 2018 19:25:12 +0000 Subject: [issue32554] random.seed(tuple) uses the randomized hash function and so is not reproductible In-Reply-To: <1516007302.18.0.467229070634.issue32554@psf.upfronthosting.co.za> Message-ID: <1531769112.43.0.56676864532.issue32554@psf.upfronthosting.co.za> Lee Griffiths added the comment: a) This below issue added doc to py2.7 that calls out PYTHONHASHSEED, but py doesn't currently contain those words https://bugs.python.org/issue27706 It'd be useful to have the something whether the "behaviour" is fixed or not, as providing other objects (like a tuple) will still be non-deterministic. b) I don't know if this is the correct issue to heap this on, but I think it might as you're looking at changing the seed function? The documentation for `object.__hash__` calls out `str`, `bytes` and `datetime` as being affected by `PYTHONHASHSEED`. Doesn't it seem odd that there's a workaround in the seed function for str and bytes, but not for datetime? https://docs.python.org/3/reference/datamodel.html#object.__hash__ I mainly point this out as seeding random with the current date/time is idiomatic in many languages and environments (usually used when you log the seed to be able to recreate things later, or just blindly copying the historical use `srand(time(NULL))` from C programs!). Anyone shoving a datetime straight into seed() is going to find it non-deterministic and might not understand why, or even notice, especially as the documentation for seed() doesn't call this out. Those "in the know" will get a unix timestamp out of the datetime and put that in seed instead, but I feel that falls under the same argument as users-in-the-know SHA512ing a string, mentioned above, which is undesirable and apparently something the function should implement and not users. Would it be wise for datetime to have a specific implementation as well? ---------- nosy: +poddster _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 15:41:55 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 16 Jul 2018 19:41:55 +0000 Subject: [issue34124] email.message_from_binary_file documentation is broken In-Reply-To: <1531741156.21.0.56676864532.issue34124@psf.upfronthosting.co.za> Message-ID: <1531770115.2.0.56676864532.issue34124@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset f1ab9cac909449ad85595245fa49b8660214cd0e by Berker Peksag (Miss Islington (bot)) in branch '3.6': bpo-34124: Fix markup of message_from_binary_file() signature (GH-8297) https://github.com/python/cpython/commit/f1ab9cac909449ad85595245fa49b8660214cd0e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 15:41:58 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Mon, 16 Jul 2018 19:41:58 +0000 Subject: [issue31342] test.bisect module causes tests to fail In-Reply-To: <1504561717.28.0.121590412099.issue31342@psf.upfronthosting.co.za> Message-ID: <1531770118.1.0.56676864532.issue31342@psf.upfronthosting.co.za> Neil Schemenauer added the comment: This is still broken, IMHO. Either we should rename test.bisect or we should remove all of the 'if __name__ == "__main__"' part of the test scripts. You can't run the tests reliably as scripts anymore. Doing so puts Lib/test into sys.path. Then, anything that imports 'bisect' (e.g. the random module) will get test.bisect and not the real bisect module. I tried making it so that test.bisect could not be imported as bisect but I can't think of a way. E.g. adding to test/__init__.py import test._bisect as bisect sys.modules['test.bisect'] = bisect does not work. I don't understand the import system good enough to think of a solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 15:42:32 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 16 Jul 2018 19:42:32 +0000 Subject: [issue34124] email.message_from_binary_file documentation is broken In-Reply-To: <1531741156.21.0.56676864532.issue34124@psf.upfronthosting.co.za> Message-ID: <1531770152.1.0.56676864532.issue34124@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report and for the patch, Jon. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 15:47:44 2018 From: report at bugs.python.org (Pavel Jurkas) Date: Mon, 16 Jul 2018 19:47:44 +0000 Subject: [issue34129] CGITB does not mangle variables names In-Reply-To: <1531767859.43.0.56676864532.issue34129@psf.upfronthosting.co.za> Message-ID: <1531770464.68.0.56676864532.issue34129@psf.upfronthosting.co.za> Change by Pavel Jurkas : ---------- pull_requests: +7836 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 15:49:00 2018 From: report at bugs.python.org (Pavel Jurkas) Date: Mon, 16 Jul 2018 19:49:00 +0000 Subject: [issue34129] CGITB does not mangle variables names In-Reply-To: <1531767859.43.0.56676864532.issue34129@psf.upfronthosting.co.za> Message-ID: <1531770540.09.0.56676864532.issue34129@psf.upfronthosting.co.za> Pavel Jurkas added the comment: https://github.com/python/cpython/pull/8302 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 15:50:17 2018 From: report at bugs.python.org (Segev Finer) Date: Mon, 16 Jul 2018 19:50:17 +0000 Subject: [issue32814] smtplib.send_message mishandles 8BITMIME RFC 6152 In-Reply-To: <1518259581.24.0.467229070634.issue32814@psf.upfronthosting.co.za> Message-ID: <1531770617.97.0.56676864532.issue32814@psf.upfronthosting.co.za> Change by Segev Finer : ---------- keywords: +patch pull_requests: +7837 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 15:58:11 2018 From: report at bugs.python.org (ppperry) Date: Mon, 16 Jul 2018 19:58:11 +0000 Subject: [issue34128] Do not block threads when pickle/unpickle In-Reply-To: <1531767337.85.0.56676864532.issue34128@psf.upfronthosting.co.za> Message-ID: <1531771091.2.0.56676864532.issue34128@psf.upfronthosting.co.za> ppperry added the comment: um, something doesn't make sense about this. the python implementation of pickle never released the GIL (it can't, by definition -- it's written in python). The C implementation releasing the GIL wouldn't make sense, as the pickle api involves calls into python everywhere (for example, `__reduce__`) ---------- nosy: +ppperry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 16:18:36 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 16 Jul 2018 20:18:36 +0000 Subject: [issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L In-Reply-To: <1531314657.47.0.56676864532.issue34096@psf.upfronthosting.co.za> Message-ID: <1531772316.71.0.56676864532.issue34096@psf.upfronthosting.co.za> Gregory P. Smith added the comment: IIRC that we decided that CPython and extension modules always require -fwrapv. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 16:20:21 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 16 Jul 2018 20:20:21 +0000 Subject: [issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L In-Reply-To: <1531314657.47.0.56676864532.issue34096@psf.upfronthosting.co.za> Message-ID: <1531772421.31.0.56676864532.issue34096@psf.upfronthosting.co.za> Gregory P. Smith added the comment: https://github.com/python/cpython/blob/2.7/configure.ac#L1067 appears to add -fwrapv as desired if the gcc or clang version being used supports it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 16:23:16 2018 From: report at bugs.python.org (Erich Eckner) Date: Mon, 16 Jul 2018 20:23:16 +0000 Subject: [issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L In-Reply-To: <1531314657.47.0.56676864532.issue34096@psf.upfronthosting.co.za> Message-ID: <1531772596.79.0.56676864532.issue34096@psf.upfronthosting.co.za> Erich Eckner added the comment: ah, that would explain, why we don't get it set automatically on archlinux32 - there's "export OPT=$CFLAGS" right infront of ./configure ... - so $OPT is set and thus, -fwrapv is not appended ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 16:33:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Jul 2018 20:33:25 +0000 Subject: [issue32430] Simplify Modules/Setup{,.dist,.local} In-Reply-To: <1531760681.15.0.56676864532.issue32430@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Thank you Antoine for fixing this issue! This issue annoyed me forever, but I never tried to fix it. It was very annoying when using git bisect for example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 16:51:13 2018 From: report at bugs.python.org (Francis Deslauriers) Date: Mon, 16 Jul 2018 20:51:13 +0000 Subject: [issue28909] Adding LTTng-UST tracing support In-Reply-To: <1481227474.94.0.337411886613.issue28909@psf.upfronthosting.co.za> Message-ID: <1531774273.93.0.56676864532.issue28909@psf.upfronthosting.co.za> Francis Deslauriers added the comment: Hi all, It seems that, as of right now, the thing blocking this patchset from going forward is the name of the intrumentation point. Two naming approached were suggested: - Keeping PyDtrace* - Changing to PyProbe* I prefer the PyProbe option as it's a more generic name and is not misleading of the underlying tracing engine but if people prefer that we keep the PyDtrace version let's go with that. So, what should we go with? I can easily update and rebase this patchset. As an example of how this feature could be used, a colleague of mine gave a talk[1] at PyCon Canada 2017 about tracing Python applications using this patchset. He built a tool to visualize Python Logging, Python function calls and Linux syscalls all in the same view. This was done using the existing Python logger tracing of LTTng-UST, the LTTng kernel tracer and the CPython LTTng-UST instrumentation of this patchset. Here is an asciinema[2] recording used in the talk, it shows the tool in action. [1]: https://youtu.be/gKmtmPqr6H8 [2]: https://asciinema.org/a/v20Hxnoh3lpzzz3FPmF86fNDS Cheers! Francis ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 16:57:02 2018 From: report at bugs.python.org (Pavel Jurkas) Date: Mon, 16 Jul 2018 20:57:02 +0000 Subject: [issue34129] CGITB does not mangle variables names In-Reply-To: <1531767859.43.0.56676864532.issue34129@psf.upfronthosting.co.za> Message-ID: <1531774622.86.0.56676864532.issue34129@psf.upfronthosting.co.za> Change by Pavel Jurkas : ---------- pull_requests: +7838 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 16:58:40 2018 From: report at bugs.python.org (Pavel Jurkas) Date: Mon, 16 Jul 2018 20:58:40 +0000 Subject: [issue34129] CGITB does not mangle variables names In-Reply-To: <1531767859.43.0.56676864532.issue34129@psf.upfronthosting.co.za> Message-ID: <1531774720.86.0.56676864532.issue34129@psf.upfronthosting.co.za> Pavel Jurkas added the comment: https://github.com/python/cpython/pull/8304 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 17:31:25 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 16 Jul 2018 21:31:25 +0000 Subject: [issue34118] Fix some class entries in 'Built-in Functions' In-Reply-To: <1531623878.78.0.56676864532.issue34118@psf.upfronthosting.co.za> Message-ID: <1531776685.31.0.56676864532.issue34118@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I was forgetting that this is a Python, not CPython doc. So I agree to not tag the iterator classes as such. For all I know, PyPy might use (compiled?) generator functions. And if we were to allow use of Cython, say, for CPython, we might try that. How about a note under the index table: Functions that must be classes are tagged *class*. The iterator functions enumerate, filter, map, reversed, and zip are classes in CPython, but they are not tagged because they could be implemented as generator functions. Or we could add an *iterator* tag. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 17:42:36 2018 From: report at bugs.python.org (Michael Handler) Date: Mon, 16 Jul 2018 21:42:36 +0000 Subject: [issue22708] httplib/http.client in method _tunnel used HTTP/1.0 CONNECT method In-Reply-To: <1414045283.61.0.401738994501.issue22708@psf.upfronthosting.co.za> Message-ID: <1531777356.86.0.56676864532.issue22708@psf.upfronthosting.co.za> Change by Michael Handler : ---------- pull_requests: +7839 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 17:55:32 2018 From: report at bugs.python.org (Tianon) Date: Mon, 16 Jul 2018 21:55:32 +0000 Subject: [issue21622] ctypes.util incorrectly fails for libraries without DT_SONAME In-Reply-To: <1401593302.24.0.994822187168.issue21622@psf.upfronthosting.co.za> Message-ID: <1531778132.75.0.56676864532.issue21622@psf.upfronthosting.co.za> Tianon added the comment: This was reported on the Docker image for Python in https://github.com/docker-library/python/issues/111, with the note that it affects the Twisted inotify implementation, so it'd be really neat to see a proper patch in Python (instead of the very musl-/Alpine-assuming patch found in https://github.com/alpinelinux/aports/blob/202f4bea916b0cf974b38ced96ab8fca0b192e3f/main/python2/musl-find_library.patch). <3 ---------- nosy: +tianon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 18:07:19 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 16 Jul 2018 22:07:19 +0000 Subject: [issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L In-Reply-To: <1531314657.47.0.56676864532.issue34096@psf.upfronthosting.co.za> Message-ID: <1531778839.15.0.56676864532.issue34096@psf.upfronthosting.co.za> Gregory P. Smith added the comment: yep. i'm going to close this, it seems arch specific. there isn't much we can realistically do to prevent people overriding things to their peril for configure or make. :) ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 18:08:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Jul 2018 22:08:27 +0000 Subject: [issue31342] test.bisect module causes tests to fail In-Reply-To: <1504561717.28.0.121590412099.issue31342@psf.upfronthosting.co.za> Message-ID: <1531778907.0.0.56676864532.issue31342@psf.upfronthosting.co.za> STINNER Victor added the comment: > This is still broken, IMHO. Either we should rename test.bisect (...) I renamed it: commit 823c295efa4efea93cadc640ed6122cd9d86cec4 Author: Victor Stinner Date: Wed May 30 17:24:40 2018 +0200 bpo-29512: Rename Lib/test/bisect.py to bisect_cmd.py (#7229) Can we close this issue a duplicate of bpo-29512? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 18:19:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Jul 2018 22:19:02 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor Message-ID: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> New submission from STINNER Victor : test_signal.test_warn_on_full_buffer() failed on AppVeyor. https://ci.appveyor.com/project/python/cpython/build/3.8build19372 ====================================================================== FAIL: test_warn_on_full_buffer (test.test_signal.WakeupSocketSignalTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\test\test_signal.py", line 538, in test_warn_on_full_buffer assert_python_ok('-c', code) File "C:\projects\cpython\lib\test\support\script_helper.py", line 157, in assert_python_ok return _assert_python(True, *args, **env_vars) File "C:\projects\cpython\lib\test\support\script_helper.py", line 143, in _assert_python res.fail(cmd_line) File "C:\projects\cpython\lib\test\support\script_helper.py", line 84, in fail err)) AssertionError: Process return code is 1 command line: ['C:\\projects\\cpython\\PCbuild\\win32\\python.exe', '-X', 'faulthandler', '-I', '-c', 'if 1:\n import errno\n import signal\n import socket\n import sys\n import time\n import _testcapi\n from test.support import captured_stderr\n\n signum = signal.SIGINT\n\n # This handler will be called, but we intentionally won\'t read from\n # the wakeup fd.\n def handler(signum, frame):\n pass\n\n signal.signal(signum, handler)\n\n read, write = socket.socketpair()\n read.setblocking(False)\n write.setblocking(False)\n\n # Fill the send buffer\n try:\n while True:\n write.send(b"x")\n except BlockingIOError:\n pass\n\n # By default, we get a warning when a signal arrives\n signal.set_wakeup_fd(write.fileno())\n\n with captured_stderr() as err:\n _testcapi.raise_signal(signum)\n\n err = err.getvalue()\n if (\'Exception ignored when trying to send to the signal wakeup fd\'\n not in err):\n raise AssertionError(err)\n\n # And also if warn_on_full_buffer=True\n signal.set_wakeup_fd(write.fileno(), warn_on_full_buffer=True)\n\n with captured_stderr() as err:\n _testcapi.raise_signal(signum)\n\n err = err.getvalue()\n if (\'Exception ignored when trying to send to the signal wakeup fd\'\n not in err):\n raise AssertionError(err)\n\n # But not if warn_on_full_buffer=False\n signal.set_wakeup_fd(write.fileno(), warn_on_full_buffer=False)\n\n with captured_stderr() as err:\n _testcapi.raise_signal(signum)\n\n err = err.getvalue()\n if err != "":\n raise AssertionError("got unexpected output %r" % (err,))\n\n # And then check the default again, to make sure warn_on_full_buffer\n # settings don\'t leak across calls.\n signal.set_wakeup_fd(write.fileno())\n\n with captured_stderr() as err:\n _testcapi.raise_signal(signum)\n\n err = err.getvalue()\n if (\'Exception ignored when trying to send to the signal wakeup fd\'\n not in err):\n raise AssertionError(err)\n\n '] stdout: --- --- stderr: --- Traceback (most recent call last): File "", line 39, in AssertionError --- ---------------------------------------------------------------------- The test passed when run again sequentially ("Re-running test 'test_signal' in verbose mode"). ---------- components: Tests messages: 321775 nosy: njs, pitrou, vstinner priority: normal severity: normal status: open title: test_signal: test_warn_on_full_buffer() failed on AppVeyor versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 18:25:49 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Jul 2018 22:25:49 +0000 Subject: [issue8799] Hang in lib/test/test_threading.py In-Reply-To: <1274694258.02.0.421667436928.issue8799@psf.upfronthosting.co.za> Message-ID: <1531779949.89.0.56676864532.issue8799@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue discussed different things: * test_threading was unable: I didn't see such failure the last 12 months, and I backported enhancements from master to 2.7, so I consider this issue as fixed * documentation of threading locks: fixed * Except on Windows, Python 2.7 uses its own implementation of TLS: this issue has been fixed in Python 3. All discussed issues have been fixed, so I close the issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 18:26:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Jul 2018 22:26:33 +0000 Subject: [issue18605] 2.7: test_threading hangs on Solaris 9 In-Reply-To: <1375254182.2.0.923446047018.issue18605@psf.upfronthosting.co.za> Message-ID: <1531779993.39.0.56676864532.issue18605@psf.upfronthosting.co.za> STINNER Victor added the comment: There is no more Solaris buildbot, there is no useful information to debug this issue, so I close the issue. ---------- nosy: +vstinner resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 18:32:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Jul 2018 22:32:27 +0000 Subject: [issue34131] test_threading: BarrierTests.test_default_timeout() failed on AppVeyor Message-ID: <1531780347.81.0.56676864532.issue34131@psf.upfronthosting.co.za> New submission from STINNER Victor : test_threading.BarrierTests.test_default_timeout() failed on AppVeyor. Related issues: * bpo-11871, commit d4d1d068dcf4e1aaf93772ccc0824207a21606e5: change timeout * bpo-30316 https://ci.appveyor.com/project/python/cpython/build/3.8build19370 test_barrier (test.test_threading.BarrierTests) ... ok test_barrier_10 (test.test_threading.BarrierTests) ... ok test_default_timeout (test.test_threading.BarrierTests) ... ERROR test_reset (test.test_threading.BarrierTests) ... Unhandled exception in thread started by .task at 0x03266728> Traceback (most recent call last): File "C:\projects\cpython\lib\test\lock_tests.py", line 41, in task f() File "C:\projects\cpython\lib\test\lock_tests.py", line 938, in f i = barrier.wait() File "C:\projects\cpython\lib\threading.py", line 613, in wait self._wait(timeout) File "C:\projects\cpython\lib\threading.py", line 653, in _wait raise BrokenBarrierError threading.BrokenBarrierError Unhandled exception in thread started by .task at 0x03266728> Traceback (most recent call last): File "C:\projects\cpython\lib\test\lock_tests.py", line 41, in task f() File "C:\projects\cpython\lib\test\lock_tests.py", line 938, in f i = barrier.wait() File "C:\projects\cpython\lib\threading.py", line 613, in wait self._wait(timeout) File "C:\projects\cpython\lib\threading.py", line 653, in _wait raise BrokenBarrierError threading.BrokenBarrierError Unhandled exception in thread started by .task at 0x03266728> Traceback (most recent call last): File "C:\projects\cpython\lib\test\lock_tests.py", line 41, in task f() File "C:\projects\cpython\lib\test\lock_tests.py", line 938, in f i = barrier.wait() File "C:\projects\cpython\lib\threading.py", line 604, in wait self._enter() # Block while the barrier drains. File "C:\projects\cpython\lib\threading.py", line 628, in _enter raise BrokenBarrierError threading.BrokenBarrierError Unhandled exception in thread started by .task at 0x03266728> Traceback (most recent call last): File "C:\projects\cpython\lib\test\lock_tests.py", line 41, in task f() File "C:\projects\cpython\lib\test\lock_tests.py", line 938, in f i = barrier.wait() File "C:\projects\cpython\lib\threading.py", line 604, in wait self._enter() # Block while the barrier drains. File "C:\projects\cpython\lib\threading.py", line 628, in _enter raise BrokenBarrierError threading.BrokenBarrierError ok test_single_thread (test.test_threading.BarrierTests) ... ok test_timeout (test.test_threading.BarrierTests) ... ok test_wait_return (test.test_threading.BarrierTests) ... ok test_acquire (test.test_threading.BoundedSemaphoreTests) ... ok ... ====================================================================== ERROR: test_default_timeout (test.test_threading.BarrierTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\test\lock_tests.py", line 943, in test_default_timeout self.run_threads(f) File "C:\projects\cpython\lib\test\lock_tests.py", line 772, in run_threads f() File "C:\projects\cpython\lib\test\lock_tests.py", line 938, in f i = barrier.wait() File "C:\projects\cpython\lib\threading.py", line 613, in wait self._wait(timeout) File "C:\projects\cpython\lib\threading.py", line 651, in _wait raise BrokenBarrierError threading.BrokenBarrierError test_threading succeeded when it has been re-run in verbose mode. ---------- components: Tests messages: 321778 nosy: vstinner priority: normal severity: normal status: open title: test_threading: BarrierTests.test_default_timeout() failed on AppVeyor versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 19:13:33 2018 From: report at bugs.python.org (Skip Montanaro) Date: Mon, 16 Jul 2018 23:13:33 +0000 Subject: [issue34132] Obscure netrc parser "bug" Message-ID: <1531782813.71.0.56676864532.issue34132@psf.upfronthosting.co.za> New submission from Skip Montanaro : Not sure I can really call this a bug, however there is a behavioral change between 2.7 and at least 3.6 and 3.7 (probably earlier versions of the 3.x series as well). There is no spec for .netrc files that I can find, certainly nothing which mentions comment or blank lines. Still, Python's netrc file parser seems happy with both. However, in 3.x a blank line followed immediately by a comment line containing actual comment text causes the parser to raise a parse error. I've attached two netrc files, netrc-comment-blank, and netrc-blank-comment, identical save for the ordering of a blank line and a comment line. Here's what a 2.7.14 session looks like: Python 2.7.14 |Anaconda, Inc.| (default, Mar 27 2018, 17:29:31) [GCC 7.2.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import netrc >>> rc = netrc.netrc(file="/home/skip/tmp/netrc-comment-blank") >>> rc = netrc.netrc(file="/home/skip/tmp/netrc-blank-comment") Here's 3.7.0: Python 3.7.0 (default, Jun 28 2018, 13:15:42) [GCC 7.2.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information. >>> import netrc >>> rc = netrc.netrc(file="/home/skip/tmp/netrc-comment-blank") >>> rc = netrc.netrc(file="/home/skip/tmp/netrc-blank-comment") Traceback (most recent call last): File "", line 1, in File "/home/skip/miniconda3/envs/python3/lib/python3.7/netrc.py", line 30, in __init__ self._parse(file, fp, default_netrc) File "/home/skip/miniconda3/envs/python3/lib/python3.7/netrc.py", line 63, in _parse "bad toplevel token %r" % tt, file, lexer.lineno) netrc.NetrcParseError: bad toplevel token 'Comment' (/home/skip/tmp/netrc-blank-comment, line 2) ---------- components: Library (Lib) files: netrc-comment-blank messages: 321779 nosy: skip.montanaro priority: normal severity: normal stage: needs patch status: open title: Obscure netrc parser "bug" type: behavior versions: Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file47696/netrc-comment-blank _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 19:13:58 2018 From: report at bugs.python.org (Skip Montanaro) Date: Mon, 16 Jul 2018 23:13:58 +0000 Subject: [issue34132] Obscure netrc parser "bug" In-Reply-To: <1531782813.71.0.56676864532.issue34132@psf.upfronthosting.co.za> Message-ID: <1531782838.07.0.56676864532.issue34132@psf.upfronthosting.co.za> Change by Skip Montanaro : Added file: https://bugs.python.org/file47697/netrc-blank-comment _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 19:22:22 2018 From: report at bugs.python.org (smheidrich) Date: Mon, 16 Jul 2018 23:22:22 +0000 Subject: [issue26270] Support for read()/write()/select() on asyncio In-Reply-To: <1454451619.12.0.0280470843365.issue26270@psf.upfronthosting.co.za> Message-ID: <1531783342.86.0.56676864532.issue26270@psf.upfronthosting.co.za> Change by smheidrich : ---------- nosy: +smheidrich _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 19:23:47 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 16 Jul 2018 23:23:47 +0000 Subject: [issue26270] Support for read()/write()/select() on asyncio In-Reply-To: <1454451619.12.0.0280470843365.issue26270@psf.upfronthosting.co.za> Message-ID: <1531783427.35.0.56676864532.issue26270@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 19:23:59 2018 From: report at bugs.python.org (ppperry) Date: Mon, 16 Jul 2018 23:23:59 +0000 Subject: [issue34126] Profiling certain invalid calls crashes Python In-Reply-To: <1531761430.57.0.56676864532.issue34126@psf.upfronthosting.co.za> Message-ID: <1531783439.56.0.56676864532.issue34126@psf.upfronthosting.co.za> Change by ppperry : ---------- title: Profiling certain invalid calls crash Python -> Profiling certain invalid calls crashes Python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 19:59:25 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 16 Jul 2018 23:59:25 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531785565.0.0.56676864532.issue33967@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- pull_requests: +7840 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 19:59:27 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 16 Jul 2018 23:59:27 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531785567.13.0.56676864532.issue33967@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- pull_requests: +7840, 7841 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 20:09:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Jul 2018 00:09:38 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531786178.44.0.56676864532.issue34130@psf.upfronthosting.co.za> STINNER Victor added the comment: The test failed at: # Fill the send buffer try: while True: write.send(b"x") except BlockingIOError: pass # By default, we get a warning when a signal arrives signal.set_wakeup_fd(write.fileno()) with captured_stderr() as err: _testcapi.raise_signal(signum) err = err.getvalue() if ('Exception ignored when trying to {action} to the signal wakeup fd' not in err): raise AssertionError(err) # <~~~~~~ HERE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 20:16:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Jul 2018 00:16:35 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531786595.45.0.56676864532.issue34130@psf.upfronthosting.co.za> STINNER Victor added the comment: Traceback (most recent call last): File "", line 39, in AssertionError According to the traceback, the captured stderr ('err' variable) is an empty string. The test uses test.support.capture_stderr() which replaces sys.stderr. The signal module calls PySys_WriteStderr(msg) which calls sys.stderr.write(msg). If the Python call fails, msg is supposed to be written into the C stderr stream. sys.stderr.flush() is not called, but it shouldn't be needed, since test.support.capture_stderr() replace sys.stderr with a io.StringIO object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 20:20:19 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 Jul 2018 00:20:19 +0000 Subject: [issue34123] ambiguous documentation for dict.popitem In-Reply-To: <1531720827.11.0.56676864532.issue34123@psf.upfronthosting.co.za> Message-ID: <1531786819.97.0.56676864532.issue34123@psf.upfronthosting.co.za> Raymond Hettinger added the comment: New changeset 01b7d5898262dbe0e9edb321b3be9a34da196f6f by Raymond Hettinger in branch 'master': bpo-34123: Fix missed documentation update for dict.popitem(). (GH-8292) https://github.com/python/cpython/commit/01b7d5898262dbe0e9edb321b3be9a34da196f6f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 20:20:44 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Jul 2018 00:20:44 +0000 Subject: [issue34123] ambiguous documentation for dict.popitem In-Reply-To: <1531720827.11.0.56676864532.issue34123@psf.upfronthosting.co.za> Message-ID: <1531786844.92.0.56676864532.issue34123@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7842 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 20:43:00 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Tue, 17 Jul 2018 00:43:00 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531788180.59.0.56676864532.issue34130@psf.upfronthosting.co.za> Nathaniel Smith added the comment: Huh, that's weird. My first thought was some kind of race condition, but... raise_signal uses raise(), which on Windows should be invoking the signal handler synchronously, so the warning should definitely be printed before raise_signal() returns. Could the warning be trapped in some buffer? That would be weird too, usually stderr and warnings should not be buffered. Of course putting a retry loop around the test is an option if we can't figure out how to fix it properly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 20:51:44 2018 From: report at bugs.python.org (Nathaniel Manista) Date: Tue, 17 Jul 2018 00:51:44 +0000 Subject: [issue34133] ValueError should not be documented as being restricted to only "a built-in operation or function" Message-ID: <1531788704.26.0.56676864532.issue34133@psf.upfronthosting.co.za> New submission from Nathaniel Manista : The documentation for ValueError currently describes it as being "Raised when a built-in operation or function receives an argument that has the right type but an inappropriate value, and the situation is not described by a more precise exception such as IndexError.", but the Python community has (quite rightly!) adopted it as the exception to raise in any system when that system is passed a value for a parameter that is type-correct but of an invalid value. (Because what, is every library going to present a "my_library.ValueError" exception instead? That would be ridiculous.) ValueError's documentation should drop the "a built-in operation or function" wording. Perhaps go with something like "When raised indicates that a function or method was passed a value of the correct type but an invalid value"? ---------- assignee: docs at python components: Documentation messages: 321784 nosy: Nathaniel Manista, docs at python priority: normal severity: normal status: open title: ValueError should not be documented as being restricted to only "a built-in operation or function" type: enhancement versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 21:50:03 2018 From: report at bugs.python.org (Neil Schemenauer) Date: Tue, 17 Jul 2018 01:50:03 +0000 Subject: [issue31342] test.bisect module causes tests to fail In-Reply-To: <1504561717.28.0.121590412099.issue31342@psf.upfronthosting.co.za> Message-ID: <1531792203.21.0.56676864532.issue31342@psf.upfronthosting.co.za> Neil Schemenauer added the comment: Yes, it looks like the same issue as bpo-29512. Renaming test.bisect is the simplest solution. I have trained myself to run "python -m test.regrtest " so this issue doesn't affect me any more. However, I think it was a trap that will catch some people. So, thanks for fixing. I considered adding a 'bisect' command to the test/__main__, e.g. you could run 'python -m test --bisect ..'. That looks not entirely simple to implement though. ---------- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 21:54:47 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 17 Jul 2018 01:54:47 +0000 Subject: [issue34118] Fix some class entries in 'Built-in Functions' In-Reply-To: <1531623878.78.0.56676864532.issue34118@psf.upfronthosting.co.za> Message-ID: <1531792487.88.0.56676864532.issue34118@psf.upfronthosting.co.za> Terry J. Reedy added the comment: SO user abarnert, who I presume is bpo abarnert (Andrew Barnert) claims that "Create a new dictionary. The dict object is the dictionary class." sounds a bit like dict returns the dictionary class. It is different from "Return a new set object, ... . set is a built-in class." I like the latter better and will use it as the pattern. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 22:08:22 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 Jul 2018 02:08:22 +0000 Subject: [issue34123] ambiguous documentation for dict.popitem In-Reply-To: <1531720827.11.0.56676864532.issue34123@psf.upfronthosting.co.za> Message-ID: <1531793302.21.0.56676864532.issue34123@psf.upfronthosting.co.za> Raymond Hettinger added the comment: New changeset bfa8a358e2cec40484c4655138ca3c6b10f8462a by Raymond Hettinger (Miss Islington (bot)) in branch '3.7': bpo-34123: Fix missed documentation update for dict.popitem(). (GH-8292) (GH#8307) https://github.com/python/cpython/commit/bfa8a358e2cec40484c4655138ca3c6b10f8462a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 22:08:43 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 Jul 2018 02:08:43 +0000 Subject: [issue34123] ambiguous documentation for dict.popitem In-Reply-To: <1531720827.11.0.56676864532.issue34123@psf.upfronthosting.co.za> Message-ID: <1531793323.86.0.56676864532.issue34123@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 23:08:38 2018 From: report at bugs.python.org (bbayles) Date: Tue, 17 Jul 2018 03:08:38 +0000 Subject: [issue34132] Obscure netrc parser "bug" In-Reply-To: <1531782813.71.0.56676864532.issue34132@psf.upfronthosting.co.za> Message-ID: <1531796918.14.0.56676864532.issue34132@psf.upfronthosting.co.za> Change by bbayles : ---------- nosy: +bbayles _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 16 23:32:54 2018 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 17 Jul 2018 03:32:54 +0000 Subject: [issue34132] Obscure netrc parser "bug" In-Reply-To: <1531782813.71.0.56676864532.issue34132@psf.upfronthosting.co.za> Message-ID: <1531798374.96.0.56676864532.issue34132@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 00:03:50 2018 From: report at bugs.python.org (Windson Yang) Date: Tue, 17 Jul 2018 04:03:50 +0000 Subject: [issue34134] multiprocessing memory huge usage Message-ID: <1531800230.72.0.56676864532.issue34134@psf.upfronthosting.co.za> New submission from Windson Yang : I'm using macOX and I got huge memory usage when using generator with multiprocess. (see file) I think this is because (https://github.com/python/cpython/blob/master/Lib/multiprocessing/pool.py#L383) if not hasattr(iterable, '__len__'): iterable = list(iterable) if chunksize is None: chunksize, extra = divmod(len(iterable), len(self._pool) * 4) if extra: chunksize += 1 When we convert an iterable to list(iterable), we lost the advantage of using the generator. I'm not sure how to fix it, maybe we can set a default value for an object don't have '__len__' attr, any ideas? ---------- files: test.py messages: 321788 nosy: Windson Yang, zach.ware priority: normal severity: normal status: open title: multiprocessing memory huge usage type: resource usage versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file47698/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 00:44:50 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 17 Jul 2018 04:44:50 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531802690.87.0.56676864532.issue33967@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 56d8f57b83a37b05a6f2fbc3e141bbc1ba6cb3a2 by INADA Naoki in branch 'master': bpo-33967: Fix wrong use of assertRaises (GH-8306) https://github.com/python/cpython/commit/56d8f57b83a37b05a6f2fbc3e141bbc1ba6cb3a2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 00:45:06 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Jul 2018 04:45:06 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531802706.09.0.56676864532.issue33967@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7843 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 00:45:59 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Jul 2018 04:45:59 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531802759.85.0.56676864532.issue33967@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7844 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 00:52:03 2018 From: report at bugs.python.org (=?utf-8?b?6rmA7YOc7ZmY?=) Date: Tue, 17 Jul 2018 04:52:03 +0000 Subject: [issue34135] The results of time.tzname print broken. Message-ID: <1531803123.68.0.56676864532.issue34135@psf.upfronthosting.co.za> New submission from ??? : When I call time.tzname at Korean Windows. (Microsoft Windows 10 Pro(10.0.17134 Build 17134)) It prints like below. This problem occurred Python 2 and 3 both. >>> import time >>> time.tzname ('???????? ??????', '???????? ???? ???? ????') I used chardet for getting correct tzname. >>> import chardet >>> tzname = [tzn.encode('latin-1').decode('cp949') for tzn in time.tzname] >>> tzname ['???? ???', '???? ?? ?? ??'] I think that cause of this problem is tzname encoded by 'latin-1' at Window s. ---------- components: Windows messages: 321790 nosy: paul.moore, steve.dower, tim.golden, zach.ware, ??? priority: normal severity: normal status: open title: The results of time.tzname print broken. type: behavior versions: Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 01:16:04 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 17 Jul 2018 05:16:04 +0000 Subject: [issue34134] multiprocessing memory huge usage In-Reply-To: <1531800230.72.0.56676864532.issue34134@psf.upfronthosting.co.za> Message-ID: <1531804564.17.0.56676864532.issue34134@psf.upfronthosting.co.za> INADA Naoki added the comment: Do you imap or imap_unorderd? They are intended for use with iterator, including generator. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 01:18:59 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Jul 2018 05:18:59 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531804739.48.0.56676864532.issue33967@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 892df9d15aae08d4033faeb34698e3c550c85854 by Miss Islington (bot) in branch '3.7': bpo-33967: Fix wrong use of assertRaises (GH-8306) https://github.com/python/cpython/commit/892df9d15aae08d4033faeb34698e3c550c85854 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 01:36:46 2018 From: report at bugs.python.org (Amin Radjabov) Date: Tue, 17 Jul 2018 05:36:46 +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: <1531805806.15.0.56676864532.issue32545@psf.upfronthosting.co.za> Amin Radjabov added the comment: yes I try to install to all user, but I have no any other python installations in my OS. I succeeded to install it to just me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 01:38:32 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Jul 2018 05:38:32 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531805912.28.0.56676864532.issue33967@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 8b5d191386350d28a0f20283dcb366cf50f82b97 by Miss Islington (bot) in branch '3.6': bpo-33967: Fix wrong use of assertRaises (GH-8306) https://github.com/python/cpython/commit/8b5d191386350d28a0f20283dcb366cf50f82b97 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 02:20:39 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 17 Jul 2018 06:20:39 +0000 Subject: [issue33967] functools.singledispatch: Misleading exception when calling without arguments In-Reply-To: <1530014230.86.0.56676864532.issue33967@psf.upfronthosting.co.za> Message-ID: <1531808439.75.0.56676864532.issue33967@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 Tue Jul 17 02:31:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Jul 2018 06:31:49 +0000 Subject: [issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. In-Reply-To: <1531031682.19.0.56676864532.issue34068@psf.upfronthosting.co.za> Message-ID: <1531809109.83.0.56676864532.issue34068@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 28f07364f066792ceee93231dbb80ae8ad98b2bb by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-34068: _io__IOBase_close_impl could call _PyObject_SetAttrId with an exception set (GH-8282) https://github.com/python/cpython/commit/28f07364f066792ceee93231dbb80ae8ad98b2bb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 02:33:24 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Jul 2018 06:33:24 +0000 Subject: [issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. In-Reply-To: <1531031682.19.0.56676864532.issue34068@psf.upfronthosting.co.za> Message-ID: <1531809204.64.0.56676864532.issue34068@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7845 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 02:42:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Jul 2018 06:42:45 +0000 Subject: [issue24618] Invalid read in PyCode_New In-Reply-To: <1436723206.75.0.0338800196723.issue24618@psf.upfronthosting.co.za> Message-ID: <1531809765.79.0.56676864532.issue24618@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +7846 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 02:43:59 2018 From: report at bugs.python.org (Windson Yang) Date: Tue, 17 Jul 2018 06:43:59 +0000 Subject: [issue34134] multiprocessing memory huge usage In-Reply-To: <1531800230.72.0.56676864532.issue34134@psf.upfronthosting.co.za> Message-ID: <1531809839.35.0.56676864532.issue34134@psf.upfronthosting.co.za> Windson Yang added the comment: Thank you for the hint, INADA. I think we should add something like "if you are using generator, consider use imap instead" in https://docs.python.org/3.4/library/multiprocessing.html?highlight=process#multiprocessing.pool.Pool.map ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 02:46:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Jul 2018 06:46:53 +0000 Subject: [issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. In-Reply-To: <1531031682.19.0.56676864532.issue34068@psf.upfronthosting.co.za> Message-ID: <1531810013.49.0.56676864532.issue34068@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +7847 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 02:56:04 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 17 Jul 2018 06:56:04 +0000 Subject: [issue34134] multiprocessing memory huge usage In-Reply-To: <1531800230.72.0.56676864532.issue34134@psf.upfronthosting.co.za> Message-ID: <1531810564.79.0.56676864532.issue34134@psf.upfronthosting.co.za> INADA Naoki added the comment: > I think we should add something like "if you are using generator, consider use imap instead" I think it's not good hint. There are short generator. And there are long (or infinite) iterator other than generator too. Maybe, "if iterator is not sequence (e.g. generator) and can be very big, consider using `imap` or `imap_unorderd` with explicit `chunksize` option for better efficiency." But I'm not good at writing English. Someone other than me can write better paragraph. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 02:57:21 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 Jul 2018 06:57:21 +0000 Subject: [issue34133] ValueError should not be documented as being restricted to only "a built-in operation or function" In-Reply-To: <1531788704.26.0.56676864532.issue34133@psf.upfronthosting.co.za> Message-ID: <1531810641.6.0.56676864532.issue34133@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 03:05:10 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 Jul 2018 07:05:10 +0000 Subject: [issue34133] ValueError should not be documented as being restricted to only "a built-in operation or function" In-Reply-To: <1531788704.26.0.56676864532.issue34133@psf.upfronthosting.co.za> Message-ID: <1531811110.23.0.56676864532.issue34133@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +7848 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 03:09:35 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Jul 2018 07:09:35 +0000 Subject: [issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. In-Reply-To: <1531031682.19.0.56676864532.issue34068@psf.upfronthosting.co.za> Message-ID: <1531811375.34.0.56676864532.issue34068@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 6020d98beaf6b9945beb7560f9a1df361e0ba4dd by Miss Islington (bot) in branch '3.7': bpo-34068: _io__IOBase_close_impl could call _PyObject_SetAttrId with an exception set (GH-8282) https://github.com/python/cpython/commit/6020d98beaf6b9945beb7560f9a1df361e0ba4dd ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 03:16:14 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 Jul 2018 07:16:14 +0000 Subject: [issue34118] Fix some class entries in 'Built-in Functions' In-Reply-To: <1531623878.78.0.56676864532.issue34118@psf.upfronthosting.co.za> Message-ID: <1531811774.8.0.56676864532.issue34118@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > How about a note under the index table: > Functions that must be classes are tagged *class*. < The iterator functions enumerate, filter, map, reversed, and zip > are classes in CPython, but they are not tagged because they > could be implemented as generator functions. This doesn't seem like it adds any value at all and I don't see what problem is being solved. Adding a cryptic note at the top doesn't make the docs any more readable. I recommend leaving the iterator factories as-is. AFAICT, the current docs are not a source of confusion and the text descriptions suffice to explain what is being done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 03:30:46 2018 From: report at bugs.python.org (Windson Yang) Date: Tue, 17 Jul 2018 07:30:46 +0000 Subject: [issue34134] multiprocessing memory huge usage In-Reply-To: <1531800230.72.0.56676864532.issue34134@psf.upfronthosting.co.za> Message-ID: <1531812646.68.0.56676864532.issue34134@psf.upfronthosting.co.za> Windson Yang added the comment: Thank you, I will try to make a pull request and let other to edit it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 03:33:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Jul 2018 07:33:20 +0000 Subject: [issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. In-Reply-To: <1531031682.19.0.56676864532.issue34068@psf.upfronthosting.co.za> Message-ID: <1531812800.78.0.56676864532.issue34068@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset cc13016658a9ed86d0b702ab6c251ad5952a952f by Serhiy Storchaka in branch '3.6': bpo-34068: _io__IOBase_close_impl could call _PyObject_SetAttrId with an exception set (GH-8282). (GH-8312) https://github.com/python/cpython/commit/cc13016658a9ed86d0b702ab6c251ad5952a952f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 03:33:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Jul 2018 07:33:57 +0000 Subject: [issue24618] Invalid read in PyCode_New In-Reply-To: <1436723206.75.0.0338800196723.issue24618@psf.upfronthosting.co.za> Message-ID: <1531812837.75.0.56676864532.issue24618@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset cf30d5c5b88276a9af863438839ba386b9723a14 by Serhiy Storchaka in branch '3.6': bpo-24618: Add a check in the code constructor. (GH-8283) (GH-8311) https://github.com/python/cpython/commit/cf30d5c5b88276a9af863438839ba386b9723a14 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 03:46:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Jul 2018 07:46:16 +0000 Subject: [issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. In-Reply-To: <1531031682.19.0.56676864532.issue34068@psf.upfronthosting.co.za> Message-ID: <1531813576.58.0.56676864532.issue34068@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 Tue Jul 17 03:47:16 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 17 Jul 2018 07:47:16 +0000 Subject: [issue33111] Merely importing tkinter breaks parallel code (multiprocessing, sharedmem) In-Reply-To: <1531733065.54.0.56676864532.issue33111@psf.upfronthosting.co.za> Message-ID: <8D00D6AA-C5C4-4B28-8172-133D60101CB3@mac.com> Ronald Oussoren added the comment: I can provide a patch, but that will likely be during EuroPython as I?m currently taking a roundabout route towards Edinburgh. Btw. I?m not sure yet how impactful changing the default spawning mechanism would be for 3.8. How likely is that to break user code? Op 16 jul. 2018 om 10:24 heeft Antoine Pitrou het volgende geschreven: > > Antoine Pitrou added the comment: > > macOS users, feel free to propose a doc PR for multiprocessing. > > ---------- > assignee: -> docs at python > components: +Documentation > nosy: +docs at python > versions: +Python 3.7, Python 3.8 -Python 3.5 > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 03:48:36 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 17 Jul 2018 07:48:36 +0000 Subject: [issue33111] Merely importing tkinter breaks parallel code (multiprocessing, sharedmem) In-Reply-To: <1521573656.32.0.467229070634.issue33111@psf.upfronthosting.co.za> Message-ID: <1531813716.1.0.56676864532.issue33111@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It will definitely break *some* user code. Also, everyone not using tkinter (which I think is the majority of users) isn't affected by this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 03:48:53 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 17 Jul 2018 07:48:53 +0000 Subject: [issue34128] Do not block threads when pickle/unpickle In-Reply-To: <1531767337.85.0.56676864532.issue34128@psf.upfronthosting.co.za> Message-ID: <1531813733.32.0.56676864532.issue34128@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This is about releasing the GIL periodically to allow other threads to run, as Python already does in its main interpreter loop. ---------- nosy: +pitrou versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 03:49:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Jul 2018 07:49:27 +0000 Subject: [issue24618] Invalid read in PyCode_New In-Reply-To: <1436723206.75.0.0338800196723.issue24618@psf.upfronthosting.co.za> Message-ID: <1531813767.56.0.56676864532.issue24618@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 04:00:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Jul 2018 08:00:53 +0000 Subject: [issue34128] Do not block threads when pickle/unpickle In-Reply-To: <1531767337.85.0.56676864532.issue34128@psf.upfronthosting.co.za> Message-ID: <1531814453.48.0.56676864532.issue34128@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: A workaround is writing Python wrappers for IO: def Writer: def __init__(self, file): self.file = file def write(self, data): return self.file.write(data) def Reader: def __init__(self, file): self.file = file def read(self, size=-1): return self.file.read(size) def readline(self, size=-1): return self.file.readline(size) def peek(self, size=-1): return self.file.peek(size) def mydump(obj, file, *args, **kwargs): return pickle.dump(obj, Writer(file), *args, **kwargs) def myload(file, *args, **kwargs): return pickle.load(Reader(file), *args, **kwargs) ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 04:15:16 2018 From: report at bugs.python.org (Kay Hayen) Date: Tue, 17 Jul 2018 08:15:16 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test Message-ID: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> New submission from Kay Hayen : I am getting this: PYTHONPATH=`pwd` /c/Python37_32/python test/test_opcodes.py .F...... ====================================================================== FAIL: test_do_not_recreate_annotations (__main__.OpcodeTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "test/test_opcodes.py", line 45, in test_do_not_recreate_annotations class C: File "test/test_opcodes.py", line 48, in C x: int AssertionError: NameError not raised I have seen this on Linux as well. I first notices that as a regression of Nuitka in the CPython36 test suite. It actually took me a while to implement support for "del __annotations__" to make later references not fall back to the module "__annotation__", for 3.6 compatibility. However, now with 3.7 behavior is back to what 3.5 I think would have done, while the test is not updated to match. I am confused now, which is the intended way for this to work? Should I follow this change, or will it be fixed, or am I doing something wrong in running something wrong here? Yours, Kay ---------- components: Interpreter Core messages: 321807 nosy: kayhayen priority: normal severity: normal status: open title: Del on class __annotations__ regressed, failing test type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 04:28:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Jul 2018 08:28:20 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1531816100.25.0.56676864532.issue34136@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See issue32550. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 04:49:01 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 17 Jul 2018 08:49:01 +0000 Subject: [issue34135] The results of time.tzname print broken. In-Reply-To: <1531803123.68.0.56676864532.issue34135@psf.upfronthosting.co.za> Message-ID: <1531817341.86.0.56676864532.issue34135@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: There is some discussion about this at https://bugs.python.org/issue16322#msg251068 and seems the issue is a related one. Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 05:03:59 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 17 Jul 2018 09:03:59 +0000 Subject: [issue34132] Obscure netrc parser "bug" In-Reply-To: <1531782813.71.0.56676864532.issue34132@psf.upfronthosting.co.za> Message-ID: <1531818239.54.0.56676864532.issue34132@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 06:14:36 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 17 Jul 2018 10:14:36 +0000 Subject: [issue34132] Obscure netrc parser "bug" In-Reply-To: <1531782813.71.0.56676864532.issue34132@psf.upfronthosting.co.za> Message-ID: <1531822476.38.0.56676864532.issue34132@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: This seems to have been introduced with commit : 1df0f214a9fdb4dde7506576b144cf6a7fd01b65 before which it was working fine. Testing shows the error from 1df0f214a9fdb4dde7506576b144cf6a7fd01b65 and above. I have checked out only versions of Lib/netrc.py and I think this doesn't require a rebuild of Python. ? cpython git:(master) $ git log --oneline --format="%h" Lib/netrc.py > commits.txt # Get all commits to test the changes ? cpython git:(master) ? ./python netrc_foo_tester.py netrc_foo_tester.py is attached with the message which basically does the below using Python for every commit. netrc_foo.py contains the actual test of parsing two files. ? cpython git:(master) ? ./python Python 3.8.0a0 (heads/master:35c0809, Jul 16 2018, 10:29:23) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> ? cpython git:(master) ? cat netrc_foo.py import netrc rc = netrc.netrc(file="netrc-comment-blank") rc = netrc.netrc(file="netrc-blank-comment") ? cpython git:(master) ? git reset --quiet HEAD . && git checkout . && git checkout be19ed7 Lib/netrc.py && ./python netrc_foo.py netrc_foo.py:2: ResourceWarning: unclosed file <_io.TextIOWrapper name='netrc-comment-blank' mode='r' encoding='UTF-8'> rc = netrc.netrc(file="netrc-comment-blank") netrc_foo.py:3: ResourceWarning: unclosed file <_io.TextIOWrapper name='netrc-blank-comment' mode='r' encoding='UTF-8'> rc = netrc.netrc(file="netrc-blank-comment") ? cpython git:(master) ? git reset --quiet HEAD . && git checkout . && git checkout c12a813 Lib/netrc.py && ./python netrc_foo.py ? cpython git:(master) ? git reset --quiet HEAD . && git checkout . && git checkout 78a1a15 Lib/netrc.py && ./python netrc_foo.py ? cpython git:(master) ? git reset --quiet HEAD . && git checkout . && git checkout 1df0f21 Lib/netrc.py && ./python netrc_foo.py Traceback (most recent call last): File "netrc_foo.py", line 3, in rc = netrc.netrc(file="netrc-blank-comment") File "/home/cpython/Lib/netrc.py", line 32, in __init__ self._parse(file, fp) File "/home/cpython/Lib/netrc.py", line 65, in _parse "bad toplevel token %r" % tt, file, lexer.lineno) netrc.NetrcParseError: bad toplevel token 'Comment' (netrc-blank-comment, line 2) I hope the above approach is correct. Thanks ---------- Added file: https://bugs.python.org/file47699/netrc_foo_tester.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 06:53:29 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 17 Jul 2018 10:53:29 +0000 Subject: [issue33129] Add kwarg-only option to dataclass In-Reply-To: <1521847997.9.0.467229070634.issue33129@psf.upfronthosting.co.za> Message-ID: <1531824809.61.0.56676864532.issue33129@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: There is an open PR and some discussion about this feature in attrs repo : https://github.com/python-attrs/attrs/pull/281 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 06:59:41 2018 From: report at bugs.python.org (Daniel Pope) Date: Tue, 17 Jul 2018 10:59:41 +0000 Subject: [issue34137] Add Path.lexist() to pathlib Message-ID: <1531825181.93.0.56676864532.issue34137@psf.upfronthosting.co.za> New submission from Daniel Pope : When using pathlib to manipulate paths that may be symlinks or regular files, a pattern that comes up frequently is this expression: path.is_symlink() or path.exists() os.path.lexists(path) can be used for this, but when using pathlib going back to os.path for this seems like defeat. ---------- components: Library (Lib) messages: 321812 nosy: lordmauve priority: normal severity: normal status: open title: Add Path.lexist() to pathlib type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 07:01:21 2018 From: report at bugs.python.org (Daniel Pope) Date: Tue, 17 Jul 2018 11:01:21 +0000 Subject: [issue33123] Path.unlink should have a missing_ok parameter In-Reply-To: <1521741396.21.0.467229070634.issue33123@psf.upfronthosting.co.za> Message-ID: <1531825281.45.0.56676864532.issue33123@psf.upfronthosting.co.za> Change by Daniel Pope : ---------- nosy: +lordmauve _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 07:25:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Jul 2018 11:25:25 +0000 Subject: [issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. In-Reply-To: <1531031682.19.0.56676864532.issue34068@psf.upfronthosting.co.za> Message-ID: <1531826725.02.0.56676864532.issue34068@psf.upfronthosting.co.za> STINNER Victor added the comment: > The assertion failure is a little bit "far" from the bug: would it make sense to add "assert(!PyErr_Occurred());" to the entry point of: Stefan, Serhiy: any opinion on my idea? For example, PyObject_HasAttr() can replace and clear the current exception *by design*. This function does more or less: try: obj.attr; return True except AttributeError: return False int PyObject_HasAttr(PyObject *v, PyObject *name) { PyObject *res; if (_PyObject_LookupAttr(v, name, &res) < 0) { PyErr_Clear(); return 0; } if (res == NULL) { return 0; } Py_DECREF(res); return 1; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 07:27:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Jul 2018 11:27:14 +0000 Subject: [issue31342] test.bisect module causes tests to fail In-Reply-To: <1504561717.28.0.121590412099.issue31342@psf.upfronthosting.co.za> Message-ID: <1531826834.6.0.56676864532.issue31342@psf.upfronthosting.co.za> STINNER Victor added the comment: > I considered adding a 'bisect' command to the test/__main__, e.g. you could run 'python -m test --bisect ..'. That looks not entirely simple to implement though. Ah yes, for the long term, integrating test.bisect directly in libregrtest would be great, but I don't see how to modify the existing libregrtest CLI. test.bisect comes with its set of options like -i, -o, -n. Maybe it's fine to have a separated tool and file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 07:29:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Jul 2018 11:29:23 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531826963.91.0.56676864532.issue34130@psf.upfronthosting.co.za> STINNER Victor added the comment: I succeeded to reproduce the issue on Windows, but I also got a failure of test_signal.test_socket() as if the C signal handle has not been called immediately by _testcapi.raise_signal() and so the socket didn't contain the byte of the signal number. It seems quite easy to make test_signal fail on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 07:37:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Jul 2018 11:37:26 +0000 Subject: [issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. In-Reply-To: <1531031682.19.0.56676864532.issue34068@psf.upfronthosting.co.za> Message-ID: <1531827446.24.0.56676864532.issue34068@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 2.7 also has the io module: it may be good to backport the change to Python 2.7 as well, no? I see the same bug in 2.7: res = PyObject_CallMethodObjArgs(self, _PyIO_str_flush, NULL); PyObject_SetAttrString(self, "__IOBase_closed", Py_True); if (res == NULL) { return NULL; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 07:37:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Jul 2018 11:37:41 +0000 Subject: [issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. In-Reply-To: <1531031682.19.0.56676864532.issue34068@psf.upfronthosting.co.za> Message-ID: <1531827461.08.0.56676864532.issue34068@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 07:47:27 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 17 Jul 2018 11:47:27 +0000 Subject: [issue34137] Add Path.lexist() to pathlib In-Reply-To: <1531825181.93.0.56676864532.issue34137@psf.upfronthosting.co.za> Message-ID: <1531828047.9.0.56676864532.issue34137@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 08:16:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Jul 2018 12:16:32 +0000 Subject: [issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. In-Reply-To: <1531031682.19.0.56676864532.issue34068@psf.upfronthosting.co.za> Message-ID: <1531829792.69.0.56676864532.issue34068@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +7849 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 08:19:47 2018 From: report at bugs.python.org (Kay Hayen) Date: Tue, 17 Jul 2018 12:19:47 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1531829987.25.0.56676864532.issue34136@psf.upfronthosting.co.za> Kay Hayen added the comment: Thanks for pointing out, where it comes from, Serhiy. So, should the test case be removed then. I still am not so sure about the bug nature. Because using the standard mechanism will do this: x : int class C: del __annotations__ x : float y : int print(__annotations__) This will give float for x, and int for y, both of which are wrong for the module. I do agree that "del" on "__annotations__" might not have a use case, or does it? I think it's optimized away if not used for classes anyway, isn't it? Maybe you want make "del" on __annotations__ a syntax error then? Yours, Kay ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 08:21:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Jul 2018 12:21:41 +0000 Subject: [issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. In-Reply-To: <1531031682.19.0.56676864532.issue34068@psf.upfronthosting.co.za> Message-ID: <1531830101.08.0.56676864532.issue34068@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > The assertion failure is a little bit "far" from the bug: would it make sense to add "assert(!PyErr_Occurred());" to the entry point of: This looks like a part of larger issue, and I think it deserves a separate issue on the tracker. See also issue26776. ---------- stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 08:22:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Jul 2018 12:22:11 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1531830131.99.0.56676864532.issue34136@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +Mark.Shannon, gvanrossum, levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 08:31:07 2018 From: report at bugs.python.org (Sam Varshavchik) Date: Tue, 17 Jul 2018 12:31:07 +0000 Subject: [issue34138] RFC 6855 issue Message-ID: <1531830667.9.0.56676864532.issue34138@psf.upfronthosting.co.za> New submission from Sam Varshavchik : Greetings. I am in the process of implementing RFC 6855 in Courier-IMAP. A Google search for IMAP clients that implement RFC 6855 led me to https://bugs.python.org/issue21800 and looking over the code that was added to imaplib, to support RFC 6855, a few things stood out. I checked, and the changes introduces in 21800 still appear to be unchanged in https://github.com/python/cpython/blob/master/Lib/imaplib.py Issue 21800 modified sub append(), that implements the IMAP APPEND command, thusly: - self.literal = MapCRLF.sub(CRLF, message) + literal = MapCRLF.sub(CRLF, message) + if self.utf8_enabled: + literal = b'UTF8 (' + literal + b')' + self.literal = literal "literal" here appears to be the contents of the message with CRLF line ending. But section 4 of https://tools.ietf.org/html/rfc6855.html states: The ABNF for the "APPEND" data extension and "CATENATE" extension follows: utf8-literal = "UTF8" SP "(" literal8 ")" literal8 = append-data =/ utf8-literal cat-part =/ utf8-literal As indicated above, "literal8" comes from RFC 4466, which also defines "append-data". RFC 4466 additionally states: In addition, the non-terminal "literal8" defined in [BINARY] got extended to allow for non-synchronizing literals if both [BINARY] and [LITERAL+] extensions are supported by the server. I'll come back to this revealing paragraph in a moment, but, as stated, "literal8" actually comes from [BINARY] which is RFC 3516, which specifies the following: append =/ "APPEND" SP mailbox [SP flag-list] [SP date-time] SP literal8 fetch-att =/ "BINARY" [".PEEK"] section-binary [partial] / "BINARY.SIZE" section-binary literal8 = "~{" number "}" CRLF *OCTET ; represents the number of OCTETs ; in the response string. An exhaustive search of imaplib.py seems to indicate that this pesky tilde is in hiding. And the wrong thing seems to be quoted as the actual literal. Anyway, back to the RFCs: combine all of the above together, spin it in a blender, and you get the following result: Supposing that the message being appended consists of a single header line "Subject: test", and a blank line, a sample command of what actually goes out the wire (based on the above, and other parts of these, and related RFCs): APPEND INBOX NIL NIL UTF8 (~{17}Subject: test) I haven't tested imaplib against Courier-IMAP in this respect, but it doesn't seem like this is going to be results. But wait, there's more! "literal8" is a synchronizing literal, like "literal" from RFC 3501, which specifies: ...In the case of literals transmitted from client to server, the client MUST wait to receive a command continuation request (described later in this document) before sending the octet data (and the remainder of the command). The LITERAL+ IMAP extension, that was mentioned in the excerpt from RFC 4466 that I cited above, introduced non-synchronizing literals: The protocol receiver of an IMAP4 server must check the end of every received line for an open brace ('{') followed by an octet count, a plus ('+'), and a close brace ('}') immediately preceeding the CRLF. If it finds this sequence, it is the octet count of a non- synchronizing literal and the server MUST treat the specified number of following octets and the following line as part of the same command. Otherwise, after the closing brace and the the IMAP client must wait for the continuation response from the server. So, to summarize: 1) RFC 4466, combined with RFC 6855 an IMAP UTF-8 client talking to an IMAP UTF-8 server can send the following, on the wire, if the server supports LITERAL+: APPEND INBOX NIL NIL UTF8 (~{17+}Subject: test) 2) But, if the server did not advertise LITERAL+, the IMAP client is required to send only: APPEND INBOX NIL NIL UTF8 (~{17} Then wait for the continuation response from the server, then send the rest of the command. IMAP specifications have been painful to read, for the 20+ years I've been reading them. Historically there's been a lot of interoperability problems between IMAP clients and servers. I lay the blame squarely on the horrible specs, but that's off-topic. Suffice to say, nothing of that sort has been observed for POP3 and SMTP, and I think there's a very good reason for that. ---------- components: email messages: 321819 nosy: Sam Varshavchik, barry, r.david.murray priority: normal severity: normal status: open title: RFC 6855 issue versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 08:42:51 2018 From: report at bugs.python.org (ppperry) Date: Tue, 17 Jul 2018 12:42:51 +0000 Subject: [issue34128] Release GIL periodically in _pickle module In-Reply-To: <1531767337.85.0.56676864532.issue34128@psf.upfronthosting.co.za> Message-ID: <1531831371.74.0.56676864532.issue34128@psf.upfronthosting.co.za> Change by ppperry : ---------- components: +Library (Lib) title: Do not block threads when pickle/unpickle -> Release GIL periodically in _pickle module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 08:53:28 2018 From: report at bugs.python.org (e-kayrakli) Date: Tue, 17 Jul 2018 12:53:28 +0000 Subject: [issue34137] Add Path.lexist() to pathlib In-Reply-To: <1531825181.93.0.56676864532.issue34137@psf.upfronthosting.co.za> Message-ID: <1531832008.13.0.56676864532.issue34137@psf.upfronthosting.co.za> e-kayrakli added the comment: I haven't contributed to Python yet and I can contribute this as a way for me to practice the PR process in Python. As this is a small addition, should I create a PR right away, or wait for a consensus here? ---------- nosy: +e-kayrakli _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 08:56:29 2018 From: report at bugs.python.org (Martin Bammer) Date: Tue, 17 Jul 2018 12:56:29 +0000 Subject: [issue34128] Release GIL periodically in _pickle module In-Reply-To: <1531767337.85.0.56676864532.issue34128@psf.upfronthosting.co.za> Message-ID: <1531832189.89.0.56676864532.issue34128@psf.upfronthosting.co.za> Martin Bammer added the comment: Maybe an optional parameter with the desired interval would be good idea. So that the coder can decide if he wants/needs that feature and which interval he needs for his application. Otherwise it is hard to define a specific interval which fits for everyone. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 09:10:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Jul 2018 13:10:28 +0000 Subject: [issue33123] Path.unlink should have a missing_ok parameter In-Reply-To: <1521741396.21.0.467229070634.issue33123@psf.upfronthosting.co.za> Message-ID: <1531833028.02.0.56676864532.issue33123@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It can be written as try: path.inlink() except FileNotFoundError: pass If you want to save few lines of code, you can use contextlib.suppress(). with suppress(FileNotFoundError): path.inlink() I suggest to close this issue. It is better to keep the API simple and orthogonal. Adding an option in Path.unlink() will require adding this support of this option in third-part implementations of Path. In general, adding a single boolean parameter is not considered a good practice in Python. A "strict" parameter in Path.resolve() does the different thing. In both cases Path.resolve() returns a value, and you can't implement strict=False by catching exception externally. ---------- nosy: +pitrou, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 09:21:53 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 17 Jul 2018 13:21:53 +0000 Subject: [issue34128] Release GIL periodically in _pickle module In-Reply-To: <1531767337.85.0.56676864532.issue34128@psf.upfronthosting.co.za> Message-ID: <1531833713.46.0.56676864532.issue34128@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The right way to do this is not to pass a timeout parameter but to check for GIL interrupts as done in the main bytecode evaluation loop. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 09:37:05 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 17 Jul 2018 13:37:05 +0000 Subject: [issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party yt module fails on Python 3.5) In-Reply-To: <1442494739.31.0.584117765088.issue25150@psf.upfronthosting.co.za> Message-ID: <1531834625.58.0.56676864532.issue25150@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think this should be reconsidered. I understand the desire to compile Python with OpenMP. But the resolution here is hiding _Py_atomic symbols all the time, even when OpenMP isn't involved, and even when building a standard extension module. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 09:38:57 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 17 Jul 2018 13:38:57 +0000 Subject: [issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party yt module fails on Python 3.5) In-Reply-To: <1442494739.31.0.584117765088.issue25150@psf.upfronthosting.co.za> Message-ID: <1531834737.74.0.56676864532.issue25150@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Case in point: if I want to include "internal/pystate.h" from _pickle.c, I get the following error: """ In file included from ./Include/internal/pystate.h:12:0, from /home/antoine/cpython/default/Modules/_pickle.c:10: ./Include/internal/ceval.h:14:5: error: unknown type name ?_Py_atomic_int? _Py_atomic_int calls_to_do; ^ """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 09:48:46 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 17 Jul 2018 13:48:46 +0000 Subject: [issue34128] Release GIL periodically in _pickle module In-Reply-To: <1531767337.85.0.56676864532.issue34128@psf.upfronthosting.co.za> Message-ID: <1531835326.55.0.56676864532.issue34128@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Attaching proof-of-concept patch. ---------- keywords: +patch Added file: https://bugs.python.org/file47700/pickle_gil.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 09:49:18 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 17 Jul 2018 13:49:18 +0000 Subject: [issue34128] Release GIL periodically in _pickle module In-Reply-To: <1531767337.85.0.56676864532.issue34128@psf.upfronthosting.co.za> Message-ID: <1531835358.76.0.56676864532.issue34128@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Attaching demonstration script. ---------- Added file: https://bugs.python.org/file47701/pickle_gil.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 09:50:42 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 17 Jul 2018 13:50:42 +0000 Subject: [issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party yt module fails on Python 3.5) In-Reply-To: <1442494739.31.0.584117765088.issue25150@psf.upfronthosting.co.za> Message-ID: <1531835442.3.0.56676864532.issue25150@psf.upfronthosting.co.za> Antoine Pitrou added the comment: (see issue34128 for context) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 09:52:23 2018 From: report at bugs.python.org (Quentin Dawans) Date: Tue, 17 Jul 2018 13:52:23 +0000 Subject: [issue34139] Remove stale unix datagram socket before binding Message-ID: <1531835543.49.0.56676864532.issue34139@psf.upfronthosting.co.za> New submission from Quentin Dawans : Like https://github.com/python/asyncio/commit/806cc68d762acc30490cf5583569e41441c25c35 but for unix datagram socket. I'm looking into making a PR ---------- components: asyncio messages: 321829 nosy: asvetlov, qdawans, yselivanov priority: normal severity: normal status: open title: Remove stale unix datagram socket before binding _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 09:54:50 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 17 Jul 2018 13:54:50 +0000 Subject: [issue34128] Release GIL periodically in _pickle module In-Reply-To: <1531767337.85.0.56676864532.issue34128@psf.upfronthosting.co.za> Message-ID: <1531835690.75.0.56676864532.issue34128@psf.upfronthosting.co.za> Antoine Pitrou added the comment: (as the demo script shows, there is no detectable slowdown) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 10:07:41 2018 From: report at bugs.python.org (Daniel Pope) Date: Tue, 17 Jul 2018 14:07:41 +0000 Subject: [issue33123] Path.unlink should have a missing_ok parameter In-Reply-To: <1521741396.21.0.467229070634.issue33123@psf.upfronthosting.co.za> Message-ID: <1531836461.41.0.56676864532.issue33123@psf.upfronthosting.co.za> Daniel Pope added the comment: This would be a shortcut in the common case that you simply want an idempotent "make sure this file/symlink is gone" operation. There are already boolean options to enable idempotent behaviour in several pathlib implementations, such as mkdir(exist_ok=True) and touch(exist_ok=True). write_bytes() and write_text() are also idempotent. unlink() aligns well with this. Because this operation doesn't exist, developers are tempted to write if path.exists(): path.unlink() which both has a TOCTTOU bug and doesn't correctly handle symlinks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 10:21:19 2018 From: report at bugs.python.org (Horace Stoica) Date: Tue, 17 Jul 2018 14:21:19 +0000 Subject: [issue34140] Possible multiprocessing deadlock when placing too many objects in Queue() Message-ID: <1531837279.07.0.56676864532.issue34140@psf.upfronthosting.co.za> New submission from Horace Stoica : I am trying to use the multiprocessing module for a simulation on a spherical lattice, but the process hangs when the lattice is too large. In the file IssuesWithQueueMultiProcessing.py, the method createLattice(), use either "return(I4)" for the small lattice or "return(I5)" for the large lattice. Running the script when using the large lattice causes the process to hang while for the small lattice it works fine. I have tested with Python 3.5.2 and 3.6.1 and the behavior is the same in both versions. ---------- files: IssuesWithQueueMultiProcessing.tar.bz messages: 321832 nosy: fhstoica priority: normal severity: normal status: open title: Possible multiprocessing deadlock when placing too many objects in Queue() type: performance versions: Python 3.5, Python 3.6 Added file: https://bugs.python.org/file47702/IssuesWithQueueMultiProcessing.tar.bz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 10:47:34 2018 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 17 Jul 2018 14:47:34 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531830132.0.0.902498594338.issue34136@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Serhiy, what question do you want us to answer? On Tue, Jul 17, 2018 at 5:22 AM Serhiy Storchaka wrote: > > Change by Serhiy Storchaka : > > > ---------- > nosy: +Mark.Shannon, gvanrossum, levkivskyi > > _______________________________________ > Python tracker > > _______________________________________ > -- --Guido (mobile) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 10:52:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Jul 2018 14:52:17 +0000 Subject: [issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party yt module fails on Python 3.5) In-Reply-To: <1442494739.31.0.584117765088.issue25150@psf.upfronthosting.co.za> Message-ID: <1531839137.06.0.56676864532.issue25150@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue is closed. Would you mind to either reopen it or create a new issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 11:02:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Jul 2018 15:02:49 +0000 Subject: [issue34128] Release GIL periodically in _pickle module In-Reply-To: <1531767337.85.0.56676864532.issue34128@psf.upfronthosting.co.za> Message-ID: <1531839769.03.0.56676864532.issue34128@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The demo script shows around 8% slowdown to me for data = list(map(float, range(N))) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 11:02:52 2018 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 17 Jul 2018 15:02:52 +0000 Subject: [issue34134] multiprocessing memory huge usage In-Reply-To: <1531800230.72.0.56676864532.issue34134@psf.upfronthosting.co.za> Message-ID: <1531839772.17.0.56676864532.issue34134@psf.upfronthosting.co.za> Xiang Zhang added the comment: One thing worth a try here maybe turn `len` to `operator.length_hint`. But I am not sure it's a good idea and just a mention here. ---------- nosy: +xiang.zhang versions: -Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 11:12:55 2018 From: report at bugs.python.org (Windson Yang) Date: Tue, 17 Jul 2018 15:12:55 +0000 Subject: [issue34134] multiprocessing memory huge usage In-Reply-To: <1531800230.72.0.56676864532.issue34134@psf.upfronthosting.co.za> Message-ID: <1531840375.98.0.56676864532.issue34134@psf.upfronthosting.co.za> Windson Yang added the comment: Thank you Xiang Zhang, I found the code keeps hanging when I use imap, I will try to figure out tomorrow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 11:14:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Jul 2018 15:14:31 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1531840471.91.0.56676864532.issue34136@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry. I thought the discussion issue32550 shows that this CPython behavior change was intended, but it is not a part of Python language, and alternate implementations can have different behavior. But I expected that someone of participants with better English can confirm this more clearly, and may be even suggest what to do with Nuitka's tests. (I think that Nuitka can do what is simpler for it.) I am wondering if it is worth to document this behavior change explicitly in the "What's New in 3.8" document. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 11:15:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Jul 2018 15:15:50 +0000 Subject: [issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. In-Reply-To: <1531031682.19.0.56676864532.issue34068@psf.upfronthosting.co.za> Message-ID: <1531840550.6.0.56676864532.issue34068@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset fc153d127901361d7fe5f60caa6f41d2b8db0eb0 by Serhiy Storchaka in branch '2.7': [2.7] bpo-34068: iobase_close could call PyObject_SetAttrString with an exception set (GH-8282). (GH-8312) (GH-8314) https://github.com/python/cpython/commit/fc153d127901361d7fe5f60caa6f41d2b8db0eb0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 11:53:10 2018 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 17 Jul 2018 15:53:10 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1531842790.42.0.56676864532.issue34136@psf.upfronthosting.co.za> Guido van Rossum added the comment: The test fails on CPython master, so shouldn't it be removed? Don't we have a policy that all tests must pass on master? This is what I see: cpython38$ ./python.exe Lib/test/test_opcodes.py ./python.exe Lib/test/test_opcodes.py .F...... ====================================================================== FAIL: test_do_not_recreate_annotations (__main__.OpcodeTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_opcodes.py", line 45, in test_do_not_recreate_annotations class C: File "Lib/test/test_opcodes.py", line 48, in C x: int AssertionError: NameError not raised ---------------------------------------------------------------------- Ran 8 tests in 0.003s FAILED (failures=1) cpython38$ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 11:55:58 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Jul 2018 15:55:58 +0000 Subject: [issue34133] ValueError should not be documented as being restricted to only "a built-in operation or function" In-Reply-To: <1531788704.26.0.56676864532.issue34133@psf.upfronthosting.co.za> Message-ID: <1531842958.93.0.56676864532.issue34133@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7850 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 11:56:07 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Jul 2018 15:56:07 +0000 Subject: [issue34133] ValueError should not be documented as being restricted to only "a built-in operation or function" In-Reply-To: <1531788704.26.0.56676864532.issue34133@psf.upfronthosting.co.za> Message-ID: <1531842967.21.0.56676864532.issue34133@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7851 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 11:56:14 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Jul 2018 15:56:14 +0000 Subject: [issue34133] ValueError should not be documented as being restricted to only "a built-in operation or function" In-Reply-To: <1531788704.26.0.56676864532.issue34133@psf.upfronthosting.co.za> Message-ID: <1531842974.19.0.56676864532.issue34133@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7852 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 12:19:57 2018 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 17 Jul 2018 16:19:57 +0000 Subject: [issue34140] Possible multiprocessing deadlock when placing too many objects in Queue() In-Reply-To: <1531837279.07.0.56676864532.issue34140@psf.upfronthosting.co.za> Message-ID: <1531844397.31.0.56676864532.issue34140@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- nosy: +davin, pitrou, xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 12:49:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Jul 2018 16:49:06 +0000 Subject: [issue34141] Speed up pickling simple non-recusive values Message-ID: <1531846146.68.0.56676864532.issue34141@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The proposed PR reduces an overhead of calling Py_EnterRecursiveCall() when pickle simple non-recusive values: None, True, False, instances of int, float, bytes, str. $ ./python -m timeit -s 'data = list(range(10**7)); import pickle' -- 'pickle.dumps(data)' Unpatched: 218 msec per loop Patched: 147 msec per loop $ ./python -m timeit -s 'data = list(map(float, range(10**7))); import pickle' -- 'pickle.dumps(data)' Unpatched: 218 msec per loop Patched: 179 msec per loop $ ./python -m timeit -s 'data = list(map(str, range(10**6))); import pickle' -- 'pickle.dumps(data)' Unpatched: 212 msec per loop Patched: 201 msec per loop ---------- components: Library (Lib) messages: 321841 nosy: alexandre.vassalotti, pitrou, serhiy.storchaka priority: normal severity: normal status: open title: Speed up pickling simple non-recusive values type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 12:50:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Jul 2018 16:50:30 +0000 Subject: [issue34141] Speed up pickling simple non-recusive values In-Reply-To: <1531846146.68.0.56676864532.issue34141@psf.upfronthosting.co.za> Message-ID: <1531846230.47.0.56676864532.issue34141@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +7853 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 12:51:17 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 17 Jul 2018 16:51:17 +0000 Subject: [issue34140] Possible multiprocessing deadlock when placing too many objects in Queue() In-Reply-To: <1531837279.07.0.56676864532.issue34140@psf.upfronthosting.co.za> Message-ID: <1531846277.67.0.56676864532.issue34140@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The problem is you're joining the child processes before draining the queue in the parent. Generally, instead of building your own kind of synchronization like this, I would recommend you use the higher-level abstractions provided by multiprocessing.Pool or concurrent.futures.ProcessPoolExecutor. By the way, this issue is mentioned precisely in the documentation: """ As mentioned above, if a child process has put items on a queue (and it has not used JoinableQueue.cancel_join_thread), then that process will not terminate until all buffered items have been flushed to the pipe. This means that if you try joining that process you may get a deadlock unless you are sure that all items which have been put on the queue have been consumed. Similarly, if the child process is non-daemonic then the parent process may hang on exit when it tries to join all its non-daemonic children. """ (from https://docs.python.org/3/library/multiprocessing.html#pipes-and-queues) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 12:51:46 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 17 Jul 2018 16:51:46 +0000 Subject: [issue34140] Possible multiprocessing deadlock when placing too many objects in Queue() In-Reply-To: <1531837279.07.0.56676864532.issue34140@psf.upfronthosting.co.za> Message-ID: <1531846306.9.0.56676864532.issue34140@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Closing as not a bug. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed type: performance -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 13:41:39 2018 From: report at bugs.python.org (Brett Cannon) Date: Tue, 17 Jul 2018 17:41:39 +0000 Subject: [issue34133] ValueError documented as being restricted to only "a built-in operation or function" In-Reply-To: <1531788704.26.0.56676864532.issue34133@psf.upfronthosting.co.za> Message-ID: <1531849299.61.0.56676864532.issue34133@psf.upfronthosting.co.za> Brett Cannon added the comment: Just an FYI, Nathaniel, your title and message are bit "pushy". I've gone ahead and tweaked the title. ---------- nosy: +brett.cannon title: ValueError should not be documented as being restricted to only "a built-in operation or function" -> ValueError documented as being restricted to only "a built-in operation or function" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 13:42:21 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 17 Jul 2018 17:42:21 +0000 Subject: [issue33111] Merely importing tkinter breaks parallel code (multiprocessing, sharedmem) In-Reply-To: <8D00D6AA-C5C4-4B28-8172-133D60101CB3@mac.com> Message-ID: <9dc048fa-fa6f-0421-a012-228696a9007a@udel.edu> Terry J. Reedy added the comment: Ronald Oussoren> I can provide a patch, but that will likely be during EuroPython as I?m currently taking a roundabout route towards Edinburgh. Can you add a test of the procedure you document for using _tkinter with multiprocessing? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 13:49:47 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 17 Jul 2018 17:49:47 +0000 Subject: [issue34128] Release GIL periodically in _pickle module In-Reply-To: <1531767337.85.0.56676864532.issue34128@psf.upfronthosting.co.za> Message-ID: <1531849787.59.0.56676864532.issue34128@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Interesting, which kind of computer / system / compiler are you on? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 13:58:55 2018 From: report at bugs.python.org (ppperry) Date: Tue, 17 Jul 2018 17:58:55 +0000 Subject: [issue34128] Release GIL periodically in _pickle module In-Reply-To: <1531767337.85.0.56676864532.issue34128@psf.upfronthosting.co.za> Message-ID: <1531850335.11.0.56676864532.issue34128@psf.upfronthosting.co.za> Change by ppperry : ---------- nosy: -ppperry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 14:12:42 2018 From: report at bugs.python.org (david awad) Date: Tue, 17 Jul 2018 18:12:42 +0000 Subject: [issue34088] [EASY] sndhdr.what() throws exceptions on unknown files In-Reply-To: <1531255806.14.0.56676864532.issue34088@psf.upfronthosting.co.za> Message-ID: <1531851162.72.0.56676864532.issue34088@psf.upfronthosting.co.za> Change by david awad : ---------- keywords: +patch pull_requests: +7854 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 14:14:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Jul 2018 18:14:10 +0000 Subject: [issue34128] Release GIL periodically in _pickle module In-Reply-To: <1531767337.85.0.56676864532.issue34128@psf.upfronthosting.co.za> Message-ID: <1531851250.47.0.56676864532.issue34128@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: CPU = Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz Ubuntu 18.04 Linux 4.15.0 x86_64 gcc 7.3.0 Performing the check in save() can have not insignificant overhead (especially after implementing the issue34141 optimization). It can be reduced if perform it when flush a frame (in protocol 4) or buffer to the file, or after writing significant amount of bytes into buffer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 14:18:03 2018 From: report at bugs.python.org (david awad) Date: Tue, 17 Jul 2018 18:18:03 +0000 Subject: [issue34088] [EASY] sndhdr.what() throws exceptions on unknown files In-Reply-To: <1531255806.14.0.56676864532.issue34088@psf.upfronthosting.co.za> Message-ID: <1531851483.74.0.56676864532.issue34088@psf.upfronthosting.co.za> david awad added the comment: Hey, I saw the issue and spent some time piecing together a PR for it. I've never contributed to Python before but this seemed like a good place to start! I posted these questions on the PR but I'll echo them here as well. - Should we only handle the specific exceptions that are created in these two examples? or is there a cleaner, more pythonic way to handle it? - It doesn't appear that test_sndhdr.py does any testing of bad inputs. Can I add test cases to the test_sndhdr.py file? Thanks! I'm here to learn so if there's anything I missed please feel free to let me know. ---------- nosy: +davidawad _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 14:49:51 2018 From: report at bugs.python.org (Ammar Askar) Date: Tue, 17 Jul 2018 18:49:51 +0000 Subject: [issue34088] [EASY] sndhdr.what() throws exceptions on unknown files In-Reply-To: <1531255806.14.0.56676864532.issue34088@psf.upfronthosting.co.za> Message-ID: <1531853391.66.0.56676864532.issue34088@psf.upfronthosting.co.za> Ammar Askar added the comment: Hey David, thanks for your contribution, I've added some feedback in context of the code on Github. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 16:26:26 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 Jul 2018 20:26:26 +0000 Subject: [issue34133] ValueError documented as being restricted to only "a built-in operation or function" In-Reply-To: <1531788704.26.0.56676864532.issue34133@psf.upfronthosting.co.za> Message-ID: <1531859186.4.0.56676864532.issue34133@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Nathaniel, thanks for the bug report. I've fixed the docs. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 17:45:24 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 17 Jul 2018 21:45:24 +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: <1531863924.53.0.56676864532.issue33695@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Unless somebody has complaints I think I'm gonna merge this soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 18:21:47 2018 From: report at bugs.python.org (Alexander Mohr) Date: Tue, 17 Jul 2018 22:21: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: <1531866107.37.0.56676864532.issue34022@psf.upfronthosting.co.za> Alexander Mohr added the comment: we're compiling similar to debian and getting the same issues now only with 3.7 so interested in what the resolution is. I tried both w/ and w/o setting SOURCE_DATE_EPOCH and still get failures. ---------- nosy: +thehesiod _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 18:54:42 2018 From: report at bugs.python.org (Nathaniel Manista) Date: Tue, 17 Jul 2018 22:54:42 +0000 Subject: [issue34133] ValueError documented as being restricted to only "a built-in operation or function" In-Reply-To: <1531788704.26.0.56676864532.issue34133@psf.upfronthosting.co.za> Message-ID: <1531868082.88.0.56676864532.issue34133@psf.upfronthosting.co.za> Nathaniel Manista added the comment: Thank you both! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 22:09:35 2018 From: report at bugs.python.org (LarryZA) Date: Wed, 18 Jul 2018 02:09:35 +0000 Subject: [issue34142] Windows launcher version lookup flawed Message-ID: <1531879775.21.0.56676864532.issue34142@psf.upfronthosting.co.za> New submission from LarryZA : In the manual it says that the following .ini file will cause the launcher to run Python3.1 for calls of `py` or `py -3` [defaults] python=3 python3=3.1 On my Windows 7 machine I have Python2.7-32, Python3.4-64, and Python3.7-64 (installed in that order). Setting the ini to: [defaults] python=3 python3=3.4 results in `py` running 3.7-64 (expected 3.4-64) and `py -3` running 3.4-64. Setting both to point to 3.4 in the ini will run 3.4-64 for both commands. ---------- components: Windows messages: 321855 nosy: LarryZA, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Windows launcher version lookup flawed type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 22:21:22 2018 From: report at bugs.python.org (bbayles) Date: Wed, 18 Jul 2018 02:21:22 +0000 Subject: [issue34132] Obscure netrc parser "bug" In-Reply-To: <1531782813.71.0.56676864532.issue34132@psf.upfronthosting.co.za> Message-ID: <1531880482.82.0.56676864532.issue34132@psf.upfronthosting.co.za> Change by bbayles : ---------- keywords: +patch pull_requests: +7856 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 17 23:52:33 2018 From: report at bugs.python.org (Windson Yang) Date: Wed, 18 Jul 2018 03:52:33 +0000 Subject: [issue34134] multiprocessing memory huge usage In-Reply-To: <1531800230.72.0.56676864532.issue34134@psf.upfronthosting.co.za> Message-ID: <1531885953.63.0.56676864532.issue34134@psf.upfronthosting.co.za> Windson Yang added the comment: The code didn't work with imap because imap create a generator, so we can't access result outside the with statement. with Pool(os.cpu_count()) as p: result = p.imap(clean_up, k, 50) for r in result: print(r) In https://docs.python.org/3.4/library/multiprocessing.html?highlight=process#using-a-pool-of-workers I found the correct example. I'm not sure should me add example or warning in imap function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 00:29:03 2018 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 18 Jul 2018 04:29:03 +0000 Subject: [issue34134] multiprocessing memory huge usage In-Reply-To: <1531800230.72.0.56676864532.issue34134@psf.upfronthosting.co.za> Message-ID: <1531888143.19.0.56676864532.issue34134@psf.upfronthosting.co.za> Xiang Zhang added the comment: Why accessing the result outside of with block? The pool is terminated while exiting the block before the work is done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 01:02:59 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 18 Jul 2018 05:02:59 +0000 Subject: [issue34142] Windows launcher version lookup flawed In-Reply-To: <1531879775.21.0.56676864532.issue34142@psf.upfronthosting.co.za> Message-ID: <1531890179.57.0.56676864532.issue34142@psf.upfronthosting.co.za> Steve Dower added the comment: The behavior is correct, so the documentation needs fixing. Which page has that example on it? Is it assuming that you only have 3.1 installed? ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 01:22:46 2018 From: report at bugs.python.org (LarryZA) Date: Wed, 18 Jul 2018 05:22:46 +0000 Subject: [issue34142] Windows launcher version lookup flawed In-Reply-To: <1531879775.21.0.56676864532.issue34142@psf.upfronthosting.co.za> Message-ID: <1531891366.04.0.56676864532.issue34142@psf.upfronthosting.co.za> LarryZA added the comment: https://docs.python.org/3/using/windows.html Section 3.4.4.2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 02:16:46 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 18 Jul 2018 06:16:46 +0000 Subject: [issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party yt module fails on Python 3.5) In-Reply-To: <1442494739.31.0.584117765088.issue25150@psf.upfronthosting.co.za> Message-ID: <1531894606.6.0.56676864532.issue25150@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Yes, why not fix this by putting the offending code under "#ifndef _OPENMP"? What would be even better if is pyatomic.h wasn't included in Python.h, which should be fine since pyatomic.h doesn't have any public APIs. Maybe we can do that for 3.8. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 03:07:18 2018 From: report at bugs.python.org (Eryk Sun) Date: Wed, 18 Jul 2018 07:07:18 +0000 Subject: [issue34142] Windows launcher version lookup flawed In-Reply-To: <1531879775.21.0.56676864532.issue34142@psf.upfronthosting.co.za> Message-ID: <1531897638.44.0.56676864532.issue34142@psf.upfronthosting.co.za> Eryk Sun added the comment: This line in the docs is incorrect: If PY_PYTHON=3 and PY_PYTHON3=3.1, the commands python and python3 will both use specifically 3.1 It implies that setting the `python` virtual command to "3" or "2" will use the configured version of the `python3` or `python2` virtual command. As implemented, these three virtual commands are separately configured. The `python` command is different in one way, since it's also the overall default. If the version set for `python2` or `python3` doesn't match an installed version, that's the end of the search. OTOH, the `python` command will continue to search for any version. For a shebang it prefers "2" over "3", and vice versa for the REPL or a script without a shebang. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 03:10:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 18 Jul 2018 07:10:55 +0000 Subject: [issue34141] Speed up pickling simple non-recusive values In-Reply-To: <1531846146.68.0.56676864532.issue34141@psf.upfronthosting.co.za> Message-ID: <1531897855.93.0.56676864532.issue34141@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 5d4cb54800966947db2e86f65fb109c5067076be by Serhiy Storchaka in branch 'master': bpo-34141: Optimized pickling simple non-recursive values. (GH-8318) https://github.com/python/cpython/commit/5d4cb54800966947db2e86f65fb109c5067076be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 03:20:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 18 Jul 2018 07:20:57 +0000 Subject: [issue34141] Speed up pickling simple non-recusive values In-Reply-To: <1531846146.68.0.56676864532.issue34141@psf.upfronthosting.co.za> Message-ID: <1531898457.12.0.56676864532.issue34141@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 Wed Jul 18 03:26:34 2018 From: report at bugs.python.org (lktoken) Date: Wed, 18 Jul 2018 07:26:34 +0000 Subject: [issue34143] There is a constant definition error in errno.py Message-ID: <1531898794.31.0.56676864532.issue34143@psf.upfronthosting.co.za> New submission from lktoken : In errno.py, the constant EDEADLK has a defined value of 11, and the constant EAGAIN has a defined value of 35, which is exactly the opposite of the linux constant definition. See: https://www.thegeekstuff.com/2010/10/linux -error-codes/. ---------- components: Library (Lib), macOS files: pythonbug.png messages: 321863 nosy: lktoken, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: There is a constant definition error in errno.py type: behavior versions: Python 2.7 Added file: https://bugs.python.org/file47703/pythonbug.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 03:43:49 2018 From: report at bugs.python.org (Windson Yang) Date: Wed, 18 Jul 2018 07:43:49 +0000 Subject: [issue34134] multiprocessing memory huge usage In-Reply-To: <1531800230.72.0.56676864532.issue34134@psf.upfronthosting.co.za> Message-ID: <1531899829.39.0.56676864532.issue34134@psf.upfronthosting.co.za> Windson Yang added the comment: Yes, we should not. But we can do this when use map function. the document gives a good example but doesn't say much about real differences between map and imap. Maybe we should add some notes like INADA suggest. map function will convert iterable to list if it doesn't implement __len__ function, so if you are using a generator, you should consider use imap. As well as add a warning about don't try to access the result outside the with statement. But if you guys think the docs are good enough, please close this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 04:08:43 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 08:08:43 +0000 Subject: [issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party yt module fails on Python 3.5) In-Reply-To: <1442494739.31.0.584117765088.issue25150@psf.upfronthosting.co.za> Message-ID: <1531901323.55.0.56676864532.issue25150@psf.upfronthosting.co.za> STINNER Victor added the comment: (Ah, Benjamin restarted the discussion, so I reopen this issue.) > I understand the desire to compile Python with OpenMP. I'm not sure that I understood the use case. Do you want to only compile Python core ("python3" binary") or just stdlib C extensions, or both? > But the resolution here is hiding _Py_atomic symbols all the time, even when OpenMP isn't involved, and even when building a standard extension module. Sorry, but I don't understand the problem. Why is it an issue to hide _Py_atomic symbols? ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 04:09:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 08:09:37 +0000 Subject: [issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party module fails on Python 3.5) In-Reply-To: <1442494739.31.0.584117765088.issue25150@psf.upfronthosting.co.za> Message-ID: <1531901377.16.0.56676864532.issue25150@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue is very specific to *third party* extensions, not C extensions which are part of the standard library. That's why I asked if it wouldn't be better to open a new issue, if your use case concerns the stdlib and/or Python core. ---------- title: 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party yt module fails on Python 3.5) -> 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party module fails on Python 3.5) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 04:15:01 2018 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 18 Jul 2018 08:15:01 +0000 Subject: [issue34134] multiprocessing memory huge usage In-Reply-To: <1531800230.72.0.56676864532.issue34134@psf.upfronthosting.co.za> Message-ID: <1531901701.59.0.56676864532.issue34134@psf.upfronthosting.co.za> Xiang Zhang added the comment: I'm +1 for INADA's change, but not more examples trying to distinguish every detail difference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 04:18:42 2018 From: report at bugs.python.org (Lorenz Mende) Date: Wed, 18 Jul 2018 08:18:42 +0000 Subject: [issue34144] venv activate.bat reset codepage fails on windows 10 Message-ID: <1531901922.72.0.56676864532.issue34144@psf.upfronthosting.co.za> New submission from Lorenz Mende : environment: Windows 10 Pro German/ 1803 cpython @master When running the venv activate.bat the script fails to reset the codepage to the stored. # Parameterformat falsch - 65001. It seems that version 1803 brought a small change to the output of chcp.com - a dot is appended at the output The issue can be solved by modifying the codepage grep of activate.bat: for /f "tokens=2 delims=:." %%a in ('"%SystemRoot%\System32\chcp.com"') do (... A pull will be requested. ---------- components: Library (Lib) messages: 321868 nosy: LorenzMende priority: normal severity: normal status: open title: venv activate.bat reset codepage fails on windows 10 type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 04:22:28 2018 From: report at bugs.python.org (Lorenz Mende) Date: Wed, 18 Jul 2018 08:22:28 +0000 Subject: [issue34144] venv activate.bat reset codepage fails on windows 10 In-Reply-To: <1531901922.72.0.56676864532.issue34144@psf.upfronthosting.co.za> Message-ID: <1531902148.39.0.56676864532.issue34144@psf.upfronthosting.co.za> Change by Lorenz Mende : ---------- keywords: +patch pull_requests: +7857 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 04:33:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 08:33:52 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531902832.26.0.56676864532.issue34060@psf.upfronthosting.co.za> STINNER Victor added the comment: I found a command to get the CPU usage in percent *per* CPU. Here with 2 CPUs: vstinner at WIN C:\vstinner\python\master>wmic cpu get loadpercentage LoadPercentage 100 100 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 04:46:07 2018 From: report at bugs.python.org (Bence Romsics) Date: Wed, 18 Jul 2018 08:46:07 +0000 Subject: [issue34145] uuid3 and uuid5 hard to use portably between Python 2 and 3 Message-ID: <1531903567.77.0.56676864532.issue34145@psf.upfronthosting.co.za> New submission from Bence Romsics : The issue I'd like to report may not be an outright bug neither in cPython 2 nor in cPython 3, but more of a wishlist item to help Python programmers writing UUID-handling code that's valid in Python 2 and 3 at the same time. Please consider these one-liners: $ python2 -c 'import uuid ; uuid.uuid5(namespace=uuid.UUID("850aeee8-e173-4da1-9d6b-dd06e4b06747"), name="foo")' $ python3 -c 'import uuid ; uuid.uuid5(namespace=uuid.UUID("850aeee8-e173-4da1-9d6b-dd06e4b06747"), name="foo")' As long as the 'name' input to uuid.uuid3() or uuid.uuid5() is the literal string type of the relevant Python version there's no problem at all. However if you'd like to handle both unicode and non-unicode 'name' input in valid Python2/3 code then I find that's impossible to express without relying on Python version checking. cPython2's uuid module is incompatible with unicode input: $ python2 -c 'import uuid ; uuid.uuid5(namespace=uuid.UUID("850aeee8-e173-4da1-9d6b-dd06e4b06747"), name=u"foo")' Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.7/uuid.py", line 589, in uuid5 hash = sha1(namespace.bytes + name).digest() UnicodeDecodeError: 'ascii' codec can't decode byte 0x85 in position 0: ordinal not in range(128) cPython3's uuid module is incompatible with non-unicode input: $ python3 -c 'import uuid ; uuid.uuid5(namespace=uuid.UUID("850aeee8-e173-4da1-9d6b-dd06e4b06747"), name=b"foo")' Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.5/uuid.py", line 608, in uuid5 hash = sha1(namespace.bytes + bytes(name, "utf-8")).digest() TypeError: encoding without a string argument The reason is obvious looking at the uuid modules' source code: cPython 2.7: https://github.com/python/cpython/blob/ea9a0994cd0f4bd37799b045c34097eb21662b3d/Lib/uuid.py#L603 cPython 3.6: https://github.com/python/cpython/blob/e9e2fd75ccbc6e9a5221cf3525e39e9d042d843f/Lib/uuid.py#L628 Therefore portable code has to resort to version checking like this: import six import uuid if six.PY2: name = name.encode('utf-8') uuid.uuid5(namespace=namespace, name=name) IMHO this inconvenience could be avoided if cPython2's uuid.uuid3() and uuid.uuid5() had been changed to also accept unicode 'name' arguments and encode() them implicitly. What do you think? ---------- components: Library (Lib) messages: 321870 nosy: rubasov priority: normal severity: normal status: open title: uuid3 and uuid5 hard to use portably between Python 2 and 3 versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 05:22:06 2018 From: report at bugs.python.org (Roundup Robot) Date: Wed, 18 Jul 2018 09:22:06 +0000 Subject: [issue34139] Remove stale unix datagram socket before binding In-Reply-To: <1531835543.49.0.56676864532.issue34139@psf.upfronthosting.co.za> Message-ID: <1531905726.68.0.56676864532.issue34139@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +7858 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 05:39:06 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 18 Jul 2018 09:39:06 +0000 Subject: [issue34143] There is a constant definition error in errno.py In-Reply-To: <1531898794.31.0.56676864532.issue34143@psf.upfronthosting.co.za> Message-ID: <1531906746.1.0.56676864532.issue34143@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Can you please add some info on how the errorcode dictionary is generated as shown in the picture along with your OS, system information? They seem to have the right values as per the Linux error codes in my Ubuntu box. I might be wrong on the OS on which this happens since you have mentioned it's the opposite of Linux. cpython git:(master) ? rlwrap ./python Python 3.8.0a0 (heads/master:35c0809, Jul 16 2018, 10:29:23) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import errno >>> errno.EDEADLK 35 >>> errno.EAGAIN 11 ? cpython git:(master) ? rlwrap python2.7 Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import errno >>> errno.EDEADLK 35 >>> errno.EAGAIN 11 Machine details and values in header files as below ? cpython git:(master) ? rg 'EDEADLK|EAGAIN' /usr/include/asm-generic/errno-base.h /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h 14:#define EAGAIN 11 /* Try again */ /usr/include/asm-generic/errno.h 6:#define EDEADLK 35 /* Resource deadlock would occur */ ? cpython git:(master) ? uname -a Linux ubuntu-s-1vcpu-1gb-blr1-01 4.4.0-127-generic #153-Ubuntu SMP Sat May 19 10:58:46 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 05:53:30 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 18 Jul 2018 09:53:30 +0000 Subject: [issue34143] There is a constant definition error in errno.py In-Reply-To: <1531898794.31.0.56676864532.issue34143@psf.upfronthosting.co.za> Message-ID: <1531907610.46.0.56676864532.issue34143@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Please ignore about how it's generated. I tried `errno.errorcode` and can get the dictionary as in the picture with https://docs.python.org/3.8/library/errno.html#errno.errorcode. I think this has to be used as below and also would like to know how other error names have the correct numeric value except for the EDEADLK and EAGAIN which is generated at Modules/errnomodule.c . Using them with `os.strerror` also gets me the correct information ? cpython git:(master) ? rlwrap ./python Python 3.8.0a0 (heads/master:35c0809, Jul 16 2018, 10:29:23) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.strerror(35) 'Resource deadlock avoided' >>> os.strerror(11) 'Resource temporarily unavailable' Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 05:55:58 2018 From: report at bugs.python.org (Govind Vijay) Date: Wed, 18 Jul 2018 09:55:58 +0000 Subject: [issue26543] [EASY] imaplib noop Debug: bytes vs Unicode bug in debug mode In-Reply-To: <1457738623.54.0.0867122071018.issue26543@psf.upfronthosting.co.za> Message-ID: <1531907758.72.0.56676864532.issue26543@psf.upfronthosting.co.za> Change by Govind Vijay : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 06:03:16 2018 From: report at bugs.python.org (Windson Yang) Date: Wed, 18 Jul 2018 10:03:16 +0000 Subject: [issue34134] multiprocessing memory huge usage In-Reply-To: <1531800230.72.0.56676864532.issue34134@psf.upfronthosting.co.za> Message-ID: <1531908196.51.0.56676864532.issue34134@psf.upfronthosting.co.za> Change by Windson Yang : ---------- keywords: +patch pull_requests: +7859 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 06:09:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 10:09:54 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531908594.57.0.56676864532.issue34130@psf.upfronthosting.co.za> STINNER Victor added the comment: On Windows 10, when I run "python -m test test_signal -v -F" in 3 terminals in parallel, sometimes test_socket() fails. I debugged test_socket() and I validated that the C signal handler called send() and that the signal byte (signal number) has been sent properly (send() returns 1) when the bug occurs. I added an internal "static size_t written = 0;" variable which is incremented when send() succeed and I added a signal.get_written() method to get the value after read.recv(1) fails in the unit test. But recv() fails with BlockingIOError, as if the single byte has not be transfered from the write end to the read end of the TCP socket pair. On Windows, a socket pair is a pair of two TCP sockets connected on the local link (IPv4 127.0.0.1). It's not a UNIX socket as on Linux. Questions. (*) Is the socket pair properly connected when the bug occurs? socket.socketpair() sets the socket as non-blocking to call connect() and ignores when connect() fails with BlockingIOError or InterruptedError (EINTR). I modified the Windows implementation of socketpair() (in socket.py) to use a blocking call and the bug occurs even if connect() is made in blocking mode. I also checked that csock.getpeername() == lsock.getsockname(). So the socket is connected. (*) Does the socket pair use buffering somewhere? Both socekts are set to non-blocking mode by test_signal.test_socket(). By default, SO_SNDBUF is 64 KiB (65 536 bytes) for the write end of the socket pair, and SO_RCVBUF is 64 KiB (65 536 bytes) for the read end of the socket pair. It *seems* like adding the following call to test_socket() works around the bug: write.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 0) I'm not sure if it's "correct" to use SO_SNDBUF=0. I'm not sure that SO_SNDBUF=0 really *fix* the bug: it's a race condition, so it's hard to check if it's really fixed or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 06:16:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 10:16:58 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531909018.85.0.56676864532.issue34130@psf.upfronthosting.co.za> STINNER Victor added the comment: > write.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 0) Instead of that, I also tried: read.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) write.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) But I'm able to reproduce the bug with TCP_NODELAY=1 on the write end. (The option should have no impact on the read end, but I added it anyway, just in case, I still reproduce the bug.) MSDN documentation for TCP_NODELAY: "Disables the Nagle algorithm for send coalescing.This socket option is included for backward compatibility with Windows Sockets 1.1 " https://docs.microsoft.com/en-us/windows/desktop/api/winsock/nf-winsock-setsockopt ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 06:18:01 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 10:18:01 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531909081.97.0.56676864532.issue34130@psf.upfronthosting.co.za> STINNER Victor added the comment: Note: socket.socketpair() has been implemented for Windows in pure Python in Python 3.5: bpo-18643. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 06:28:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 10:28:24 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531909704.54.0.56676864532.issue34130@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, I found a test written by Nathaniel in trio source code and he wrote that "if SNDBUF = 0 freezes, so that's useless" :-) https://github.com/python-trio/trio/blob/master/notes-to-self/socketpair-buffering.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 06:38:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 10:38:34 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531910314.53.0.56676864532.issue34130@psf.upfronthosting.co.za> STINNER Victor added the comment: Using "write.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 0)", I ran a stress test on test_socket() in 3 different terminals and I failed to reproduce the bug, whereas the same test (in 3 terminals) usually reproduces the bug in less than 30 seconds. Using "write.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 1)", I still reproduce the bug. It seems like Windows behaves differently with SO_SNDBUF=0 as if the socket has really no kernel buffer and so respects user preference for SO_SNDBUF=0 ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 06:41:57 2018 From: report at bugs.python.org (Dan Snider) Date: Wed, 18 Jul 2018 10:41:57 +0000 Subject: [issue34146] PyCData_Type.tp_hash doesn't use PyObject_HashNotImplemented Message-ID: <1531910517.42.0.56676864532.issue34146@psf.upfronthosting.co.za> New submission from Dan Snider : So not only does the function it does use (`PyCData_nohash`) prevent PyType_Ready from setting _ctypes._SimpleCData.__dict__["__hash__"] to `None`, (contrary to to every other unhashable type in the standard library) but the error message it returns is less detailed. It seems like a big deal if this were to be changed as it could break backwards compatibility so I won't open PR myself as I'm still not that familiar with the contribution process. ---------- components: ctypes messages: 321878 nosy: bup priority: normal severity: normal status: open title: PyCData_Type.tp_hash doesn't use PyObject_HashNotImplemented versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 06:48:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 10:48:02 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531910882.54.0.56676864532.issue34130@psf.upfronthosting.co.za> STINNER Victor added the comment: I found two different articles on microsoft.com which confirms that SO_SNDBUF=0 is valid and is intended to completely disable kernel buffering: * https://support.microsoft.com/en-gb/help/181611/socket-overlapped-i-o-versus-blocking-nonblocking-mode * https://blogs.msdn.microsoft.com/larryosterman/2004/08/06/the-consequences-of-ignoring-nagling-and-delayed-acks/ "If SO_SNDBUF=0, each send() or WriteFile() must wait for an acknowledgement from the other side before returning. (That is the only way for the protocol to implement retransmissions)" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 08:18:26 2018 From: report at bugs.python.org (Govind Vijay) Date: Wed, 18 Jul 2018 12:18:26 +0000 Subject: [issue16512] imghdr doesn't recognize variant jpeg formats In-Reply-To: <1353406880.2.0.236043197389.issue16512@psf.upfronthosting.co.za> Message-ID: <1531916306.38.0.56676864532.issue16512@psf.upfronthosting.co.za> Change by Govind Vijay : ---------- pull_requests: +7860 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 08:37:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 12:37:02 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531917422.11.0.56676864532.issue34130@psf.upfronthosting.co.za> STINNER Victor added the comment: I ran "python -m test test_signal -v -F" 4 times in parallel (in 4 terminals), and I reproduced test_warn_on_full_buffer() failure after one hour: 2 terminals got the failures (the 2 others are still running). I ran this test using "write.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 0)" fix on test_socket(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 09:14:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 13:14:53 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531919693.37.0.56676864532.issue34130@psf.upfronthosting.co.za> STINNER Victor added the comment: I modified test_warn_on_full_buffer() to fill the socket pair using chunks of 64 KiB instead of sending b'x' byte per byte, just to make the test faster. Using two terminals, I ran "python -m test test_signal -m test_warn_on_full_buffer -F": I reproduced the bug in 2 minutes. Ok. The problem is in that is that the code responsible to full the socketpair is not reliable. *Sometimes*, send() blocks, whereas if I retry *immediately*, the send() complete (the socketpair is not full). The issue seems to be related to the test_socket() failure where send() is "asynchronous". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 09:51:41 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Wed, 18 Jul 2018 13:51:41 +0000 Subject: [issue34147] doc Describe briefly sampling w/out replacement in random Message-ID: <1531921901.63.0.56676864532.issue34147@psf.upfronthosting.co.za> New submission from Andr?s Delfino : I think a short footnote explaining these terms could be useful to those without statistics knowledge. ---------- assignee: docs at python components: Documentation messages: 321882 nosy: adelfino, docs at python priority: normal severity: normal status: open title: doc Describe briefly sampling w/out replacement in random type: enhancement versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 09:56:35 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Wed, 18 Jul 2018 13:56:35 +0000 Subject: [issue34147] doc Describe briefly sampling w/out replacement in random In-Reply-To: <1531921901.63.0.56676864532.issue34147@psf.upfronthosting.co.za> Message-ID: <1531922195.37.0.56676864532.issue34147@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- keywords: +patch pull_requests: +7861 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 10:23:04 2018 From: report at bugs.python.org (yjq) Date: Wed, 18 Jul 2018 14:23:04 +0000 Subject: [issue34148] Fatal error on SSL transport Message-ID: <1531923784.93.0.56676864532.issue34148@psf.upfronthosting.co.za> New submission from yjq : Fatal read error on socket transport protocol: transport: <_SelectorSocketTransport fd=47 read=polling write=> Traceback (most recent call last): File "/var/containers/Bundle/Application/9F565D30-C54B-4210-902B-874D7A5AB814/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/asyncio/selector_events.py", line 725, in _read_ready data = self._sock.recv(self.max_size) TimeoutError: [Errno 60] Operation timed out ---------- components: asyncio messages: 321883 nosy: asvetlov, yjqiang, yselivanov priority: normal severity: normal status: open title: Fatal error on SSL transport type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 10:25:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 14:25:35 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531923935.4.0.56676864532.issue34130@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +7862 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 10:26:40 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 18 Jul 2018 14:26:40 +0000 Subject: [issue30480] samefile and sameopenfile fail for WebDAV mapped drives In-Reply-To: <1495788627.48.0.260495922264.issue30480@psf.upfronthosting.co.za> Message-ID: <1531924000.23.0.56676864532.issue30480@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 10:26:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 14:26:59 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531924019.03.0.56676864532.issue34130@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote a simple fix for test_signal.test_socket(): PR 8326. Just configure the read end of the socket pair as blocking, so read.recv(1) blocks until we get the signal handler. This fix is simple and should be more portable than my previous attempt of workaround: write.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 0) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 10:33:03 2018 From: report at bugs.python.org (yjq) Date: Wed, 18 Jul 2018 14:33:03 +0000 Subject: [issue34148] Fatal error on SSL transport In-Reply-To: <1531923784.93.0.56676864532.issue34148@psf.upfronthosting.co.za> Message-ID: <1531924383.92.0.56676864532.issue34148@psf.upfronthosting.co.za> yjq added the comment: More information: https://github.com/omz/Pythonista-Issues/issues/555 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 10:54:39 2018 From: report at bugs.python.org (yjq) Date: Wed, 18 Jul 2018 14:54:39 +0000 Subject: [issue34148] Fatal error on SSL transport In-Reply-To: <1531923784.93.0.56676864532.issue34148@psf.upfronthosting.co.za> Message-ID: <1531925679.95.0.56676864532.issue34148@psf.upfronthosting.co.za> Change by yjq : ---------- nosy: -asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 11:00:35 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 18 Jul 2018 15:00:35 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531926035.03.0.56676864532.issue34060@psf.upfronthosting.co.za> Steve Dower added the comment: > wmic cpu ... This is the WMI solution we are trying to avoid. But then again, if it's solely for our tests, perhaps the best way to approach this is to start a Python thread that periodically runs this command? I also haven't seen it suggested, but perhaps GetProcessTimes (https://docs.microsoft.com/en-us/windows/desktop/api/processthreadsapi/nf-processthreadsapi-getprocesstimes) (or GetThreadTimes) would provide enough information to detect the same information? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 11:12:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 15:12:51 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531926771.88.0.56676864532.issue34130@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +7863 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 11:12:57 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 18 Jul 2018 15:12:57 +0000 Subject: [issue34138] imaplib RFC 6855 issue In-Reply-To: <1531830667.9.0.56676864532.issue34138@psf.upfronthosting.co.za> Message-ID: <1531926777.18.0.56676864532.issue34138@psf.upfronthosting.co.za> R. David Murray added the comment: Would you care to propose a patch? That's likely the only way this is going to get fixed, unfortunately, as currently we have no one on the core team interested in imaplib. Which means it is also going to be hard to come up with someone to do the review (I'm the most likely candidate and have a distinct lack of time currently), but we'll deal with that when we get that far. ---------- title: RFC 6855 issue -> imaplib RFC 6855 issue _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 11:14:21 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 18 Jul 2018 15:14:21 +0000 Subject: [issue34138] imaplib RFC 6855 issue In-Reply-To: <1531830667.9.0.56676864532.issue34138@psf.upfronthosting.co.za> Message-ID: <1531926861.54.0.56676864532.issue34138@psf.upfronthosting.co.za> R. David Murray added the comment: Maybe we'll be luck and Maciej will still be interested :) ---------- nosy: +maciej.szulik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 11:16:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 15:16:02 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531926962.66.0.56676864532.issue34130@psf.upfronthosting.co.za> STINNER Victor added the comment: I tried to modify the test_warn_on_full_buffer() code filling the socketpair buffer: * iterate on multiple chunk sizes: 2**16, 2**10, 2**5, 1 bytes * first try in non-blocking mode then retry with a timeout of 100 ms * I also tried to play with SO_SNDBUF and SO_RCVBUF socket options The problem is that I failed to fail a reliable way to fill the socketpair buffer. I will stick with Nathaniel's very simple idea: retry once if the test fails. I implemented exactly this idea in my PR 8327 (with additional minor changes to enhance the test). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 11:44:07 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 15:44:07 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531928647.63.0.56676864532.issue34130@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 99bb6df66a42625367c4f38e6802c8bb527baf4a by Victor Stinner in branch 'master': bpo-34130: Fix test_signal.test_socket() (GH-8326) https://github.com/python/cpython/commit/99bb6df66a42625367c4f38e6802c8bb527baf4a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 12:06:09 2018 From: report at bugs.python.org (Alexander Marshalov) Date: Wed, 18 Jul 2018 16:06:09 +0000 Subject: [issue34149] Behavior of the min/max with key=None Message-ID: <1531929969.94.0.56676864532.issue34149@psf.upfronthosting.co.za> New submission from Alexander Marshalov <_ at marshalov.org>: I was faced with the fact that the behavior of the functions "min"/"max" and "sorted" is a little different. For example, this code works fine: >>> sorted([3, 2, 1], key=None) [1, 2, 3] But the same example for "min" and "max" doesn't work: >>> min([3, 2, 1], key=None) Traceback (most recent call last): File "", line 1, in TypeError: 'NoneType' object is not callable That is why the heapq library has this code: ... def nsmallest(n, iterable, key=None): ... if key is None: result = min(it, default=sentinel) else: result = min(it, default=sentinel, key=key) ... At the same time, there are many places where such checks are not performed for the "sorted" function. I think the behavior of the "min" / "max" / "sorted" functions should be unified. That is, they should work as if "None" is the default value for "key". ---------- messages: 321891 nosy: amper priority: normal severity: normal status: open title: Behavior of the min/max with key=None type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 12:09:11 2018 From: report at bugs.python.org (Alexander Marshalov) Date: Wed, 18 Jul 2018 16:09:11 +0000 Subject: [issue34149] Behavior of the min/max with key=None In-Reply-To: <1531929969.94.0.56676864532.issue34149@psf.upfronthosting.co.za> Message-ID: <1531930151.31.0.56676864532.issue34149@psf.upfronthosting.co.za> Change by Alexander Marshalov <_ at marshalov.org>: ---------- keywords: +patch pull_requests: +7864 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 12:29:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 16:29:57 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531931397.79.0.56676864532.issue34130@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 686b4b5ff219ed66714f3b811815776dafadc23b by Victor Stinner in branch 'master': bpo-34130: Fix test_signal.test_warn_on_full_buffer() (GH-8327) https://github.com/python/cpython/commit/686b4b5ff219ed66714f3b811815776dafadc23b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 12:34:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 16:34:51 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531931691.17.0.56676864532.issue34130@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +7866 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 12:48:12 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 18 Jul 2018 16:48:12 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531932492.42.0.56676864532.issue34130@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7867 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 12:48:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 16:48:44 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531932524.4.0.56676864532.issue34130@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 2.7 is not impacted: it doesn't have test_socket() nor test_warn_on_full_buffer() tests in test_signal. Python 3.6 only has test_socket() in test_signal. ---------- versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 12:49:30 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 16:49:30 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531932570.33.0.56676864532.issue34130@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 296e5720921f1837dfd09a16457ac5bba7cb1676 by Victor Stinner in branch '3.7': [3.7] bpo-34130: Fix 2 race conditions in test_signal (GH-8329) https://github.com/python/cpython/commit/296e5720921f1837dfd09a16457ac5bba7cb1676 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 12:54:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 16:54:44 +0000 Subject: [issue34150] test_multiprocessing_spawn: Dangling processes leaked on AMD64 FreeBSD 10.x Shared 3.x Message-ID: <1531932884.13.0.56676864532.issue34150@psf.upfronthosting.co.za> New submission from STINNER Victor : https://buildbot.python.org/all/#/builders/87/builds/1175 0:07:52 load avg: 4.38 [369/417/1] test_multiprocessing_spawn failed (env changed) (2 min 43 sec) -- running: test_lib2to3 (1 min 11 sec), test_tools (2 min 4 sec) (...) test_lock (test.test_multiprocessing_spawn.WithProcessesTestLock) ... ok test_lock_context (test.test_multiprocessing_spawn.WithProcessesTestLock) ... ok test_rlock (test.test_multiprocessing_spawn.WithProcessesTestLock) ... ok test_enable_logging (test.test_multiprocessing_spawn.WithProcessesTestLogging) ... ok test_level (test.test_multiprocessing_spawn.WithProcessesTestLogging) ... ok test_rapid_restart (test.test_multiprocessing_spawn.WithProcessesTestManagerRestart) ... ok Warning -- Dangling processes: {} test_access (test.test_multiprocessing_spawn.WithProcessesTestPicklingConnections) ... ok test_pickling (test.test_multiprocessing_spawn.WithProcessesTestPicklingConnections) ... ok test_boundaries (test.test_multiprocessing_spawn.WithProcessesTestPoll) ... ok test_dont_merge (test.test_multiprocessing_spawn.WithProcessesTestPoll) ... ok (...) 1 test altered the execution environment: test_multiprocessing_spawn (...) Tests result: ENV CHANGED ---------- components: Tests messages: 321895 nosy: vstinner priority: normal severity: normal status: open title: test_multiprocessing_spawn: Dangling processes leaked on AMD64 FreeBSD 10.x Shared 3.x versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 12:59:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 16:59:38 +0000 Subject: [issue32692] test_threading.test_set_and_clear fails in AppVeyor CI In-Reply-To: <1517129650.59.0.467229070634.issue32692@psf.upfronthosting.co.za> Message-ID: <1531933178.34.0.56676864532.issue32692@psf.upfronthosting.co.za> STINNER Victor added the comment: Another failure on Python 3.6 on my PR 8330: https://ci.appveyor.com/project/python/cpython/build/3.6build19434/job/n24xudh8egp8i78j ====================================================================== FAIL: test_set_and_clear (test.test_threading.EventTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\test\lock_tests.py", line 417, in test_set_and_clear self.assertEqual(results, [True] * N) AssertionError: Lists differ: [False, False, False, True, True] != [True, True, True, True, True] First differing element 0: False True - [False, False, False, True, True] + [True, True, True, True, True] ---------------------------------------------------------------------- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 12:59:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 16:59:51 +0000 Subject: [issue32692] [3.6] test_threading.test_set_and_clear fails in AppVeyor CI In-Reply-To: <1517129650.59.0.467229070634.issue32692@psf.upfronthosting.co.za> Message-ID: <1531933191.0.0.56676864532.issue32692@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: test_threading.test_set_and_clear fails in AppVeyor CI -> [3.6] test_threading.test_set_and_clear fails in AppVeyor CI _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 13:02:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 17:02:09 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531933329.41.0.56676864532.issue34130@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset e13180bc4c40a9ac300590c62a6efbcaf10ae6df by Victor Stinner (Miss Islington (bot)) in branch '3.6': bpo-34130: Fix test_signal.test_socket() (GH-8326) (GH-8330) https://github.com/python/cpython/commit/e13180bc4c40a9ac300590c62a6efbcaf10ae6df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 13:03:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 17:03:02 +0000 Subject: [issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor In-Reply-To: <1531779542.02.0.56676864532.issue34130@psf.upfronthosting.co.za> Message-ID: <1531933382.91.0.56676864532.issue34130@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, test_signal should now be more reliable on Windows in 3.6, 3.7 and master branches. If test_signal.test_warn_on_full_buffer() fails again, we should just increase the timeout of 50 ms to 100 ms or more. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 13:04:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 17:04:20 +0000 Subject: [issue32692] [3.6] test_threading.test_set_and_clear fails in AppVeyor CI In-Reply-To: <1517129650.59.0.467229070634.issue32692@psf.upfronthosting.co.za> Message-ID: <1531933460.23.0.56676864532.issue32692@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 3.7 and master are likely impacted as well since Lib/test/lock_tests.py is the same file in 3.6, 3.7 and master branches. ---------- versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 13:04:30 2018 From: report at bugs.python.org (Alan Huang) Date: Wed, 18 Jul 2018 17:04:30 +0000 Subject: [issue33808] ssl.get_server_certificate fails with openssl 1.1.0 but works with 1.0.2g for self-signed certificate In-Reply-To: <1528462754.61.0.592728768989.issue33808@psf.upfronthosting.co.za> Message-ID: <1531933470.85.0.56676864532.issue33808@psf.upfronthosting.co.za> Alan Huang added the comment: This is an issue of cipher support, not a Python bug. mail.mani.pt supports the following (outdated) ciphers: RC4-SHA (0x05) RC4-MD5 (0x04) DES-CBC3-SHA (0x0a) EXP1024-DES-CBC-SHA (0x62) DES-CBC-SHA (0x09) EXP1024-RC4-SHA (0x64) EXP-RC2-CBC-MD5 (0x06) EXP-RC4-MD5 (0x03) OpenSSL 1.0.2k supports RC4-SHA, RC4-MD5, and DES-CBC3-SHA. OpenSSL 1.1.0g supports none of the above ciphers. As such, OpenSSL 1.1.0 cannot negotiate a shared cipher suite, but OpenSSL 1.0.2g can. Update your mailserver to use modern cipher suites and protocols. ---------- nosy: +Alan.Huang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 13:08:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 17:08:14 +0000 Subject: [issue32692] [3.6] test_threading.test_set_and_clear fails in AppVeyor CI In-Reply-To: <1517129650.59.0.467229070634.issue32692@psf.upfronthosting.co.za> Message-ID: <1531933694.27.0.56676864532.issue32692@psf.upfronthosting.co.za> STINNER Victor added the comment: The test rely on time. Using smaller timeouts, I'm able to reproduce the bug on Linux as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 13:08:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 17:08:23 +0000 Subject: [issue32692] [3.6] test_threading.test_set_and_clear fails in AppVeyor CI In-Reply-To: <1517129650.59.0.467229070634.issue32692@psf.upfronthosting.co.za> Message-ID: <1531933703.66.0.56676864532.issue32692@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +7868 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 13:10:07 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 17:10:07 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531933807.52.0.56676864532.issue34060@psf.upfronthosting.co.za> STINNER Victor added the comment: > I also haven't seen it suggested, but perhaps GetProcessTimes (https://docs.microsoft.com/en-us/windows/desktop/api/processthreadsapi/nf-processthreadsapi-getprocesstimes) (or GetThreadTimes) would provide enough information to detect the same information? My intent is to get an idea if the whole system is busy. Not if the current Python process is busy. Most buildbots run tests with multiple worker processes (at least 2). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 13:25:08 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 18 Jul 2018 17:25:08 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531934708.79.0.56676864532.issue34060@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: psutil exposes this functionality as "psutil.cpu_percent()": https://github.com/giampaolo/psutil/blob/ac9dccab6b038835b5d612f92cf4804ec2662c2e/psutil/_psutil_windows.c#L992 https://github.com/giampaolo/psutil/blob/ac9dccab6b038835b5d612f92cf4804ec2662c2e/psutil/__init__.py#L1675 I'm not sure if it's worth it to copy all that stuff into Modules/_winapi.c and test/libregrtest/main.py though. It would probably be simpler to change the policy and allow (at least some) some third party libs in cPython's test suite. =) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 13:26:41 2018 From: report at bugs.python.org (Ammar Askar) Date: Wed, 18 Jul 2018 17:26:41 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531934801.23.0.56676864532.issue34060@psf.upfronthosting.co.za> Ammar Askar added the comment: > But then again, if it's solely for our tests, perhaps the best way to approach this is to start a Python thread that periodically runs this command? This sounds like a very good solution to me, it avoids adding the complexity of the C code. We actually have two options here, to keep the results consistent with the unix load, we can use `typeperf "\System\Processor Queue Length"` To get cpu usage, we can use the command Victor posted. I'll make an alternative PR with that today just so we can contrast the two approaches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 13:31:49 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Wed, 18 Jul 2018 17:31:49 +0000 Subject: [issue34151] use malloc() for better performance of some list operations Message-ID: <1531935109.04.0.56676864532.issue34151@psf.upfronthosting.co.za> New submission from Sergey Fedoseev : Currently list concatenation, slicing and repeating operations are using PyList_New() which allocates memory for the items by calloc(). malloc() could be used instead, since the allocated memory is overwritten by mentioned operations. I made benchmarks with this script: NAME=list-malloc-master.json python -m perf timeit --name slice0 -s "l = [None]*1000000" "l[:0]" --duplicate=2048 --append $NAME python -m perf timeit --name slice1 -s "l = [None]*1000000" "l[:1]" --duplicate=1024 --append $NAME python -m perf timeit --name slice2 -s "l = [None]*1000000" "l[:2]" --duplicate=1024 --append $NAME python -m perf timeit --name slice3 -s "l = [None]*1000000" "l[:3]" --duplicate=1024 --append $NAME python -m perf timeit --name slice1000000 -s "l = [None]*1000000" "l[:1000000]" --append $NAME python -m perf timeit --name cat0 -s "l = [None]*0" "l + l" --duplicate=1024 --append $NAME python -m perf timeit --name cat1 -s "l = [None]*1" "l * 1" --duplicate=1024 --append $NAME python -m perf timeit --name cat2 -s "l = [None]*2" "l * 1" --duplicate=1024 --append $NAME python -m perf timeit --name cat3 -s "l = [None]*3" "l * 1" --duplicate=1024 --append $NAME python -m perf timeit --name cat1000000 -s "l = [None]*1000000" "l * 1" --append $NAME python -m perf timeit --name 1x0 -s "l = [None]" "l * 0" --duplicate=1024 --append $NAME python -m perf timeit --name 1x1 -s "l = [None]" "l * 1" --duplicate=1024 --append $NAME python -m perf timeit --name 1x2 -s "l = [None]" "l * 2" --duplicate=1024 --append $NAME python -m perf timeit --name 1x3 -s "l = [None]" "l * 3" --duplicate=1024 --append $NAME python -m perf timeit --name 1x1000000 -s "l = [None]" "l * 1000000" --append $NAME Here's comparison table: +--------------+--------------------+------------------------------+ | Benchmark | list-malloc-master | list-malloc | +==============+====================+==============================+ | slice1 | 84.5 ns | 59.6 ns: 1.42x faster (-30%) | +--------------+--------------------+------------------------------+ | slice2 | 71.6 ns | 61.8 ns: 1.16x faster (-14%) | +--------------+--------------------+------------------------------+ | slice3 | 74.4 ns | 63.6 ns: 1.17x faster (-15%) | +--------------+--------------------+------------------------------+ | slice1000000 | 4.39 ms | 4.08 ms: 1.08x faster (-7%) | +--------------+--------------------+------------------------------+ | cat0 | 23.9 ns | 24.9 ns: 1.04x slower (+4%) | +--------------+--------------------+------------------------------+ | cat1 | 73.2 ns | 51.9 ns: 1.41x faster (-29%) | +--------------+--------------------+------------------------------+ | cat2 | 61.6 ns | 53.1 ns: 1.16x faster (-14%) | +--------------+--------------------+------------------------------+ | cat3 | 63.0 ns | 54.3 ns: 1.16x faster (-14%) | +--------------+--------------------+------------------------------+ | cat1000000 | 4.38 ms | 4.08 ms: 1.07x faster (-7%) | +--------------+--------------------+------------------------------+ | 1x0 | 27.1 ns | 27.7 ns: 1.02x slower (+2%) | +--------------+--------------------+------------------------------+ | 1x1 | 72.9 ns | 51.9 ns: 1.41x faster (-29%) | +--------------+--------------------+------------------------------+ | 1x2 | 60.9 ns | 52.9 ns: 1.15x faster (-13%) | +--------------+--------------------+------------------------------+ | 1x3 | 62.5 ns | 54.8 ns: 1.14x faster (-12%) | +--------------+--------------------+------------------------------+ | 1x1000000 | 2.67 ms | 2.34 ms: 1.14x faster (-12%) | +--------------+--------------------+------------------------------+ Not significant (1): slice0 ---------- components: Interpreter Core messages: 321905 nosy: sir-sigurd priority: normal severity: normal status: open title: use malloc() for better performance of some list operations type: performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 13:33:45 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Wed, 18 Jul 2018 17:33:45 +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: <1531935225.13.0.56676864532.issue34151@psf.upfronthosting.co.za> Change by Sergey Fedoseev : ---------- keywords: +patch pull_requests: +7869 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 13:33:46 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 18 Jul 2018 17:33:46 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531935226.19.0.56676864532.issue34060@psf.upfronthosting.co.za> Steve Dower added the comment: > It would probably be simpler to change the policy and allow (at least some) some third party libs in cPython's test suite. =) I'm actually totally okay with this, as I'd really like to have JUnit XML output from the test suite, which is easiest to do with the existing third-party libraries. Can we formalize a way by which optional third-party libraries are allowed? Provided they aren't critical for the overall pass/fail state of the test suite (or the more strict alternative: pass/fail state of *each* test), I don't see any particular harm in certain site packages being used. (This is probably a discussion for python-dev, assuming the policy is written down somewhere.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 13:40:00 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 18 Jul 2018 17:40:00 +0000 Subject: [issue34149] Behavior of the min/max with key=None In-Reply-To: <1531929969.94.0.56676864532.issue34149@psf.upfronthosting.co.za> Message-ID: <1531935600.82.0.56676864532.issue34149@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Accepting None has a drawback. It can hide a bug when the key function unexpectedly becomes None. ---------- nosy: +bethard, rhettinger, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 14:26:09 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Wed, 18 Jul 2018 18:26:09 +0000 Subject: [issue34152] performance of some list slice assignment can be improved Message-ID: <1531938369.41.0.56676864532.issue34152@psf.upfronthosting.co.za> New submission from Sergey Fedoseev : Script for benchmarks: NAME=list-slice.json python -m perf timeit --name "l[len(l):] = reversed(l)" -l 1 -s "l = [None] * 1000000" "l[len(l):] = reversed(l)" --append $NAME python -m perf timeit --name "l[len(l):] = l" -l 1 -s "l = [None] * 1000000" "l[len(l):] = l" --append $NAME python -m perf timeit --name "l[::-1] = l" -s "l = [None] * 1000000" "l[::-1] = l" --append $NAME python -m perf timeit --name "l[:] = l" -s "l = [None] * 1000000" "l[:] = l" --append $NAME python -m perf timeit --name "l[len(l)//2:] = l" -l 1 -s "l = [None] * 1000000" "l[len(l)//2:] = l" --append $NAME python -m perf timeit --name "l[:len(l)//2] = l" -l 1 -s "l = [None] * 1000000" "l[:len(l)//2] = l" --append $NAME python -m perf timeit --name "l[len(l)//4:len(l)*3//4] = l" -l 1 -s "l = [None] * 1000000" "l[len(l)//4:len(l)*3//4] = l" --append $NAME Results table: +------------------------------+-------------------+------------------------------------+ | Benchmark | list-slice-master | list-slice | +==============================+===================+====================================+ | l[len(l):] = reversed(l) | 8.44 ms | 5.18 ms: 1.63x faster (-39%) | +------------------------------+-------------------+------------------------------------+ | l[len(l):] = l | 7.88 ms | 3.37 ms: 2.34x faster (-57%) | +------------------------------+-------------------+------------------------------------+ | l[::-1] = l | 10.4 ms | 582 us: 17.85x faster (-94%) | +------------------------------+-------------------+------------------------------------+ | l[:] = l | 10.6 ms | 86.1 ns: 123128.46x faster (-100%) | +------------------------------+-------------------+------------------------------------+ | l[len(l)//2:] = l | 11.1 ms | 2.08 ms: 5.33x faster (-81%) | +------------------------------+-------------------+------------------------------------+ | l[:len(l)//2] = l | 11.5 ms | 1.76 ms: 6.53x faster (-85%) | +------------------------------+-------------------+------------------------------------+ | l[len(l)//4:len(l)*3//4] = l | 11.3 ms | 2.27 ms: 4.98x faster (-80%) | +------------------------------+-------------------+------------------------------------+ ---------- components: Interpreter Core messages: 321908 nosy: sir-sigurd priority: normal severity: normal status: open title: performance of some list slice assignment can be improved type: performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 14:27:31 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Wed, 18 Jul 2018 18:27:31 +0000 Subject: [issue34152] performance of some list slice assignment can be improved In-Reply-To: <1531938369.41.0.56676864532.issue34152@psf.upfronthosting.co.za> Message-ID: <1531938451.08.0.56676864532.issue34152@psf.upfronthosting.co.za> Change by Sergey Fedoseev : ---------- keywords: +patch pull_requests: +7870 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 15:18:40 2018 From: report at bugs.python.org (wassersteinchen) Date: Wed, 18 Jul 2018 19:18:40 +0000 Subject: [issue34153] 10/3 - last digit Message-ID: <1531941520.1.0.56676864532.issue34153@psf.upfronthosting.co.za> New submission from wassersteinchen : Hi, I am new to python and just installed it on my win pc. First thing what I did were some calculations (see below). There is a failure in th last digit at 10/3 and 100/3. Sorry if this is a RTFM-issue... armin Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> 3+6 9 >>> 10/3 3.3333333333333335 >>> 1/3 0.3333333333333333 >>> 10/3 3.3333333333333335 >>> 100/3 33.333333333333336 >>> 1000/3 333.3333333333333 >>> 10000/3 3333.3333333333335 >>> 100000/3 33333.333333333336 >>> 1000000/3 333333.3333333333 >>> 200/3 66.66666666666667 ---------- components: Windows messages: 321909 nosy: paul.moore, steve.dower, tim.golden, wassersteinchen, zach.ware priority: normal severity: normal status: open title: 10/3 - last digit versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 15:27:11 2018 From: report at bugs.python.org (Paul Moore) Date: Wed, 18 Jul 2018 19:27:11 +0000 Subject: [issue34153] 10/3 - last digit In-Reply-To: <1531941520.1.0.56676864532.issue34153@psf.upfronthosting.co.za> Message-ID: <1531942031.77.0.56676864532.issue34153@psf.upfronthosting.co.za> Paul Moore added the comment: See https://docs.python.org/3.7/tutorial/floatingpoint.html. Essentially, the behaviour you are seeing is caused by the fact that the results calculations you are attempting cannot be exactly represented in binary floating point, so approximate results are shown. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 15:57:31 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 19:57:31 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531943851.81.0.56676864532.issue34060@psf.upfronthosting.co.za> STINNER Victor added the comment: Processor Queue Length seems simpler and easier to read. I don't want to log 24 numbers per regrtest output line if a machine has 24 CPUs... The load average is a "raw" value to give the idea if the system is "loaded" or not. More precise metrics can be used later to debug a test failure, but manually. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 15:59:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 19:59:26 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1531943966.34.0.56676864532.issue34060@psf.upfronthosting.co.za> STINNER Victor added the comment: PR 8287 seems short to me and it seems like psutils doesn't expose Processor Queue Length, so I'm not sure why we are talking about depending on psutils? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 16:00:35 2018 From: report at bugs.python.org (Brett Cannon) Date: Wed, 18 Jul 2018 20:00:35 +0000 Subject: [issue34137] Add Path.lexist() to pathlib In-Reply-To: <1531825181.93.0.56676864532.issue34137@psf.upfronthosting.co.za> Message-ID: <1531944035.19.0.56676864532.issue34137@psf.upfronthosting.co.za> Brett Cannon added the comment: If you're okay with the PR being rejected because the decision is the method isn't desired, then feel free to go ahead and create a PR, Engin! But if you want to a better chance that it will eventually go in then I would wait for consensus. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 16:07:04 2018 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 18 Jul 2018 20:07:04 +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: <1531944424.58.0.56676864532.issue34151@psf.upfronthosting.co.za> Stefan Behnel added the comment: Nice! Patch looks good to me, minus the usual naming nit-pick. ---------- nosy: +scoder versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 16:26:27 2018 From: report at bugs.python.org (Engin Kayraklioglu) Date: Wed, 18 Jul 2018 20:26:27 +0000 Subject: [issue34137] Add Path.lexist() to pathlib In-Reply-To: <1531825181.93.0.56676864532.issue34137@psf.upfronthosting.co.za> Message-ID: <1531945587.42.0.56676864532.issue34137@psf.upfronthosting.co.za> Engin Kayraklioglu added the comment: Thanks for the response Brett! I am not going to rush, then. But if I happen to have some free time and motivation to create the PR, I will just do it. I don't mind revising or getting rejected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 16:53:16 2018 From: report at bugs.python.org (Michael Felt) Date: Wed, 18 Jul 2018 20:53:16 +0000 Subject: [issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX) In-Reply-To: <1456413023.18.0.874865601403.issue26439@psf.upfronthosting.co.za> Message-ID: <1531947196.88.0.56676864532.issue26439@psf.upfronthosting.co.za> Michael Felt added the comment: imho - this should have status "closed" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 16:57:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Jul 2018 20:57:26 +0000 Subject: [issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX) In-Reply-To: <1456413023.18.0.874865601403.issue26439@psf.upfronthosting.co.za> Message-ID: <1531947446.93.0.56676864532.issue26439@psf.upfronthosting.co.za> STINNER Victor added the comment: Thank you Michael Felt for your big "Implement find_library() support in ctypes/util for AIX" contribution, commit c5ae169e1b73315672770517bf51cf8464286c76! I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 16:57:47 2018 From: report at bugs.python.org (Michael Felt) Date: Wed, 18 Jul 2018 20:57:47 +0000 Subject: [issue27643] test_ctypes fails on AIX with xlc In-Reply-To: <1469718089.88.0.404760174195.issue27643@psf.upfronthosting.co.za> Message-ID: <1531947467.82.0.56676864532.issue27643@psf.upfronthosting.co.za> Michael Felt added the comment: Again, the PR worked months ago. I expect it to still work. So, I guess the question is: is there any interest. After several weeks of waiting after the last ttt - still waiting :) ---------- components: +Tests -ctypes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 17:00:10 2018 From: report at bugs.python.org (Michael Felt) Date: Wed, 18 Jul 2018 21:00:10 +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: <1531947610.22.0.56676864532.issue11191@psf.upfronthosting.co.za> Michael Felt added the comment: @tarek - anything specific/extra you need? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 18:37:07 2018 From: report at bugs.python.org (Sam Varshavchik) Date: Wed, 18 Jul 2018 22:37:07 +0000 Subject: [issue34138] imaplib RFC 6855 issue In-Reply-To: <1531830667.9.0.56676864532.issue34138@psf.upfronthosting.co.za> Message-ID: <1531953427.51.0.56676864532.issue34138@psf.upfronthosting.co.za> Sam Varshavchik added the comment: I don't have sufficient python or imaplib exposure to be able to implement full UTF8 APPEND functionality. I was merely investigating and researching what IMAP UTF8 support there was, in all existing client and server code I knew of. What I can propose is to reverse this part of the original change: @@ -360,7 +380,10 @@ date_time = Time2Internaldate(date_time) else: date_time = None - self.literal = MapCRLF.sub(CRLF, message) + literal = MapCRLF.sub(CRLF, message) + if self.utf8_enabled: + literal = b'UTF8 (' + literal + b')' + self.literal = literal return self._simple_command(name, mailbox, flags, date_time) I don't see that the original patch added any code to test_imaplib.py to test UTF8 literals with APPEND. So what this should do is, is go back and use the pre-UTF8, RFC 3501 APPEND syntax, with no existing unit test fall-out. Which is fine. IMAP UTF8 clients are not required to use UTF8 literals with APPEND. Enabling UTF8 in the IMAP server does not require using the UTF8 version of APPEND. It's only required if the IMAP client wishes to send a message with UTF8 headers to the IMAP server. I also looked into mutt's source, and mutt appears to be taking the same approach. It enables UTF8 mode in the IMAP server, and swallows UTF8 E-mail, and deals with folders whose names are now encoded in UTF8, instead of RFC3501 IMAP's modified-UTF7 encoding convention. But I did not see anything in mutt that used UTF8 literals with APPEND. Searching mutt's source for APPEND code finds only one instance which sends the non-UTF8 literal. Looks like mutt will accept UTF8 mail, but not generate them itself. Not sure what mutt does creating a reply to E-mail with a UTF8 E-mail address. I don't use mutt, but I'll test that. It does not surprise me, that this did not come up previously. All three other Libre IMAP server that I know of: UW-IMAP, Cyrus, and Dovecot, do not implement RFC 6855. Unless one of them is currently working on it, Courier will be the first one to support it. But, I have other sources that confirm otherwise. I fully understand your lack of interest in imaplib (I really do), and I wish I had more Python background to help out here, myself. This is as much as I can propose right now, with some level of confidence in my meager Python skills. I mostly revolve in C++, C, and Perl orbits. If in the future more interest develops in improving IMAP support, I'm reachable and I'll be open to integration testing as much as my own time permits, in these matters... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 23:08:30 2018 From: report at bugs.python.org (Creation Elemental) Date: Thu, 19 Jul 2018 03:08:30 +0000 Subject: [issue34154] Tkinter __init__ documentations sometimes missing valid keyword values Message-ID: <1531969710.94.0.56676864532.issue34154@psf.upfronthosting.co.za> New submission from Creation Elemental : Priority: Low Type: Documentation issue Some of the Tkinter documentation is incomplete. I've only checked it on the Listbox so far, but some of the valid keyword arguments are missing. The one I noticed was "disabledforeground" which changes how the foreground color of text when the Listbox is in the disabled state or has a selection mode of none. I've noticed this across multiple versions of python, including Python 2.7 and Python 3.6, both of which accepted "disabledforeground" as a valid keyword without it being in the list shown in the help for Listbox.__init__ I found the disabledforeground keyword argument when looking at the Listbox documentation here: https://www.tcl.tk/man/tcl8.4/TkCmd/listbox.htm ---------- components: Tkinter messages: 321921 nosy: Creation Elemental priority: normal severity: normal status: open title: Tkinter __init__ documentations sometimes missing valid keyword values versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 18 23:54:57 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Thu, 19 Jul 2018 03:54:57 +0000 Subject: [issue34152] performance of some list slice assignment margin cases can be improved In-Reply-To: <1531938369.41.0.56676864532.issue34152@psf.upfronthosting.co.za> Message-ID: <1531972497.76.0.56676864532.issue34152@psf.upfronthosting.co.za> Change by Sergey Fedoseev : ---------- title: performance of some list slice assignment can be improved -> performance of some list slice assignment margin cases can be improved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 01:18:54 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 19 Jul 2018 05:18:54 +0000 Subject: [issue34149] Behavior of the min/max with key=None In-Reply-To: <1531929969.94.0.56676864532.issue34149@psf.upfronthosting.co.za> Message-ID: <1531977534.68.0.56676864532.issue34149@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +0 Probably users will never care about this but I don't see a downside beyond the small API churn. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 01:22:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 19 Jul 2018 05:22:50 +0000 Subject: [issue34149] Behavior of the min/max with key=None In-Reply-To: <1531929969.94.0.56676864532.issue34149@psf.upfronthosting.co.za> Message-ID: <1531977770.16.0.56676864532.issue34149@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Whouldn't be better to add operator.identity and use it as the default value instead of None? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 01:26:31 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 19 Jul 2018 05:26:31 +0000 Subject: [issue34152] performance of some list slice assignment margin cases can be improved In-Reply-To: <1531938369.41.0.56676864532.issue34152@psf.upfronthosting.co.za> Message-ID: <1531977991.83.0.56676864532.issue34152@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I recommend against this one. The cases covered are too exotic to care about and don't warrant the code churn. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 01:27:15 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 19 Jul 2018 05:27:15 +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: <1531978035.84.0.56676864532.issue34151@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 This looks like a reasonable improvement. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 01:31:52 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 19 Jul 2018 05:31:52 +0000 Subject: [issue34147] doc Describe briefly sampling w/out replacement in random In-Reply-To: <1531921901.63.0.56676864532.issue34147@psf.upfronthosting.co.za> Message-ID: <1531978312.11.0.56676864532.issue34147@psf.upfronthosting.co.za> Raymond Hettinger added the comment: IMO, this is unnecessary documentation cruft. I'm concerned that you're continuing to spew lots of minor documentation PRs of dubious value and wasting our time. Please direct your efforts to known areas where users have actually had a problem with the documentation. ---------- nosy: +rhettinger resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 01:54:34 2018 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 19 Jul 2018 05:54:34 +0000 Subject: [issue25943] Integer overflow in _bsddb leads to heap corruption In-Reply-To: <1451015615.68.0.324504050935.issue25943@psf.upfronthosting.co.za> Message-ID: <1531979674.88.0.56676864532.issue25943@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +7871 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 02:02:41 2018 From: report at bugs.python.org (Martin Panter) Date: Thu, 19 Jul 2018 06:02:41 +0000 Subject: [issue18397] Python with MinGW In-Reply-To: <1373227373.99.0.371478249642.issue18397@psf.upfronthosting.co.za> Message-ID: <1531980161.8.0.56676864532.issue18397@psf.upfronthosting.co.za> Change by Martin Panter : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> mingw-meta: build interpeter core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 02:11:55 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 19 Jul 2018 06:11:55 +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: <1531980715.43.0.56676864532.issue34047@psf.upfronthosting.co.za> Tal Einat added the comment: With Python 3.7.0 installed from python.org, I can't see any of the scrolling issues with tk_scroll2.py either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 02:14:03 2018 From: report at bugs.python.org (Martin Panter) Date: Thu, 19 Jul 2018 06:14:03 +0000 Subject: [issue29253] Fix test_asyncore tests on Cygwin In-Reply-To: <1484229111.27.0.864294562114.issue29253@psf.upfronthosting.co.za> Message-ID: <1531980843.06.0.56676864532.issue29253@psf.upfronthosting.co.za> Martin Panter added the comment: Similar to Issue 31882 ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 02:14:12 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 19 Jul 2018 06:14:12 +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: <1531980852.5.0.56676864532.issue34047@psf.upfronthosting.co.za> Tal Einat added the comment: The reported scrolling issues do happen for me with the Python 3.7.0 installed from python.org, which does use Tk 8.6.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 02:19:13 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 19 Jul 2018 06:19:13 +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: <1531981153.45.0.56676864532.issue34151@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 02:34:11 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 19 Jul 2018 06:34:11 +0000 Subject: [issue34149] Behavior of the min/max with key=None In-Reply-To: <1531929969.94.0.56676864532.issue34149@psf.upfronthosting.co.za> Message-ID: <1531982051.36.0.56676864532.issue34149@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Whouldn't be better to add operator.identity and use it as the default value instead of None? No, that would incur overhead that currently isn't present. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 02:42:00 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 19 Jul 2018 06:42: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: <1531982520.93.0.56676864532.issue34047@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I've encountered this problem as well. It occurs with files bigger than a screenful (i.e. use OpenModule to open the collections module). Both the scroll-up and scroll-down inputs result in scrolling down. This occurs with a fresh MacOs install of Python 3.7 from python.org. I do not have the issue on other versions of Python. Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 26 2018, 23:26:24) [Clang 6.0 (clang-600.0.57)] on darwin This is running on MacOS High Sierra 10.13.5 running on a Haswell CPU with Iris Pro. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 02:42:26 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 19 Jul 2018 06:42:26 +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: <1531982546.19.0.56676864532.issue34047@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 02:42:29 2018 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 19 Jul 2018 06:42:29 +0000 Subject: [issue25943] Integer overflow in _bsddb leads to heap corruption In-Reply-To: <1451015615.68.0.324504050935.issue25943@psf.upfronthosting.co.za> Message-ID: <1531982549.8.0.56676864532.issue25943@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 03:08:46 2018 From: report at bugs.python.org (Larry Hastings) Date: Thu, 19 Jul 2018 07:08:46 +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: <1531984126.56.0.56676864532.issue33216@psf.upfronthosting.co.za> Change by Larry Hastings : ---------- pull_requests: +7872 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 03:16:50 2018 From: report at bugs.python.org (lktoken) Date: Thu, 19 Jul 2018 07:16:50 +0000 Subject: [issue34143] There is a constant definition error in errno.py In-Reply-To: <1531898794.31.0.56676864532.issue34143@psf.upfronthosting.co.za> Message-ID: <1531984610.4.0.56676864532.issue34143@psf.upfronthosting.co.za> lktoken added the comment: The picture is a screenshot from the IDEA editor on my OSX system. This may be just a problem with the python I am using. So sad. Python 2.7.10 (default, Oct 6 2017, 22:29:07) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import errno >>> errno.EDEADLK 11 >>> errno.EAGAIN 35 >>> import os >>> os.strerror(11) 'Resource deadlock avoided' >>> os.strerror(35) 'Resource temporarily unavailable' >>> Any more, follow your shell commands, I found this: ? ~ grep -E 'EDEADLK|EAGAIN' /usr/include/sys/errno.h #define EDEADLK 11 /* Resource deadlock avoided */ /* 11 was EAGAIN */ #define EAGAIN 35 /* Resource temporarily unavailable */ #define EWOULDBLOCK EAGAIN /* Operation would block */ And my OS info: ? ~ uname -a Darwin lktokendeMacBook-Air.local 17.6.0 Darwin Kernel Version 17.6.0: Tue May 8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64 x86_64 Thank you very much. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 03:33:21 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 19 Jul 2018 07:33:21 +0000 Subject: [issue34143] There is a constant definition error in errno.py In-Reply-To: <1531984610.4.0.56676864532.issue34143@psf.upfronthosting.co.za> Message-ID: Ronald Oussoren added the comment: I?m not sure if I understand correctly. Is your report about the difference in the values of EAGAIN between Linux and macOS? If so, that is not a bug: the relevant standards only document the name and type of these constants and not their values. The value can and does vary across operating systems. -- On the road, hence brief. Op 19 jul. 2018 om 08:16 heeft lktoken het volgende geschreven: > > lktoken added the comment: > > The picture is a screenshot from the IDEA editor on my OSX system. This may be just a problem with the python I am using. So sad. > Python 2.7.10 (default, Oct 6 2017, 22:29:07) > [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> import errno >>>> errno.EDEADLK > 11 >>>> errno.EAGAIN > 35 >>>> import os >>>> os.strerror(11) > 'Resource deadlock avoided' >>>> os.strerror(35) > 'Resource temporarily unavailable' >>>> > > Any more, follow your shell commands, I found this: > > ? ~ grep -E 'EDEADLK|EAGAIN' /usr/include/sys/errno.h > #define EDEADLK 11 /* Resource deadlock avoided */ > /* 11 was EAGAIN */ > #define EAGAIN 35 /* Resource temporarily unavailable */ > #define EWOULDBLOCK EAGAIN /* Operation would block */ > > And my OS info: > ? ~ uname -a > Darwin lktokendeMacBook-Air.local 17.6.0 Darwin Kernel Version 17.6.0: Tue May 8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64 x86_64 > > Thank you very much. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 03:38:04 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 19 Jul 2018 07:38:04 +0000 Subject: [issue34149] Behavior of the min/max with key=None In-Reply-To: <1531929969.94.0.56676864532.issue34149@psf.upfronthosting.co.za> Message-ID: <1531985884.74.0.56676864532.issue34149@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Accepting None makes the typing model more complex. Instead of just a callable functions accept callable-or-none. It terms of annotations, it is Union[Callable[[Any], Any], None] instead of just Callable[[Any], Any]. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 03:40:45 2018 From: report at bugs.python.org (lktoken) Date: Thu, 19 Jul 2018 07:40:45 +0000 Subject: [issue34143] There is a constant definition error in errno.py In-Reply-To: <1531898794.31.0.56676864532.issue34143@psf.upfronthosting.co.za> Message-ID: <1531986045.25.0.56676864532.issue34143@psf.upfronthosting.co.za> lktoken added the comment: yes, I agree that this is not a bug. I used to think that this value is the same in macOS and Linux. Now it seems that I am wrong. And sorry for disturbing you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 03:52:37 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 19 Jul 2018 07:52:37 +0000 Subject: [issue34143] There is a constant definition error in errno.py In-Reply-To: <1531898794.31.0.56676864532.issue34143@psf.upfronthosting.co.za> Message-ID: <1531986757.34.0.56676864532.issue34143@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the details @lktoken. I assumed that you were on Linux and had the opposite values. Verified it on my Mac and they report the same values as yours. I think the values are also different for Windows machines as @ronaldoussoren noted in his comment EAGAIN - 11 EDEADLK - 36 (Not 35 like Linux) Ref : https://docs.microsoft.com/en-us/cpp/c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 04:31:30 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 19 Jul 2018 08:31:30 +0000 Subject: [issue34149] Behavior of the min/max with key=None In-Reply-To: <1531929969.94.0.56676864532.issue34149@psf.upfronthosting.co.za> Message-ID: <1531989090.8.0.56676864532.issue34149@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Serhiy, feel free to reject this PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 04:45:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Jul 2018 08:45:50 +0000 Subject: [issue34150] test_multiprocessing_spawn: Dangling processes leaked on AMD64 FreeBSD 10.x Shared 3.x In-Reply-To: <1531932884.13.0.56676864532.issue34150@psf.upfronthosting.co.za> Message-ID: <1531989950.18.0.56676864532.issue34150@psf.upfronthosting.co.za> STINNER Victor added the comment: Another failure on AMD64 Windows8.1 Refleaks 3.6: https://buildbot.python.org/all/#/builders/64/builds/293 1:24:09 [391/407/2] test_multiprocessing_spawn failed -- running: test_mailbox (8 min 1 sec), test_asyncio (2 min 58 sec) beginning 6 repetitions 123456 ..Warning -- Dangling processes: {} Warning -- files was modified by test_multiprocessing_spawn Before: [] After: ['@test_3712_tmp'] test test_multiprocessing_spawn failed -- multiple errors occurred; run in verbose mode for details (...) Re-running test 'test_multiprocessing_spawn' in verbose mode beginning 6 repetitions (...) test_thread_safety (test.test_multiprocessing_spawn.WithProcessesTestFinalize) ... Unable to join 2 threads during a period of 1 minutes Unable to join 2 threads during a period of 2 minutes Unable to join 2 threads during a period of 3 minutes Unable to join 2 threads during a period of 4 minutes Unable to join 2 threads during a period of 5 minutes Unable to join 2 threads during a period of 6 minutes Unable to join 2 threads during a period of 7 minutes Unable to join 2 threads during a period of 8 minutes Unable to join 2 threads during a period of 9 minutes Unable to join 2 threads during a period of 10 minutes Unable to join 2 threads during a period of 11 minutes Unable to join 2 threads during a period of 12 minutes Unable to join 2 threads during a period of 13 minutes Unable to join 2 threads during a period of 14 minutes Unable to join 2 threads during a period of 15 minutes Thread 0x00000ad8 (most recent call first): File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\_test_multiprocessing.py", line 3333 in make_finalizers File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 864 in run File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 916 in _bootstrap_inner File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 884 in _bootstrap Thread 0x00000700 (most recent call first): File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\multiprocessing\util.py", line 188 in __call__ File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\multiprocessing\util.py", line 262 in _run_finalizers File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\_test_multiprocessing.py", line 3322 in run_finalizers File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 864 in run File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 916 in _bootstrap_inner File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 884 in _bootstrap Current thread 0x00000b14 (most recent call first): File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\support\__init__.py", line 2213 in start_threads File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\contextlib.py", line 88 in __exit__ File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\_test_multiprocessing.py", line 3347 in test_thread_safety File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\unittest\case.py", line 605 in run File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\unittest\case.py", line 653 in __call__ File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\unittest\suite.py", line 122 in run File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\unittest\suite.py", line 84 in __call__ File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\unittest\suite.py", line 122 in run File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\unittest\suite.py", line 84 in __call__ File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\unittest\suite.py", line 122 in run File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\unittest\suite.py", line 84 in __call__ File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\unittest\runner.py", line 176 in run File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\support\__init__.py", line 1908 in _run_suite File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\support\__init__.py", line 1998 in run_unittest File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\libregrtest\runtest.py", line 175 in test_runner File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\libregrtest\refleak.py", line 62 in dash_R File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\libregrtest\runtest.py", line 177 in runtest_inner File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\libregrtest\runtest.py", line 140 in runtest File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\libregrtest\main.py", line 286 in rerun_failed_tests File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\libregrtest\main.py", line 570 in _main File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\libregrtest\main.py", line 531 in main File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\libregrtest\main.py", line 584 in main File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\__main__.py", line 2 in File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\runpy.py", line 85 in _run_code File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\runpy.py", line 193 in _run_module_as_main ...Warning -- Dangling threads: {, } FAIL (...) test_starmap (test.test_multiprocessing_spawn.WithProcessesTestPool) ... ok test_starmap_async (test.test_multiprocessing_spawn.WithProcessesTestPool) ... ok test_terminate (test.test_multiprocessing_spawn.WithProcessesTestPool) ... FAIL test_traceback (test.test_multiprocessing_spawn.WithProcessesTestPool) ... ok Warning -- Dangling processes: {} Warning -- Dangling threads: {, } test_wrapped_exception (test.test_multiprocessing_spawn.WithProcessesTestPool) ... ok Timeout (3:15:00)! Thread 0x00000ad8 (most recent call first): File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\multiprocessing\util.py", line 180 in __call__ File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\_test_multiprocessing.py", line 3310 in __init__ File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\_test_multiprocessing.py", line 3333 in File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\_test_multiprocessing.py", line 3333 in make_finalizers File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 864 in run File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 916 in _bootstrap_inner File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 884 in _bootstrap Thread 0x00000700 (most recent call first): File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\_test_multiprocessing.py", line 3318 in run_finalizers File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 864 in run File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 916 in _bootstrap_inner File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 884 in _bootstrap Thread 0x00000b14 (most recent call first): File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 295 in wait File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 551 in wait File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\multiprocessing\pool.py", line 635 in wait File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\multiprocessing\pool.py", line 638 in get File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\unittest\case.py", line 178 in handle File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\unittest\case.py", line 733 in assertRaises File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\_test_multiprocessing.py", line 2282 in test_async_error_callback File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\unittest\case.py", line 605 in run File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\unittest\case.py", line 653 in __call__ File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\unittest\suite.py", line 122 in run File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\unittest\suite.py", line 84 in __call__ File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\unittest\suite.py", line 122 in run File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\unittest\suite.py", line 84 in __call__ File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\unittest\suite.py", line 122 in run File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\unittest\suite.py", line 84 in __call__ File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\unittest\runner.py", line 176 in run File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\support\__init__.py", line 1908 in _run_suite File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\support\__init__.py", line 1998 in run_unittest File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\libregrtest\runtest.py", line 175 in test_runner File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\libregrtest\refleak.py", line 62 in dash_R File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\libregrtest\runtest.py", line 177 in runtest_inner File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\libregrtest\runtest.py", line 140 in runtest File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\libregrtest\main.py", line 286 in rerun_failed_tests File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\libregrtest\main.py", line 570 in _main File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\libregrtest\main.py", line 531 in main File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\libregrtest\main.py", line 584 in main File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\__main__.py", line 2 in File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\runpy.py", line 85 in _run_code File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\runpy.py", line 193 in _run_module_as_main program finished with exit code 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 04:49:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Jul 2018 08:49:36 +0000 Subject: [issue34131] test_threading: BarrierTests.test_default_timeout() failed on AppVeyor In-Reply-To: <1531780347.81.0.56676864532.issue34131@psf.upfronthosting.co.za> Message-ID: <1531990176.3.0.56676864532.issue34131@psf.upfronthosting.co.za> STINNER Victor added the comment: Another failure on AMD64 Windows8.1 Refleaks 3.6 which seems very very slow on this build. https://buildbot.python.org/all/#/builders/64/builds/293 0:26:36 [133/407/1] test_threading failed -- running: test_venv (23 min 45 sec), test_mmap (19 min 28 sec) beginning 6 repetitions 123456 ..Unhandled exception in thread started by .task at 0x000000A373C5E110> Unhandled exception in thread started by .task at 0x000000A373C5E110> Unhandled exception in thread started by .task at 0x000000A373C5E110> Traceback (most recent call last): Traceback (most recent call last): Traceback (most recent call last): File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\lock_tests.py", line 41, in task File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\lock_tests.py", line 41, in task File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\lock_tests.py", line 41, in task f() File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\lock_tests.py", line 938, in f f() f() File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\lock_tests.py", line 938, in f File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\lock_tests.py", line 938, in f i = barrier.wait() File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 612, in wait i = barrier.wait() File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 612, in wait i = barrier.wait() File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 612, in wait self._wait(timeout) File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 652, in _wait self._wait(timeout) self._wait(timeout) File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 652, in _wait File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 652, in _wait raise BrokenBarrierError threading.BrokenBarrierError raise BrokenBarrierError threading.BrokenBarrierError raise BrokenBarrierError threading.BrokenBarrierError Unhandled exception in thread started by .task at 0x000000A373C5E110> Traceback (most recent call last): File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\lock_tests.py", line 41, in task f() File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\lock_tests.py", line 938, in f i = barrier.wait() File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 603, in wait self._enter() # Block while the barrier drains. File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 627, in _enter raise BrokenBarrierError threading.BrokenBarrierError Exception ignored in: Traceback (most recent call last): File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\support\__init__.py", line 2154, in wait_threads_exit raise AssertionError(msg) AssertionError: wait_threads() failed to cleanup 1 threads after 60.0 seconds (count: 1, old count: 0) test test_threading failed -- Traceback (most recent call last): File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\lock_tests.py", line 943, in test_default_timeout self.run_threads(f) File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\lock_tests.py", line 772, in run_threads f() File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\lock_tests.py", line 938, in f i = barrier.wait() File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 612, in wait self._wait(timeout) File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\threading.py", line 650, in _wait raise BrokenBarrierError threading.BrokenBarrierError ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 04:50:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Jul 2018 08:50:11 +0000 Subject: [issue32692] [3.6] test_threading.test_set_and_clear fails in AppVeyor CI In-Reply-To: <1517129650.59.0.467229070634.issue32692@psf.upfronthosting.co.za> Message-ID: <1531990211.04.0.56676864532.issue32692@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 81950495ba2c36056e0ce48fd37d514816c26747 by Victor Stinner in branch 'master': bpo-32692: Fix test_threading.test_set_and_clear() (GH-8331) https://github.com/python/cpython/commit/81950495ba2c36056e0ce48fd37d514816c26747 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 04:50:21 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 19 Jul 2018 08:50:21 +0000 Subject: [issue32692] [3.6] test_threading.test_set_and_clear fails in AppVeyor CI In-Reply-To: <1517129650.59.0.467229070634.issue32692@psf.upfronthosting.co.za> Message-ID: <1531990221.13.0.56676864532.issue32692@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7873 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 04:51:11 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 19 Jul 2018 08:51:11 +0000 Subject: [issue32692] [3.6] test_threading.test_set_and_clear fails in AppVeyor CI In-Reply-To: <1517129650.59.0.467229070634.issue32692@psf.upfronthosting.co.za> Message-ID: <1531990271.27.0.56676864532.issue32692@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7874 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 04:59:51 2018 From: report at bugs.python.org (Marin Petrov) Date: Thu, 19 Jul 2018 08:59:51 +0000 Subject: [issue31534] python 3.6.2 installation failed 0x80070002 error In-Reply-To: <1505923189.21.0.0271351675112.issue31534@psf.upfronthosting.co.za> Message-ID: <1531990791.58.0.56676864532.issue31534@psf.upfronthosting.co.za> Marin Petrov added the comment: same error on windows 10 64bit python 3.6.4 windows user (from windows installation) was named ' pc' - a space as first character. In the log file most paths were c:\users\ pc\... but there was one c:\users\PC~1\... folowing some error. I didnt make a copy, sorry. I hope this hints for resolving it. I reinstalled windows with user 'pc' and all was good. ---------- nosy: +malopet _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 05:24:55 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 19 Jul 2018 09:24:55 +0000 Subject: [issue34100] Same constants in tuples are not merged while compile() In-Reply-To: <1531336111.06.0.56676864532.issue34100@psf.upfronthosting.co.za> Message-ID: <1531992295.96.0.56676864532.issue34100@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- keywords: +patch pull_requests: +7875 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 05:27:50 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 19 Jul 2018 09:27:50 +0000 Subject: [issue32692] [3.6] test_threading.test_set_and_clear fails in AppVeyor CI In-Reply-To: <1517129650.59.0.467229070634.issue32692@psf.upfronthosting.co.za> Message-ID: <1531992470.81.0.56676864532.issue32692@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 339e0c1296c61c9dbc1f8f880c5c668bf4007e5e by Miss Islington (bot) in branch '3.7': bpo-32692: Fix test_threading.test_set_and_clear() (GH-8331) https://github.com/python/cpython/commit/339e0c1296c61c9dbc1f8f880c5c668bf4007e5e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 05:32:05 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 19 Jul 2018 09:32:05 +0000 Subject: [issue34100] Same constants in tuples are not merged while compile() In-Reply-To: <1531336111.06.0.56676864532.issue34100@psf.upfronthosting.co.za> Message-ID: <1531992725.6.0.56676864532.issue34100@psf.upfronthosting.co.za> INADA Naoki added the comment: Counting object types in logging/__pycache__/__init__.cpython-38.pyc: master: [('r', 1815), (')', 467), ('Z', 339), ('s', 314), ('z', 273), ('c', 157), ('N', 154), ('a', 24), ('F', 14), ('i', 11), ('T', 8)] GH-8341: [('r', 1737), (')', 375), ('Z', 339), ('s', 314), ('z', 264), ('c', 157), ('N', 138), ('a', 24), ('F', 14), ('i', 11), ('T', 8)] It reduced about 5% objects. I chose logging/__init__ because it's large except tests, and it's written in OO-based. (Large application has many OO-based code). ---------- keywords: -patch stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 05:32:56 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 19 Jul 2018 09:32:56 +0000 Subject: [issue34100] Same constants in tuples are not merged while compile() In-Reply-To: <1531336111.06.0.56676864532.issue34100@psf.upfronthosting.co.za> Message-ID: <1531992776.26.0.56676864532.issue34100@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- keywords: +needs review -3.7regression stage: needs patch -> patch review type: enhancement -> resource usage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 05:44:32 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 19 Jul 2018 09:44:32 +0000 Subject: [issue32692] [3.6] test_threading.test_set_and_clear fails in AppVeyor CI In-Reply-To: <1517129650.59.0.467229070634.issue32692@psf.upfronthosting.co.za> Message-ID: <1531993472.96.0.56676864532.issue32692@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 2fe1c6b386e7bbb8b647636643cc637795b99123 by Miss Islington (bot) in branch '3.6': bpo-32692: Fix test_threading.test_set_and_clear() (GH-8331) https://github.com/python/cpython/commit/2fe1c6b386e7bbb8b647636643cc637795b99123 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 06:16:32 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 19 Jul 2018 10:16:32 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1531995392.9.0.56676864532.issue33729@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: This was introduced as part of https://hg.python.org/cpython/rev/4969f6d343b1 . In addition to the signature there is also a line at https://docs.python.org/dev/library/hashlib.html#simple-hashing which could be removed > As a shortcut, you can pass the first chunk of data to update directly to the constructor as the first argument (or as data keyword argument) Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 06:32:21 2018 From: report at bugs.python.org (Erik Bray) Date: Thu, 19 Jul 2018 10:32:21 +0000 Subject: [issue29253] Fix test_asyncore tests on Cygwin In-Reply-To: <1484229111.27.0.864294562114.issue29253@psf.upfronthosting.co.za> Message-ID: <1531996341.67.0.56676864532.issue29253@psf.upfronthosting.co.za> Erik Bray added the comment: Yes, it's a dupe. There was enough time after I later made the PR for this that I forgot I already opened an issue for it. ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 06:33:29 2018 From: report at bugs.python.org (Erik Bray) Date: Thu, 19 Jul 2018 10:33:29 +0000 Subject: [issue31882] Cygwin: asyncio and asyncore test suites hang indefinitely due to bug in Cygwin In-Reply-To: <1509109689.46.0.213398074469.issue31882@psf.upfronthosting.co.za> Message-ID: <1531996409.27.0.56676864532.issue31882@psf.upfronthosting.co.za> Erik Bray added the comment: I originally opened this in https://bugs.python.org/issue29253 but then made a dupe of my own bug! Anyways, there's a (nearly year old) pull request for it now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 06:57:47 2018 From: report at bugs.python.org (Martin Panter) Date: Thu, 19 Jul 2018 10:57:47 +0000 Subject: [issue29253] Fix test_asyncore tests on Cygwin In-Reply-To: <1484229111.27.0.864294562114.issue29253@psf.upfronthosting.co.za> Message-ID: <1531997867.98.0.56676864532.issue29253@psf.upfronthosting.co.za> Change by Martin Panter : ---------- superseder: -> Cygwin: asyncio and asyncore test suites hang indefinitely due to bug in Cygwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 07:09:33 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 19 Jul 2018 11:09:33 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1531998573.53.0.56676864532.issue33729@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: hashlib.blake2b() and some other constructors accept the first chunk of data as the "string" keyword argument. >>> hashlib.blake2b(string=b'') <_blake2.blake2b object at 0x7f2847a9c430> >>> hashlib.blake2s(string=b'') <_blake2.blake2s object at 0x7f28468f6290> >>> hashlib.sha3_224(string=b'') <_sha3.sha3_224 object at 0x7f28468f6608> >>> hashlib.sha3_256(string=b'') <_sha3.sha3_256 object at 0x7f28468f6290> >>> hashlib.sha3_384(string=b'') <_sha3.sha3_384 object at 0x7f28468f6608> >>> hashlib.sha3_512(string=b'') <_sha3.sha3_512 object at 0x7f28468f6290> >>> hashlib.shake_128(string=b'') <_sha3.shake_128 object at 0x7f28468f6608> >>> hashlib.shake_256(string=b'') <_sha3.shake_256 object at 0x7f28468f6290> ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 07:13:05 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 19 Jul 2018 11:13:05 +0000 Subject: [issue33635] OSError when using pathlib.Path.rglob() to list device files In-Reply-To: <1527164127.59.0.682650639539.issue33635@psf.upfronthosting.co.za> Message-ID: <1531998785.36.0.56676864532.issue33635@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 07:20:56 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 19 Jul 2018 11:20:56 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1531999256.91.0.56676864532.issue33729@psf.upfronthosting.co.za> Christian Heimes added the comment: Please treat the first argument as positional-only argument. I don't want to standardize on 'string'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 07:34:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 19 Jul 2018 11:34:31 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1532000071.95.0.56676864532.issue33729@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: docs at python -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 07:43:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Jul 2018 11:43:47 +0000 Subject: [issue33336] [imaplib] MOVE is a legal command In-Reply-To: <1524436182.1.0.682650639539.issue33336@psf.upfronthosting.co.za> Message-ID: <1532000627.18.0.56676864532.issue33336@psf.upfronthosting.co.za> STINNER Victor added the comment: > Should we also add the MOVE command to Python 2.7, 3.6 and 3.7? The change looks safe and trivial. IMHO it's ok to backport this change. The stdlib must follow evolutions of the IMAP protocol. It's a self contained and safe change, it's not a new Python method. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 07:53:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Jul 2018 11:53:45 +0000 Subject: [issue32692] [3.6] test_threading.test_set_and_clear fails in AppVeyor CI In-Reply-To: <1517129650.59.0.467229070634.issue32692@psf.upfronthosting.co.za> Message-ID: <1532001225.54.0.56676864532.issue32692@psf.upfronthosting.co.za> STINNER Victor added the comment: I changed the timeout in 3.6, 3.7 and master branches. The failure should now be much less likely. Python 2.7 doesn't have the unit test. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 07:56:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Jul 2018 11:56:39 +0000 Subject: [issue33327] Add a method to move messages to IMAPlib In-Reply-To: <1524337803.72.0.682650639539.issue33327@psf.upfronthosting.co.za> Message-ID: <1532001399.86.0.56676864532.issue33327@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-33336: [imaplib] MOVE is a legal command. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 07:56:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Jul 2018 11:56:54 +0000 Subject: [issue33336] [imaplib] MOVE is a legal command In-Reply-To: <1524436182.1.0.682650639539.issue33336@psf.upfronthosting.co.za> Message-ID: <1532001414.09.0.56676864532.issue33336@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-33327: Add a method to move messages to IMAPlib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 07:59:03 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Jul 2018 11:59:03 +0000 Subject: [issue18921] In imaplib, cached capabilities may be out of date after login In-Reply-To: <1378304850.85.0.68028293284.issue18921@psf.upfronthosting.co.za> Message-ID: <1532001543.12.0.56676864532.issue18921@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-33327: Add a method to move messages to IMAPlib. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 08:05:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 19 Jul 2018 12:05:02 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1532001902.52.0.56676864532.issue33729@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I take this issue because there are many other issues with handling arguments in the hashlib module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 09:29:52 2018 From: report at bugs.python.org (Felix Vollmer) Date: Thu, 19 Jul 2018 13:29:52 +0000 Subject: [issue34144] venv activate.bat reset codepage fails on windows 10 In-Reply-To: <1531901922.72.0.56676864532.issue34144@psf.upfronthosting.co.za> Message-ID: <1532006992.38.0.56676864532.issue34144@psf.upfronthosting.co.za> Change by Felix Vollmer : ---------- nosy: +Felix Vollmer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 09:31:40 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Thu, 19 Jul 2018 13:31:40 +0000 Subject: [issue33869] doc Add link to list definition in Glossary list entry In-Reply-To: <1529073801.77.0.947875510639.issue33869@psf.upfronthosting.co.za> Message-ID: <1532007100.27.0.56676864532.issue33869@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 10:53:43 2018 From: report at bugs.python.org (=?utf-8?q?Cyril_Nicod=C3=A8me?=) Date: Thu, 19 Jul 2018 14:53:43 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email Message-ID: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> New submission from Cyril Nicod?me : Hi! I'm trying to parse some emails, and I discovered that email.utils.parseaddr wrongly parse an email. Here's the corresponding header: > From: =?utf-8?Q?zq at redacted.com.cn=E3=82=86=E2=86=91=E3=82=86?= =?utf-8?Q?=E3=82=83=E3=82=85=E3=81=87=E3=81=BA=E3=81=BD=E3=81=BC"\=E3?= =?utf-8?Q?=81=A9=E3=81=A5=E3=81=A2l=E3=81=A0=E3=81=B0=E3=81=A8=E3=81?= =?utf-8?Q?=8FKL=E3=81=84=E3=82=8C=E3=82=8B=E3=82=86>KL=E3=82=89JF?= Once this has been parsed via `decode_header`, we obtain this value: > From: zq at redacted.com.cn?????????"\???l????KL????>KL?JF (I agree, not really a nice looking From email ...) Then, when this value is given to parseaddr, here's the result: > ('', 'zq at redacted.com.cn?????????') But it should be: > ('zq at redacted.com.cn?????????"\???l????KL????>KL?JF', 'mxvu at redacted2.com') (Note that the email in the "name" part is not the same as the email in the "email" part!) ---------- components: email messages: 321956 nosy: Cyril Nicod?me, barry, r.david.murray priority: normal severity: normal status: open title: email.utils.parseaddr mistakenly parse an email type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 11:18:03 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 19 Jul 2018 15:18:03 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1532013483.91.0.56676864532.issue34155@psf.upfronthosting.co.za> R. David Murray added the comment: That does appear to be a bug. Note that the new email API handles it correctly: >>> x = """ ... > From: =?utf-8?Q?zq at redacted.com.cn=E3=82=86=E2=86=91=E3=82=86?= ... =?utf-8?Q?=E3=82=83=E3=82=85=E3=81=87=E3=81=BA=E3=81=BD=E3=81=BC"\=E3?= ... =?utf-8?Q?=81=A9=E3=81=A5=E3=81=A2l=E3=81=A0=E3=81=B0=E3=81=A8=E3=81?= ... =?utf-8?Q?=8FKL=E3=81=84=E3=82=8C=E3=82=8B=E3=82=86>KL=E3=82=89JF?= ... ... """ >>> from email import message_from_string >>> from email.policy import default >>> m = message_from_string(x+'\n\ntest', policy=default) >>> m['from'] '"zq at redacted.com.cn??? ??????\\"\\\\? ????l???? ?KL????>KL?JF" ' >>> m['from'].addresses[0].addr_spec 'mxvu at redacted2.com' >>> m['from'].addresses[0].display_name 'zq at redacted.com.cn??? ??????"\\\udce3 \udc81\udca9??l???\udce3\udc81 \udc8fKL????>KL?JF' I'm not particularly interested myself in fixing parseaddr to handle this case correctly, since it is the legacy API, but if someone else wants to I'll review the patch. ---------- versions: +Python 3.7, Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 11:19:13 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 19 Jul 2018 15:19:13 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1532013553.21.0.56676864532.issue34155@psf.upfronthosting.co.za> R. David Murray added the comment: Oops, I left out a step in that cut and paste. For completeness: >>> x = x[3:] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 11:21:25 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 19 Jul 2018 15:21:25 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1532013685.72.0.56676864532.issue34155@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, maybe it doesn't handle it completely correctly; that decode looks different now that I look at it in detail. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 13:09:14 2018 From: report at bugs.python.org (Segev Finer) Date: Thu, 19 Jul 2018 17:09:14 +0000 Subject: [issue33808] ssl.get_server_certificate fails with openssl 1.1.0 but works with 1.0.2g for self-signed certificate In-Reply-To: <1528462754.61.0.592728768989.issue33808@psf.upfronthosting.co.za> Message-ID: <1532020154.68.0.56676864532.issue33808@psf.upfronthosting.co.za> Segev Finer added the comment: Even if the server is outdated and the SSL library doesn't support it anymore, that's a poor exception to raise for such an error... Sadly I'm not able to access the affected server to reproduce and debug why it raises such a poor exception. ---------- nosy: +Segev Finer -Alan.Huang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 13:28:11 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 19 Jul 2018 17:28:11 +0000 Subject: [issue33808] ssl.get_server_certificate fails with openssl 1.1.0 but works with 1.0.2g for self-signed certificate In-Reply-To: <1528462754.61.0.592728768989.issue33808@psf.upfronthosting.co.za> Message-ID: <1532021291.13.0.56676864532.issue33808@psf.upfronthosting.co.za> Christian Heimes added the comment: It looks like the server is hard-killing the connection. It doesn't respond with a proper TLS error code. Instead the server response to the CLientHello with a FIN/ACK TCP package. The OSError is all we are getting from the network layer. 19:27:20.956332 IP 192.168.7.168.45884 > 195.22.7.222.imaps: Flags [S], seq 4225502143, win 29200, options [mss 1460,sackOK,TS val 2762111573 ecr 0,nop,wscale 7], length 0 19:27:21.007310 IP 195.22.7.222.imaps > 192.168.7.168.45884: Flags [S.], seq 2527363412, ack 4225502144, win 64240, options [mss 1452,nop,wscale 0,nop,nop,TS val 0 ecr 0,nop,nop,sackOK], length 0 19:27:21.007413 IP 192.168.7.168.45884 > 195.22.7.222.imaps: Flags [.], ack 1, win 229, options [nop,nop,TS val 2762111625 ecr 0], length 0 19:27:21.007775 IP 192.168.7.168.45884 > 195.22.7.222.imaps: Flags [P.], seq 1:111, ack 1, win 229, options [nop,nop,TS val 2762111625 ecr 0], length 110 19:27:21.060476 IP 195.22.7.222.imaps > 192.168.7.168.45884: Flags [F.], seq 1, ack 111, win 64130, options [nop,nop,TS val 37305785 ecr 2762111625], length 0 19:27:21.060767 IP 192.168.7.168.45884 > 195.22.7.222.imaps: Flags [F.], seq 111, ack 2, win 229, options [nop,nop,TS val 2762111678 ecr 37305785], length 0 19:27:21.111577 IP 195.22.7.222.imaps > 192.168.7.168.45884: Flags [.], ack 112, win 64130, options [nop,nop,TS val 37305786 ecr 2762111678], length 0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 14:03:00 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 19 Jul 2018 18:03:00 +0000 Subject: [issue34143] There is a constant definition error in errno.py In-Reply-To: <1531986757.34.0.56676864532.issue34143@psf.upfronthosting.co.za> Message-ID: <1F2EBD9A-08CE-49BB-A998-E1F07E758C22@mac.com> Ronald Oussoren added the comment: This is not a bug and the issue can be closed. I?ll do so when I get back to my computer in a couple of days. -- On the road, hence brief. Op 19 jul. 2018 om 08:52 heeft Karthikeyan Singaravelan het volgende geschreven: > > Karthikeyan Singaravelan added the comment: > > Thanks for the details @lktoken. I assumed that you were on Linux and had the opposite values. Verified it on my Mac and they report the same values as yours. I think the values are also different for Windows machines as @ronaldoussoren noted in his comment > > EAGAIN - 11 > EDEADLK - 36 (Not 35 like Linux) > > Ref : https://docs.microsoft.com/en-us/cpp/c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr > > Thanks > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 15:03:20 2018 From: report at bugs.python.org (Zack Weinberg) Date: Thu, 19 Jul 2018 19:03:20 +0000 Subject: [issue34156] Nail down and document the behavior of range expressions in RE character classes Message-ID: <1532027000.32.0.56676864532.issue34156@psf.upfronthosting.co.za> New submission from Zack Weinberg : The documentation of the semantics of range expressions in regular expression character classes is not precise enough. All it says is Ranges of characters can be indicated by giving two characters and separating them by a '-', for example [a-z] will match any lowercase ASCII letter [... more examples, none involving non-ASCII characters] In testing it seems that the behavior is simply to expand the range to a set of characters by numeric code point, e.g. '[?-?]' will match any single character whose ord() is in between ord('?') and ord('?') (inclusive). If that is the intended behavior, I would like the documentation to explicitly say so. If that is _not_ the intended behavior, I would like to know what the intended behavior actually is, and for both the code and the documentation to be changed to reflect the intent. (I think expansion by numeric code point makes sense and is probably what most existing programs want, but this is a contended issue in the context of POSIX regular expressions, e.g. some C libraries try (not always successfully) to make [0-9] match all of the characters that Python's \d matches, so it's not "obvious".) ---------- assignee: docs at python components: Documentation, Regular Expressions messages: 321963 nosy: docs at python, ezio.melotti, mrabarnett, zwol priority: normal severity: normal status: open title: Nail down and document the behavior of range expressions in RE character classes type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 15:05:07 2018 From: report at bugs.python.org (Zack Weinberg) Date: Thu, 19 Jul 2018 19:05:07 +0000 Subject: [issue34156] Nail down and document the behavior of range expressions in RE character classes In-Reply-To: <1532027000.32.0.56676864532.issue34156@psf.upfronthosting.co.za> Message-ID: <1532027107.77.0.56676864532.issue34156@psf.upfronthosting.co.za> Zack Weinberg added the comment: Also, whether or not the current behavior is the intended behavior, I think programmers would appreciate an explicit statement of whether or not it might change in the future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 15:26:29 2018 From: report at bugs.python.org (Brett Cannon) Date: Thu, 19 Jul 2018 19:26:29 +0000 Subject: [issue34143] There is a constant definition error in errno.py In-Reply-To: <1531898794.31.0.56676864532.issue34143@psf.upfronthosting.co.za> Message-ID: <1532028389.88.0.56676864532.issue34143@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 15:29:32 2018 From: report at bugs.python.org (Jakub Wilk) Date: Thu, 19 Jul 2018 19:29:32 +0000 Subject: [issue34157] NamedTemporaryFile can leave temporary files behind Message-ID: <1532028572.02.0.56676864532.issue34157@psf.upfronthosting.co.za> New submission from Jakub Wilk : If you press Ctrl+C at the wrong moment, NamedTemporaryFile won't delete the temporary file. To reproduce, you can try this script: import tempfile while True: with tempfile.NamedTemporaryFile(dir='.'): pass I get a stray temporary file when I press Ctrl+C about 40% of the time. ---------- components: Library (Lib) messages: 321965 nosy: jwilk priority: normal severity: normal status: open title: NamedTemporaryFile can leave temporary files behind type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 16:54:53 2018 From: report at bugs.python.org (Stephan Hoyer) Date: Thu, 19 Jul 2018 20:54:53 +0000 Subject: [issue24379] Add operator.subscript as a convenience for creating slices In-Reply-To: <1433398024.28.0.0919512106527.issue24379@psf.upfronthosting.co.za> Message-ID: <1532033693.94.0.56676864532.issue24379@psf.upfronthosting.co.za> Stephan Hoyer added the comment: Raymond, Tal and Guido -- do any of you work routinely with multi-dimensional arrays? In my experience as someone who uses Python everyday for numerical computing (and has been doing so for many years), the need for an operator like this comes up with some regularity. With multi-dimensional indexing, this allows lets you cut down quite a bit on boilerplate, e.g., compare subscript[:, 0, ::-1] vs (slice(None), 0, slice(None, None, -1)) It's absolutely true that subscript is an easy four line recipe, and indeed a form of this recipe is already included in both NumPy and pandas. But I think this is a case where the lack of a common idiom is actively harmful. I do multi-dimensional indexing in using at least four different libraries (pandas, xarray, numpy and tensorflow), and it feels wrong to use a utility from numpy/pandas for other projects. I could write my own version of operator.subscript in each project (and yes, I've done so before), but for any individual use case it's less hassle to write things out the long way. In practice, the preferred way to write such long expressions seems to be to redundantly repeat indexing operations, e.g., x[:, 0, ::-1] y[:, 0, ::-1] rather than index = subscript[:, 0, ::-1] x[index] y[index] This is definitely non-ideal from a readability perspective. It's no longer immediately clear that these arrays are being indexed in the same way, and any changes would need to be applied twice. ---------- nosy: +Stephan Hoyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 17:03:38 2018 From: report at bugs.python.org (Jakub Wilk) Date: Thu, 19 Jul 2018 21:03:38 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1532034218.31.0.56676864532.issue34155@psf.upfronthosting.co.za> Jakub Wilk added the comment: You should not use decode_header() on the whole From header, because that loses information. You should parse the header first, then decode the parts that could be RFC2047-encoded. Quoting : > NOTE: Decoding and display of encoded-words occurs *after* a > structured field body is parsed into tokens. It is therefore > possible to hide 'special' characters in encoded-words which, when > displayed, will be indistinguishable from 'special' characters in the > surrounding text. For this and other reasons, it is NOT generally > possible to translate a message header containing 'encoded-word's to > an unencoded form which can be parsed by an RFC 822 mail reader. So I don't see a bug in parseaddr() here, except that the API is a bit of a footgun. ---------- nosy: +jwilk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 17:34:47 2018 From: report at bugs.python.org (Christophe Nanteuil) Date: Thu, 19 Jul 2018 21:34:47 +0000 Subject: [issue34158] Documentation of datetime '%z' format code is odd Message-ID: <1532036087.85.0.56676864532.issue34158@psf.upfronthosting.co.za> New submission from Christophe Nanteuil : In ? 8.1.8. "strftime() and strptime() Behavior", the documentation states that "%z" format code is a string of the form '?HHMM[SS[.uuuuuu]]' where uuuuuu is a 2-digit string giving the number of UTC offset microseconds. I think it's a 6-digit string. ---------- assignee: docs at python components: Documentation files: datetime.rst.patch keywords: patch messages: 321968 nosy: Christophe Nanteuil, docs at python priority: normal severity: normal status: open title: Documentation of datetime '%z' format code is odd versions: Python 3.7 Added file: https://bugs.python.org/file47704/datetime.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 18:19:35 2018 From: report at bugs.python.org (Sheng Zhong) Date: Thu, 19 Jul 2018 22:19:35 +0000 Subject: [issue34159] asyncio basic event loop stuck with no tasks scheduled or ready Message-ID: <1532038775.06.0.56676864532.issue34159@psf.upfronthosting.co.za> New submission from Sheng Zhong : An exception is raised and propagates up the call stack without being consumed until the asyncio/events.py:_run function. The exception seemingly doesn't get consumed according to my breakpoint (quite strange and a part of my confusion) but the task does get removed from the next loop cycle as expected. However, a subsequent call to the loop's _run_once() gets stuck forever on `event_list = self._selector.select(timeout)` with no tasks in its `_ready` or `_scheduled` queue. A snippet of the debug session is below https://i.imgur.com/YLcU8I6.png Shouldn't an event loop with no tasks left exit? ---------- components: asyncio messages: 321969 nosy: Sheng Zhong, asvetlov, yselivanov priority: normal severity: normal status: open title: asyncio basic event loop stuck with no tasks scheduled or ready type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 18:34:11 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 19 Jul 2018 22:34:11 +0000 Subject: [issue30237] Access violation due to CancelSynchronousIo of console read In-Reply-To: <1493747167.63.0.66545140377.issue30237@psf.upfronthosting.co.za> Message-ID: <1532039651.79.0.56676864532.issue30237@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset ce75df3031c86b78311b1ad76c39c0b39d7d7424 by Steve Dower (ValeriyaSinevich) in branch 'master': bpo-30237: Output error when ReadConsole is canceled by CancelSynchronousIo. (GH-7911) https://github.com/python/cpython/commit/ce75df3031c86b78311b1ad76c39c0b39d7d7424 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 18:34:49 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 19 Jul 2018 22:34:49 +0000 Subject: [issue30237] Access violation due to CancelSynchronousIo of console read In-Reply-To: <1493747167.63.0.66545140377.issue30237@psf.upfronthosting.co.za> Message-ID: <1532039689.42.0.56676864532.issue30237@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7876 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 18:41:07 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 19 Jul 2018 22:41:07 +0000 Subject: [issue30237] Access violation due to CancelSynchronousIo of console read In-Reply-To: <1493747167.63.0.66545140377.issue30237@psf.upfronthosting.co.za> Message-ID: <1532040067.12.0.56676864532.issue30237@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +7877 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 19:35:31 2018 From: report at bugs.python.org (Larry Hastings) Date: Thu, 19 Jul 2018 23:35: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: <1532043331.5.0.56676864532.issue33216@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset 76aa2c0a9a8dd3ac90b91e7342c8ce8125bf21f9 by larryhastings in branch '3.5': bpo-33216: Clarify the documentation for CALL_FUNCTION_* (#8338) https://github.com/python/cpython/commit/76aa2c0a9a8dd3ac90b91e7342c8ce8125bf21f9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 20:08:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Jul 2018 00:08:42 +0000 Subject: [issue24379] Add operator.subscript as a convenience for creating slices In-Reply-To: <1433398024.28.0.0919512106527.issue24379@psf.upfronthosting.co.za> Message-ID: <1532045322.39.0.56676864532.issue24379@psf.upfronthosting.co.za> STINNER Victor added the comment: > Raymond, Tal and Guido -- do any of you work routinely with multi-dimensional arrays? Hi Stephan Hoyer, IMHO a *closed* issue is not the most appropriate place to request Guido to change his mind. You may get more traction on python-ideas where you may find more supporters who need the operator. The question is not only if the operator makes sense (obviously, it does, for you), but if it "belongs" to the standard library. Is it popular enough? Is it consistent with other functions of the operator module? etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 20:42:07 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 20 Jul 2018 00:42:07 +0000 Subject: [issue34160] ElementTree not preserving attribute order Message-ID: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> New submission from Raymond Hettinger : Starting with Python3.6, the order of keyword arguments has been guaranteed. Something in ElementTree is not respecting that order. $ python3.7 Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 26 2018, 23:26:24) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from xml.etree.ElementTree import Element, dump >>> dump(Element('cirriculum', status='public', company='example')) >>> # ^-----------------^-------------------- These are swapped ---------- components: Library (Lib) messages: 321973 nosy: eli.bendersky, rhettinger, scoder priority: normal severity: normal status: open title: ElementTree not preserving attribute order type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 20:44:48 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 20 Jul 2018 00:44:48 +0000 Subject: [issue34157] NamedTemporaryFile can leave temporary files behind In-Reply-To: <1532028572.02.0.56676864532.issue34157@psf.upfronthosting.co.za> Message-ID: <1532047488.37.0.56676864532.issue34157@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Nick, is this related to the bug where the "finally" portion of a context manager isn't guaranteed to be called? ---------- nosy: +ncoghlan, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 19 23:12:47 2018 From: report at bugs.python.org (bbayles) Date: Fri, 20 Jul 2018 03:12:47 +0000 Subject: [issue34132] Obscure netrc parser "bug" In-Reply-To: <1531782813.71.0.56676864532.issue34132@psf.upfronthosting.co.za> Message-ID: <1532056367.48.0.56676864532.issue34132@psf.upfronthosting.co.za> bbayles added the comment: I took a shot at this, but closed my PR when I found that it introduced a different regression. After playing with it for a bit, I think that this commit [1] is a bit problematic because it uses lexer.instream.readline(), which can make the line number in lexer.lineno incorrect. I may take another look if I have time, but someone else is free to tackle this. [1] https://github.com/python/cpython/commit/1df0f214a9fdb4dde7506576b144cf6a7fd01b65#diff-e6896f6d68ca3fd8094a933533f8b2ed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 00:46:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 20 Jul 2018 04:46:12 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1532061972.5.0.56676864532.issue34160@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Attributes are sorted by name when converted an element to the text representation for making it stable. Changing this may break existing software. I think it makes sense now to add an optional keyword-only parameter sort_attrs (True by default) for functions tostring() and tostringlist() and method ElementTree.write(). If it is False, attributes will keep the original order. Since dump() is used for debugging only, it could change the behavior by default, even in maintained releases. But currently it just uses ElementTree.write(), which should sort attributes by default for compatibility. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 00:52:03 2018 From: report at bugs.python.org (Orlando) Date: Fri, 20 Jul 2018 04:52:03 +0000 Subject: [issue34161] Tutorial 7.1 str.format() code example syntax error Message-ID: <1532062323.28.0.56676864532.issue34161@psf.upfronthosting.co.za> New submission from Orlando : Tutorial 7.1 str.format() example (https://docs.python.org/3.7/tutorial/inputoutput.html#fancier-output-formatting): [1]yes_votes = 42_572_654 ; no_votes = 43_132_495 [2]percentage = (yes_votes/(yes_votes+no_votes) [3]'{:-9} YES votes {:2.2%}'.format(yes_votes, percentage)) Proposed Fix: Remove first open parens on line 2 and last close parens on line 3. ---------- assignee: docs at python components: Documentation messages: 321977 nosy: docs at python, oboff priority: normal severity: normal status: open title: Tutorial 7.1 str.format() code example syntax error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 01:06:52 2018 From: report at bugs.python.org (Valeriya Sinevich) Date: Fri, 20 Jul 2018 05:06:52 +0000 Subject: [issue28166] WindowsConsoleIO misbehavior when Ctrl+C is ignored In-Reply-To: <1473927025.25.0.183534906845.issue28166@psf.upfronthosting.co.za> Message-ID: <1532063212.19.0.56676864532.issue28166@psf.upfronthosting.co.za> Change by Valeriya Sinevich : ---------- keywords: +patch pull_requests: +7878 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 01:15:13 2018 From: report at bugs.python.org (Valeriya Sinevich) Date: Fri, 20 Jul 2018 05:15:13 +0000 Subject: [issue28166] WindowsConsoleIO misbehavior when Ctrl+C is ignored In-Reply-To: <1473927025.25.0.183534906845.issue28166@psf.upfronthosting.co.za> Message-ID: <1532063713.13.0.56676864532.issue28166@psf.upfronthosting.co.za> Valeriya Sinevich added the comment: I posted a PR but the problem with it is that all the input before the ignored Ctrl+C is lost. ---------- nosy: +valer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 01:25:09 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 20 Jul 2018 05:25:09 +0000 Subject: [issue34161] (good first issue) Tutorial 7.1 str.format() code example syntax error In-Reply-To: <1532062323.28.0.56676864532.issue34161@psf.upfronthosting.co.za> Message-ID: <1532064309.84.0.56676864532.issue34161@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Yup. Are you interested in creating the PR? ---------- keywords: +easy nosy: +Mariatta stage: -> needs patch title: Tutorial 7.1 str.format() code example syntax error -> (good first issue) Tutorial 7.1 str.format() code example syntax error versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 01:33:12 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 20 Jul 2018 05:33:12 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) Message-ID: <1532064792.76.0.56676864532.issue34162@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- assignee: terry.reedy components: IDLE nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: idlelib/NEWS.txt for 3.8.0 (and backports) type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 01:45:23 2018 From: report at bugs.python.org (Janibasha) Date: Fri, 20 Jul 2018 05:45:23 +0000 Subject: [issue34163] Python latest release 2.7 shows SSL error Message-ID: <1532065522.97.0.56676864532.issue34163@psf.upfronthosting.co.za> New submission from Janibasha : I have downloaded & installed python latest 2.7 version (on date - 16th July). Initially i was unable to install even pip using cmd - python get-pip.py, somehow i managed to installed pip. Then i was unable to install any package using pip. It throws SSL error. Tried multiple ways to install but no go. No proxy or admin issues observed (admin confirmed the same). Then i uninstalled & reinstalled 2.7.10 which resolved the issue. Please check the attached screenshots and resolve it. ---------- assignee: christian.heimes components: SSL files: pip-error.JPG messages: 321981 nosy: Janibasha, christian.heimes priority: normal severity: normal status: open title: Python latest release 2.7 shows SSL error type: compile error versions: Python 2.7 Added file: https://bugs.python.org/file47705/pip-error.JPG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 01:53:09 2018 From: report at bugs.python.org (Christian Heimes) Date: Fri, 20 Jul 2018 05:53:09 +0000 Subject: [issue34163] Python latest release 2.7 shows SSL error In-Reply-To: <1532065522.97.0.56676864532.issue34163@psf.upfronthosting.co.za> Message-ID: <1532065989.32.0.56676864532.issue34163@psf.upfronthosting.co.za> Christian Heimes added the comment: This looks like a pip problem. Please open a bug report at https://github.com/pypa/pip ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 01:54:22 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 20 Jul 2018 05:54:22 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) Message-ID: <1532066062.45.0.56676864532.issue34162@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +7880 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 02:13:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 20 Jul 2018 06:13:54 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1532067234.51.0.56676864532.issue33729@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +7881 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 02:14:59 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 20 Jul 2018 06:14:59 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) Message-ID: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> New submission from Terry J. Reedy : New changeset 2c5c0a367c6ca648178072240fe0a32848636da6 by Terry Jan Reedy in branch 'master': bpo-34162: idlelib/NEWS.txt entries to 2018-7-20 (GH-8345) https://github.com/python/cpython/commit/2c5c0a367c6ca648178072240fe0a32848636da6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 02:16:12 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 20 Jul 2018 06:16:12 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1532067372.4.0.56676864532.issue34162@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +7882 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 02:16:39 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 20 Jul 2018 06:16:39 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1532067399.75.0.56676864532.issue34162@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +7883 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 02:42:22 2018 From: report at bugs.python.org (Windson Yang) Date: Fri, 20 Jul 2018 06:42:22 +0000 Subject: [issue34159] asyncio basic event loop stuck with no tasks scheduled or ready In-Reply-To: <1532038775.06.0.56676864532.issue34159@psf.upfronthosting.co.za> Message-ID: <1532068942.77.0.56676864532.issue34159@psf.upfronthosting.co.za> Windson Yang added the comment: Would you mind adding an example file? ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 02:48:21 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 20 Jul 2018 06:48:21 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1532069301.35.0.56676864532.issue34162@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 97c079c19a83881c88b56b95c545207f9ab51f6e by Terry Jan Reedy in branch '3.7': bpo-34162: idlelib/NEWS.txt entries to 2018-7-20 (GH-8345) (GH-8347) https://github.com/python/cpython/commit/97c079c19a83881c88b56b95c545207f9ab51f6e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 02:49:17 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 20 Jul 2018 06:49:17 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1532069357.75.0.56676864532.issue34162@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 917696242b2d1c7cf4cba660fa6a29c30667e6da by Terry Jan Reedy in branch '3.6': [3.6] bpo-34162: idlelib/NEWS.txt entries to 2018-7-20 (GH-8345) (GH-8348) https://github.com/python/cpython/commit/917696242b2d1c7cf4cba660fa6a29c30667e6da ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 02:51:02 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 20 Jul 2018 06:51:02 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1532069462.85.0.56676864532.issue34162@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Follow-up to #30928. First patch has to be backported by hand to adjust headers for each version. After that, 2 blanks after uniform length separator allows auto backports, except for further version-specific header changes or code patches. ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 03:05:46 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 20 Jul 2018 07:05:46 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1532070346.98.0.56676864532.issue30928@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed superseder: -> idlelib/NEWS.txt for 3.8.0 (and backports) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 03:56:42 2018 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 20 Jul 2018 07:56:42 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1532073402.4.0.56676864532.issue34160@psf.upfronthosting.co.za> Stefan Behnel added the comment: At least for lxml, attributes were never specified to have a sorted order (although attribute dicts are sorted on *input*, to give a *predictable* order as in ET), and the tutorial says: "Attributes are just unordered name-value pairs". However, I still think that Serhiy is right: this change would break code, and in particular test code that compares XML output. Having to deal with two different "correct" serialisations in tests depending on the Python version is annoying at best. But OTOH, comparing XML output should always be based on C14N and not on an arbitrary serialisation. XML C14N serialisation was specifically designed to provide a deterministic output byte sequence, regardless of how the XML document was created. (This is also used for cryptographic fingerprinting.) It is interesting that ET sorts the attributes on output. lxml does it only on API *input*, because the underlying tree model is order preserving. Parsed attributes are always written in the original document order, followed by the attributes set through the API in the order in which they were set. For lxml, a serialisation flag is not going to help, because the serialisation order is always deterministic from the time where an attribute is added to the tree. Given that dicts are order preserving in Python now, ET could follow this path as well. The attributes are already in parse order and could easily be serialised that way, and attributes that were added through the API would end up being serialised last, also preserving the order. This would leave lxml and ET with the same serialisation order, which seems attractive. In short, I like this change, it's just difficult to see a way how this could preserve full backwards compatibility. And it's difficult to say how important backwards compatibility really is here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 04:34:13 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 20 Jul 2018 08:34:13 +0000 Subject: [issue34100] Same constants in tuples are not merged while compile() In-Reply-To: <1531336111.06.0.56676864532.issue34100@psf.upfronthosting.co.za> Message-ID: <1532075653.91.0.56676864532.issue34100@psf.upfronthosting.co.za> INADA Naoki added the comment: This is another memory overhead comparison. It seems merging constants reduces 2~3% memory usage. import sys, django, flask sys._debugmallocstats() ### master branch class size num pools blocks in use avail blocks ----- ---- --------- ------------- ------------ 0 8 1 312 194 1 16 1 135 118 2 24 2 198 138 3 32 22 2690 82 4 40 62 6214 48 5 48 149 12465 51 6 56 254 18260 28 7 64 354 22300 2 8 72 208 11589 59 9 80 124 6173 27 10 88 59 2708 6 ... # bytes in allocated blocks = 9,261,952 ### merge-const branch class size num pools blocks in use avail blocks ----- ---- --------- ------------- ------------ 0 8 1 312 194 1 16 1 135 118 2 24 1 161 7 3 32 22 2657 115 4 40 62 6202 60 5 48 102 8501 67 6 56 235 16879 41 7 64 346 21751 47 8 72 204 11387 37 9 80 122 6083 17 10 88 58 2656 12 ... # bytes in allocated blocks = 8,919,824 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 05:07:27 2018 From: report at bugs.python.org (Windson Yang) Date: Fri, 20 Jul 2018 09:07:27 +0000 Subject: [issue34161] (good first issue) Tutorial 7.1 str.format() code example syntax error In-Reply-To: <1532062323.28.0.56676864532.issue34161@psf.upfronthosting.co.za> Message-ID: <1532077647.48.0.56676864532.issue34161@psf.upfronthosting.co.za> Windson Yang added the comment: Hi, Orlando, this link maybe useful: https://devguide.python.org/documenting/ ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 05:21:09 2018 From: report at bugs.python.org (Jussi Judin) Date: Fri, 20 Jul 2018 09:21:09 +0000 Subject: [issue34164] base64.b32decode() leads into UnboundLocalError on some data Message-ID: <1532078469.74.0.56676864532.issue34164@psf.upfronthosting.co.za> New submission from Jussi Judin : base64.b32decode() function leads into "UnboundLocalError: local variable 'acc' referenced before assignment" when passing 8 equality signs as data: >>> import base64 >>> base64.b32decode(b"========") Traceback (most recent call last): File "", line 1, in File "/tmp/python-3.7-bin/lib/python3.7/base64.py", line 235, in b32decode acc <<= 5 * padchars UnboundLocalError: local variable 'acc' referenced before assignment When passing a different number of equality signs, the documented binascii.Error exception is thrown. ---------- components: Library (Lib) messages: 321991 nosy: Barro priority: normal severity: normal status: open title: base64.b32decode() leads into UnboundLocalError on some data type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 05:28:43 2018 From: report at bugs.python.org (Jussi Judin) Date: Fri, 20 Jul 2018 09:28:43 +0000 Subject: [issue34164] base64.b32decode() leads into UnboundLocalError and OverflowError on some data In-Reply-To: <1532078469.74.0.56676864532.issue34164@psf.upfronthosting.co.za> Message-ID: <1532078923.36.0.56676864532.issue34164@psf.upfronthosting.co.za> Jussi Judin added the comment: Apparently base64.b32decode() also has another issue that I missed when going through the issues with base64 module: >>> import base64 >>> base64.b32decode(b"M===============================") Traceback (most recent call last): File "", line 1, in File "/tmp/python-3.7-bin/lib/python3.7/base64.py", line 236, in b32decode last = acc.to_bytes(5, 'big') OverflowError: int too big to convert ---------- title: base64.b32decode() leads into UnboundLocalError on some data -> base64.b32decode() leads into UnboundLocalError and OverflowError on some data _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 05:44:15 2018 From: report at bugs.python.org (Windson Yang) Date: Fri, 20 Jul 2018 09:44:15 +0000 Subject: [issue33635] OSError when using pathlib.Path.rglob() to list device files In-Reply-To: <1527164127.59.0.682650639539.issue33635@psf.upfronthosting.co.za> Message-ID: <1532079855.26.0.56676864532.issue33635@psf.upfronthosting.co.za> Windson Yang added the comment: I tried to fix this issue and I found this should be related to os.stat() in os.py. But I can't find the os.stat() API in the file, any ideas? ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 05:53:48 2018 From: report at bugs.python.org (Jussi Judin) Date: Fri, 20 Jul 2018 09:53:48 +0000 Subject: [issue34165] uu.decode() raises binascii.Error instead of uu.Error on invalid data Message-ID: <1532080428.61.0.56676864532.issue34165@psf.upfronthosting.co.za> New submission from Jussi Judin : uu.decode() function can leak the internal binascii.Error exception from binascii.a2b_uu() function call instead of the documented uu.Error exception. Following code demonstrates the issue: >>> import uu >>> with open("in.uu", "wb") as fp: ... fp.write(b'begin 0 \n0\xe8') >>> uu.decode("in.uu", "out.uu") Traceback (most recent call last): File "/tmp/python-3.7-bin/lib/python3.7/uu.py", line 148, in decode data = binascii.a2b_uu(s) binascii.Error: Illegal char During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "/tmp/python-3.7-bin/lib/python3.7/uu.py", line 152, in decode data = binascii.a2b_uu(s[:nbytes]) binascii.Error: Illegal char It looks like the the workaround for broken encoders that catches the first binascii.Error exception just lets the second one to propagate if the recovery fails. I would except uu.Error to be raised instead, as that is mentioned in the documentation. ---------- components: Library (Lib) messages: 321994 nosy: Barro priority: normal severity: normal status: open title: uu.decode() raises binascii.Error instead of uu.Error on invalid data versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 06:26:09 2018 From: report at bugs.python.org (Orlando) Date: Fri, 20 Jul 2018 10:26:09 +0000 Subject: [issue34161] (good first issue) Tutorial 7.1 str.format() code example syntax error In-Reply-To: <1532062323.28.0.56676864532.issue34161@psf.upfronthosting.co.za> Message-ID: <1532082369.01.0.56676864532.issue34161@psf.upfronthosting.co.za> Orlando added the comment: Thanks, Mariatta and Windson. I'll make a PR for the change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 06:35:02 2018 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 20 Jul 2018 10:35:02 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1532082902.85.0.56676864532.issue29710@psf.upfronthosting.co.za> Nick Coghlan added the comment: Ah, "the internal representation" was meant to refer a hypothetical representation, rather than literally to CPython's actual implementation, but now that you point it out, I agree my wording is ambiguous. I like Tim's suggested replacement: ===================== 4. Performing these calculations with at least one extra sign extension bit in a finite two's complement representation (a working bit-width of ``1 + max(x.bit_length(), y.bit_length()`` or more) is sufficient to get the same result as if there were an infinite number of sign bits. ===================== ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 06:49:36 2018 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 20 Jul 2018 10:49:36 +0000 Subject: [issue34118] Fix some class entries in 'Built-in Functions' In-Reply-To: <1531623878.78.0.56676864532.issue34118@psf.upfronthosting.co.za> Message-ID: <1532083776.12.0.56676864532.issue34118@psf.upfronthosting.co.za> Nick Coghlan added the comment: Marking memoryview, range, and tuple explicitly as classes, and making the initial phrasing in the docs consistent across all the builtin collection/container types sounds like a good improvement to me. I agree with Raymond that we should leave whether or not enumerate, filter, map, reversed, and zip support inheritance, isinstance() and issubclass() ambiguous for now (at least within the scope of this issue). That's the main observable difference between implementations that expose a class definition directly, and those that wrap them in a factory function. While technically that ambiguity is a portability problem across implementations, in practice folks that want to emulate one of these behaviours are far more likely to write their own generator function or iterator class from scratch than they are to try to inherit from one of these. If we were going to note anything at all for these, it would be to put a "CPython implementation detail" note in each one about the fact that you can subclass them being a CPython implementation detail, but I'd only suggest adding that if we ever get complaints about this hindering portability in practice, rather than our pointing it ourselves as a potential point of inconsistency. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 06:53:24 2018 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 20 Jul 2018 10:53:24 +0000 Subject: [issue34118] Fix some class entries in 'Built-in Functions' In-Reply-To: <1531623878.78.0.56676864532.issue34118@psf.upfronthosting.co.za> Message-ID: <1532084004.39.0.56676864532.issue34118@psf.upfronthosting.co.za> Nick Coghlan added the comment: Note that an alternative option for clarifying the status of the "Are they types or factory functions?" builtins would be for someone to review https://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy and compare it to the builtins documentation in the library reference. The language reference is often a better home for clarifying the Python vs CPython behavioural oundary, since it avoids cluttering up the main docs with info that's going to be irrelevant to the vast majority of users. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 06:56:36 2018 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 20 Jul 2018 10:56:36 +0000 Subject: [issue34157] NamedTemporaryFile can leave temporary files behind In-Reply-To: <1532028572.02.0.56676864532.issue34157@psf.upfronthosting.co.za> Message-ID: <1532084196.17.0.56676864532.issue34157@psf.upfronthosting.co.za> Nick Coghlan added the comment: Aye, this is a specific case of the general issue noted in https://bugs.python.org/issue29988 (while it may be partially mitigated by https://bugs.python.org/issue32949, it isn't a guarantee) ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> with statements are not ensuring that __exit__ is called if __enter__ succeeds _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 07:01:47 2018 From: report at bugs.python.org (Michael Felt) Date: Fri, 20 Jul 2018 11:01:47 +0000 Subject: [issue34163] Python latest release 2.7 shows SSL error In-Reply-To: <1532065522.97.0.56676864532.issue34163@psf.upfronthosting.co.za> Message-ID: <1532084507.26.0.56676864532.issue34163@psf.upfronthosting.co.za> Michael Felt added the comment: There is a big chance it is not a direct issue with either python or pip / rather an issue with how current your "openssl" setup is. As an example, using git I was not able to "pull" from a remote. This git (that also depends on python) has been working for ages. I "fixed" it by getting an updated "global" cacert.pem "chain of trust" installed and now https://... queries were working instantly. So, did you perhaps, also update your SSL while re-installing/updating python2? (And also note, v2.7.10 is several years old. The latest v2.7 version is 2.7.15). ---------- nosy: +Michael.Felt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 08:06:04 2018 From: report at bugs.python.org (Lele Gaifax) Date: Fri, 20 Jul 2018 12:06:04 +0000 Subject: [issue34166] Tools/msgfmt.py emits a DeprecationWarning under Python 3.7 Message-ID: <1532088364.94.0.56676864532.issue34166@psf.upfronthosting.co.za> New submission from Lele Gaifax : $ python3.7 msgfmt.py -o test.mo test.po msgfmt.py:199: DeprecationWarning: tostring() is deprecated. Use tobytes() instead. output = generate() ---------- components: Demos and Tools messages: 322001 nosy: lelit priority: normal severity: normal status: open title: Tools/msgfmt.py emits a DeprecationWarning under Python 3.7 versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 08:35:12 2018 From: report at bugs.python.org (Eric Janson) Date: Fri, 20 Jul 2018 12:35:12 +0000 Subject: [issue34167] Standard library docs: prev/next skip right over 16.11 Message-ID: <1532090112.81.0.56676864532.issue34167@psf.upfronthosting.co.za> New submission from Eric Janson : Hitting next from 16.10 in standard library online docs jumps to 16.12. Previous goes from 16.12 back to 16.10. Curses.Textpad(16.11) must be random-accessed. ---------- assignee: docs at python components: Documentation messages: 322002 nosy: Eric Janson, docs at python priority: normal severity: normal status: open title: Standard library docs: prev/next skip right over 16.11 type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 08:44:22 2018 From: report at bugs.python.org (Eryk Sun) Date: Fri, 20 Jul 2018 12:44:22 +0000 Subject: [issue28166] WindowsConsoleIO misbehavior when Ctrl+C is ignored In-Reply-To: <1473927025.25.0.183534906845.issue28166@psf.upfronthosting.co.za> Message-ID: <1532090662.87.0.56676864532.issue28166@psf.upfronthosting.co.za> Eryk Sun added the comment: > all the input before the ignored Ctrl+C is lost The console host process doesn't know that Python is ignoring Ctrl+C, so it cancels the read and flushes the input buffer. For now, we have to accept this as a limitation of relying on the high-level console API (i.e. ReadConsoleW with the default settings), which implements command-line editing, aliases and history completely in the console host process. Restarting the read with a flushed input buffer is better than raising EOFError or exiting the REPL. In the future, Python's console readline implementation could hook deeper into the operation by temporarily disabling the console's ENABLE_PROCESSED_INPUT mode and using the pInputControl parameter to handle ^C and ^H (backspace). This would be fairly involved but still an imperfect solution because ^C will replace whichever character is under the cursor (fine if the cursor is at the end of the line, but otherwise pretty clunky). The only way to have complete control is to use the low-level ReadConsoleInput function. pyreadline implements this via ctypes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 08:53:50 2018 From: report at bugs.python.org (Dem) Date: Fri, 20 Jul 2018 12:53:50 +0000 Subject: [issue34168] RAM consumption too high using concurrent.futures (Python 3.7 / 3.6 ) Message-ID: <1532091230.61.0.56676864532.issue34168@psf.upfronthosting.co.za> New submission from Dem : I have a list of 30 million strings, and I want to run a dns query to all of them. I do not understand how this operation can get memory intensive. I would assume that the threads would exit after the job is done, and there is also a timeout of 1 minute as well ({'dns_request_timeout': 1}). Here is a sneak peek of the machine's resources while running the script: [![enter image description here][1]][1] My code is as follows: # -*- coding: utf-8 -*- import dns.resolver import concurrent.futures from pprint import pprint from json import json bucket = json.load(open('30_million_strings.json','r')) def _dns_query(target, **kwargs): global bucket resolv = dns.resolver.Resolver() resolv.timeout = kwargs['function']['dns_request_timeout'] try: resolv.query(target + '.com', kwargs['function']['query_type']) with open('out.txt', 'a') as f: f.write(target + '\n') except Exception: pass def run(**kwargs): global bucket temp_locals = locals() pprint({k: v for k, v in temp_locals.items()}) with concurrent.futures.ThreadPoolExecutor(max_workers=kwargs['concurrency']['threads']) as executor: future_to_element = dict() for element in bucket: future = executor.submit(kwargs['function']['name'], element, **kwargs) future_to_element[future] = element for future in concurrent.futures.as_completed(future_to_element): result = future_to_element[future] run(function={'name': _dns_query, 'dns_request_timeout': 1, 'query_type': 'MX'}, concurrency={'threads': 15}) [1]: https://i.stack.imgur.com/686SW.png ---------- components: Library (Lib) messages: 322004 nosy: DemGiran priority: normal severity: normal status: open title: RAM consumption too high using concurrent.futures (Python 3.7 / 3.6 ) versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 08:55:27 2018 From: report at bugs.python.org (Dem) Date: Fri, 20 Jul 2018 12:55:27 +0000 Subject: [issue34168] RAM consumption too high using concurrent.futures (Python 3.7 / 3.6 ) In-Reply-To: <1532091230.61.0.56676864532.issue34168@psf.upfronthosting.co.za> Message-ID: <1532091327.72.0.56676864532.issue34168@psf.upfronthosting.co.za> Dem added the comment: It seems that even without the as_completed call it has the same problem. ``` # -*- coding: utf-8 -*- import dns.resolver import concurrent.futures from pprint import pprint from json import json bucket = json.load(open('30_million_strings.json','r')) def _dns_query(target, **kwargs): global bucket resolv = dns.resolver.Resolver() resolv.timeout = kwargs['function']['dns_request_timeout'] try: resolv.query(target + '.com', kwargs['function']['query_type']) with open('out.txt', 'a') as f: f.write(target + '\n') except Exception: pass def run(**kwargs): global bucket temp_locals = locals() pprint({k: v for k, v in temp_locals.items()}) with concurrent.futures.ThreadPoolExecutor(max_workers=kwargs['concurrency']['threads']) as executor: for element in bucket: executor.submit(kwargs['function']['name'], element, **kwargs) run(function={'name': _dns_query, 'dns_request_timeout': 1, 'query_type': 'MX'}, concurrency={'threads': 15}) ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 09:33:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Jul 2018 13:33:39 +0000 Subject: [issue34008] Do we support calling Py_Main() after Py_Initialize()? In-Reply-To: <1530341921.37.0.56676864532.issue34008@psf.upfronthosting.co.za> Message-ID: <1532093619.42.0.56676864532.issue34008@psf.upfronthosting.co.za> STINNER Victor added the comment: > This hits fontforge. See https://bugzilla.redhat.com/show_bug.cgi?id=1595421 Copy of my comment 20: I looked one more time to the issue: * fontforge code is fine: it calls Py_Initialize() before using the Python C API to initialize its Python namespace (modules, functions, types, etc.), and later it calls Py_Main(). * Python 3.7.0 is wrong: it fails with a fatal erro when Py_Main() is called if Py_Initialize() has been called previously. It is a regression since it worked fine in Python 3.6. * My PR https://github.com/python/cpython/pull/8043 works again the simplest test: "fontforge -script hello.py" where hello.py is just "print('Hello World!')" * This PR is not enough according to Miro, since fontforge requires sys.argv to be set, whereas sys.argv is no longer set when Py_Main() is after Py_Initialize(): https://github.com/python/cpython/pull/8043#issuecomment-401731992 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 09:38:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Jul 2018 13:38:13 +0000 Subject: [issue34008] Do we support calling Py_Main() after Py_Initialize()? In-Reply-To: <1530341921.37.0.56676864532.issue34008@psf.upfronthosting.co.za> Message-ID: <1532093893.6.0.56676864532.issue34008@psf.upfronthosting.co.za> STINNER Victor added the comment: I looked one more time at Python 3.6, code before my huge Py_Main()/Py_Initialize() refactoring, before _PyCoreConfig/_PyMainInterpreterConfig have been added. In short, calling Py_Main() after Py_Initialize() "works" in Python 3.6 but only sys.argv is set: almost all other options are lost/ignored. For example, if you call Py_Initialize() you get a sys.path from the current environment, but if Py_Main() gets a new module search path: sys.path is not updated. I modified PR 8043 to write the minimum patch just to fix fontforge. When Py_Main() is called Py_Initialize(): just set sys.argv, that's all. If someone wants to fix this use case, apply properly the new Py_Main() configuration carefully, I would suggest to only work in the master branch: that's out of the scope of this specific regression. IMHO it would be nice to enhance this use case. For example, it would be "nice" to update at least "sys.path" (and other related variables) in such case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 09:41:45 2018 From: report at bugs.python.org (Noah Haasis) Date: Fri, 20 Jul 2018 13:41:45 +0000 Subject: [issue34154] Tkinter __init__ documentations sometimes missing valid keyword values In-Reply-To: <1531969710.94.0.56676864532.issue34154@psf.upfronthosting.co.za> Message-ID: <1532094105.72.0.56676864532.issue34154@psf.upfronthosting.co.za> Noah Haasis added the comment: I'd like to work on this, if it's ok for everybody. ---------- nosy: +noah.haasis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 09:49:52 2018 From: report at bugs.python.org (Jakub Wilk) Date: Fri, 20 Jul 2018 13:49:52 +0000 Subject: [issue34157] NamedTemporaryFile can leave temporary files behind In-Reply-To: <1532028572.02.0.56676864532.issue34157@psf.upfronthosting.co.za> Message-ID: <1532094592.85.0.56676864532.issue34157@psf.upfronthosting.co.za> Jakub Wilk added the comment: I think issue29988 is unrelated, or at least not the whole story. These are samples of tracebacks I see when the file is left behind: Traceback (most recent call last): File "test-tmpfile.py", line 4, in with tempfile.NamedTemporaryFile(dir='.'): File "/opt/python/lib/python3.8/tempfile.py", line 548, in NamedTemporaryFile (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type) File "/opt/python/lib/python3.8/tempfile.py", line 258, in _mkstemp_inner fd = _os.open(file, flags, 0o600) KeyboardInterrupt Traceback (most recent call last): File "test-tmpfile.py", line 4, in with tempfile.NamedTemporaryFile(dir='.'): File "/opt/python/lib/python3.8/tempfile.py", line 548, in NamedTemporaryFile (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type) File "/opt/python/lib/python3.8/tempfile.py", line 269, in _mkstemp_inner return (fd, _os.path.abspath(file)) File "/opt/python/lib/python3.8/posixpath.py", line 371, in abspath path = os.fspath(path) KeyboardInterrupt Traceback (most recent call last): File "test-tmpfile.py", line 4, in with tempfile.NamedTemporaryFile(dir='.'): File "/opt/python/lib/python3.8/tempfile.py", line 548, in NamedTemporaryFile (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type) File "/opt/python/lib/python3.8/tempfile.py", line 269, in _mkstemp_inner return (fd, _os.path.abspath(file)) File "/opt/python/lib/python3.8/posixpath.py", line 378, in abspath return normpath(path) File "/opt/python/lib/python3.8/posixpath.py", line 355, in normpath if comp in (empty, dot): KeyboardInterrupt In all cases the interrupt happened in the NamedTemporaryFile function, so before __enter__/__exit__ would have chance to do its job. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 10:09:15 2018 From: report at bugs.python.org (Aaqa Ishtyaq) Date: Fri, 20 Jul 2018 14:09:15 +0000 Subject: [issue34161] (good first issue) Tutorial 7.1 str.format() code example syntax error In-Reply-To: <1532062323.28.0.56676864532.issue34161@psf.upfronthosting.co.za> Message-ID: <1532095755.36.0.56676864532.issue34161@psf.upfronthosting.co.za> Change by Aaqa Ishtyaq : ---------- keywords: +patch pull_requests: +7884 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 10:11:03 2018 From: report at bugs.python.org (Clint Hepner) Date: Fri, 20 Jul 2018 14:11:03 +0000 Subject: [issue34169] itertools.repeat does not accept None as an explicit count Message-ID: <1532095863.33.0.56676864532.issue34169@psf.upfronthosting.co.za> New submission from Clint Hepner : I expected to be able to pass None as an explicit count to itertools.repeat to get the default behavior of an infinite iterator: >>> list(islice(repeat(1), 10)) [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] >>> list(islice(repeat(1, None), 10)) Traceback (most recent call last): File "", line 1 in TypeError: 'NoneType' object cannot be interpreted as an integer ---------- components: Library (Lib) messages: 322010 nosy: chepner priority: normal severity: normal status: open title: itertools.repeat does not accept None as an explicit count versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 10:59:12 2018 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 20 Jul 2018 14:59:12 +0000 Subject: [issue34008] Do we support calling Py_Main() after Py_Initialize()? In-Reply-To: <1530341921.37.0.56676864532.issue34008@psf.upfronthosting.co.za> Message-ID: <1532098752.63.0.56676864532.issue34008@psf.upfronthosting.co.za> Nick Coghlan added the comment: +1 from me for the idea of fixing Python 3.7 to correctly set sys.argv in this case (and leaving everything else unmodified). As far as further enhancement in Python 3.8 goes, perhaps that can be seen as part of PEP 432, such that embedding applications have to explicitly opt-in to any new behaviour by calling the new APIs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 11:06:17 2018 From: report at bugs.python.org (Aaqa Ishtyaq) Date: Fri, 20 Jul 2018 15:06:17 +0000 Subject: [issue34161] (good first issue) Tutorial 7.1 str.format() code example syntax error In-Reply-To: <1532062323.28.0.56676864532.issue34161@psf.upfronthosting.co.za> Message-ID: <1532099177.85.0.56676864532.issue34161@psf.upfronthosting.co.za> Change by Aaqa Ishtyaq : ---------- pull_requests: +7885 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 11:09:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 20 Jul 2018 15:09:25 +0000 Subject: [issue34164] base64.b32decode() leads into UnboundLocalError and OverflowError on some data In-Reply-To: <1532078469.74.0.56676864532.issue34164@psf.upfronthosting.co.za> Message-ID: <1532099365.11.0.56676864532.issue34164@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +7886 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 11:13:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 20 Jul 2018 15:13:28 +0000 Subject: [issue34164] base64.b32decode() leads into UnboundLocalError and OverflowError on some data In-Reply-To: <1532078469.74.0.56676864532.issue34164@psf.upfronthosting.co.za> Message-ID: <1532099608.48.0.56676864532.issue34164@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your report Jussi. The type "crash" is used for hard crashes of the Python interpreter ? possibly with a core dump or a Windows error box. ---------- nosy: +serhiy.storchaka type: crash -> behavior versions: +Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 11:17:51 2018 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 20 Jul 2018 15:17:51 +0000 Subject: [issue34157] NamedTemporaryFile can leave temporary files behind In-Reply-To: <1532028572.02.0.56676864532.issue34157@psf.upfronthosting.co.za> Message-ID: <1532099871.48.0.56676864532.issue34157@psf.upfronthosting.co.za> Nick Coghlan added the comment: It's still the same problem - the underlying issue is that the with statement machinery doesn't currently mask signals in the main thread while __enter__ and __exit__ are running, so __enter__ and __exit__ methods written in Python are also at risk of being interrupted at an inopportune point. This means that even "with closing(open('filename')) as f: ..." is more at risk of leaving the file open until __del__ cleans it up than the version that calls open() directly. So if this a concern that an application needs to worry about, then it currently needs to adopt a more complicated execution structure where: 1. The main thread launches a subthread that actually does all the work. 2. The main thread immediately drops into "active_thread.join()" (which can be interrupted by Ctrl-C) Unfortunately, this scheme *doesn't* work for applications where the application itself needs to detect and handling signals other than Ctrl-C. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 11:22:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Jul 2018 15:22:57 +0000 Subject: [issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432) Message-ID: <1532100177.89.0.56676864532.issue34170@psf.upfronthosting.co.za> New submission from STINNER Victor : Attached ---------- components: Interpreter Core messages: 322014 nosy: vstinner priority: normal severity: normal status: open title: Py_Initialize(): computing path configuration must not have side effect (PEP 432) versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 11:23:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 20 Jul 2018 15:23:56 +0000 Subject: [issue34169] itertools.repeat does not accept None as an explicit count In-Reply-To: <1532095863.33.0.56676864532.issue34169@psf.upfronthosting.co.za> Message-ID: <1532100236.44.0.56676864532.issue34169@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 11:24:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Jul 2018 15:24:12 +0000 Subject: [issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432) In-Reply-To: <1532100177.89.0.56676864532.issue34170@psf.upfronthosting.co.za> Message-ID: <1532100252.91.0.56676864532.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: Attached PR reworks _PyCoreConfig_Read() to leave _Py_path_config unchanged: *reading* the core configuration must not *modify* the path configuration. The PR adds _PyCoreConfig.dll_path field. The change is related to the PEP 432. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 11:26:23 2018 From: report at bugs.python.org (Antoni Szych) Date: Fri, 20 Jul 2018 15:26:23 +0000 Subject: [issue21600] mock.patch.stopall doesn't work with patch.dict to sys.modules In-Reply-To: <1401334528.48.0.358693350259.issue21600@psf.upfronthosting.co.za> Message-ID: <1532100383.66.0.56676864532.issue21600@psf.upfronthosting.co.za> Antoni Szych added the comment: Hi, Any chance of getting this resolved 1 year later? :) BR ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 11:26:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Jul 2018 15:26:38 +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: <1532100398.46.0.56676864532.issue34170@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- Removed message: https://bugs.python.org/msg322014 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 11:27:00 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Jul 2018 15:27:00 +0000 Subject: [issue34008] Do we support calling Py_Main() after Py_Initialize()? In-Reply-To: <1530341921.37.0.56676864532.issue34008@psf.upfronthosting.co.za> Message-ID: <1532100420.5.0.56676864532.issue34008@psf.upfronthosting.co.za> STINNER Victor added the comment: I created bpo-34170: "Py_Initialize(): computing path configuration must not have side effect (PEP 432)" as a follow-up of this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 11:27:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Jul 2018 15:27:25 +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: <1532100445.96.0.56676864532.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-34008: "Do we support calling Py_Main() after Py_Initialize()?". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 11:34:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Jul 2018 15:34:25 +0000 Subject: [issue34008] Do we support calling Py_Main() after Py_Initialize()? In-Reply-To: <1530341921.37.0.56676864532.issue34008@psf.upfronthosting.co.za> Message-ID: <1532100865.85.0.56676864532.issue34008@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset fb47bca9ee2d07ce96df94b4e4abafd11826eb01 by Victor Stinner in branch 'master': bpo-34008: Allow to call Py_Main() after Py_Initialize() (GH-8043) https://github.com/python/cpython/commit/fb47bca9ee2d07ce96df94b4e4abafd11826eb01 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 11:34:50 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 20 Jul 2018 15:34:50 +0000 Subject: [issue34008] Do we support calling Py_Main() after Py_Initialize()? In-Reply-To: <1530341921.37.0.56676864532.issue34008@psf.upfronthosting.co.za> Message-ID: <1532100890.14.0.56676864532.issue34008@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7887 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 11:35:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Jul 2018 15:35:13 +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: <1532100913.48.0.56676864532.issue34170@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +7888 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 11:37:25 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Jul 2018 15:37:25 +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: <1532101045.46.0.56676864532.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: PR 8353 is the last piece of my long work on Py_Main() to separate code *reading* configuration and code *applying* a new configuration. My work on the new _PyPathConfig structure, and the PR should finish that work. Extract of the commit message: "A new _PyCoreConfig_SetPathConfig() function now recreates the path configuration from the core configuration. This function is now called very late in _Py_InitializeCore(), just before calling initimport()." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 11:46:14 2018 From: report at bugs.python.org (Matthias Klose) Date: Fri, 20 Jul 2018 15:46:14 +0000 Subject: [issue26544] platform.libc_ver() returns incorrect version number In-Reply-To: <1457742963.17.0.0403505576154.issue26544@psf.upfronthosting.co.za> Message-ID: <1532101574.65.0.56676864532.issue26544@psf.upfronthosting.co.za> Matthias Klose added the comment: please don't close this yet. the patch introduces a dependency on the distutils package. I don't see any reason to compare the libc version as a python egg version, so please avoid that. if we need to have a module to compare arbitrary version strings, then we should think about adding one in the standard library, but I think that's what the packaging module is for. ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 11:47:53 2018 From: report at bugs.python.org (Frank Thommen) Date: Fri, 20 Jul 2018 15:47:53 +0000 Subject: [issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support In-Reply-To: <1530609211.5.0.56676864532.issue34028@psf.upfronthosting.co.za> Message-ID: <1532101673.63.0.56676864532.issue34028@psf.upfronthosting.co.za> Frank Thommen added the comment: The configure script doesn't work with a proper openssl installation either. Even though there is a "lib" directory in the directory given to --with-openssl=, libssl.so.1.1 isn't found, because there is still a "-L/lib" missing in some of the compiler calls. LDFLAGS="-L/lib" ./configure --with-openssl= is required, which seems somehow redundant. Bug? ---------- nosy: +fthommen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 11:55:14 2018 From: report at bugs.python.org (Matthias Klose) Date: Fri, 20 Jul 2018 15:55:14 +0000 Subject: [issue26544] platform.libc_ver() returns incorrect version number In-Reply-To: <1457742963.17.0.0403505576154.issue26544@psf.upfronthosting.co.za> Message-ID: <1532102114.03.0.56676864532.issue26544@psf.upfronthosting.co.za> Matthias Klose added the comment: a tuple comparison should be good enough ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 11:56:38 2018 From: report at bugs.python.org (Frank Thommen) Date: Fri, 20 Jul 2018 15:56:38 +0000 Subject: [issue32627] Header dependent _uuid build failure on Fedora 27 In-Reply-To: <1516672443.95.0.467229070634.issue32627@psf.upfronthosting.co.za> Message-ID: <1532102198.04.0.56676864532.issue32627@psf.upfronthosting.co.za> Change by Frank Thommen : ---------- nosy: +fthommen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 12:07:40 2018 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 20 Jul 2018 16:07:40 +0000 Subject: [issue34011] Default preference not given to venv DLL's In-Reply-To: <1530353263.14.0.56676864532.issue34011@psf.upfronthosting.co.za> Message-ID: <1532102860.52.0.56676864532.issue34011@psf.upfronthosting.co.za> Vinay Sajip added the comment: New changeset 94487d45707772723ef19e86700a40a12743baa1 by Vinay Sajip in branch 'master': bpo-34011: Update code copying DLLs and init.tcl into venvs. (GH-8253) https://github.com/python/cpython/commit/94487d45707772723ef19e86700a40a12743baa1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 12:08:10 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 20 Jul 2018 16:08:10 +0000 Subject: [issue34161] (good first issue) Tutorial 7.1 str.format() code example syntax error In-Reply-To: <1532062323.28.0.56676864532.issue34161@psf.upfronthosting.co.za> Message-ID: <1532102890.49.0.56676864532.issue34161@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 Fri Jul 20 12:08:57 2018 From: report at bugs.python.org (Matthias Klose) Date: Fri, 20 Jul 2018 16:08:57 +0000 Subject: [issue34171] Lib/trace.cover not removed by the clean target Message-ID: <1532102937.62.0.56676864532.issue34171@psf.upfronthosting.co.za> New submission from Matthias Klose : Lib/trace.cover is not removed by the clean target, and apparently this file is always created in the source tree, not in the build tree. It should be created in the build tree, if that's not possible, it should be cleaned in any case. ---------- components: Build messages: 322026 nosy: doko priority: normal severity: normal status: open title: Lib/trace.cover not removed by the clean target versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 12:17:32 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 20 Jul 2018 16:17:32 +0000 Subject: [issue34161] (good first issue) Tutorial 7.1 str.format() code example syntax error In-Reply-To: <1532062323.28.0.56676864532.issue34161@psf.upfronthosting.co.za> Message-ID: <1532103452.04.0.56676864532.issue34161@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7889 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 12:35:12 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 20 Jul 2018 16:35:12 +0000 Subject: [issue34157] NamedTemporaryFile can leave temporary files behind In-Reply-To: <1532028572.02.0.56676864532.issue34157@psf.upfronthosting.co.za> Message-ID: <1532104512.66.0.56676864532.issue34157@psf.upfronthosting.co.za> R. David Murray added the comment: Nick, what Jakub is saying is that 'with' hasn't even gotten involved yet: we're still executing the NamedTemporaryFile constructor, so the object hasn't been returned for 'with' to operate on yet. In other words, NamedTemporaryFile.__init__ isn't safe against ctl-C when it calls _mkstemp, which is obvious by inspection since it isn't inside the try/except. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 12:36:19 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 20 Jul 2018 16:36:19 +0000 Subject: [issue34157] NamedTemporaryFile can leave temporary files behind In-Reply-To: <1532028572.02.0.56676864532.issue34157@psf.upfronthosting.co.za> Message-ID: <1532104579.97.0.56676864532.issue34157@psf.upfronthosting.co.za> Change by R. David Murray : ---------- resolution: duplicate -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 12:45:29 2018 From: report at bugs.python.org (tzickel) Date: Fri, 20 Jul 2018 16:45:29 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted Message-ID: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> New submission from tzickel : In multiprocessing.Pool documentation it's written "When the pool object is garbage collected terminate() will be called immediately.": https://docs.python.org/3.7/library/multiprocessing.html#multiprocessing.pool.Pool.terminate A. This does not happen, creating a Pool, deleting it and collecting the garbage, does not call terminate. B. The documentation for Pool itself does not specify it has a context manager (but the examples show it). C. This bug is both in Python 3 & 2. ---------- components: Library (Lib) messages: 322028 nosy: tzickel priority: normal severity: normal status: open title: multiprocessing.Pool and ThreadPool leak resources after being deleted type: behavior versions: Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 12:47:14 2018 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 20 Jul 2018 16:47:14 +0000 Subject: [issue34169] itertools.repeat does not accept None as an explicit count In-Reply-To: <1532095863.33.0.56676864532.issue34169@psf.upfronthosting.co.za> Message-ID: <1532105234.89.0.56676864532.issue34169@psf.upfronthosting.co.za> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +7890 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 12:59:44 2018 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 20 Jul 2018 16:59:44 +0000 Subject: [issue34169] itertools.repeat does not accept None as an explicit count In-Reply-To: <1532095863.33.0.56676864532.issue34169@psf.upfronthosting.co.za> Message-ID: <1532105984.25.0.56676864532.issue34169@psf.upfronthosting.co.za> Dong-hee Na added the comment: IMHO, this issue should be fixed since times=None can be passed, ref: https://docs.python.org/3/library/itertools.html#itertools.repeat This documentation also shows the equivalent python code, >From this code, times=None should work but does not work in current implementation. def repeat(object, times=None): # repeat(10, 3) --> 10 10 10 if times is None: while True: yield object else: for i in range(times): yield object I've upload PR with this issue. ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 13:06:14 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 20 Jul 2018 17:06:14 +0000 Subject: [issue34118] Fix some class entries in 'Built-in Functions' In-Reply-To: <1531623878.78.0.56676864532.issue34118@psf.upfronthosting.co.za> Message-ID: <1532106374.96.0.56676864532.issue34118@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I will write a PR only touching the collection class entries. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 13:42:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 20 Jul 2018 17:42:05 +0000 Subject: [issue26544] platform.libc_ver() returns incorrect version number In-Reply-To: <1457742963.17.0.0403505576154.issue26544@psf.upfronthosting.co.za> Message-ID: <1532108525.36.0.56676864532.issue26544@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +7891 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 14:18:21 2018 From: report at bugs.python.org (Tim Peters) Date: Fri, 20 Jul 2018 18:18:21 +0000 Subject: [issue34168] RAM consumption too high using concurrent.futures (Python 3.7 / 3.6 ) In-Reply-To: <1532091230.61.0.56676864532.issue34168@psf.upfronthosting.co.za> Message-ID: <1532110701.39.0.56676864532.issue34168@psf.upfronthosting.co.za> Tim Peters added the comment: If your `bucket` has 30 million items, then for element in bucket: executor.submit(kwargs['function']['name'], element, **kwargs) is going to create 30 million Future objects (and all the under-the-covers objects needed to manage their concurrency) just as fast as the main thread can create them. Nothing in your code waits for anything to finish until after they've _all_ been created and queued up under the covers. So your producer is running vastly faster than your consumers can keep up with. It's the huge backlog of pending work items that consume the RAM. To slash RAM, you need to craft a way to interleave creating new work items with giving consumers time to deal with them. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 14:32:19 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 20 Jul 2018 18:32:19 +0000 Subject: [issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party module fails on Python 3.5) In-Reply-To: <1442494739.31.0.584117765088.issue25150@psf.upfronthosting.co.za> Message-ID: <1532111539.58.0.56676864532.issue25150@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: +Python 3.7, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 15:19:52 2018 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 20 Jul 2018 19:19:52 +0000 Subject: [issue34169] itertools.repeat does not accept None as an explicit count In-Reply-To: <1532095863.33.0.56676864532.issue34169@psf.upfronthosting.co.za> Message-ID: <1532114392.64.0.56676864532.issue34169@psf.upfronthosting.co.za> Change by Dong-hee Na : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 15:31:47 2018 From: report at bugs.python.org (Corey Bryant) Date: Fri, 20 Jul 2018 19:31:47 +0000 Subject: [issue34173] [3.7] possible race condition in /usr/lib/python3.7/concurrent/futures/thread.py Message-ID: <1532115107.08.0.56676864532.issue34173@psf.upfronthosting.co.za> New submission from Corey Bryant : I initially reported this on launchpad at https://bugs.launchpad.net/bugs/1782647. I'm running a test for a project that hangs and requires a Control-C to cancel it. The results look like this: https://paste.ubuntu.com/p/SwXsCcghjt/ In narrowing down on this some more, the use of queue.SimpleQueue() seems to make the difference that causes the hang. If I switch that back to queue.Queue() (which was the case for py3.6) the hang goes away: - self._work_queue = queue.Queue() + self._work_queue = queue.SimpleQueue() To reproduce with OpenStack designate: git clone https://github.com/openstack/designate. Then, update tox.ini with the following: --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 2.0 -envlist = py35,py27,flake8 +envlist = py35,py37,py27,flake8 skipsdist = True [testenv] @@ -39,6 +39,12 @@ commands = {[testenv]commands} stestr run '{posargs}' +[testenv:py37] +basepython = python3.7 +commands = + {[testenv]commands} + stestr run 'designate\.tests\.test_workers\.test_processing\.TestProcessingExecutor\.(test_execute_multiple_tasks)' + [testenv:docs] basepython = python3 deps = And run: tox -e py37 ---------- components: Library (Lib) messages: 322032 nosy: corey.bryant priority: normal severity: normal status: open title: [3.7] possible race condition in /usr/lib/python3.7/concurrent/futures/thread.py type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 16:26:43 2018 From: report at bugs.python.org (Ammar Askar) Date: Fri, 20 Jul 2018 20:26:43 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1532118403.35.0.56676864532.issue34060@psf.upfronthosting.co.za> Change by Ammar Askar : ---------- pull_requests: +7892 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 16:26:43 2018 From: report at bugs.python.org (Ammar Askar) Date: Fri, 20 Jul 2018 20:26:43 +0000 Subject: [issue5115] Extend subprocess.kill to be able to kill process groups In-Reply-To: <1233370260.58.0.70597374825.issue5115@psf.upfronthosting.co.za> Message-ID: <1532118403.58.0.665841612001.issue5115@psf.upfronthosting.co.za> Change by Ammar Askar : ---------- pull_requests: +7893 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 16:29:24 2018 From: report at bugs.python.org (Ammar Askar) Date: Fri, 20 Jul 2018 20:29:24 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1532118564.95.0.56676864532.issue34060@psf.upfronthosting.co.za> Ammar Askar added the comment: > But then again, if it's solely for our tests, perhaps the best way to approach this is to start a Python thread that periodically runs this command? I opened up https://github.com/python/cpython/pull/8357 with this strategy, in my opinion its a lot nicer and doesn't clutter up _winapi with half baked, extremely specialized functions. Its a bit more involved than running a thread, details are on the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 16:34:50 2018 From: report at bugs.python.org (Chris Kessler) Date: Fri, 20 Jul 2018 20:34:50 +0000 Subject: [issue34174] argparse formatter_class issue for RawDescriptionHelpFormatter Message-ID: <1532118890.75.0.56676864532.issue34174@psf.upfronthosting.co.za> New submission from Chris Kessler : In document https://docs.python.org/2/library/argparse.html#argparse.RawDescriptionHelpFormatter this will fail with NameError: global name 'textwrap' is not defiend >>> parser = argparse.ArgumentParser( ... prog='PROG', ... formatter_class=argparse.RawDescriptionHelpFormatter, ... description=textwrap.dedent('''\ ... Please do not mess up this text! ... -------------------------------- ... I have indented it ... exactly the way ... I want it ... ''')) ---------- assignee: docs at python components: Documentation messages: 322034 nosy: ckessler, docs at python priority: normal severity: normal status: open title: argparse formatter_class issue for RawDescriptionHelpFormatter type: resource usage versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 16:38:13 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 20 Jul 2018 20:38:13 +0000 Subject: [issue34161] (good first issue) Tutorial 7.1 str.format() code example syntax error In-Reply-To: <1532062323.28.0.56676864532.issue34161@psf.upfronthosting.co.za> Message-ID: <1532119093.84.0.56676864532.issue34161@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 49abd307d222e6fe85b5175eed6b6f87fc656a8d by Mariatta (Miss Islington (bot)) in branch '3.7': bpo-34161: Remove extra parentheses in output formatting tutorial (GH-8350) https://github.com/python/cpython/commit/49abd307d222e6fe85b5175eed6b6f87fc656a8d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 16:42:30 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 20 Jul 2018 20:42:30 +0000 Subject: [issue34174] argparse formatter_class issue for RawDescriptionHelpFormatter In-Reply-To: <1532118890.75.0.56676864532.issue34174@psf.upfronthosting.co.za> Message-ID: <1532119350.12.0.56676864532.issue34174@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks for the report. To make it work, you'll have to import textwrap first. We don't always add all the necessary imports in our code snippets and examples, and we don't need to start adding imports into code examples either. So I'm closing this issue. Thanks again. ---------- nosy: +Mariatta resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 17:02:39 2018 From: report at bugs.python.org (Chris Kessler) Date: Fri, 20 Jul 2018 21:02:39 +0000 Subject: [issue34174] argparse formatter_class issue for RawDescriptionHelpFormatter In-Reply-To: <1532118890.75.0.56676864532.issue34174@psf.upfronthosting.co.za> Message-ID: <1532120559.69.0.56676864532.issue34174@psf.upfronthosting.co.za> Chris Kessler added the comment: Thanks for the quick response! I didnt see it anywhere in the documentation on that page so I assumed it was built in with argparse. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 17:08:00 2018 From: report at bugs.python.org (Keith Campbell) Date: Fri, 20 Jul 2018 21:08:00 +0000 Subject: [issue34175] typing.NamedTuple: type-checking error when "index" used as member Message-ID: <1532120880.21.0.56676864532.issue34175@psf.upfronthosting.co.za> New submission from Keith Campbell : Find the test case below: ---- from typing import NamedTuple class Foo(NamedTuple): alpha: int index: int ---- This results in the following error when run through type-checking with mypy: ---- % mypy --version mypy 0.620 % mypy go.py go.py:5: error: Incompatible types in assignment (expression has type "int", base class "tuple" defined the type as "Callable[[Tuple[int, ...], Any, int, int], int]") ---- When I instantiate this class in the python interpreter, I have no problem accessing the "index" member, so I suspect this is a bug in the type checker. ---------- components: Library (Lib) messages: 322038 nosy: campkeith priority: normal severity: normal status: open title: typing.NamedTuple: type-checking error when "index" used as member versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 19:22:58 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 20 Jul 2018 23:22:58 +0000 Subject: [issue34163] Python latest release 2.7 shows SSL error In-Reply-To: <1532065522.97.0.56676864532.issue34163@psf.upfronthosting.co.za> Message-ID: <1532128978.82.0.56676864532.issue34163@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 19:40:36 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 20 Jul 2018 23:40:36 +0000 Subject: [issue34115] code.InteractiveConsole.interact() closes stdin In-Reply-To: <1531608583.62.0.56676864532.issue34115@psf.upfronthosting.co.za> Message-ID: <1532130036.1.0.56676864532.issue34115@psf.upfronthosting.co.za> Terry J. Reedy added the comment: To investigate your claim about closing sys.stdin, I ran the following on Windows 10, mostly with 3.7.0, in both the console and IDLE, using various exit methods. import code import sys for i in range(2): try: code.InteractiveConsole().interact() print(f'Try {i}: closed is', sys.stdin.closed) except SystemExit: print(f'Exc {i}: closed is', sys.stdin.closed) ^D in IDLE and ^Z+ in console prints 'Try 0/1...False'. The IC.interact loop catches EOFError and breaks for a normal exit. 'raise SystemExit' and sys.exit() print 'Exc 0/1...False'. exit() and quit() print 'Exc 0/1...True' on Console. On Windows Console, sys.stdin.close() does not prevent a second interact call. This might be considered a bug. What OS are you running and what is the result and traceback for the code above? In IDLE, either function exit causes a 'Kill the running process' popup. If yes, user code execution ceases and the shell window closes. If no, SystemExit is caught and 'SysExit...False' is printed. The latter is true because sys.stdin.close in the user process is 'sys.shell.close()', and the latter does the popup. The *purpose* of sys.stdin.close is to get the attention of shells that intercept SystemExit, so that users can say 'Close this now'. Even so, IDLE asks users first to make sure. Emulating IDLE in a simplified fashion as follows will negate closure. import _io class Stdin(_io.TextIOWrapper): def close(self): pass sys.stdin = Stdin() # To restore, sys.__stdin__ is the original. --- History of sys.stdin.close: https://github.com/python/cpython/commit/24cb053b158a3cd63f7be05ac27f47e45bb2f1b3 Site.py, line 236, Mar 9, 2006, George Brandel added Quitter with __call__ consisting of 'raise SystemExit(code)'. https://github.com/python/cpython/commit/d112bc7958151fa17c4ccb27413c43e45b8476fb#diff-f34a16518c608b2ca946d3f5ca0a1942 site.py, line Aug 16, 2006, Kurt Kaiser added the following lines # Shells like IDLE catch the SystemExit, but listen when their # stdin wrapper is closed. try: sys.stdin.close() except: pass https://github.com/python/cpython/commit/862543aa85249b46649b60da96743b4b14c6c83b#diff-f34a16518c608b2ca946d3f5ca0a1942 site.py, line 250, Christian Heimes replace stdin.close with the following to avoid Lib/io.py: RuntimeWarning: Trying to close unclosable fd. (I believe io has since been patched to not do this.) fd = -1 if hasattr(sys.stdin, "fileno"): fd = sys.stdin.fileno() if fd != 0: # Don't close stdin if it wraps fd 0 sys.stdin.close() https://hg.python.org/cpython/rev/82451c88b3c0, 11 Apr 2013 After discussion on #17585 with Antoine Pitrou and Serhiy Storchaka, Roger Serwy reverted the above because it was no longer needed --- Your code assumes that sys.stdin has a buffer attribute. Not necessarily true when python is started with pythonw.exe. With the print removed, it also assumes that sys.stdin has file descriptor 0. Ditto. --- Possible doc improvements: the exit/quit doc says that closes. https://docs.python.org/3/library/constants.html#constants-added-by-the-site-module interact doc mentions catching exceptions and quit/exit issue. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, terry.reedy stage: -> needs patch type: behavior -> enhancement versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 20:06:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 21 Jul 2018 00:06:20 +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: <1532131580.61.0.56676864532.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b1147e43daeb3c51a63056b489e8d868404d4e22 by Victor Stinner in branch 'master': bpo-34170: Rework _PyCoreConfig_Read() to avoid side effect (GH-8353) https://github.com/python/cpython/commit/b1147e43daeb3c51a63056b489e8d868404d4e22 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 20:16:26 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 21 Jul 2018 00:16:26 +0000 Subject: [issue34008] Do we support calling Py_Main() after Py_Initialize()? In-Reply-To: <1530341921.37.0.56676864532.issue34008@psf.upfronthosting.co.za> Message-ID: <1532132186.17.0.56676864532.issue34008@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 03ec4df67d6b4ce93a2da21db7c84dff8259953f by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-34008: Allow to call Py_Main() after Py_Initialize() (GH-8043) (GH-8352) https://github.com/python/cpython/commit/03ec4df67d6b4ce93a2da21db7c84dff8259953f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 20:17:10 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Jul 2018 00:17:10 +0000 Subject: [issue34169] itertools.repeat does not accept None as an explicit count In-Reply-To: <1532095863.33.0.56676864532.issue34169@psf.upfronthosting.co.za> Message-ID: <1532132230.01.0.56676864532.issue34169@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Clint, why do you think you need this? Dong-hee, the pure python code is listed a rough equivalent, not an exact equivalent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 20:19:48 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Jul 2018 00:19:48 +0000 Subject: [issue34175] typing.NamedTuple: type-checking error when "index" used as member In-Reply-To: <1532120880.21.0.56676864532.issue34175@psf.upfronthosting.co.za> Message-ID: <1532132388.93.0.56676864532.issue34175@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > So I suspect this is a bug in the type checker. Perhaps this report should go on the mypy bug tracker rather than the Python language tracker. ---------- nosy: +gvanrossum, levkivskyi, rhettinger -campkeith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 20:20:07 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 21 Jul 2018 00:20:07 +0000 Subject: [issue34008] Do we support calling Py_Main() after Py_Initialize()? In-Reply-To: <1530341921.37.0.56676864532.issue34008@psf.upfronthosting.co.za> Message-ID: <1532132407.22.0.56676864532.issue34008@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, I fixed the fontforge bug in 3.7 and master branches. Sorry for the regression, but I really didn't expect that anyone would call Py_Main() after Py_Initialize() :-) I guess we should be prepared for such hiccup when reworking the Python initialization :-) Nick: Can I close the issue, or do you want to keep it open to change the documentation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 20:26:59 2018 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 21 Jul 2018 00:26:59 +0000 Subject: [issue34175] typing.NamedTuple: type-checking error when "index" used as member In-Reply-To: <1532120880.21.0.56676864532.issue34175@psf.upfronthosting.co.za> Message-ID: <1532132819.24.0.56676864532.issue34175@psf.upfronthosting.co.za> Guido van Rossum added the comment: > Perhaps this report should go on the mypy bug tracker rather than the Python language tracker. Agreed. It's up to the OP to file an issue there though (hence adding @campkeith back to the nosy list). ---------- nosy: +campkeith resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 20:27:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 21 Jul 2018 00:27:52 +0000 Subject: [issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x In-Reply-To: <1527803116.79.0.682650639539.issue33723@psf.upfronthosting.co.za> Message-ID: <1532132872.06.0.56676864532.issue33723@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +7894 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 20:28:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 21 Jul 2018 00:28:53 +0000 Subject: [issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x In-Reply-To: <1527803116.79.0.682650639539.issue33723@psf.upfronthosting.co.za> Message-ID: <1532132933.38.0.56676864532.issue33723@psf.upfronthosting.co.za> STINNER Victor added the comment: I reopen the issue since I got a very similar failure of test_time.test_process_time() on my laptop: the busy loop took 15.9 ms whereas the test expects at least 20 ms. I wrote PR 8358 to only require 15 ms instead. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 20:30:19 2018 From: report at bugs.python.org (Jim DeLaHunt) Date: Sat, 21 Jul 2018 00:30:19 +0000 Subject: [issue34176] Asyncio StreamReader fails to close Transport Message-ID: <1532133019.54.0.56676864532.issue34176@psf.upfronthosting.co.za> New submission from Jim DeLaHunt : Asyncio's StreamReaderProtocol[1] often returns True from Protocol.eof_received(). This tells the Transport that "closing the transport is up to the protocol" [2]. However, StreamReaderProtocol does not call Transport.close(). More precisely, StreamReaderProtocol leaves the transport interaction to StreamReader. It calls StreamReader.feed_eof()[3]. But StreamReader does not call self._transport.close(). It only sets a self._eof flag, and awakens any of its functions which were waiting for data. The only occurrence of self._transport.close() occurs in StreamWriter[4]. There is none in StreamReader or StreamReaderProtocol. I believe that the fix should be for StreamReader to call self._transport.close(). However, it may need to avoid this if StreamReaderProtocol._over_ssl is True, and I don't immediately see how it can tell this. Also, it may need to wait for anything waiting for self._waiter to run, before closing the Transport. Or, maybe StreamReaderProtocol should not return True from Protocol.eof_received(). I discovered this when using a Transport of my own devising, which reads from a file instead of from a socket, with asyncio.streams. The file did not close in the unit test. My transport duly called Protocol.eof_received(), but received a True in response, so did not close the file. My workaround will probably be to not believe what Protocol.eof_received() tells me, and to close my transport regardless. [1] Lib/asyncio.streams.StreamReaderProtocol.eof_received, line 259-266. [2] 19.5.4.2.3. "Streaming protocols" [3] Lib/Lib/asyncio.streams.StreamReader.feed_eof, lines 419-421. [4] Lib/Lib/asyncio.streams.StreamWriter.close, lines 316-317. All line numbers are as of tag v3.7.0, commit 1bf9cc509326bc42cd8cb1650eb9bf64550d817e . Bug observed in v3.7.0. Not yet investigated in HEAD revision. ---------- components: asyncio messages: 322047 nosy: JDLH, asvetlov, yselivanov priority: normal severity: normal status: open title: Asyncio StreamReader fails to close Transport type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 20:32:44 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 21 Jul 2018 00:32:44 +0000 Subject: [issue34127] Gramatically incorrect error message for some descriptor calls with wrong number of arguments In-Reply-To: <1531766313.86.0.56676864532.issue34127@psf.upfronthosting.co.za> Message-ID: <1532133164.71.0.56676864532.issue34127@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Yes. 0 things, (1/2 thing), 1 thing, (3/2 things), 2... things is the bugaboo of formatting sentences with a number field. Raymond, will we accept a patch for this? ---------- nosy: +rhettinger, terry.reedy stage: -> needs patch versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 20:34:27 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Jul 2018 00:34:27 +0000 Subject: [issue34055] IDLE: erroneous 'smart' indents in shell In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1532133267.05.0.56676864532.issue34055@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Of late, I've also encountered two recurring problems along these lines. At some point in the IDLE session, the auto-indents become large and this survives a restart-shell. Another problem is that an extra \n is emitted after every result which gives an odd double-spaced effect. When added to other existing bugs, this has greatly impaired the usability of IDLE for teaching (the tool tips no longer display on the newest mac builds and periodically the mouse pointer is mistargeted by 1/4 of the screen until the screen is resized, and periodically I encounter cases where pressing any key in the interactive session results in pasting the current contents of the keyboard on the current entry line). ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 20:35:18 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 21 Jul 2018 00:35:18 +0000 Subject: [issue34134] multiprocessing memory huge usage In-Reply-To: <1531800230.72.0.56676864532.issue34134@psf.upfronthosting.co.za> Message-ID: <1532133318.2.0.56676864532.issue34134@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 20:38:48 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 21 Jul 2018 00:38:48 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1532133528.86.0.56676864532.issue34136@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Yes, the test should be removed, commented out, skipped, or made to work, depending on intentions. Test first is for private branches. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 20:43:38 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Jul 2018 00:43:38 +0000 Subject: [issue33129] Add kwarg-only option to dataclass In-Reply-To: <1521847997.9.0.467229070634.issue33129@psf.upfronthosting.co.za> Message-ID: <1532133818.66.0.56676864532.issue33129@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 from me -- think would occasionally be nice to have. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 20:49:29 2018 From: report at bugs.python.org (ppperry) Date: Sat, 21 Jul 2018 00:49:29 +0000 Subject: [issue34127] Gramatically incorrect error message for some calls with wrong number of arguments In-Reply-To: <1531766313.86.0.56676864532.issue34127@psf.upfronthosting.co.za> Message-ID: <1532134169.53.0.56676864532.issue34127@psf.upfronthosting.co.za> ppperry added the comment: Another test case: >> classmethod() Traceback (most recent call last): File "", line 2, in check TypeError: classmethod expected 1 arguments, got 0 ---------- title: Gramatically incorrect error message for some descriptor calls with wrong number of arguments -> Gramatically incorrect error message for some calls with wrong number of arguments _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 20:52:50 2018 From: report at bugs.python.org (bbayles) Date: Sat, 21 Jul 2018 00:52:50 +0000 Subject: [issue34132] Obscure netrc parser "bug" In-Reply-To: <1531782813.71.0.56676864532.issue34132@psf.upfronthosting.co.za> Message-ID: <1532134370.89.0.56676864532.issue34132@psf.upfronthosting.co.za> Change by bbayles : ---------- pull_requests: +7895 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 20:54:36 2018 From: report at bugs.python.org (bbayles) Date: Sat, 21 Jul 2018 00:54:36 +0000 Subject: [issue34132] Obscure netrc parser "bug" In-Reply-To: <1531782813.71.0.56676864532.issue34132@psf.upfronthosting.co.za> Message-ID: <1532134476.34.0.56676864532.issue34132@psf.upfronthosting.co.za> bbayles added the comment: I realized that the Python 2 solution was adapt-able after all; I've re-submitted as GitHub PR 8360. https://github.com/python/cpython/pull/8360 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 20:59:38 2018 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 21 Jul 2018 00:59:38 +0000 Subject: [issue34169] itertools.repeat does not accept None as an explicit count In-Reply-To: <1532095863.33.0.56676864532.issue34169@psf.upfronthosting.co.za> Message-ID: <1532134778.13.0.56676864532.issue34169@psf.upfronthosting.co.za> Dong-hee Na added the comment: Raymond, when I first read this issue, it seemed very clear that it should not work. However, after reading the documentation I misunderstood that it can be worked because the pseudocode specifies NoneType. IMHO, in that case, we should let users through documentation know that this code is just pseudo-code and that the actual counts parameter should be passed as an integer type. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 21:09:37 2018 From: report at bugs.python.org (Yonatan Zunger) Date: Sat, 21 Jul 2018 01:09:37 +0000 Subject: [issue34115] code.InteractiveConsole.interact() closes stdin In-Reply-To: <1531608583.62.0.56676864532.issue34115@psf.upfronthosting.co.za> Message-ID: <1532135377.41.0.56676864532.issue34115@psf.upfronthosting.co.za> Yonatan Zunger added the comment: Testing your code sample on OS X (10.13.6) with Python 3.6.2: - quit() in the console yields Exc 0: closed is True Python 3.6.2 (default, Apr 17 2018, 12:29:33) [GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> Traceback (most recent call last): File "./test.py", line 6, in code.InteractiveConsole().interact() File "/Users/zunger/.pyenv/versions/3.6.2/lib/python3.6/code.py", line 228, in interact line = self.raw_input(prompt) File "/Users/zunger/.pyenv/versions/3.6.2/lib/python3.6/code.py", line 275, in raw_input return input(prompt) ValueError: I/O operation on closed file. - ^D and raise SystemExit in console both yield: Python 3.6.2 (default, Apr 17 2018, 12:29:33) [GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> ^D now exiting InteractiveConsole... Try 0: closed is False Python 3.6.2 (default, Apr 17 2018, 12:29:33) [GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> ^D now exiting InteractiveConsole... Try 1: closed is False So it looks like the issue is specific to quit(), as you say. I'm not sure I understand what the purpose of the sys.stdin.close() call is, though: why would we *want* to alert the parent shell in some way beyond a SystemExit as the default (non-overrideable) behavior? This may be a documentation issue, but it seems extremely surprising to me; no other function does this additional thing, even when raising a SystemExit. I would think that any caller which is running InteractiveConsole.interact() and also wants to do something when it finishes would want to handle that additional logic itself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 21:28:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 21 Jul 2018 01:28:37 +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: <1532136517.74.0.56676864532.issue34170@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +7896 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 21:31:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 21 Jul 2018 01:31:53 +0000 Subject: [issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x In-Reply-To: <1527803116.79.0.682650639539.issue33723@psf.upfronthosting.co.za> Message-ID: <1532136713.8.0.56676864532.issue33723@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset e78dace8dcb23c371df19c9add65895adf436995 by Victor Stinner in branch 'master': bpo-33723: Fix test_time.test_process_time() (GH-8358) https://github.com/python/cpython/commit/e78dace8dcb23c371df19c9add65895adf436995 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 21:32:07 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 21 Jul 2018 01:32:07 +0000 Subject: [issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x In-Reply-To: <1527803116.79.0.682650639539.issue33723@psf.upfronthosting.co.za> Message-ID: <1532136727.28.0.56676864532.issue33723@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7897 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 21:43:17 2018 From: report at bugs.python.org (Yonatan Zunger) Date: Sat, 21 Jul 2018 01:43:17 +0000 Subject: [issue34115] code.InteractiveConsole.interact() closes stdin In-Reply-To: <1531608583.62.0.56676864532.issue34115@psf.upfronthosting.co.za> Message-ID: <1532137397.45.0.56676864532.issue34115@psf.upfronthosting.co.za> Yonatan Zunger added the comment: Or perhaps in an alternate phrasing: The sys.stdin.close behavior makes sense if quit is being used inside IDLE, but is very surprising from the perspective of the `code` module. (Really, even the SystemExit is surprising there, and should be documented!) What if we added a stdin-preserving workaround to code.InteractiveConsole.interact, and added documentation of the SystemExit behavior to that module as well, but left _Quitter itself as-is? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 21:52:46 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 21 Jul 2018 01:52:46 +0000 Subject: [issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x In-Reply-To: <1527803116.79.0.682650639539.issue33723@psf.upfronthosting.co.za> Message-ID: <1532137966.62.0.56676864532.issue33723@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a7a6eac966dd52db1762c8f455c1e208df36feb4 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-33723: Fix test_time.test_process_time() (GH-8358) (GH-8362) https://github.com/python/cpython/commit/a7a6eac966dd52db1762c8f455c1e208df36feb4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 21:53:33 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 21 Jul 2018 01:53:33 +0000 Subject: [issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x In-Reply-To: <1527803116.79.0.682650639539.issue33723@psf.upfronthosting.co.za> Message-ID: <1532138013.55.0.56676864532.issue33723@psf.upfronthosting.co.za> STINNER Victor added the comment: I changed the minimum time from 20 ms to 15 ms in test_time.test_process_time(), in Python 3.7 and master branches. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 21:54:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Sat, 21 Jul 2018 01:54:22 +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: <1532138062.75.0.56676864532.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset f2626ce6d4136f13a506e34ca8631ff2eab85fd9 by Victor Stinner in branch 'master': bpo-34170: _PyCoreConfig_Read() leaves Py_IsolatedFlag unchanged (GH-8361) https://github.com/python/cpython/commit/f2626ce6d4136f13a506e34ca8631ff2eab85fd9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 22:17:49 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 21 Jul 2018 02:17:49 +0000 Subject: [issue34149] Behavior of the min/max with key=None In-Reply-To: <1531929969.94.0.56676864532.issue34149@psf.upfronthosting.co.za> Message-ID: <1532139469.9.0.56676864532.issue34149@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In 2.x, map(None, 'abc', 'zyz') == [('a', 'z'), ('b', 'y'), ('c', 'z')], but with the addition of zip, so that zip('abc', 'xyz') has the same result, we deprecated that use of None to mean identity function. For python-coded functions, a default is needed to make a keyword-only argument optional, and preferred over use of *args for making positional arguments optional. Unless I am missing something, a function can special-case 'key is identity', to avoid overhead, just as well as it can special-case 'key is None'. So rather than extend 'key=None', to me a kludge, I would rather replace it with 'key=identity'. Both can be accepted during a deprecation period. For instance, after adding identity, def nsmallest(n, iterable, key=identity): ... if key is identity or key is None: # key in (identity, None) result = min(it, default=sentinel) ... Since no one need ever write key=None, explicit passing should be rare. It seems to me that the main reason for the type declaration of key to include None is so that the def statement itself passes a consistency check with the None default. Once that is changed, most people should be able to use a simple callable declaration. I am considering this for python-ideas. Since the weekly issues list came out just 10 hours ago, I will not close this yet, but I will if still open in couple of days and no coredev objections. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 22:20:34 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 21 Jul 2018 02:20:34 +0000 Subject: [issue34149] Behavior of the min/max with key=None In-Reply-To: <1531929969.94.0.56676864532.issue34149@psf.upfronthosting.co.za> Message-ID: <1532139634.46.0.56676864532.issue34149@psf.upfronthosting.co.za> Terry J. Reedy added the comment: FWIW, the nsmallest/largest key param was added Dec 2, 2004, before keyword-only parameters. https://github.com/python/cpython/commit/4901a1f267e9d632f85054ce8b21ff23bff305e1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 22:33:43 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 21 Jul 2018 02:33:43 +0000 Subject: [issue34154] Tkinter __init__ documentations sometimes missing valid keyword values In-Reply-To: <1531969710.94.0.56676864532.issue34154@psf.upfronthosting.co.za> Message-ID: <1532140423.41.0.56676864532.issue34154@psf.upfronthosting.co.za> Terry J. Reedy added the comment: By documentation, you mean the doc string for each widget, which is the basis for the help(widget) response. I checked that there do not seem to be any other issues open for the docstrings. Go ahead. Use https://www.tcl.tk/man/tcl8.6/TkCmd/contents.htm as the reference. C.E.: if you have a list of missing thing, can you post? This is normal priority. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, serhiy.storchaka, terry.reedy stage: -> needs patch type: -> behavior versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 22:36:14 2018 From: report at bugs.python.org (ppperry) Date: Sat, 21 Jul 2018 02:36:14 +0000 Subject: [issue21600] mock.patch.stopall doesn't work with patch.dict In-Reply-To: <1401334528.48.0.358693350259.issue21600@psf.upfronthosting.co.za> Message-ID: <1532140574.89.0.56676864532.issue21600@psf.upfronthosting.co.za> Change by ppperry : ---------- title: mock.patch.stopall doesn't work with patch.dict to sys.modules -> mock.patch.stopall doesn't work with patch.dict _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 22:39:25 2018 From: report at bugs.python.org (Creation Elemental) Date: Sat, 21 Jul 2018 02:39:25 +0000 Subject: [issue34154] Tkinter __init__ documentations sometimes missing valid keyword values In-Reply-To: <1531969710.94.0.56676864532.issue34154@psf.upfronthosting.co.za> Message-ID: <1532140765.09.0.56676864532.issue34154@psf.upfronthosting.co.za> Creation Elemental added the comment: Ah, yes. That is what I meant to say. The doc string printed by help(widget) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 22:41:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 02:41:14 +0000 Subject: [issue34154] Tkinter __init__ documentations sometimes missing valid keyword values In-Reply-To: <1531969710.94.0.56676864532.issue34154@psf.upfronthosting.co.za> Message-ID: <1532140874.96.0.56676864532.issue34154@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The official Tk documentation is not always correct. OPTIONS attributes in tests should contain full lists of supported options, and running tests produces warnings for missed options, like: ListboxTest.OPTIONS doesn't contain "justify". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 22:53:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 02:53:03 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1532141583.13.0.56676864532.issue34136@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oh, I missed that this issue is about the test from the CPython testsuite. I thought it is about the Numba specific tests. It is strange that this test is passed when run as ./python -m test test_opcodes but is failed when run as ./python -m test.test_opcodes or ./python Lib/test/test_opcodes.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 23:01:31 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Jul 2018 03:01:31 +0000 Subject: [issue34149] Behavior of the min/max with key=None In-Reply-To: <1531929969.94.0.56676864532.issue34149@psf.upfronthosting.co.za> Message-ID: <1532142091.29.0.56676864532.issue34149@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Repeating my comment on the Github PR, "I'm persuaded by your idea that min(), max(), nsmallest(), nlargest(), sorted(), and itertools.groupby() should ideally have the same API for key functions. Syncing of those APIs would be a minor improvement. As Serhiy pointed out, this does complicate the type signature a bit, but that is of small concern giving that the other four functions listed have already gone down this path." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 23:04:04 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Jul 2018 03:04:04 +0000 Subject: [issue34169] itertools.repeat does not accept None as an explicit count In-Reply-To: <1532095863.33.0.56676864532.issue34169@psf.upfronthosting.co.za> Message-ID: <1532142244.18.0.56676864532.issue34169@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > we should let users through documentation know that this code is just pseudo-code We already modified the docs to specifically say that the provided code is just a rough equivalent. Thanks for the suggestion, but I'm going to decline. There doesn't seem to be a legitimate use case for this. ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 23:14:05 2018 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 21 Jul 2018 03:14:05 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1532142845.12.0.56676864532.issue34136@psf.upfronthosting.co.za> Guido van Rossum added the comment: (Serhiy: I think you meant Nuitka, not numba -- Nuitka is a Python-to-C++ compiler, and Kay is its author. Somehow he managed to confuse us all. :-) I suspect that the way `python3 -m test` runs the tests whose name you pass on the command line causes there to be no `__annotations__` global, while the way `python3 -m test.test_opcodes` runs its argument causes there to be one. It seems that when a module is run as `__main__` it always is endowed with an `__annotations__` global, but when it is an imported module, `__annotations__` is only created when there is at least one top-level annotation. I don't know why the global is always created for a `__main__`, but I suspect there's a good reason; the test will have to cope, because I think it should be able to run the tests either way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 23:27:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 03:27:37 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1532143657.26.0.56676864532.issue34136@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry for my mistake, yes, I meant Nuitka. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 23:31:28 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 21 Jul 2018 03:31:28 +0000 Subject: [issue34169] itertools.repeat does not accept None as an explicit count In-Reply-To: <1532095863.33.0.56676864532.issue34169@psf.upfronthosting.co.za> Message-ID: <1532143888.25.0.56676864532.issue34169@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The 'roughly equivalent' Python code is real code that really runs, and in that sense not pseudocode. itertools is coded in C, which allows optional args with no default. To have optional args when coding in Python, either a default is needed or the argument has to be turned into a residual args tuple of length 0 or 1. In the former case, 'var is None' should be read as being the equivalent of 'var is undefined' in the C code. In the latter case, the best equivalent, which has its own noise, might be def repeat(object, *times): if not times: while True: yield object elif len(times) == 1: for i in range(times[0]): yield object else: raise TypeError(f'There can be at most 1 times argument, not {len(times)}') I prefer what we have. ---------- nosy: +terry.reedy type: -> enhancement versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 20 23:40:04 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 03:40:04 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1532144404.02.0.56676864532.issue34136@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +7898 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 00:44:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 04:44:07 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1532148247.09.0.56676864532.issue34136@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 06ca3f0c09d017b9d741553818459cca2d5da587 by Serhiy Storchaka in branch 'master': bpo-34136: Make test_do_not_recreate_annotations more reliable. (GH-8364) https://github.com/python/cpython/commit/06ca3f0c09d017b9d741553818459cca2d5da587 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 00:44:14 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 21 Jul 2018 04:44:14 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1532148254.96.0.56676864532.issue34136@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7899 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 00:45:26 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 21 Jul 2018 04:45:26 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1532148326.82.0.56676864532.issue34136@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7900 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 01:16:21 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 21 Jul 2018 05:16:21 +0000 Subject: [issue34115] code.InteractiveConsole.interact() closes stdin In-Reply-To: <1531608583.62.0.56676864532.issue34115@psf.upfronthosting.co.za> Message-ID: <1532150181.27.0.56676864532.issue34115@psf.upfronthosting.co.za> Terry J. Reedy added the comment: There is an important difference between a program saying 'I am done executing' and a user saying 'I am done with the interactive session'. This is especially true in an IDE where 'session' can include many editing and shell sessions. 'Stop executing' happens when execution reaches the end of the file, which causes EOFError upon a read attempt. It can also be done gracefully before the end of input with sys.exit(), which raises SystemExit. In Interactive Python, 'leave session' can be done with SystemExit or the EOF control signal, which appears to raise EOFError. This suggests that quit() and exit(), which were added because newbies did not know the proper way to exit, should raise EOFError rather than SystemExit. The fact that 'quit' displays 'Use quit() or Ctrl-Z plus Return to exit' (EOF on Windows) suggests the same. But I need to experiment (another day). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 01:34:57 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 21 Jul 2018 05:34:57 +0000 Subject: [issue34166] Tools/msgfmt.py emits a DeprecationWarning under Python 3.7 In-Reply-To: <1532088364.94.0.56676864532.issue34166@psf.upfronthosting.co.za> Message-ID: <1532151297.66.0.56676864532.issue34166@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I could see some unclosed file handlers as well. The last commit (c56894d305211c98882898f237ff54f620520139) was also made in 2013 and I could see no tests for tools too. ? cpython git:(master) ? ./python ./Tools/i18n/msgfmt.py -o django-no-patch.mo django.po ./Tools/i18n/msgfmt.py:112: ResourceWarning: unclosed file <_io.BufferedReader name='django.po'> lines = open(infile, 'rb').readlines() ./Tools/i18n/msgfmt.py:199: DeprecationWarning: tostring() is deprecated. Use tobytes() instead. output = generate() ./Tools/i18n/msgfmt.py:202: ResourceWarning: unclosed file <_io.BufferedWriter name='django-no-patch.mo'> open(outfile,"wb").write(output) ? cpython git:(bpo34166) ? ./python -Werror ./Tools/i18n/msgfmt.py -o django-patch.mo django.po ? cpython git:(bpo34166) ? sha1sum django-patch.mo ab77140e8638adfdef6d00d6c02cc926f1dc906f django-patch.mo ? cpython git:(bpo34166) ? sha1sum django-no-patch.mo ab77140e8638adfdef6d00d6c02cc926f1dc906f django-no-patch.mo I will raise a PR. Attaching a sample .po file from django project used in the above command for testing. Thanks ---------- nosy: +xtreak Added file: https://bugs.python.org/file47706/django.po _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 01:38:19 2018 From: report at bugs.python.org (Tim Peters) Date: Sat, 21 Jul 2018 05:38:19 +0000 Subject: [issue34168] RAM consumption too high using concurrent.futures (Python 3.7 / 3.6 ) In-Reply-To: <1532091230.61.0.56676864532.issue34168@psf.upfronthosting.co.za> Message-ID: <1532151499.6.0.56676864532.issue34168@psf.upfronthosting.co.za> Tim Peters added the comment: Note that you can consume multiple gigabytes of RAM with this simpler program too, and for the same reasons: """ import concurrent.futures as cf bucket = range(30_000_000) def _dns_query(target): from time import sleep sleep(0.1) def run(): with cf.ThreadPoolExecutor(3) as executor: future_to_element = dict() for element in bucket: future = executor.submit(_dns_query, element) future_to_element[future] = element for future in cf.as_completed(future_to_element): elt = future_to_element[future] print(elt) run() """ The usual way to mediate between producers and consumers that run at very different speeds is to use a bounded queue, so that producers block when putting new work items on the queue until consumers make progress taking work items off. That's easy enough to do with `multiprocessing` instead, but `concurrent.futures` doesn't support that directly. If you don't mind doing the work in chunks, this straightforward modification allows slashing RAM - the smaller CHUNK is, the less RAM is needed, but also the more often the code waits for the most recent chunk to finish: """ CHUNK = 10_000 ... def chunkify(iterable, chunk=CHUNK): from itertools import islice it = iter(iterable) while True: piece = list(islice(it, chunk)) if piece: yield piece else: return def run(): with cf.ThreadPoolExecutor(3) as executor: for b in chunkify(bucket): # essentially the original code just indented future_to_element = dict() for element in b: future = executor.submit(_dns_query, element) future_to_element[future] = element for future in cf.as_completed(future_to_element): elt = future_to_element[future] print(elt) """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 01:46:03 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 21 Jul 2018 05:46:03 +0000 Subject: [issue34166] Tools/msgfmt.py emits a DeprecationWarning under Python 3.7 In-Reply-To: <1532088364.94.0.56676864532.issue34166@psf.upfronthosting.co.za> Message-ID: <1532151963.51.0.56676864532.issue34166@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +7901 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 02:16:49 2018 From: report at bugs.python.org (Windson Yang) Date: Sat, 21 Jul 2018 06:16:49 +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: <1532153809.54.0.56676864532.issue34172@psf.upfronthosting.co.za> Windson Yang added the comment: > A. This does not happen, creating a Pool, deleting it and collecting the garbage, does not call terminate. Would you give me an example how you delete the Pool and collecting the garbage? If you use context manager, It will call terminate() function. > B. The documentation for Pool itself does not specify it has a context manager (but the examples show it). You can find this info on the same page: New in version 3.3: Pool objects now support the context management protocol ? see Context Manager Types. __enter__() returns the pool object, and __exit__() calls terminate(). ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 02:22:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 06:22:14 +0000 Subject: [issue34166] Tools/msgfmt.py emits a DeprecationWarning under Python 3.7 In-Reply-To: <1532088364.94.0.56676864532.issue34166@psf.upfronthosting.co.za> Message-ID: <1532154134.64.0.56676864532.issue34166@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset a692efe4733f98831cb51a9683877b152f754d14 by Serhiy Storchaka (Xtreak) in branch 'master': bpo-34166: Fix warnings in Tools/msgfmt.py. (GH-8367) https://github.com/python/cpython/commit/a692efe4733f98831cb51a9683877b152f754d14 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 02:22:27 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 21 Jul 2018 06:22:27 +0000 Subject: [issue34166] Tools/msgfmt.py emits a DeprecationWarning under Python 3.7 In-Reply-To: <1532088364.94.0.56676864532.issue34166@psf.upfronthosting.co.za> Message-ID: <1532154147.45.0.56676864532.issue34166@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7902 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 02:24:50 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 21 Jul 2018 06:24:50 +0000 Subject: [issue34166] Tools/msgfmt.py emits a DeprecationWarning under Python 3.7 In-Reply-To: <1532088364.94.0.56676864532.issue34166@psf.upfronthosting.co.za> Message-ID: <1532154290.11.0.56676864532.issue34166@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- pull_requests: +7903 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 02:55:06 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 21 Jul 2018 06:55:06 +0000 Subject: [issue34157] NamedTemporaryFile can leave temporary files behind In-Reply-To: <1532028572.02.0.56676864532.issue34157@psf.upfronthosting.co.za> Message-ID: <1532156106.9.0.56676864532.issue34157@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 02:59:38 2018 From: report at bugs.python.org (Matej Cepl) Date: Sat, 21 Jul 2018 06:59:38 +0000 Subject: [issue33336] [imaplib] MOVE is a legal command In-Reply-To: <1524436182.1.0.682650639539.issue33336@psf.upfronthosting.co.za> Message-ID: <1532156378.1.0.56676864532.issue33336@psf.upfronthosting.co.za> Change by Matej Cepl : ---------- versions: +Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 03:03:13 2018 From: report at bugs.python.org (Anthony Singleton) Date: Sat, 21 Jul 2018 07:03:13 +0000 Subject: [issue33336] [imaplib] MOVE is a legal command In-Reply-To: <1524436182.1.0.682650639539.issue33336@psf.upfronthosting.co.za> Message-ID: <1532156593.17.0.56676864532.issue33336@psf.upfronthosting.co.za> Anthony Singleton added the comment: Fuck you ---------- components: +Cross-Build, Extension Modules nosy: +Alex.Willmer, Anthony Singleton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 03:24:44 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 21 Jul 2018 07:24:44 +0000 Subject: [issue34166] Tools/msgfmt.py emits a DeprecationWarning under Python 3.7 In-Reply-To: <1532088364.94.0.56676864532.issue34166@psf.upfronthosting.co.za> Message-ID: <1532157884.29.0.56676864532.issue34166@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 916bcc6fde2db95199454b22f608648467fbbc54 by Miss Islington (bot) in branch '3.6': bpo-34166: Fix warnings in Tools/msgfmt.py. (GH-8367) https://github.com/python/cpython/commit/916bcc6fde2db95199454b22f608648467fbbc54 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 03:25:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 07:25:06 +0000 Subject: [issue34166] Tools/msgfmt.py emits a DeprecationWarning under Python 3.7 In-Reply-To: <1532088364.94.0.56676864532.issue34166@psf.upfronthosting.co.za> Message-ID: <1532157906.65.0.56676864532.issue34166@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 25326dea8b907fdd2bf087baab3c31b617438f2e by Serhiy Storchaka (Xtreak) in branch '3.7': [3.7] bpo-34166: Fix warnings in Tools/msgfmt.py. (GH-8367) (GH-8369) https://github.com/python/cpython/commit/25326dea8b907fdd2bf087baab3c31b617438f2e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 03:31:03 2018 From: report at bugs.python.org (Matej Cepl) Date: Sat, 21 Jul 2018 07:31:03 +0000 Subject: [issue16817] test___all__ affects other tests by doing too much importing In-Reply-To: <1356828969.86.0.130125185831.issue16817@psf.upfronthosting.co.za> Message-ID: <1532158263.8.0.56676864532.issue16817@psf.upfronthosting.co.za> Matej Cepl added the comment: > This is superceded by: > > http://bugs.python.org/issue18906 Then it should be closed, right? ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 03:32:04 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 21 Jul 2018 07:32:04 +0000 Subject: [issue34177] test_site fails in macOS-PR VSTS builds for 3.7 branch Message-ID: <1532158324.8.0.56676864532.issue34177@psf.upfronthosting.co.za> New submission from Karthikeyan Singaravelan : Mac OS builds fail due to test_site in VSTS for 3.7 branches only Ref : https://python.visualstudio.com/cpython/_build/results?buildId=17921&view=logs 2018-07-21T07:01:08.5912930Z Traceback (most recent call last): 2018-07-21T07:01:08.5927520Z File "/Users/vsts/agent/2.136.1/work/1/s/Lib/test/test_site.py", line 199, in test_s_option 2018-07-21T07:01:08.5942120Z self.assertIn(usersite, sys.path) 2018-07-21T07:01:08.5959870Z AssertionError: '/Users/vsts/.local/lib/python3.7/site-packages' not found in ['/Users/vsts/agent/2.136.1/work/1/s', '/usr/local/lib/python37.zip', '/Users/vsts/agent/2.136.1/work/1/s/Lib', '/Users/vsts/agent/2.136.1/work/1/s/build/lib.macosx-10.13-x86_64-3.7-pydebug', '/usr/local/lib/python3.7/site-packages'] 2018-07-21T07:01:08.5971110Z 2018-07-21T07:01:08.5985860Z ====================================================================== 2018-07-21T07:01:08.6000880Z FAIL: test_startup_imports (test.test_site.StartupImportTests) 2018-07-21T07:01:08.6017050Z ---------------------------------------------------------------------- 2018-07-21T07:01:08.6033630Z Traceback (most recent call last): 2018-07-21T07:01:08.6048270Z File "/Users/vsts/agent/2.136.1/work/1/s/Lib/test/test_site.py", line 487, in test_startup_imports 2018-07-21T07:01:08.6063180Z self.assertFalse(modules.intersection(collection_mods), stderr) 2018-07-21T07:01:08.6079990Z AssertionError: {'reprlib', 'heapq', 'collections', 'keyword', 'operator', 'functools', 'types'} is not false : import _frozen_importlib # frozen I couldn't find any related issues in search and hence opened this. Feel free to close this if it's a duplicate or fixed in some other branch. Thanks ---------- messages: 322082 nosy: xtreak priority: normal severity: normal status: open title: test_site fails in macOS-PR VSTS builds for 3.7 branch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 03:44:49 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 21 Jul 2018 07:44:49 +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: <1532159089.77.0.56676864532.issue34177@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: It seems that the last successful build in 3.7 was for https://github.com/python/cpython/commit/339e0c1296c61c9dbc1f8f880c5c668bf4007e5e and all PRs after it had the same failure. Sorry for not adding the relevant components during ticket creation. Thanks ---------- components: +Build versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 04:12:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 08:12:18 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1532160738.62.0.56676864532.issue34136@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In the edition of PR 8364 the test is failed on 3.6. def test_do_not_recreate_annotations(self): annotations = {} # Don't rely on the existence of the '__annotations__' global. with support.swap_item(globals(), '__annotations__', annotations): class C: del __annotations__ x: int # Updates the '__annotations__' global. self.assertIn('x', annotations) self.assertIs(annotations['x'], int) It is possible to write it in less strong form which will be passed on 3.6 too. def test_do_not_recreate_annotations(self): # Don't rely on the existence of the '__annotations__' global. with support.swap_item(globals(), '__annotations__', {}): del globals()['__annotations__'] class C: del __annotations__ with self.assertRaises(NameError): x: int In 3.6 the annotation declaration fails immediately if __annotations__ is deleted. In 3.7 it falls back to the global __annotations__. The question is whether the difference in the behavior between 3.6 and 3.7 is intended and is a part of the language specification, or is an implementation detail of CPython. In the former case we can keep the stronger test. In the latter case we should make it weaker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 04:20:38 2018 From: report at bugs.python.org (Matej Cepl) Date: Sat, 21 Jul 2018 08:20:38 +0000 Subject: [issue33336] [imaplib] MOVE is a legal command In-Reply-To: <1524436182.1.0.682650639539.issue33336@psf.upfronthosting.co.za> Message-ID: <1532161238.87.0.56676864532.issue33336@psf.upfronthosting.co.za> Change by Matej Cepl : ---------- pull_requests: +7904 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 04:21:32 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 21 Jul 2018 08:21:32 +0000 Subject: [issue34158] Documentation of datetime '%z' format code is odd In-Reply-To: <1532036087.85.0.56676864532.issue34158@psf.upfronthosting.co.za> Message-ID: <1532161292.58.0.56676864532.issue34158@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Added as part of 018d353c1c8c87767d2335cd884017c2ce12e045 and a fix regarding duplicate words for that part was added at bac2d5ba30339298db7d4caa9c8cd31d807cf081. Relevant format string at https://github.com/python/cpython/pull/2896/files#diff-25e2d173c84057d069b7890450714eddR214. Relevant test case with 6-digit string for microsecond : https://github.com/python/cpython/pull/2896/files#diff-acc40bec51c7de832de3361db3edae52R309. Table at https://docs.python.org/3.7/library/datetime.html#strftime-and-strptime-behavior could also be updated with microseconds being optional in the second column %z | UTC offset in the form ?HHMM[SS] (empty string if the object is naive). | (empty), +0000, -0400, +1030 You can raise a GitHub PR for the same. Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 04:24:55 2018 From: report at bugs.python.org (Matthias Klose) Date: Sat, 21 Jul 2018 08:24:55 +0000 Subject: [issue34178] test_tcl fails on the 3.7 branch Message-ID: <1532161495.01.0.56676864532.issue34178@psf.upfronthosting.co.za> New submission from Matthias Klose : test_tcl fails at least on the 3.7 branch with: ====================================================================== FAIL: test_join (test.test_tcl.TclTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.7/test/test_tcl.py", line 670, in test_join check('{spam}') File "/usr/lib/python3.7/test/test_tcl.py", line 660, in check self.assertEqual(unpack(unpack(join([[value]]))), value) AssertionError: 'spam' != '{spam}' - spam + {spam} ? + + ---------- components: Tkinter messages: 322086 nosy: doko priority: normal severity: normal status: open title: test_tcl fails on the 3.7 branch versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 04:27:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 08:27:49 +0000 Subject: [issue25943] Integer overflow in _bsddb leads to heap corruption In-Reply-To: <1451015615.68.0.324504050935.issue25943@psf.upfronthosting.co.za> Message-ID: <1532161669.55.0.56676864532.issue25943@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 32522050773c257a5c3c0c8929ba5c64123b53ed by Serhiy Storchaka (Zackery Spytz) in branch '2.7': bpo-25943: Fix potential heap corruption in bsddb's _db_associateCallback() (GH-8337) https://github.com/python/cpython/commit/32522050773c257a5c3c0c8929ba5c64123b53ed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 04:31:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 08:31:03 +0000 Subject: [issue34126] Profiling certain invalid calls crashes Python In-Reply-To: <1531761430.57.0.56676864532.issue34126@psf.upfronthosting.co.za> Message-ID: <1532161863.01.0.56676864532.issue34126@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 56868f940e0cc0b35d33c0070107ff3bed2d8766 by Serhiy Storchaka (jdemeyer) in branch 'master': bpo-34126: Fix crashes while profiling invalid calls. (GH-8300) https://github.com/python/cpython/commit/56868f940e0cc0b35d33c0070107ff3bed2d8766 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 04:31:12 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 21 Jul 2018 08:31:12 +0000 Subject: [issue34126] Profiling certain invalid calls crashes Python In-Reply-To: <1531761430.57.0.56676864532.issue34126@psf.upfronthosting.co.za> Message-ID: <1532161872.24.0.56676864532.issue34126@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7905 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 05:12:02 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 21 Jul 2018 09:12:02 +0000 Subject: [issue34178] test_tcl fails on the 3.7 branch In-Reply-To: <1532161495.01.0.56676864532.issue34178@psf.upfronthosting.co.za> Message-ID: <1532164322.56.0.56676864532.issue34178@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Can you please add information about your OS and how you are running the tests? It passes in Travis for 3.7 branch for my last PR. Tests were added as part of https://bugs.python.org/issue33974 . Ref : https://travis-ci.org/python/cpython/jobs/406532961#L2397 I tried the latest 3.7 branch on my Ubuntu box and tests run fine ? cpython git:(25326de) ./python Python 3.7.0+ (remotes/upstream/3.7:25326de, Jul 21 2018, 09:05:57) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> ? cpython git:(25326de) time ./python -m unittest -v test.test_tcl.TclTest.test_join patchlevel = 8.6.5 test_join (test.test_tcl.TclTest) ... ok ---------------------------------------------------------------------- Ran 1 test in 0.013s OK ./python -m unittest -v test.test_tcl.TclTest.test_join 0.24s user 0.01s system 97% cpu 0.249 total Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 05:12:20 2018 From: report at bugs.python.org (tzickel) Date: Sat, 21 Jul 2018 09:12:20 +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: <1532164340.13.0.56676864532.issue34172@psf.upfronthosting.co.za> tzickel added the comment: >>> from multiprocessing import Pool >>> import gc >>> a = Pool(10) >>> del a >>> gc.collect() 0 >>> After this, there are still left behind Process (Pool) or Dummy (ThreadPool) and big _cache data (If you did something with it) which lingers till the process dies. You are correct on the other issue (I'm using and reading the Python 2 documentation which does not have that...). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 05:14:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 09:14:26 +0000 Subject: [issue34178] test_tcl fails on the 3.7 branch In-Reply-To: <1532161495.01.0.56676864532.issue34178@psf.upfronthosting.co.za> Message-ID: <1532164466.69.0.56676864532.issue34178@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- components: +Tests nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 05:33:54 2018 From: report at bugs.python.org (Matthias Klose) Date: Sat, 21 Jul 2018 09:33:54 +0000 Subject: [issue34178] test_tcl fails on the 3.7 branch In-Reply-To: <1532161495.01.0.56676864532.issue34178@psf.upfronthosting.co.za> Message-ID: <1532165634.19.0.56676864532.issue34178@psf.upfronthosting.co.za> Matthias Klose added the comment: seen on Linux x86_64, using Tcl 8.6.8, running the tests in the installed location. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 05:43:05 2018 From: report at bugs.python.org (ANJALI BANSAL) Date: Sat, 21 Jul 2018 09:43:05 +0000 Subject: [issue34127] Gramatically incorrect error message for some calls with wrong number of arguments In-Reply-To: <1531766313.86.0.56676864532.issue34127@psf.upfronthosting.co.za> Message-ID: <1532166185.78.0.56676864532.issue34127@psf.upfronthosting.co.za> ANJALI BANSAL added the comment: Is this still active? I want to fix the patch. ---------- nosy: +ANJALI BANSAL _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 05:47:19 2018 From: report at bugs.python.org (Lorenz Mende) Date: Sat, 21 Jul 2018 09:47:19 +0000 Subject: [issue25094] [EASY][Windows] test_tools fails on Windows when passing In-Reply-To: <1442202178.75.0.918340459191.issue25094@psf.upfronthosting.co.za> Message-ID: <1532166439.25.0.56676864532.issue25094@psf.upfronthosting.co.za> Lorenz Mende added the comment: Approving the behaviour on 3.6.5 and fresh cpython-built @master: >From the docs: test_sundry "contains extremely basic regression tests... which don't have separate tests of their own". IMHO 2to3 can be added to the whitelist of test_sundry as it comes with its own unit tests. When test_sundry runs import_tool with '2to3', lib2to3 is called without args, resulting in an exit 2 which breaks the basic test. ---------- nosy: +LorenzMende _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 06:11:54 2018 From: report at bugs.python.org (Matej Cepl) Date: Sat, 21 Jul 2018 10:11:54 +0000 Subject: [issue33336] [imaplib] MOVE is a legal command In-Reply-To: <1524436182.1.0.682650639539.issue33336@psf.upfronthosting.co.za> Message-ID: <1532167914.16.0.56676864532.issue33336@psf.upfronthosting.co.za> Change by Matej Cepl : ---------- pull_requests: +7906 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 06:14:37 2018 From: report at bugs.python.org (Anjali Bansal) Date: Sat, 21 Jul 2018 10:14:37 +0000 Subject: [issue33187] Document ElementInclude (XInclude) support in ElementTree In-Reply-To: <1522427694.7.0.467229070634.issue33187@psf.upfronthosting.co.za> Message-ID: <1532168077.85.0.56676864532.issue33187@psf.upfronthosting.co.za> Anjali Bansal added the comment: I would work on it. please guide me how to proceed? Thanks Anjali ---------- nosy: +Anjali Bansal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 06:37:28 2018 From: report at bugs.python.org (Michael Felt) Date: Sat, 21 Jul 2018 10:37:28 +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: <1532169448.13.0.56676864532.issue28009@psf.upfronthosting.co.za> Michael Felt added the comment: OK. as promised when I closed PR 5183 - a restart. You may skip the wall that follows - it is just documentation. The key points: * AIX ifconfig and arp do not supply maccaddr * netstat supplies a macaddr, but uses '.' not ':' as a delimiter ** also, AIX netstat value is not always 17 characters (dec 15 is 'f' not '0f') * since Python3-3.7 there is support for _uuid so test_unix_getnode passes "WithExtModule" but fails "WithoutExtModule" A minor point: test_find_mac() has always passed on AIX because the test was passed a macaddr using ':' and tested for ':'. The test has been modified to provide a macaddr in "AIX" format. IMHO - the test would be better if the string was not "forced to be 17 characters" (e.g., this is my macaddr as returned by netstat: "0.12.a3.53.c9.46" My question - getting back to what I had done previously - even though _uuid is working, should the "WithoutExtModule" and support for test_find_mac() be adjusted in uuid.py - OR - are these errors in test just going to be accepted asis? Details: (skip the wall :p ) So, with only test_uuid.py patched, the verbose returns ('ok' tests not included!): root at x066:[/data/prj/python/python3-3.8]./python ../git/**3.8/Lib/test/regrtest.py -v test_uuid | egrep -v "ok$" == CPython 3.8.0a0 (default, Jul 20 2018, 00:54:36) [C] == AIX-1-00C291F54C00-powerpc-32bit big-endian == cwd: /data/prj/python/python3-3.8/build/test_python_11468890 == CPU count: 4 == encodings: locale=ISO8859-1, FS=iso8859-1 Run tests sequentially 0:00:00 [1/1] test_uuid test_arp_getnode (test.test_uuid.TestInternalsWithExtModule) ... skipped 'because AIX "arp" does not provide macaddr' test_find_mac (test.test_uuid.TestInternalsWithExtModule) ... FAIL test_ifconfig_getnode (test.test_uuid.TestInternalsWithExtModule) ... skipped 'because AIX "ifconfig" does not provide macaddr' test_ip_getnode (test.test_uuid.TestInternalsWithExtModule) ... skipped 'requires ip' test_ipconfig_getnode (test.test_uuid.TestInternalsWithExtModule) ... skipped 'requires Windows' test_lanscan_getnode (test.test_uuid.TestInternalsWithExtModule) ... skipped 'requires lanscan' test_netbios_getnode (test.test_uuid.TestInternalsWithExtModule) ... skipped 'requires win32wnet' test_netstat_getnode (test.test_uuid.TestInternalsWithExtModule) ... skipped 'requires netstat' test_windll_getnode (test.test_uuid.TestInternalsWithExtModule) ... skipped 'requires Windows' test_arp_getnode (test.test_uuid.TestInternalsWithoutExtModule) ... skipped 'because AIX "arp" does not provide macaddr' test_find_mac (test.test_uuid.TestInternalsWithoutExtModule) ... FAIL test_ifconfig_getnode (test.test_uuid.TestInternalsWithoutExtModule) ... skipped 'because AIX "ifconfig" does not provide macaddr' test_ip_getnode (test.test_uuid.TestInternalsWithoutExtModule) ... skipped 'requires ip' test_ipconfig_getnode (test.test_uuid.TestInternalsWithoutExtModule) ... skipped 'requires Windows' test_lanscan_getnode (test.test_uuid.TestInternalsWithoutExtModule) ... skipped 'requires lanscan' test_netbios_getnode (test.test_uuid.TestInternalsWithoutExtModule) ... skipped 'requires win32wnet' test_netstat_getnode (test.test_uuid.TestInternalsWithoutExtModule) ... skipped 'requires netstat' test_unix_getnode (test.test_uuid.TestInternalsWithoutExtModule) ... skipped 'requires uuid_generate_time' test_windll_getnode (test.test_uuid.TestInternalsWithoutExtModule) ... skipped 'requires Windows' test_uuid1_safe (test.test_uuid.TestUUIDWithExtModule) ... skipped 'requires uuid_generate_time_safe(3)' test_uuid1_bogus_return_value (test.test_uuid.TestUUIDWithoutExtModule) ... skipped 'need uuid._generate_time_safe' test_uuid1_is_safe (test.test_uuid.TestUUIDWithoutExtModule) ... skipped 'need uuid._generate_time_safe' test_uuid1_is_unsafe (test.test_uuid.TestUUIDWithoutExtModule) ... skipped 'need uuid._generate_time_safe' test_uuid1_safe (test.test_uuid.TestUUIDWithoutExtModule) ... skipped 'requires uuid_generate_time_safe(3)' test_uuid1_unknown (test.test_uuid.TestUUIDWithoutExtModule) ... skipped 'need uuid._generate_time_safe' test test_uuid failed ====================================================================== FAIL: test_find_mac (test.test_uuid.TestInternalsWithExtModule) ---------------------------------------------------------------------- Traceback (most recent call last): File "/data/prj/python/git/python3-3.8/Lib/test/test_uuid.py", line 548, in test_find_mac self.assertEqual(mac, 0x1234567890ab) AssertionError: None != 20015998341291 ====================================================================== FAIL: test_find_mac (test.test_uuid.TestInternalsWithoutExtModule) ---------------------------------------------------------------------- Traceback (most recent call last): File "/data/prj/python/git/python3-3.8/Lib/test/test_uuid.py", line 548, in test_find_mac self.assertEqual(mac, 0x1234567890ab) AssertionError: None != 20015998341291 ---------------------------------------------------------------------- Ran 50 tests in 0.629s FAILED (failures=2, skipped=23) test_uuid failed == Tests result: FAILURE == 1 test failed: test_uuid Total duration: 797 ms Tests result: FAILURE root at x066:[/data/prj/python/python3-3.8] ---------- components: +Tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 08:24:56 2018 From: report at bugs.python.org (Jeffrey Walton) Date: Sat, 21 Jul 2018 12:24:56 +0000 Subject: [issue33145] unaligned accesses in siphash24() lead to crashes on sparc In-Reply-To: <1522083144.27.0.467229070634.issue33145@psf.upfronthosting.co.za> Message-ID: <1532175896.28.0.56676864532.issue33145@psf.upfronthosting.co.za> Jeffrey Walton added the comment: I know this is a bit late but I wanted to share... OpenCSW has a build farm with Solaris machines and Sparc hardware. The farm provides x86 and Sparc machines with Solaris 9 through 11. I believe OpenCSW operates in the same spirit as GCC compile farm. They welcome open source developers and upstream maintainers to help ensure packages build and run on Solaris machines. You can read about it at https://www.opencsw.org/extend-it/signup/to-upstream-maintainers/ . If Python is performing memory access patterns as discussed in the report then it would probably benefit the project to test on a Sparc machine with Solaris 11. ---------- nosy: +Jeffrey.Walton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 08:25:28 2018 From: report at bugs.python.org (Jeffrey Walton) Date: Sat, 21 Jul 2018 12:25:28 +0000 Subject: [issue28055] pyhash's siphash24 assumes alignment of the data pointer In-Reply-To: <1473463742.19.0.416387824738.issue28055@psf.upfronthosting.co.za> Message-ID: <1532175928.55.0.56676864532.issue28055@psf.upfronthosting.co.za> Jeffrey Walton added the comment: I know this is a bit late but I wanted to share... OpenCSW has a build farm with Solaris machines and Sparc hardware. The farm provides x86 and Sparc machines with Solaris 9 through 11. I believe OpenCSW operates in the same spirit as GCC compile farm. They welcome open source developers and upstream maintainers to help ensure packages build and run on Solaris machines. You can read about it at https://www.opencsw.org/extend-it/signup/to-upstream-maintainers/ . If Python is performing memory access patterns as discussed in the report then it would probably benefit the project to test on a Sparc machine with Solaris 11. ---------- nosy: +Jeffrey.Walton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 08:56:54 2018 From: report at bugs.python.org (Brett Randall) Date: Sat, 21 Jul 2018 12:56:54 +0000 Subject: [issue27805] io.open('/dev/stdout', 'a') raises OSError with errno=ESPIPE In-Reply-To: <1471637472.92.0.246311076418.issue27805@psf.upfronthosting.co.za> Message-ID: <1532177814.72.0.56676864532.issue27805@psf.upfronthosting.co.za> Change by Brett Randall : ---------- nosy: +javabrett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 09:17:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 13:17:45 +0000 Subject: [issue34179] test_statistics fails after test_time Message-ID: <1532179064.99.0.56676864532.issue34179@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : $ ./python -m test -v test_time test_statistics ... ====================================================================== FAIL: test_decimals_exact (test.test_statistics.TestHarmonicMean) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_statistics.py", line 1484, in test_decimals_exact self.assertEqual(self.func(data), D(66528)/70723) AssertionError: Decimal('0.9406840773157247288717955969') != Decimal('0.9406840773157247288717955970') ====================================================================== FAIL: test_repeated_single_value (test.test_statistics.TestHarmonicMean) (x=Decimal('4.125'), count=2) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_statistics.py", line 1332, in test_repeated_single_value self.assertEqual(self.func(data), x) AssertionError: Decimal('4.124999999999999999999999999') != Decimal('4.125') ====================================================================== FAIL: test_repeated_single_value (test.test_statistics.TestHarmonicMean) (x=Decimal('4.125'), count=5) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_statistics.py", line 1332, in test_repeated_single_value self.assertEqual(self.func(data), x) AssertionError: Decimal('4.124999999999999999999999999') != Decimal('4.125') ====================================================================== FAIL: test_repeated_single_value (test.test_statistics.TestHarmonicMean) (x=Decimal('4.125'), count=10) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_statistics.py", line 1332, in test_repeated_single_value self.assertEqual(self.func(data), x) AssertionError: Decimal('4.124999999999999999999999999') != Decimal('4.125') ====================================================================== FAIL: test_repeated_single_value (test.test_statistics.TestHarmonicMean) (x=Decimal('4.125'), count=20) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_statistics.py", line 1332, in test_repeated_single_value self.assertEqual(self.func(data), x) AssertionError: Decimal('4.124999999999999999999999999') != Decimal('4.125') ---------------------------------------------------------------------- ---------- components: Tests messages: 322098 nosy: serhiy.storchaka priority: normal severity: normal status: open title: test_statistics fails after test_time type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 09:41:04 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 13:41:04 +0000 Subject: [issue25943] Integer overflow in _bsddb leads to heap corruption In-Reply-To: <1451015615.68.0.324504050935.issue25943@psf.upfronthosting.co.za> Message-ID: <1532180464.13.0.56676864532.issue25943@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 Sat Jul 21 10:10:32 2018 From: report at bugs.python.org (Clint Hepner) Date: Sat, 21 Jul 2018 14:10:32 +0000 Subject: [issue34169] itertools.repeat does not accept None as an explicit count In-Reply-To: <1532095863.33.0.56676864532.issue34169@psf.upfronthosting.co.za> Message-ID: <1532182232.62.0.56676864532.issue34169@psf.upfronthosting.co.za> Clint Hepner added the comment: This came up in response to https://stackoverflow.com/q/51443795/1126841. I realize the current documentation is informative, not normative, but I think there is a legitimate reason to allow an explicit None argument like the pure Python suggests. Currently, there is no way to trigger the default behavior explicitly, as repeat behaves more like iter (in that the number of arguments has special meaning) than like islice (whose optional arguments behave like regular parameters with default values). For example, these two calls are equivalent: islice(itr, 5) islice(itr, 5, None) For some functions, it makes sense for the number of arguments to be significant. For example, there is no meaningful default value for the second argument to iter(), since the second argument completely changes the semantics of the call. iter({'a': 1, 'b': 2}) # Return an iterator for the argument iter(lambda f: f.read(4), '') # Call a function until it returns '' As an another example, the first argument to map() determines how many additional arguments are needed. map(lambda x: x + 1, [1,2,3]) # yield values form [2,3,4] map(lambda x: x + y, [1,2,3], [1,2,3]) # yield values from [2,4,6] However, with repeat(), it makes sense to think of the second argument as an upper limit that can be either finite or infinite. Lacking an infinite integer value, None makes sense if you read it as "no upper limit" repeat(1) # infinite stream of 1s repeat(1, 10322) # a finite stream repeat(1, None) # proposed: an infinite stream of 1s I prefer the current description of def repeat(object, times=None): over def repeat(object, *times) because it accurately reflects the number of arguments you can pass to repeat. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 10:15:21 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 21 Jul 2018 14:15:21 +0000 Subject: [issue33187] Document ElementInclude (XInclude) support in ElementTree In-Reply-To: <1522427694.7.0.467229070634.issue33187@psf.upfronthosting.co.za> Message-ID: <1532182521.09.0.56676864532.issue33187@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Please read the devguide on how to get started contributing: https://devguide.python.org. You'll also need to sign the CLA: https://devguide.python.org/pullrequest/?highlight=Cla#licensing ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 10:24:13 2018 From: report at bugs.python.org (bbayles) Date: Sat, 21 Jul 2018 14:24:13 +0000 Subject: [issue34179] test_statistics fails after test_time In-Reply-To: <1532179064.99.0.56676864532.issue34179@psf.upfronthosting.co.za> Message-ID: <1532183053.23.0.56676864532.issue34179@psf.upfronthosting.co.za> Change by bbayles : ---------- keywords: +patch pull_requests: +7907 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 10:24:40 2018 From: report at bugs.python.org (bbayles) Date: Sat, 21 Jul 2018 14:24:40 +0000 Subject: [issue34179] test_statistics fails after test_time In-Reply-To: <1532179064.99.0.56676864532.issue34179@psf.upfronthosting.co.za> Message-ID: <1532183080.46.0.56676864532.issue34179@psf.upfronthosting.co.za> Change by bbayles : ---------- nosy: +bbayles _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 10:35:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 14:35:48 +0000 Subject: [issue34179] test_statistics fails after test_time In-Reply-To: <1532179064.99.0.56676864532.issue34179@psf.upfronthosting.co.za> Message-ID: <1532183748.59.0.56676864532.issue34179@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 10:36:01 2018 From: report at bugs.python.org (Roundup Robot) Date: Sat, 21 Jul 2018 14:36:01 +0000 Subject: [issue34158] Documentation of datetime '%z' format code is odd In-Reply-To: <1532036087.85.0.56676864532.issue34158@psf.upfronthosting.co.za> Message-ID: <1532183761.02.0.56676864532.issue34158@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +7908 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 10:49:40 2018 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sat, 21 Jul 2018 14:49:40 +0000 Subject: [issue33462] reversible dict In-Reply-To: <1526009418.33.0.682650639539.issue33462@psf.upfronthosting.co.za> Message-ID: <1532184580.08.0.56676864532.issue33462@psf.upfronthosting.co.za> R?mi Lapeyre added the comment: Hi Serhiy and Inada, is there a reason not to move forward with this patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 11:40:54 2018 From: report at bugs.python.org (Noah Haasis) Date: Sat, 21 Jul 2018 15:40:54 +0000 Subject: [issue34154] Tkinter __init__ documentations sometimes missing valid keyword values In-Reply-To: <1531969710.94.0.56676864532.issue34154@psf.upfronthosting.co.za> Message-ID: <1532187654.36.0.56676864532.issue34154@psf.upfronthosting.co.za> Noah Haasis added the comment: This is a list of all valid keywordarguments of Listbox.__init__() listed in the test file: 'activestyle', 'background', 'borderwidth', 'cursor', 'disabledforeground', 'exportselection', 'font', 'foreground', 'height', 'highlightbackground', 'highlightcolor', 'highlightthickness', 'listvariable', 'relief', 'selectbackground', 'selectborderwidth', 'selectforeground', 'selectmode', 'setgrid', 'state', 'takefocus', 'width', 'xscrollcommand', 'yscrollcommand' The ones that are missing in the doc string: 'activestyle', 'disabledforeground', 'listvariable','state' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 11:53:57 2018 From: report at bugs.python.org (Victor Porton) Date: Sat, 21 Jul 2018 15:53:57 +0000 Subject: [issue34180] bool(Q) always return True for a priority queue Q Message-ID: <1532188437.33.0.56676864532.issue34180@psf.upfronthosting.co.za> New submission from Victor Porton : It seems that bool(Q) always return True for a priority queue Q. It should behave the same way as for bool(L) where L is a list, that is return False on an empty queue. Please check also other objects in https://docs.python.org/3/library/queue.html After the bug is fixed, the documentation should be clear that there was a change in the behavior in certain Python version. ---------- components: Library (Lib) messages: 322103 nosy: porton priority: normal severity: normal status: open title: bool(Q) always return True for a priority queue Q type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 12:08:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 16:08:12 +0000 Subject: [issue34180] bool(Q) always return True for a priority queue Q In-Reply-To: <1532188437.33.0.56676864532.issue34180@psf.upfronthosting.co.za> Message-ID: <1532189292.62.0.56676864532.issue34180@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 12:18:16 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 21 Jul 2018 16:18:16 +0000 Subject: [issue34180] bool(Q) always return True for a priority queue Q In-Reply-To: <1532188437.33.0.56676864532.issue34180@psf.upfronthosting.co.za> Message-ID: <1532189896.3.0.56676864532.issue34180@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Relevant SO answer : https://stackoverflow.com/a/41861322/2610955 Ref : https://docs.python.org/3/reference/datamodel.html#object.__bool__ > If a class defines neither __len__() nor __bool__(), all its instances are considered true. I don't know why it's not implemented and the SO answer comments has some discussion. Maybe this can be clarified in the doc. ? cpython git:(master) rlwrap ./python Python 3.8.0a0 (heads/master:56868f9, Jul 21 2018, 14:28:31) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from queue import PriorityQueue >>> len(PriorityQueue([1])) Traceback (most recent call last): File "", line 1, in TypeError: object of type 'PriorityQueue' has no len() Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 12:27:33 2018 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 21 Jul 2018 16:27:33 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1532190453.1.0.56676864532.issue34136@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks for the research. At this point I'm wondering what this test is testing. There is no prescribed behavior once you delete __annotations__ from the scope -- it is not a supported operation. At the same time I don't want to add any code enforcing that it fails. Unless you disagree, I think in 3.6 we should just delete the test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 12:33:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 16:33:54 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1532190834.15.0.56676864532.issue34136@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Shouldn't it be deleted in 3.7+ too? The behavior tested after PR 8364 (falling back to the global __annotations__) looks to me even more questionable than NameError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 12:58:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 16:58:38 +0000 Subject: [issue34126] Profiling certain invalid calls crashes Python In-Reply-To: <1531761430.57.0.56676864532.issue34126@psf.upfronthosting.co.za> Message-ID: <1532192318.19.0.56676864532.issue34126@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 7638eb892a50d101fe06342da180f0ab63a0b334 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-34126: Fix crashes while profiling invalid calls. (GH-8300) (GH-8371) https://github.com/python/cpython/commit/7638eb892a50d101fe06342da180f0ab63a0b334 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 12:59:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 16:59:47 +0000 Subject: [issue34126] Profiling certain invalid calls crashes Python In-Reply-To: <1531761430.57.0.56676864532.issue34126@psf.upfronthosting.co.za> Message-ID: <1532192387.84.0.56676864532.issue34126@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your contribution Jeroen. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 13:03:16 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 21 Jul 2018 17:03:16 +0000 Subject: [issue34173] [3.7] possible race condition in /usr/lib/python3.7/concurrent/futures/thread.py In-Reply-To: <1532115107.08.0.56676864532.issue34173@psf.upfronthosting.co.za> Message-ID: <1532192596.04.0.56676864532.issue34173@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 13:08:32 2018 From: report at bugs.python.org (Noah Haasis) Date: Sat, 21 Jul 2018 17:08:32 +0000 Subject: [issue34154] Tkinter __init__ documentations sometimes missing valid keyword values In-Reply-To: <1531969710.94.0.56676864532.issue34154@psf.upfronthosting.co.za> Message-ID: <1532192912.75.0.56676864532.issue34154@psf.upfronthosting.co.za> Change by Noah Haasis : ---------- keywords: +patch pull_requests: +7909 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 13:23:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 17:23:21 +0000 Subject: [issue34181] Lib/test/test_typing.py failed when ran as a script Message-ID: <1532193801.1.0.56676864532.issue34181@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : $ ./python Lib/test/test_typing.py ... ====================================================================== FAIL: test_repr (__main__.GenericTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_typing.py", line 654, in test_repr "") AssertionError: "" != "" - ? ^^^ ^^ + ? +++++++++ ^^^ ^ ---------------------------------------------------------------------- ---------- assignee: serhiy.storchaka components: Tests messages: 322109 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Lib/test/test_typing.py failed when ran as a script type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 13:24:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 17:24:54 +0000 Subject: [issue34181] Lib/test/test_typing.py failed when ran as a script In-Reply-To: <1532193801.1.0.56676864532.issue34181@psf.upfronthosting.co.za> Message-ID: <1532193894.0.0.56676864532.issue34181@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +7910 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 13:30:25 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 21 Jul 2018 17:30:25 +0000 Subject: [issue34173] [3.7] possible race condition in /usr/lib/python3.7/concurrent/futures/thread.py In-Reply-To: <1532115107.08.0.56676864532.issue34173@psf.upfronthosting.co.za> Message-ID: <1532194225.79.0.56676864532.issue34173@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I looked into the code of test_execute_multiple_tasks and designate/worker/processing.py from which the executor was initialized. I have converted the test case code removing the project related code as a standalone script. I hope the attached code is the minimal code required. The change from Queue to SimpleQueue was made with commit : ab74504346a6e2569b3255b7b621c589716888c4 and relevant issue is https://bugs.python.org/issue32576 . I ran the test code by checking out each commit obtained by `git log --oneline --format="%h" Lib/concurrent/futures/thread.py` . The tests finish successfully without any hanging as below Testing on commit : c4b695f Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask']s in 0.0012586116790771484fs Testing on commit : ab74504 Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask']s in 0.0013058185577392578fs Testing on commit : 63ff413 Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask']s in 0.0012793540954589844fs Testing on commit : bc61315 Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask']s in 0.0013325214385986328fs Testing on commit : a3d91b4 Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask']s in 0.0012831687927246094fs Testing on commit : 15f44ab Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask']s in 0.0013515949249267578fs Testing on commit : 50abe87 Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask']s in 0.0020570755004882812fs Testing on commit : cfd4661 Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask']s in 0.0012753009796142578fs Testing on commit : 20efceb Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask']s in 0.0012905597686767578fs Testing on commit : 6b97374 Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask']s in 0.001275777816772461fs Testing on commit : 04842a8 Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask']s in 0.0014278888702392578fs Testing on commit : 27be5da Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask']s in 0.0013408660888671875fs Testing on commit : c13d454 Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask']s in 0.0014138221740722656fs Testing on commit : 81c4d36 Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask']s in 0.0013227462768554688fs Can you please check if I am correct on the above approach? Thanks ---------- Added file: https://bugs.python.org/file47707/bpo34173.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 13:32:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 17:32:53 +0000 Subject: [issue34182] Lib/test/test_pydoc.py failed when ran as a script Message-ID: <1532194373.75.0.56676864532.issue34182@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : $ ./python Lib/test/test_pydoc.py ... ====================================================================== ERROR: test_mixed_case_module_names_are_lower_cased (__main__.PydocDocTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_pydoc.py", line 460, in test_mixed_case_module_names_are_lower_cased self.assertIn('xml.etree.elementtree', doc_link) File "/home/serhiy/py/cpython/Lib/unittest/case.py", line 1103, in assertIn if member not in container: TypeError: argument of type 'NoneType' is not iterable ---------------------------------------------------------------------- Since it works in 3.6, seems the regression was introduced in issue32031. ---------- components: Tests messages: 322111 nosy: serhiy.storchaka, xdegaye priority: normal severity: normal status: open title: Lib/test/test_pydoc.py failed when ran as a script type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 13:40:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 17:40:37 +0000 Subject: [issue34183] Lib/test/test_contextlib_async.py failed when run as a script Message-ID: <1532194837.43.0.56676864532.issue34183@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : $ ./python Lib/test/test_contextlib_async.py Lib/test/test_contextlib_async.py:7: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__ from .test_contextlib import TestBaseExitStack Traceback (most recent call last): File "Lib/test/test_contextlib_async.py", line 7, in from .test_contextlib import TestBaseExitStack ModuleNotFoundError: No module named '__main__.test_contextlib'; '__main__' is not a package ---------- assignee: serhiy.storchaka components: Tests messages: 322112 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Lib/test/test_contextlib_async.py failed when run as a script type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 13:43:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 17:43:58 +0000 Subject: [issue34183] Lib/test/test_contextlib_async.py failed when run as a script In-Reply-To: <1532194837.43.0.56676864532.issue34183@psf.upfronthosting.co.za> Message-ID: <1532195038.96.0.56676864532.issue34183@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +7911 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 13:47:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 17:47:26 +0000 Subject: [issue34184] Lib/test/test_dataclasses.py failed when ran as a script Message-ID: <1532195246.19.0.56676864532.issue34184@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : $ ./python Lib/test/test_dataclasses.py ... ====================================================================== ERROR: test_classvar_module_level_import (__main__.TestStringAnnotations) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_dataclasses.py", line 2716, in test_classvar_module_level_import from . import dataclass_module_1 ImportError: cannot import name 'dataclass_module_1' from '__main__' (Lib/test/test_dataclasses.py) ====================================================================== FAIL: test_no_repr (__main__.TestRepr) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_dataclasses.py", line 1970, in test_no_repr repr(C(3))) AssertionError: 'test_dataclasses.TestRepr.test_no_repr..C object at' not found in '<__main__.TestRepr.test_no_repr..C object at 0x7f11745df2c8>' ---------------------------------------------------------------------- ---------- assignee: serhiy.storchaka components: Tests messages: 322113 nosy: eric.smith, serhiy.storchaka priority: normal severity: normal status: open title: Lib/test/test_dataclasses.py failed when ran as a script type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 13:48:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 17:48:45 +0000 Subject: [issue34184] Lib/test/test_dataclasses.py failed when ran as a script In-Reply-To: <1532195246.19.0.56676864532.issue34184@psf.upfronthosting.co.za> Message-ID: <1532195325.91.0.56676864532.issue34184@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +7912 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 13:49:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 17:49:37 +0000 Subject: [issue34183] Lib/test/test_contextlib_async.py failed when ran as a script In-Reply-To: <1532194837.43.0.56676864532.issue34183@psf.upfronthosting.co.za> Message-ID: <1532195377.92.0.56676864532.issue34183@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- title: Lib/test/test_contextlib_async.py failed when run as a script -> Lib/test/test_contextlib_async.py failed when ran as a script _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 13:52:57 2018 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 21 Jul 2018 17:52:57 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1532190834.15.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: I wouldn?t object. Of course my opinion no longer matters that much. On Sat, Jul 21, 2018 at 9:33 AM Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > Shouldn't it be deleted in 3.7+ too? The behavior tested after PR 8364 > (falling back to the global __annotations__) looks to me even more > questionable than NameError. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > -- --Guido (mobile) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 13:54:18 2018 From: report at bugs.python.org (Stefan Krah) Date: Sat, 21 Jul 2018 17:54:18 +0000 Subject: [issue34179] test_statistics fails after test_time In-Reply-To: <1532179064.99.0.56676864532.issue34179@psf.upfronthosting.co.za> Message-ID: <1532195658.33.0.56676864532.issue34179@psf.upfronthosting.co.za> Stefan Krah added the comment: New changeset 938045f335b52ddb47076e9fbe4229a33b4bd9be by Stefan Krah (Bo Bayles) in branch 'master': bpo-34179: Make sure decimal context doesn't affect other tests. (#8376) https://github.com/python/cpython/commit/938045f335b52ddb47076e9fbe4229a33b4bd9be ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 13:54:34 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 21 Jul 2018 17:54:34 +0000 Subject: [issue34179] test_statistics fails after test_time In-Reply-To: <1532179064.99.0.56676864532.issue34179@psf.upfronthosting.co.za> Message-ID: <1532195674.77.0.56676864532.issue34179@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7913 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 13:55:25 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 21 Jul 2018 17:55:25 +0000 Subject: [issue34179] test_statistics fails after test_time In-Reply-To: <1532179064.99.0.56676864532.issue34179@psf.upfronthosting.co.za> Message-ID: <1532195725.6.0.56676864532.issue34179@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7914 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 14:02:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 18:02:02 +0000 Subject: [issue34185] Lib/test/test_bdb.py failed when ran as a script Message-ID: <1532196122.3.0.56676864532.issue34185@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : $ ./python Lib/test/test_bdb.py ... ====================================================================== FAIL: test_skip (__main__.StateTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_bdb.py", line 731, in test_skip tracer.runcall(tfunc_import) File "Lib/test/test_bdb.py", line 448, in __exit__ self.test_case.fail(err_msg) File "Lib/test/test_bdb.py", line 582, in fail raise self.failureException(msg) from None AssertionError: Wrong event type at expect_set item 2, got 'call' Expected: ('line', 3, 'tfunc_import') Got: ('call', 84, '_id'), ('quit',), ====================================================================== FAIL: test_runeval_step (__main__.RunTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_bdb.py", line 976, in test_runeval_step tracer.runeval('test_module.main()', globals(), locals()) File "Lib/test/test_bdb.py", line 448, in __exit__ self.test_case.fail(err_msg) File "Lib/test/test_bdb.py", line 582, in fail raise self.failureException(msg) from None AssertionError: Wrong event type at expect_set item 2, got 'exception' Expected: ('call', 2, 'main') Got: ('exception', 1, '', AttributeError), ('step',), All paired tuples have not been processed, the last one was number 2 ====================================================================== FAIL: test_bp_condition (__main__.BreakpointTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_bdb.py", line 843, in test_bp_condition tracer.runcall(tfunc_import) File "Lib/test/test_bdb.py", line 456, in __exit__ self.test_case.fail(not_empty) File "Lib/test/test_bdb.py", line 582, in fail raise self.failureException(msg) from None AssertionError: All paired tuples have not been processed, the last one was number 1 ====================================================================== FAIL: test_bp_exception_on_condition_evaluation (__main__.BreakpointTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_bdb.py", line 862, in test_bp_exception_on_condition_evaluation tracer.runcall(tfunc_import) File "Lib/test/test_bdb.py", line 456, in __exit__ self.test_case.fail(not_empty) File "Lib/test/test_bdb.py", line 582, in fail raise self.failureException(msg) from None AssertionError: All paired tuples have not been processed, the last one was number 1 ====================================================================== FAIL: test_bp_ignore_count (__main__.BreakpointTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_bdb.py", line 883, in test_bp_ignore_count tracer.runcall(tfunc_import) File "Lib/test/test_bdb.py", line 456, in __exit__ self.test_case.fail(not_empty) File "Lib/test/test_bdb.py", line 582, in fail raise self.failureException(msg) from None AssertionError: All paired tuples have not been processed, the last one was number 1 ====================================================================== FAIL: test_clear_two_bp_on_same_line (__main__.BreakpointTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_bdb.py", line 935, in test_clear_two_bp_on_same_line tracer.runcall(tfunc_import) File "Lib/test/test_bdb.py", line 456, in __exit__ self.test_case.fail(not_empty) File "Lib/test/test_bdb.py", line 582, in fail raise self.failureException(msg) from None AssertionError: All paired tuples have not been processed, the last one was number 4 ====================================================================== FAIL: test_disabled_temporary_bp (__main__.BreakpointTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_bdb.py", line 823, in test_disabled_temporary_bp tracer.runcall(tfunc_import) File "Lib/test/test_bdb.py", line 456, in __exit__ self.test_case.fail(not_empty) File "Lib/test/test_bdb.py", line 582, in fail raise self.failureException(msg) from None AssertionError: All paired tuples have not been processed, the last one was number 1 ====================================================================== FAIL: test_ignore_count_on_disabled_bp (__main__.BreakpointTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_bdb.py", line 910, in test_ignore_count_on_disabled_bp tracer.runcall(tfunc_import) File "Lib/test/test_bdb.py", line 456, in __exit__ self.test_case.fail(not_empty) File "Lib/test/test_bdb.py", line 582, in fail raise self.failureException(msg) from None AssertionError: All paired tuples have not been processed, the last one was number 1 ====================================================================== FAIL: test_temporary_bp (__main__.BreakpointTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_bdb.py", line 795, in test_temporary_bp tracer.runcall(tfunc_import) File "Lib/test/test_bdb.py", line 456, in __exit__ self.test_case.fail(not_empty) File "Lib/test/test_bdb.py", line 582, in fail raise self.failureException(msg) from None AssertionError: All paired tuples have not been processed, the last one was number 1 ====================================================================== FAIL: test_next_command_in_generator_for_loop (__main__.IssuesTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_bdb.py", line 1081, in test_next_command_in_generator_for_loop tracer.runcall(tfunc_import) File "Lib/test/test_bdb.py", line 456, in __exit__ self.test_case.fail(not_empty) File "Lib/test/test_bdb.py", line 582, in fail raise self.failureException(msg) from None AssertionError: All paired tuples have not been processed, the last one was number 1 ====================================================================== FAIL: test_next_command_in_generator_with_subiterator (__main__.IssuesTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_bdb.py", line 1112, in test_next_command_in_generator_with_subiterator tracer.runcall(tfunc_import) File "Lib/test/test_bdb.py", line 456, in __exit__ self.test_case.fail(not_empty) File "Lib/test/test_bdb.py", line 582, in fail raise self.failureException(msg) from None AssertionError: All paired tuples have not been processed, the last one was number 1 ====================================================================== FAIL: test_next_until_return_in_generator (__main__.IssuesTestCase) (set_type='next') ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_bdb.py", line 1050, in test_next_until_return_in_generator tracer.runcall(tfunc_import) File "Lib/test/test_bdb.py", line 456, in __exit__ self.test_case.fail(not_empty) File "Lib/test/test_bdb.py", line 582, in fail raise self.failureException(msg) from None AssertionError: All paired tuples have not been processed, the last one was number 1 ====================================================================== FAIL: test_next_until_return_in_generator (__main__.IssuesTestCase) (set_type='until') ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_bdb.py", line 1050, in test_next_until_return_in_generator tracer.runcall(tfunc_import) File "Lib/test/test_bdb.py", line 456, in __exit__ self.test_case.fail(not_empty) File "Lib/test/test_bdb.py", line 582, in fail raise self.failureException(msg) from None AssertionError: All paired tuples have not been processed, the last one was number 1 ====================================================================== FAIL: test_next_until_return_in_generator (__main__.IssuesTestCase) (set_type='return') ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_bdb.py", line 1050, in test_next_until_return_in_generator tracer.runcall(tfunc_import) File "Lib/test/test_bdb.py", line 456, in __exit__ self.test_case.fail(not_empty) File "Lib/test/test_bdb.py", line 582, in fail raise self.failureException(msg) from None AssertionError: All paired tuples have not been processed, the last one was number 1 ====================================================================== FAIL: test_return_command_in_generator_with_subiterator (__main__.IssuesTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_bdb.py", line 1143, in test_return_command_in_generator_with_subiterator tracer.runcall(tfunc_import) File "Lib/test/test_bdb.py", line 456, in __exit__ self.test_case.fail(not_empty) File "Lib/test/test_bdb.py", line 582, in fail raise self.failureException(msg) from None AssertionError: All paired tuples have not been processed, the last one was number 1 ====================================================================== FAIL: test_step_at_return_with_no_trace_in_caller (__main__.IssuesTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_bdb.py", line 1009, in test_step_at_return_with_no_trace_in_caller tracer.runcall(tfunc_import) File "Lib/test/test_bdb.py", line 456, in __exit__ self.test_case.fail(not_empty) File "Lib/test/test_bdb.py", line 582, in fail raise self.failureException(msg) from None AssertionError: All paired tuples have not been processed, the last one was number 2 ---------------------------------------------------------------------- ---------- components: Tests messages: 322116 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Lib/test/test_bdb.py failed when ran as a script type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 14:38:23 2018 From: report at bugs.python.org (Stefan Krah) Date: Sat, 21 Jul 2018 18:38:23 +0000 Subject: [issue34179] test_statistics fails after test_time In-Reply-To: <1532179064.99.0.56676864532.issue34179@psf.upfronthosting.co.za> Message-ID: <1532198303.49.0.56676864532.issue34179@psf.upfronthosting.co.za> Stefan Krah added the comment: New changeset 92ce6a64afcebd414def3b80b18b56448792a587 by Stefan Krah (Miss Islington (bot)) in branch '3.7': bpo-34179: Make sure decimal context doesn't affect other tests. (GH-8376) (#8383) https://github.com/python/cpython/commit/92ce6a64afcebd414def3b80b18b56448792a587 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 14:38:51 2018 From: report at bugs.python.org (Stefan Krah) Date: Sat, 21 Jul 2018 18:38:51 +0000 Subject: [issue34179] test_statistics fails after test_time In-Reply-To: <1532179064.99.0.56676864532.issue34179@psf.upfronthosting.co.za> Message-ID: <1532198331.46.0.56676864532.issue34179@psf.upfronthosting.co.za> Stefan Krah added the comment: New changeset 9c136700aa1f755fa2ea64594688a0930b716597 by Stefan Krah (Miss Islington (bot)) in branch '3.6': bpo-34179: Make sure decimal context doesn't affect other tests. (GH-8376) (#8384) https://github.com/python/cpython/commit/9c136700aa1f755fa2ea64594688a0930b716597 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 14:41:00 2018 From: report at bugs.python.org (Stefan Krah) Date: Sat, 21 Jul 2018 18:41:00 +0000 Subject: [issue34179] test_statistics fails after test_time In-Reply-To: <1532179064.99.0.56676864532.issue34179@psf.upfronthosting.co.za> Message-ID: <1532198460.74.0.56676864532.issue34179@psf.upfronthosting.co.za> Stefan Krah added the comment: Ok, looks fixed to me. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 14:58:56 2018 From: report at bugs.python.org (Keith Campbell) Date: Sat, 21 Jul 2018 18:58:56 +0000 Subject: [issue34175] typing.NamedTuple: type-checking error when "index" used as member In-Reply-To: <1532120880.21.0.56676864532.issue34175@psf.upfronthosting.co.za> Message-ID: <1532199536.08.0.56676864532.issue34175@psf.upfronthosting.co.za> Keith Campbell added the comment: > It's up to the OP to file an issue there though Will do; thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 15:04:39 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 21 Jul 2018 19:04:39 +0000 Subject: [issue34178] test_tcl fails on the 3.7 branch In-Reply-To: <1532161495.01.0.56676864532.issue34178@psf.upfronthosting.co.za> Message-ID: <1532199879.55.0.56676864532.issue34178@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks by install do you mean running the test with an installed version of python 3.7.0 from package manager or as a downloaded binary ? I can reproduce it with an installed version from anaconda but the binary compiled on the latest 3.7 branch works fine. Unfortunately, I can't compile tcl 8.6.8 after several tries. I think the test was added after the release of 3.7.0 is made thus causing failure on the released binary but works fine with the compiled one. If the above is correct then the test will also fail with latest 3.6.6 release. # Test added : June 30, 2018 (https://github.com/python/cpython/commit/42ea5226642c2a416b32278914fa4738093298ff) # 3.7.0 final : June 27, 2018 (https://github.com/python/cpython/commit/1bf9cc509326bc42cd8cb1650eb9bf64550d817e) # Running test with installed version of python 3.7.0 ? cpython git:(25326de) python3.7 Python 3.7.0 (default, Jun 28 2018, 02:32:19) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> ? cpython git:(25326de) python3.7 Lib/test/test_tcl.py patchlevel = 8.6.5 testCall (__main__.TclTest) ... ok testCallException (__main__.TclTest) ... ok testCallException2 (__main__.TclTest) ... ok testEval (__main__.TclTest) ... ok testEvalException (__main__.TclTest) ... ok testEvalException2 (__main__.TclTest) ... ok testEvalFile (__main__.TclTest) ... ok testEvalFileException (__main__.TclTest) ... ok testGetVar (__main__.TclTest) ... ok testGetVarArray (__main__.TclTest) ... ok testGetVarArrayException (__main__.TclTest) ... ok testGetVarException (__main__.TclTest) ... ok testLoadWithUNC (__main__.TclTest) ... skipped 'Requires Windows' testPackageRequireException (__main__.TclTest) ... ok testSetVar (__main__.TclTest) ... ok testSetVarArray (__main__.TclTest) ... ok testUnsetVar (__main__.TclTest) ... ok testUnsetVarArray (__main__.TclTest) ... ok testUnsetVarException (__main__.TclTest) ... ok test_booleans (__main__.TclTest) ... ok test_eval_null_in_result (__main__.TclTest) ... ok test_evalfile_null_in_result (__main__.TclTest) ... ok test_expr_bignum (__main__.TclTest) ... ok test_exprboolean (__main__.TclTest) ... ok test_exprdouble (__main__.TclTest) ... ok test_exprlong (__main__.TclTest) ... ok test_exprstring (__main__.TclTest) ... ok test_getboolean (__main__.TclTest) ... ok test_getdouble (__main__.TclTest) ... ok test_getint (__main__.TclTest) ... ok test_join (__main__.TclTest) ... FAIL test_new_tcl_obj (__main__.TclTest) ... ok test_passing_values (__main__.TclTest) ... ok test_split (__main__.TclTest) ... ok test_splitdict (__main__.TclTest) ... ok test_splitlist (__main__.TclTest) ... ok test_user_command (__main__.TclTest) ... ok testFlattenLen (__main__.TkinterTest) ... ok test_huge_string_builtins (__main__.BigmemTclTest) ... skipped 'not enough memory: 4.0G minimum needed' test_huge_string_builtins2 (__main__.BigmemTclTest) ... skipped 'not enough memory: 12.0G minimum needed' test_huge_string_call (__main__.BigmemTclTest) ... skipped 'not enough memory: 10.0G minimum needed' ====================================================================== FAIL: test_join (__main__.TclTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_tcl.py", line 670, in test_join check('{spam}') File "Lib/test/test_tcl.py", line 660, in check self.assertEqual(unpack(unpack(join([[value]]))), value) AssertionError: 'spam' != '{spam}' - spam + {spam} ? + + ---------------------------------------------------------------------- Ran 41 tests in 0.108s FAILED (failures=1, skipped=4) Traceback (most recent call last): File "Lib/test/test_tcl.py", line 752, in test_main() File "Lib/test/test_tcl.py", line 749, in test_main support.run_unittest(TclTest, TkinterTest, BigmemTclTest) File "/usr/lib/python3.7/test/support/__init__.py", line 1972, in run_unittest _run_suite(suite) File "/usr/lib/python3.7/test/support/__init__.py", line 1891, in _run_suite raise TestFailed(err) test.support.TestFailed: Traceback (most recent call last): File "Lib/test/test_tcl.py", line 670, in test_join check('{spam}') File "Lib/test/test_tcl.py", line 660, in check self.assertEqual(unpack(unpack(join([[value]]))), value) AssertionError: 'spam' != '{spam}' - spam + {spam} ? + + Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 15:46:29 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Jul 2018 19:46:29 +0000 Subject: [issue34181] Lib/test/test_typing.py failed when ran as a script In-Reply-To: <1532193801.1.0.56676864532.issue34181@psf.upfronthosting.co.za> Message-ID: <1532202389.96.0.56676864532.issue34181@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 961360923e7997a04833652623ea549b0dc02262 by Serhiy Storchaka in branch 'master': bpo-34181: Fix running Lib/test/test_typing.py as a script. (GH-8380) https://github.com/python/cpython/commit/961360923e7997a04833652623ea549b0dc02262 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 15:46:47 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 21 Jul 2018 19:46:47 +0000 Subject: [issue34181] Lib/test/test_typing.py failed when ran as a script In-Reply-To: <1532193801.1.0.56676864532.issue34181@psf.upfronthosting.co.za> Message-ID: <1532202407.62.0.56676864532.issue34181@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7915 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 17:14:35 2018 From: report at bugs.python.org (Yonatan Zunger) Date: Sat, 21 Jul 2018 21:14:35 +0000 Subject: [issue34115] code.InteractiveConsole.interact() closes stdin In-Reply-To: <1532150181.27.0.56676864532.issue34115@psf.upfronthosting.co.za> Message-ID: Yonatan Zunger added the comment: Definitely agree about the difference. I'd say that either SystemExit or EOFError would be a reasonable thing for the interactive session to do, but the combination of closing stdin and SystemExit is really weird. Honestly, I would have just expected interact() to return like an ordinary function when it was done; the logic of "it's time to close the terminal window" feels like it belongs at a *much* higher level of the stack. On Fri, Jul 20, 2018 at 10:16 PM Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > There is an important difference between a program saying 'I am done > executing' and a user saying 'I am done with the interactive session'. > This is especially true in an IDE where 'session' can include many editing > and shell sessions. > > 'Stop executing' happens when execution reaches the end of the file, > which causes EOFError upon a read attempt. It can also be done gracefully > before the end of input with sys.exit(), which raises SystemExit. > > In Interactive Python, 'leave session' can be done with SystemExit or the > EOF control signal, which appears to raise EOFError. This suggests that > quit() and exit(), which were added because newbies did not know the proper > way to exit, should raise EOFError rather than SystemExit. The fact that > 'quit' displays 'Use quit() or Ctrl-Z plus Return to exit' (EOF on Windows) > suggests the same. But I need to experiment (another day). > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 17:17:14 2018 From: report at bugs.python.org (Matej Cepl) Date: Sat, 21 Jul 2018 21:17:14 +0000 Subject: [issue33336] [imaplib] MOVE is a legal command In-Reply-To: <1524436182.1.0.682650639539.issue33336@psf.upfronthosting.co.za> Message-ID: <1532207834.68.0.56676864532.issue33336@psf.upfronthosting.co.za> Change by Matej Cepl : ---------- pull_requests: +7916 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 17:30:17 2018 From: report at bugs.python.org (Matthias Klose) Date: Sat, 21 Jul 2018 21:30:17 +0000 Subject: [issue34178] test_tcl fails on the 3.7 branch In-Reply-To: <1532161495.01.0.56676864532.issue34178@psf.upfronthosting.co.za> Message-ID: <1532208617.8.0.56676864532.issue34178@psf.upfronthosting.co.za> Matthias Klose added the comment: this is the python3.7 build for Debian, so yes, installed via a package manager ;) see https://ci.debian.net/data/packages/unstable/amd64/p/python3.7/ for the test results. and yes, that seems to be a regression compared to the 3.7.0 release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 18:20:01 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Jul 2018 22:20:01 +0000 Subject: [issue34180] bool(Q) always return True for a priority queue Q In-Reply-To: <1532188437.33.0.56676864532.issue34180@psf.upfronthosting.co.za> Message-ID: <1532211601.25.0.56676864532.issue34180@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The class is not documented to support __len__() or __bool__(), so this is not a bug. There is an empty() method provided for the purposes of testing whether a queue is empty or not. Likewise, there is a qsize() method for determining the current size. Note, these methods have a built in race condition -- the information may be out of date by the time it is used. In general, an EAFP approach is preferred for reliable behavior (i.e. call get() in a try/except to see whether an Empty exception is raised). FWIW, this module's API was designed by Guido a long time ago. Presumably, he had his reasons for choosing empty(), full(), and qsize() over the __len__() method. Once the API has been published and then become widely used, the time for debating his API decisions is over and we work with it as published. ---------- resolution: -> rejected stage: -> resolved status: open -> closed type: behavior -> enhancement versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 20:32:12 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 22 Jul 2018 00:32:12 +0000 Subject: [issue34157] NamedTemporaryFile can leave temporary files behind In-Reply-To: <1532028572.02.0.56676864532.issue34157@psf.upfronthosting.co.za> Message-ID: <1532219532.08.0.56676864532.issue34157@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 20:51:16 2018 From: report at bugs.python.org (bbayles) Date: Sun, 22 Jul 2018 00:51:16 +0000 Subject: [issue34182] Lib/test/test_pydoc.py failed when ran as a script In-Reply-To: <1532194373.75.0.56676864532.issue34182@psf.upfronthosting.co.za> Message-ID: <1532220676.63.0.56676864532.issue34182@psf.upfronthosting.co.za> Change by bbayles : ---------- keywords: +patch pull_requests: +7917 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 20:51:37 2018 From: report at bugs.python.org (bbayles) Date: Sun, 22 Jul 2018 00:51:37 +0000 Subject: [issue34182] Lib/test/test_pydoc.py failed when ran as a script In-Reply-To: <1532194373.75.0.56676864532.issue34182@psf.upfronthosting.co.za> Message-ID: <1532220697.29.0.56676864532.issue34182@psf.upfronthosting.co.za> Change by bbayles : ---------- nosy: +bbayles _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 20:54:20 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 22 Jul 2018 00:54:20 +0000 Subject: [issue34127] Gramatically incorrect error message for some calls with wrong number of arguments In-Reply-To: <1531766313.86.0.56676864532.issue34127@psf.upfronthosting.co.za> Message-ID: <1532220860.98.0.56676864532.issue34127@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Raymond, will we accept a patch for this? If the patch is simple and minimal, then this seems like a minor but nice little improvement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 21:29:25 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 22 Jul 2018 01:29:25 +0000 Subject: [issue34178] test_tcl fails on the 3.7 branch In-Reply-To: <1532161495.01.0.56676864532.issue34178@psf.upfronthosting.co.za> Message-ID: <1532222965.01.0.56676864532.issue34178@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Got it. Thanks for the details. I understand the change in behavior since it was added as part of https://bugs.python.org/issue33974 after 3.7.0 but I don't know if this should be classified as a regression or as a bug fix after a stable release. This was merged to master, 3.7, 3.6 and 2.7 branches. https://bugs.python.org/issue33974#msg320663 also states that it needs a more a complex fix. I don't know the policy and I will leave it to @serhiy.storchaka to decide if it's a regression or a bug fix. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 22:33:42 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 22 Jul 2018 02:33:42 +0000 Subject: [issue34127] Gramatically incorrect error message for some calls with wrong number of arguments In-Reply-To: <1531766313.86.0.56676864532.issue34127@psf.upfronthosting.co.za> Message-ID: <1532226822.41.0.56676864532.issue34127@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 22:36:57 2018 From: report at bugs.python.org (Todd) Date: Sun, 22 Jul 2018 02:36:57 +0000 Subject: [issue34186] [3.6.6 on macOS] os.listdir replacing "/" with ":" Message-ID: <1532227017.3.0.56676864532.issue34186@psf.upfronthosting.co.za> New submission from Todd : Short back story - I am organizing music where "/" appears in a lot a metadata for the songs. For instance, the artist "AC/DC" or "ACDC w/ Axl Rose". On macOS, it is acceptable to name a folder "AC/DC" while the slash would cause an issue in Windows. Issue - While using os.listdir to list a number of artist folders inside my iTunes music folder os.listdir replaced "/" with ":" IF the "/" appears in the name itself. It does not replace the slash delimiters. I have included a screen shot. On the right side of the image is an example directory I made with a few folders. Two of the folders have "/" in their names. On the left side of the image is the Python shell showing the use of os.listdir along with the output. You'll notice that the listed directories don't include "/", but instead include ":". ---------- components: macOS files: Screen Shot 2018-07-21 at 9.29.59 PM.png messages: 322128 nosy: coleman45.1 at hotmail.com, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: [3.6.6 on macOS] os.listdir replacing "/" with ":" type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file47708/Screen Shot 2018-07-21 at 9.29.59 PM.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 22:53:39 2018 From: report at bugs.python.org (Windson Yang) Date: Sun, 22 Jul 2018 02:53:39 +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: <1532228019.9.0.56676864532.issue34172@psf.upfronthosting.co.za> Windson Yang added the comment: A patch would just add def __del__(self): self.terminate() in the Pool object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 21 23:10:33 2018 From: report at bugs.python.org (Zachary Ware) Date: Sun, 22 Jul 2018 03:10:33 +0000 Subject: [issue34186] [3.6.6 on macOS] os.listdir replacing "/" with ":" In-Reply-To: <1532227017.3.0.56676864532.issue34186@psf.upfronthosting.co.za> Message-ID: <1532229033.25.0.56676864532.issue34186@psf.upfronthosting.co.za> Zachary Ware added the comment: That's nothing to do with Python and everything to do with macOS. As a test, open Terminal, do `ls ~/Example`, and you'll see `AC:DC` instead of `AC/DC`. As a further test, do `mkdir ~/Example/dir:with:colons` and then have a look in Finder. See here [1] for more information. [1] https://apple.stackexchange.com/questions/173529/when-did-the-colon-character-become-an-allowed-character-in-the-filesystem ---------- nosy: +zach.ware resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 01:05:47 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 22 Jul 2018 05:05:47 +0000 Subject: [issue940286] pydoc.Helper.help() ignores input/output init parameters Message-ID: <1532235947.92.0.56676864532.issue940286@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- pull_requests: +7918 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 01:12:18 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 22 Jul 2018 05:12:18 +0000 Subject: [issue940286] pydoc.Helper.help() ignores input/output init parameters Message-ID: <1532236338.31.0.56676864532.issue940286@psf.upfronthosting.co.za> Berker Peksag added the comment: I just noticed the same bug described by ?ric in msg127840. PR 8390 should fix it. Unfortunately, it wasn't easy to create a test case, so I skipped that part. I'm open to suggestions if you have an idea on how to write a simple test that reproduces the bug. ?ric, could you confirm that the attached PR fixes the bug? ---------- keywords: -easy nosy: +berker.peksag versions: +Python 3.6, Python 3.7, Python 3.8 -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 01:19:37 2018 From: report at bugs.python.org (Noah Haasis) Date: Sun, 22 Jul 2018 05:19:37 +0000 Subject: [issue34154] Tkinter __init__ documentations sometimes missing valid keyword values In-Reply-To: <1531969710.94.0.56676864532.issue34154@psf.upfronthosting.co.za> Message-ID: <1532236777.3.0.56676864532.issue34154@psf.upfronthosting.co.za> Noah Haasis added the comment: This are all the classes where the keywords are missing in the docs and their missing keywords: TopLevel ['padx', 'pady'] Checkbutton ['compound', 'offrelief', 'overrelief', 'tristateimage', 'tristatevalue'] Entry ['disabledbackground', 'disabledforeground', 'readonlybackground'] Frame ['padx', 'pady'] Label ['compound'] Radiobutton ['compound', 'offrelief', 'overrelief', 'tristateimage', 'tristatevalue'] Text ['blockcursor', 'endline', 'inactiveselectbackground', 'insertunfocussed', 'startline', 'tabstyle'] Spinbox ['validatecommand', 'values'] Menubutton ['activebackground', 'activeforeground', 'anchor', 'background', 'bitmap', 'borderwidth', 'compound', 'cursor', 'direction', 'disabledforeground', 'font', 'foreground', 'height', 'highlightbackground', 'highlightcolor', 'highlightthickness', 'image', 'indicatoron', 'justify', 'menu', 'padx', 'pady', 'relief', 'state', 'takefocus', 'text', 'textvariable', 'underline', 'width', 'wraplength'] Message ['anchor', 'aspect', 'background', 'borderwidth', 'cursor', 'font', 'foreground', 'highlightbackground', 'highlightcolor', 'highlightthickness', 'justify', 'padx', 'pady', 'relief', 'takefocus', 'text', 'textvariable', 'width'] The missing keywords appear in the OPTIONS list in the test but not in the docstring. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 02:13:58 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 22 Jul 2018 06:13:58 +0000 Subject: [issue21446] Update reload fixer to use importlib instead of imp In-Reply-To: <1399369899.96.0.959859751651.issue21446@psf.upfronthosting.co.za> Message-ID: <1532240038.79.0.56676864532.issue21446@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- pull_requests: +7919 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 02:22:16 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 22 Jul 2018 06:22:16 +0000 Subject: [issue21446] Update reload fixer to use importlib instead of imp In-Reply-To: <1399369899.96.0.959859751651.issue21446@psf.upfronthosting.co.za> Message-ID: <1532240536.94.0.56676864532.issue21446@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks, Brett. I've opened PR 8391. Should we backport this to 3.7? We do backport mimetypes additions (see https://github.com/python/cpython/commit/8204b903683f9e0f037ccfaa87622716019914d7 for an example) I think lib2to3 falls into the same category as mimetypes and it might be better to keep fixers in sync at least in 3.7 and 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 03:13:58 2018 From: report at bugs.python.org (Kay Hayen) Date: Sun, 22 Jul 2018 07:13:58 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1532243638.91.0.56676864532.issue34136@psf.upfronthosting.co.za> Kay Hayen added the comment: As somebody whose opinion is even less important: Did you consider my suggestion to make it a "SyntaxError" for "del __annotations__" on a class level or even module level or at all? Or does this go too far? Yours, Kay ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 03:58:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 22 Jul 2018 07:58:41 +0000 Subject: [issue28055] pyhash's siphash24 assumes alignment of the data pointer In-Reply-To: <1532175928.55.0.56676864532.issue28055@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: I would say that Python no longer officially supports sparc and solaris because of the lack of volunteer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 04:30:40 2018 From: report at bugs.python.org (Martin Panter) Date: Sun, 22 Jul 2018 08:30:40 +0000 Subject: [issue33154] subprocess.Popen ResourceWarning should have activation-deactivation flags In-Reply-To: <1522148083.75.0.467229070634.issue33154@psf.upfronthosting.co.za> Message-ID: <1532248240.14.0.56676864532.issue33154@psf.upfronthosting.co.za> Martin Panter added the comment: Can?t you use Python?s existing CLI and environment variable to control the ResourceWarning messages? Warnings where enabled by default when using the ?unittest? module in Issue 10535. There is probably a way to disable them, at least by using the ?warnings? module directly. But I think ResourceWarning should stay enabled by default when running tests. As you said, the warnings help testing for bugs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 04:38:36 2018 From: report at bugs.python.org (Martin Panter) Date: Sun, 22 Jul 2018 08:38:36 +0000 Subject: [issue31935] subprocess.run() timeout not working with grandchildren and stdout=PIPE In-Reply-To: <1509721292.04.0.213398074469.issue31935@psf.upfronthosting.co.za> Message-ID: <1532248716.22.0.56676864532.issue31935@psf.upfronthosting.co.za> Martin Panter added the comment: Closing in faviour of Issue 30154, which suggests documentation or adjusting the timeout implementation. There is also Issue 26534 proposing a new ?kill_group? option when using the timeout feature. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> subprocess.run with stderr connected to a pipe won't timeout when killing a never-ending shell commanad _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 05:05:49 2018 From: report at bugs.python.org (Eryk Sun) Date: Sun, 22 Jul 2018 09:05:49 +0000 Subject: [issue34187] Issues with lazy fd support in _WindowsConsoleIO fileno() and close() Message-ID: <1532250349.34.0.56676864532.issue34187@psf.upfronthosting.co.za> New submission from Eryk Sun : The _WindowsConsoleIO implementation of fileno should raise a ValueError if the internal handle value is INVALID_HANDLE_VALUE. Currently it raises io.UnsupportedOperation, and only if closefd=True. >>> f = open('conin$', 'r') >>> f.close() >>> f.fileno() Traceback (most recent call last): File "", line 1, in io.UnsupportedOperation: Console buffer does not support fileno >>> f = open(0, 'r', closefd=False) >>> f.close() >>> f.fileno() 0 Also, if lazily opening an fd fails when opening by name (con, conin$, conout$), it should also close the file handle to maintain a consistent state. This can be fixed as follows: error out immediately and call err_closed instead of err_mode; and close the handle if _open_osfhandle fails (i.e. fd == -1) and closehandle is set: static PyObject * _io__WindowsConsoleIO_fileno_impl(winconsoleio *self) { if (self->handle == INVALID_HANDLE_VALUE) { return err_closed(); } if (self->fd < 0) { _Py_BEGIN_SUPPRESS_IPH if (self->writable) { self->fd = _open_osfhandle((intptr_t)self->handle, _O_WRONLY | _O_BINARY); } else { self->fd = _open_osfhandle((intptr_t)self->handle, _O_RDONLY | _O_BINARY); } _Py_END_SUPPRESS_IPH } if (self->fd < 0) { if (self->closehandle) { CloseHandle(self->handle); } self->handle = INVALID_HANDLE_VALUE; return err_closed(); } return PyLong_FromLong(self->fd); } On a related note, there's a bug in internal_close that could potentially be a race condition that closes a handle to an unrelated object. If an fd has been opened, the CRT takes control of the handle. Calling close() will also close the underlying handle. In this case CloseHandle should not be called. This just needs a minor fix to add an `else` clause: static int internal_close(winconsoleio *self) { if (self->handle != INVALID_HANDLE_VALUE) { if (self->closehandle) { if (self->fd >= 0) { _Py_BEGIN_SUPPRESS_IPH close(self->fd); _Py_END_SUPPRESS_IPH } else { CloseHandle(self->handle); } } self->handle = INVALID_HANDLE_VALUE; self->fd = -1; } return 0; } ---------- components: IO, Windows keywords: easy (C) messages: 322138 nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Issues with lazy fd support in _WindowsConsoleIO fileno() and close() type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 05:12:01 2018 From: report at bugs.python.org (Eryk Sun) Date: Sun, 22 Jul 2018 09:12:01 +0000 Subject: [issue34115] code.InteractiveConsole.interact() closes stdin In-Reply-To: <1531608583.62.0.56676864532.issue34115@psf.upfronthosting.co.za> Message-ID: <1532250721.21.0.56676864532.issue34115@psf.upfronthosting.co.za> Eryk Sun added the comment: > On Windows Console, sys.stdin.close() does not prevent a second > interact call. This might be considered a bug. This is a bug in io._WindowsConsoleIO. In Python 3, the sys.std* file objects that get created at startup use closefd=False: >>> sys.stdin.buffer.raw.closefd False >>> sys.stdout.buffer.raw.closefd False >>> sys.stderr.buffer.raw.closefd False Since the REPL uses C FILE streams (or in 3.6+ the underlying console file handle in Windows), closing sys.stdin does not cause the REPL to exit, and the PyOS_ReadLine call in the interactive loop continues to work in both POSIX and Windows. That said, closing sys.stdin should cause input() to raise ValueError due to sys.stdin.fileno() failing (i.e. take the non-tty path) and subsequently sys.stdin.readline() failing. A second call to code.InteractiveConsole.interact() should thus fail. The issue is that the fileno() method of _WindowsConsoleIO isn't raising ValueError like it should when the file is closed and closefd is false. I've created issue 34187 with a suggested fix. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 05:14:59 2018 From: report at bugs.python.org (Martin Panter) Date: Sun, 22 Jul 2018 09:14:59 +0000 Subject: [issue34158] Documentation of datetime '%z' format code is odd In-Reply-To: <1532036087.85.0.56676864532.issue34158@psf.upfronthosting.co.za> Message-ID: <1532250899.62.0.56676864532.issue34158@psf.upfronthosting.co.za> Martin Panter added the comment: FWIW more oddities with this paragraph could be fixed by: * removing the first ?and? from ?HH is . . ., [and] MM is . . ., SS is . . . and uuuuuu is?, * changing the condition for omitting ?uuuuuu? from ?a whole number of [minutes]? to ?seconds?, and * changing ?the [SS parts are] omitted? to singular ?SS part is?. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 06:41:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 22 Jul 2018 10:41:49 +0000 Subject: [issue34181] Lib/test/test_typing.py failed when ran as a script In-Reply-To: <1532193801.1.0.56676864532.issue34181@psf.upfronthosting.co.za> Message-ID: <1532256109.84.0.56676864532.issue34181@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 81f85d09f4cc83fc35452afcca75baaf64831b22 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-34181: Fix running Lib/test/test_typing.py as a script. (GH-8380) (GH-8385) https://github.com/python/cpython/commit/81f85d09f4cc83fc35452afcca75baaf64831b22 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 06:45:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 22 Jul 2018 10:45:01 +0000 Subject: [issue34181] Lib/test/test_typing.py failed when ran as a script In-Reply-To: <1532193801.1.0.56676864532.issue34181@psf.upfronthosting.co.za> Message-ID: <1532256301.53.0.56676864532.issue34181@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 Jul 22 06:47:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 22 Jul 2018 10:47:07 +0000 Subject: [issue34166] Tools/msgfmt.py emits a DeprecationWarning under Python 3.7 In-Reply-To: <1532088364.94.0.56676864532.issue34166@psf.upfronthosting.co.za> Message-ID: <1532256427.78.0.56676864532.issue34166@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 08:53:50 2018 From: report at bugs.python.org (Victor Porton) Date: Sun, 22 Jul 2018 12:53:50 +0000 Subject: [issue34188] Use dicts to "transform" argparse arguments to values Message-ID: <1532264030.24.0.56676864532.issue34188@psf.upfronthosting.co.za> New submission from Victor Porton : The below code produces "rock", but it should produce "a". This (to use dict value instead of the key by argparse result) is both to be a new useful feature (for example to map strings in a command line to certain functions or classes provided as dict values) and conform to intuition better. My feature proposal breaks backward compatibility, but I think no reasonable programmer wrote it in such a way that he relied on the current behavior for `dict` values for `choices`. import argparse parser = argparse.ArgumentParser(prog='game.py') parser.add_argument('move', choices={'rock':'a', 'paper':'b', 'scissors':'c'}) print(parser.parse_args(['rock'])) ---------- components: Library (Lib) messages: 322142 nosy: porton priority: normal severity: normal status: open title: Use dicts to "transform" argparse arguments to values versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 08:53:56 2018 From: report at bugs.python.org (Victor Porton) Date: Sun, 22 Jul 2018 12:53:56 +0000 Subject: [issue34188] Use dicts to "transform" argparse arguments to values In-Reply-To: <1532264030.24.0.56676864532.issue34188@psf.upfronthosting.co.za> Message-ID: <1532264036.79.0.56676864532.issue34188@psf.upfronthosting.co.za> Change by Victor Porton : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 08:59:36 2018 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 22 Jul 2018 12:59:36 +0000 Subject: [issue25943] Integer overflow in _bsddb leads to heap corruption In-Reply-To: <1451015615.68.0.324504050935.issue25943@psf.upfronthosting.co.za> Message-ID: <1532264376.32.0.56676864532.issue25943@psf.upfronthosting.co.za> Zackery Spytz added the comment: Integer overflow can also occur in DB_join(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 09:01:28 2018 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 22 Jul 2018 13:01:28 +0000 Subject: [issue25943] Integer overflow in _bsddb leads to heap corruption In-Reply-To: <1451015615.68.0.324504050935.issue25943@psf.upfronthosting.co.za> Message-ID: <1532264488.85.0.56676864532.issue25943@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- pull_requests: +7920 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 09:31:54 2018 From: report at bugs.python.org (Zachary Ware) Date: Sun, 22 Jul 2018 13:31:54 +0000 Subject: [issue34188] Use dicts to "transform" argparse arguments to values In-Reply-To: <1532264030.24.0.56676864532.issue34188@psf.upfronthosting.co.za> Message-ID: <1532266314.37.0.56676864532.issue34188@psf.upfronthosting.co.za> Zachary Ware added the comment: I like to think I'm fairly reasonable :). You can get what you want by specifying `type=choices_dict.get`, or by extracting from the dict manually after calling `parse_args`. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 09:57:13 2018 From: report at bugs.python.org (Todd) Date: Sun, 22 Jul 2018 13:57:13 +0000 Subject: [issue34186] [3.6.6 on macOS] os.listdir replacing "/" with ":" In-Reply-To: <1532229033.25.0.56676864532.issue34186@psf.upfronthosting.co.za> Message-ID: Todd added the comment: Ah, thank you for the link. I looked for something like that, but I obviously didn?t use the right wording while searching. Sorry for the false report and thanks for the quick help. -Todd Sent from my iPhone > On Jul 21, 2018, at 10:10 PM, Zachary Ware wrote: > > > Zachary Ware added the comment: > > That's nothing to do with Python and everything to do with macOS. As a test, open Terminal, do `ls ~/Example`, and you'll see `AC:DC` instead of `AC/DC`. As a further test, do `mkdir ~/Example/dir:with:colons` and then have a look in Finder. > > See here [1] for more information. > > [1] https://apple.stackexchange.com/questions/173529/when-did-the-colon-character-become-an-allowed-character-in-the-filesystem > > ---------- > nosy: +zach.ware > resolution: -> not a bug > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 10:54:51 2018 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 22 Jul 2018 14:54:51 +0000 Subject: [issue20906] Issues in Unicode HOWTO In-Reply-To: <1394702187.81.0.00522221343959.issue20906@psf.upfronthosting.co.za> Message-ID: <1532271291.78.0.56676864532.issue20906@psf.upfronthosting.co.za> Change by A.M. Kuchling : ---------- keywords: +patch pull_requests: +7921 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 11:01:11 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 22 Jul 2018 15:01:11 +0000 Subject: [issue34127] Gramatically incorrect error message for some calls with wrong number of arguments In-Reply-To: <1531766313.86.0.56676864532.issue34127@psf.upfronthosting.co.za> Message-ID: <1532271671.43.0.56676864532.issue34127@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +7922 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 11:05:05 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 22 Jul 2018 15:05:05 +0000 Subject: [issue34127] Gramatically incorrect error message for some calls with wrong number of arguments In-Reply-To: <1531766313.86.0.56676864532.issue34127@psf.upfronthosting.co.za> Message-ID: <1532271905.26.0.56676864532.issue34127@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I have added a simple patch based on the changes by https://bugs.python.org/issue29951. The C code related error messages doesn't seem to have been covered by tests and I have added some tests. I have limited knowledge of C and this is my first C patch so code comments if any will be helpful. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 11:30:20 2018 From: report at bugs.python.org (tzickel) Date: Sun, 22 Jul 2018 15:30:20 +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: <1532273420.47.0.56676864532.issue34172@psf.upfronthosting.co.za> tzickel added the comment: But alas that does not work... ---------- nosy: +davin, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 11:51:49 2018 From: report at bugs.python.org (Anjali Bansal) Date: Sun, 22 Jul 2018 15:51:49 +0000 Subject: [issue33187] Document ElementInclude (XInclude) support in ElementTree In-Reply-To: <1522427694.7.0.467229070634.issue33187@psf.upfronthosting.co.za> Message-ID: <1532274709.29.0.56676864532.issue33187@psf.upfronthosting.co.za> Anjali Bansal added the comment: Thank you for the information. I had started working on this issue. You can assign it to me if needed. I will create a PR soon. Github Username: bansalanjali2512 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 12:01:28 2018 From: report at bugs.python.org (Windson Yang) Date: Sun, 22 Jul 2018 16:01:28 +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: <1532275288.75.0.56676864532.issue34172@psf.upfronthosting.co.za> Change by Windson Yang : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 12:07:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 22 Jul 2018 16:07:53 +0000 Subject: [issue34189] Add simple tests for new Tk widget options Message-ID: <1532275673.86.0.56676864532.issue34189@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The following PR adds simple tests for Tk widget options added in Tk 8.6.5. TIP 441: Add -justify Configuration Option to the listbox Widget https://core.tcl.tk/tips/doc/trunk/tip/441.md TIP 437: Tk panedwindow options for proxy window https://core.tcl.tk/tips/doc/trunk/tip/437.md ---------- assignee: serhiy.storchaka components: Tests, Tkinter messages: 322149 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Add simple tests for new Tk widget options type: enhancement versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 12:08:04 2018 From: report at bugs.python.org (Windson Yang) Date: Sun, 22 Jul 2018 16:08:04 +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: <1532275684.41.0.56676864532.issue34172@psf.upfronthosting.co.za> Windson Yang added the comment: Add a __del__ method in the Pool class should work. But I'm not sure we should do this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 12:10:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 22 Jul 2018 16:10:08 +0000 Subject: [issue34189] Add simple tests for new Tk widget options In-Reply-To: <1532275673.86.0.56676864532.issue34189@psf.upfronthosting.co.za> Message-ID: <1532275808.59.0.56676864532.issue34189@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +7923 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 12:37:43 2018 From: report at bugs.python.org (Brett Cannon) Date: Sun, 22 Jul 2018 16:37:43 +0000 Subject: [issue21446] Update reload fixer to use importlib instead of imp In-Reply-To: <1532240536.94.0.56676864532.issue21446@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: I think we said backporting fixers was fine but I honestly don't remember. On Sat, Jul 21, 2018, 23:22 Berker Peksag, wrote: > > Berker Peksag added the comment: > > Thanks, Brett. I've opened PR 8391. Should we backport this to 3.7? We do > backport mimetypes additions (see > https://github.com/python/cpython/commit/8204b903683f9e0f037ccfaa87622716019914d7 > for an example) I think lib2to3 falls into the same category as mimetypes > and it might be better to keep fixers in sync at least in 3.7 and 3.8. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 12:49:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 22 Jul 2018 16:49:19 +0000 Subject: [issue34154] Tkinter __init__ documentations sometimes missing valid keyword values In-Reply-To: <1531969710.94.0.56676864532.issue34154@psf.upfronthosting.co.za> Message-ID: <1532278159.4.0.56676864532.issue34154@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Few new options were added: see issue34189. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 12:50:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 22 Jul 2018 16:50:19 +0000 Subject: [issue34189] Add simple tests for new Tk widget options In-Reply-To: <1532275673.86.0.56676864532.issue34189@psf.upfronthosting.co.za> Message-ID: <1532278219.75.0.56676864532.issue34189@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset e271ca78e37a502b3dc1036f824aa3999efcd56b by Serhiy Storchaka in branch 'master': bpo-34189: Add simple tests for new Tk widget options. (GH-8396) https://github.com/python/cpython/commit/e271ca78e37a502b3dc1036f824aa3999efcd56b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 12:53:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 22 Jul 2018 16:53:59 +0000 Subject: [issue25943] Integer overflow in _bsddb leads to heap corruption In-Reply-To: <1451015615.68.0.324504050935.issue25943@psf.upfronthosting.co.za> Message-ID: <1532278439.13.0.56676864532.issue25943@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 041a4ee9456d716dd449d38a5328b82e76f5dbc4 by Serhiy Storchaka (Zackery Spytz) in branch '2.7': bpo-25943: Check for integer overflow in bsddb's DB_join(). (GH-8392) https://github.com/python/cpython/commit/041a4ee9456d716dd449d38a5328b82e76f5dbc4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 12:57:06 2018 From: report at bugs.python.org (ppperry) Date: Sun, 22 Jul 2018 16:57:06 +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: <1532278626.57.0.56676864532.issue34188@psf.upfronthosting.co.za> Change by ppperry : ---------- title: Use dicts to "transform" argparse arguments to values -> Allow dict choices to "transform" values in argpagse _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 13:40:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 22 Jul 2018 17:40:53 +0000 Subject: [issue34189] Add simple tests for new Tk widget options In-Reply-To: <1532275673.86.0.56676864532.issue34189@psf.upfronthosting.co.za> Message-ID: <1532281253.08.0.56676864532.issue34189@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +7924 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 14:20:42 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 22 Jul 2018 18:20:42 +0000 Subject: [issue34127] Gramatically incorrect error message for some calls with wrong number of arguments In-Reply-To: <1531766313.86.0.56676864532.issue34127@psf.upfronthosting.co.za> Message-ID: <1532283642.23.0.56676864532.issue34127@psf.upfronthosting.co.za> Terry J. Reedy added the comment: We don't normally backport an exception message change unless its content, as opposed to style, is erroneous. ---------- type: -> enhancement versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 14:37:48 2018 From: report at bugs.python.org (Tim Peters) Date: Sun, 22 Jul 2018 18:37:48 +0000 Subject: [issue34180] bool(Q) always return True for a priority queue Q In-Reply-To: <1532188437.33.0.56676864532.issue34180@psf.upfronthosting.co.za> Message-ID: <1532284668.13.0.56676864532.issue34180@psf.upfronthosting.co.za> Tim Peters added the comment: I'm sure Guido designed the API to discourage subtly bug-ridden code relying on the mistaken belief that it _can_ know the queue's current size. In the general multi-threaded context Queue is intended to be used, the only thing `.qsize()`'s caller can know is that the queue _had_ the returned size at some time in the past. It can't know what the size is at the time the returned value is used. Note that the docstrings still say that the `.empty()` and `.full()` methods are "likely to be removed at some point". The only surprise to me is that `.qsize()` doesn't also say that. As is, I still see race-ridden code on StackOverflow from time to time using `.qsize()`. There are already plenty of warnings about that in the docs. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 14:41:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 22 Jul 2018 18:41:50 +0000 Subject: [issue34189] Add simple tests for new Tk widget options In-Reply-To: <1532275673.86.0.56676864532.issue34189@psf.upfronthosting.co.za> Message-ID: <1532284910.87.0.56676864532.issue34189@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c75c1e0e8aeb720ac3fcfab119b70cabba4e8235 by Serhiy Storchaka in branch 'master': bpo-34189: Fix checking for bugfix Tcl version. (GH-8397) https://github.com/python/cpython/commit/c75c1e0e8aeb720ac3fcfab119b70cabba4e8235 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 14:52:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 22 Jul 2018 18:52:15 +0000 Subject: [issue34189] Add simple tests for new Tk widget options In-Reply-To: <1532275673.86.0.56676864532.issue34189@psf.upfronthosting.co.za> Message-ID: <1532285535.48.0.56676864532.issue34189@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +7925 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 14:52:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 22 Jul 2018 18:52:22 +0000 Subject: [issue34189] Add simple tests for new Tk widget options In-Reply-To: <1532275673.86.0.56676864532.issue34189@psf.upfronthosting.co.za> Message-ID: <1532285542.94.0.56676864532.issue34189@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +7926 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 14:52:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 22 Jul 2018 18:52:27 +0000 Subject: [issue34189] Add simple tests for new Tk widget options In-Reply-To: <1532275673.86.0.56676864532.issue34189@psf.upfronthosting.co.za> Message-ID: <1532285547.44.0.56676864532.issue34189@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +7927 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 15:14:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 22 Jul 2018 19:14:18 +0000 Subject: [issue34189] Add simple tests for new Tk widget options In-Reply-To: <1532275673.86.0.56676864532.issue34189@psf.upfronthosting.co.za> Message-ID: <1532286858.84.0.56676864532.issue34189@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c7b91d95d8890a4bafefa797f194a1ae3f0f0abb by Serhiy Storchaka in branch '3.7': [3.7] bpo-34189: Add simple tests for new Tk widget options. (GH-8396) (GH-8398) https://github.com/python/cpython/commit/c7b91d95d8890a4bafefa797f194a1ae3f0f0abb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 15:14:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 22 Jul 2018 19:14:47 +0000 Subject: [issue34189] Add simple tests for new Tk widget options In-Reply-To: <1532275673.86.0.56676864532.issue34189@psf.upfronthosting.co.za> Message-ID: <1532286887.45.0.56676864532.issue34189@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 0ff174643437f34c50c8625462b5419b1a643b57 by Serhiy Storchaka in branch '3.6': [3.6] bpo-34189: Add simple tests for new Tk widget options. (GH-8396) (GH-8399) https://github.com/python/cpython/commit/0ff174643437f34c50c8625462b5419b1a643b57 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 15:15:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 22 Jul 2018 19:15:19 +0000 Subject: [issue34189] Add simple tests for new Tk widget options In-Reply-To: <1532275673.86.0.56676864532.issue34189@psf.upfronthosting.co.za> Message-ID: <1532286918.99.0.56676864532.issue34189@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 46cb5fd706563673663e676bb70f46a73f4edc89 by Serhiy Storchaka in branch '2.7': [2.7] bpo-34189: Add simple tests for new Tk widget options. (GH-8396). (GH-8400) https://github.com/python/cpython/commit/46cb5fd706563673663e676bb70f46a73f4edc89 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 15:15:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 22 Jul 2018 19:15:54 +0000 Subject: [issue34189] Add simple tests for new Tk widget options In-Reply-To: <1532275673.86.0.56676864532.issue34189@psf.upfronthosting.co.za> Message-ID: <1532286954.77.0.56676864532.issue34189@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 Jul 22 15:17:48 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 22 Jul 2018 19:17:48 +0000 Subject: [issue34021] [2.7] test_regrtest: test_env_changed() fails on x86 Windows XP VS9.0 2.7 In-Reply-To: <1530525938.11.0.56676864532.issue34021@psf.upfronthosting.co.za> Message-ID: <1532287068.62.0.56676864532.issue34021@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: It seems that this buildbot failure is related to this issue: https://buildbot.python.org/all/#/builders/105/builds/192 1 test failed: test_regrtest 43 tests skipped: test_aepack test_al test_applesingle test_bsddb185 test_bsddb3 test_cd test_cl test_commands test_crypt test_curses test_dbm test_dl test_epoll test_fcntl test_fork1 test_gdb test_gdbm test_gl test_grp test_imgfile test_ioctl test_kqueue test_linuxaudiodev test_macos test_macostools test_mhlib test_nis test_openpty test_ossaudiodev test_pipes test_poll test_posix test_pty test_pwd test_readline test_resource test_scriptpackages test_spwd test_sunaudiodev test_threadsignals test_wait3 test_wait4 test_zipfile64 2 skips unexpected on win32: test_gdb test_readline 1 re-run test: test_regrtest Total duration: 29 min 51 sec Tests result: FAILURE then FAILURE test test_regrtest failed -- Traceback (most recent call last): File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\test_regrtest.py", line 662, in test_env_changed self.check_executed_tests(output, [testname], env_changed=testname) File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\test_regrtest.py", line 140, in check_executed_tests self.check_line(output, regex) File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\test_regrtest.py", line 87, in check_line self.assertRegexpMatches(output, regex) AssertionError: Regexp didn't match: '^1 test altered the execution environment:\\n test_regrtest_noop33$' not found in 'Run tests sequentially\n0:00:00 [1/1] test_regrtest_noop33\n\n== Tests result: SUCCESS ==\n\n1 test OK.\n\nTotal duration: 20 ms\nTests result: SUCCESS\n' Both failures mention "test_regrtest_noop33". ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 15:22:01 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 22 Jul 2018 19:22:01 +0000 Subject: [issue34190] x86 Gentoo Refleaks 3.x: test_sys_setprofile leaked [1, 1, 1] references, sum=3 Message-ID: <1532287321.5.0.56676864532.issue34190@psf.upfronthosting.co.za> New submission from Pablo Galindo Salgado : The x86 Gentoo Refleaks 3.x report that test_sys_setprofile is potentially leaking referenecs: https://buildbot.python.org/all/#/builders/1/builds/292 ---------------------------------------------------------------------- Ran 21 tests in 0.007s OK . test_sys_setprofile leaked [1, 1, 1] references, sum=3 1 test failed again: test_sys_setprofile == Tests result: FAILURE then FAILURE == 408 tests OK. 10 slowest tests: - test_asyncio: 28 min 19 sec - test_concurrent_futures: 23 min 10 sec - test_multiprocessing_spawn: 22 min 1 sec - test_multiprocessing_forkserver: 11 min 24 sec - test_multiprocessing_fork: 8 min 35 sec - test_lib2to3: 6 min 39 sec - test_zipfile: 6 min 21 sec - test_decimal: 6 min 18 sec - test_io: 5 min 44 sec - test_gdb: 5 min 39 sec 1 test failed: test_sys_setprofile 8 tests skipped: test_devpoll test_kqueue test_msilib test_startfile test_winconsoleio test_winreg test_winsound test_zipfile64 1 re-run test: test_sys_setprofile Total duration: 2 hour 10 min Tests result: FAILURE then FAILURE ---------- components: Tests messages: 322162 nosy: pablogsal priority: normal severity: normal status: open title: x86 Gentoo Refleaks 3.x: test_sys_setprofile leaked [1, 1, 1] references, sum=3 type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 15:23:46 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 22 Jul 2018 19:23:46 +0000 Subject: [issue34190] x86 Gentoo Refleaks 3.x: test_sys_setprofile leaked [1, 1, 1] references, sum=3 In-Reply-To: <1532287321.5.0.56676864532.issue34190@psf.upfronthosting.co.za> Message-ID: <1532287426.03.0.56676864532.issue34190@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Same error in the x86 Gentoo Refleaks 3.7 buildbot: https://buildbot.python.org/all/#/builders/114/builds/174 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 15:58:30 2018 From: report at bugs.python.org (Victor Porton) Date: Sun, 22 Jul 2018 19:58:30 +0000 Subject: [issue34191] argparse: Missing subparser error message should be more clear Message-ID: <1532289510.54.0.56676864532.issue34191@psf.upfronthosting.co.za> New submission from Victor Porton : argparse produces a long unreadable, non-understandable for non-programmers error message when a subparser is not specified in the command line. Note that the below message contains Ubuntu specifics, but it seems it would be nearly as unclear on other OSes too. The worst thing about this error message is that to produce something readable instead I need to somehow parse the command string (or at least to catch TypeError). $ python3.7 test.py Traceback (most recent call last): File "test.py", line 10, in args = parser.parse_args() File "/usr/lib/python3.7/argparse.py", line 1754, in parse_args args, argv = self.parse_known_args(args, namespace) File "/usr/lib/python3.7/argparse.py", line 1786, in parse_known_args namespace, args = self._parse_known_args(args, namespace) File "/usr/lib/python3.7/argparse.py", line 2021, in _parse_known_args ', '.join(required_actions)) TypeError: sequence item 0: expected str instance, NoneType found Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook from apport.fileutils import likely_packaged, get_recent_crashes File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in from apport.report import Report File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in import apport.fileutils File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in from apport.packaging_impl import impl as packaging File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in import apt File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in import apt_pkg ModuleNotFoundError: No module named 'apt_pkg' Original exception was: Traceback (most recent call last): File "test.py", line 10, in args = parser.parse_args() File "/usr/lib/python3.7/argparse.py", line 1754, in parse_args args, argv = self.parse_known_args(args, namespace) File "/usr/lib/python3.7/argparse.py", line 1786, in parse_known_args namespace, args = self._parse_known_args(args, namespace) File "/usr/lib/python3.7/argparse.py", line 2021, in _parse_known_args ', '.join(required_actions)) TypeError: sequence item 0: expected str instance, NoneType found The script follows. #!/usr/bin/env python import argparse parser = argparse.ArgumentParser(description="Automatically process XML") subparsers = parser.add_subparsers(title='subcommands') chain_parser = subparsers.add_parser('chain', aliases=['c'], help='Automatically run a chain of transformations') args = parser.parse_args() ---------- components: Library (Lib) messages: 322164 nosy: porton priority: normal severity: normal status: open title: argparse: Missing subparser error message should be more clear type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 16:13:29 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 22 Jul 2018 20:13:29 +0000 Subject: [issue34127] Gramatically incorrect error message for some calls with wrong number of arguments In-Reply-To: <1531766313.86.0.56676864532.issue34127@psf.upfronthosting.co.za> Message-ID: <1532290409.11.0.56676864532.issue34127@psf.upfronthosting.co.za> Raymond Hettinger added the comment: New changeset 1426daa4fe47d8f8be0d416f7cba7adae1d5839f by Raymond Hettinger (Xtreak) in branch 'master': bpo-34127: Fix grammar in error message with respect to argument count (GH-8395) https://github.com/python/cpython/commit/1426daa4fe47d8f8be0d416f7cba7adae1d5839f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 16:14:02 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 22 Jul 2018 20:14:02 +0000 Subject: [issue34127] Gramatically incorrect error message for some calls with wrong number of arguments In-Reply-To: <1531766313.86.0.56676864532.issue34127@psf.upfronthosting.co.za> Message-ID: <1532290442.88.0.56676864532.issue34127@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Nice work. Thanks for the patch. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 16:18:51 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 22 Jul 2018 20:18:51 +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: <1532290731.0.0.56676864532.issue34188@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I concur with Zachary. Downstream processing or transformation of inputs is beyond the scope of argparse which should stick to its core responsibilities of argument extraction. ---------- assignee: -> bethard nosy: +bethard, rhettinger type: behavior -> enhancement versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 17:33:33 2018 From: report at bugs.python.org (Victor Porton) Date: Sun, 22 Jul 2018 21:33:33 +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: <1532295213.83.0.56676864532.issue34188@psf.upfronthosting.co.za> Victor Porton added the comment: @Raymond: "Downstream processing or transformation of inputs is beyond the scope of argparse which should stick to its core responsibilities of argument extraction." You somehow contradict the official documentation: "One particularly effective way of handling sub-commands is to combine the use of the add_subparsers() method with calls to set_defaults() so that each subparser knows which Python function it should execute." The official documentation seems to recommend to pass real Python functions to the parser. So it does do simple "processing or transformation of inputs" which you recommend against. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 17:57:35 2018 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 22 Jul 2018 21:57:35 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1532296655.34.0.56676864532.issue34136@psf.upfronthosting.co.za> Guido van Rossum added the comment: > Did you consider my suggestion to make it a "SyntaxError" for > "del __annotations__" on a class level or even module level or at all? > Or does this go too far? That's not reasonable. __annotations__ is just an identifier. There are lots of other things that shouldn't be deleted -- should we try to enumerate them all and make them all syntax errors? Surely not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 18:18:49 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 22 Jul 2018 22:18:49 +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: <1532297929.15.0.56676864532.issue34188@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Victor, please don't try to get your way by adopting a tone of shoving people around or mis-parsing their words try to catch them in a contradiction. There is in fact a boundary between argument parsing logic and application logic. In my view, the proposed behavior crosses that boundary. Where the docs mention "transformations", they do so in limited ways (such as type conversion) that are tightly bound to argument parsing and are not part of the application logic. FWIW, I'm not the one you need to convince. Steven Bethard is the module maintainer and arbiter of feature requests. Recommendations from Zachary and me are meant to help inform his decision. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 21:05:26 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 23 Jul 2018 01:05:26 +0000 Subject: [issue31734] crash or SystemError in sqlite3.Cache in case it is uninitialized or partially initialized In-Reply-To: <1507557245.08.0.213398074469.issue31734@psf.upfronthosting.co.za> Message-ID: <1532307926.42.0.56676864532.issue31734@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the PR and for the work you've been doing to fix similar bugs in Python! The Cache class is an implementation detail and it has no practical use for third party users. See issue 30262 for a discussion on making it private. If a user somehow finds the Cache class, wants to do something with it, it's their problem if it crashes the interpreter. So, unless you can demonstrate that these problems can be reproduced without using the Cache class directly, I'm inclined to close this issue as 'wontfix'. ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 21:59:55 2018 From: report at bugs.python.org (mattip) Date: Mon, 23 Jul 2018 01:59:55 +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: <1532311195.78.0.56676864532.issue34172@psf.upfronthosting.co.za> mattip added the comment: It would be sufficient to modify the documentation to reflect the code. There are other objects like `file` that recommend[0] calling a method to release resources without depending on implementation-specific details like garbage collection. [0] https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files ---------- nosy: +mattip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 23:08:54 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 23 Jul 2018 03:08:54 +0000 Subject: [issue940286] pydoc.Helper.help() ignores input/output init parameters Message-ID: <1532315334.78.0.56676864532.issue940286@psf.upfronthosting.co.za> ?ric Araujo added the comment: Patch works! ---------- assignee: eric.araujo -> berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 22 23:57:25 2018 From: report at bugs.python.org (Dan Snider) Date: Mon, 23 Jul 2018 03:57:25 +0000 Subject: [issue34192] FunctionType.__new__ can generate functions that immediately crash Message-ID: <1532318245.8.0.56676864532.issue34192@psf.upfronthosting.co.za> New submission from Dan Snider : The following program crashes on 3.3.1, 3.4.2, 3.5.2, and 3.6.1 because despite having a non-empty co_cellvars slot due to the generator object, the NOFREE flag was set. 3.7 isn't immune to some bad behavior here, either. While I only have access to 3.7.03b right now, I noted the assertion at the bottom failing because it appears CodeType.__new__ is silently stripping the NOFREE flag out, which is why it's highlighted as well. Since the interpreter doesn't actually use FunctionType.__new__ it shouldn't hurt performance too much to add a check for when NOFREE is set that co_cellvars and co_freevars are indeed empty. Anyway, the code: from functools import reduce from itertools import repeat from operator import or_ from types import FunctionType, CodeType OPTIMIZED, NEWLOCALS, NOFREE = 1, 2, 64 FLAGS = [OPTIMIZED, NEWLOCALS, NOFREE] fields=('argcount kwonlyargcount nlocals stacksize flags code consts ' 'names varnames filename name firstlineno lnotab freevars cellvars').split() def edit_code(code, *args, **kws): """Construct a new code object using `code` as a template""" params = [] atrs = ('co_%s'%a for a in fields) kwds = map(kws.pop, fields, repeat(kws)) for arg, kwv, k in zip(args, kwds, atrs): if kwv is not kws: raise TypeError("edit_code() got multiple parameters for %r"%k) params.append(arg) for kwv, atr in zip(kwds, atrs): params.append(kwv if kwv is not kws else getattr(code, atr)) if kws: k, v = kws.popitem() raise TypeError("edit_code() got unexpected keyword argument %r"%k) return CodeType(*params) def get_co_flags(flags): if isinstance(flags, FunctionType): flags = flags.__code__.co_flags elif isinstance(flags, CodeType): flags = flags.co_flags return reduce(or_, (i for i in FLAGS if flags & i)) if __name__ == '__main__': co = get_co_flags.__code__ ns = get_co_flags.__globals__ flags = co.co_flags assert flags == OPTIMIZED|NEWLOCALS assert NOFREE == 64 a = FunctionType(edit_code(co, flags=flags), ns) b = FunctionType(edit_code(co, flags=flags|NOFREE), ns) # this assertion fails on 3.7.0b3 assert b.__code__.co_flags == OPTIMIZED|NEWLOCALS|NOFREE print('calling a...') a(get_co_flags) t = input("Blow up the universe? y/n : ") if t != 'n': b(get_co_flags) ---------- components: Interpreter Core messages: 322174 nosy: bup priority: normal severity: normal status: open title: FunctionType.__new__ can generate functions that immediately crash type: crash versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 01:22:57 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 23 Jul 2018 05:22:57 +0000 Subject: [issue29336] merge tuples in module In-Reply-To: <1484969445.33.0.406694538272.issue29336@psf.upfronthosting.co.za> Message-ID: <1532323377.22.0.56676864532.issue29336@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- resolution: postponed -> duplicate stage: -> resolved status: pending -> closed superseder: -> Same constants in tuples are not merged while compile() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 01:36:07 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 23 Jul 2018 05:36:07 +0000 Subject: [issue21446] Update reload fixer to use importlib instead of imp In-Reply-To: <1399369899.96.0.959859751651.issue21446@psf.upfronthosting.co.za> Message-ID: <1532324167.4.0.56676864532.issue21446@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 01:37:50 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 23 Jul 2018 05:37:50 +0000 Subject: [issue940286] pydoc.Helper.help() ignores input/output init parameters Message-ID: <1532324270.24.0.56676864532.issue940286@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset d04f46c59f1d07d9bcc0ba910741296ac88d370d by Berker Peksag in branch 'master': bpo-940286: Fix pydoc to show cross refs correctly (GH-8390) https://github.com/python/cpython/commit/d04f46c59f1d07d9bcc0ba910741296ac88d370d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 01:37:59 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 23 Jul 2018 05:37:59 +0000 Subject: [issue940286] pydoc.Helper.help() ignores input/output init parameters Message-ID: <1532324279.47.0.56676864532.issue940286@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7928 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 01:38:57 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 23 Jul 2018 05:38:57 +0000 Subject: [issue940286] pydoc.Helper.help() ignores input/output init parameters Message-ID: <1532324337.71.0.56676864532.issue940286@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7929 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 01:54:16 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 23 Jul 2018 05:54:16 +0000 Subject: [issue34193] Fix pluralization in TypeError messages in getargs.c Message-ID: <1532325256.19.0.56676864532.issue34193@psf.upfronthosting.co.za> New submission from Karthikeyan Singaravelan : This ticket is to address comments by @terry.reedy on GitHub for PR https://github.com/python/cpython/pull/8395. Ref : https://github.com/python/cpython/pull/8395#issuecomment-406894241 Tests: In the 3 tests before this, the suffix 0, 2, or 3 is the number of arguments given. This would suggest 0a, 0b, 2a, and 3a for the suffixes here. I like 1min, 2min, 1max, and 2max even better. You can wait a bit for other reviews before changing. Blurb: Let us be more specific. For the patch as is, Fix pluralization of 'argument' in TypeError message with 'expected at least/most 1 argument', instead of '1 arguments'. But if we add all the remaining fixes needed in this file (see below), we could write. Fix pluralization in TypeError messages in getargs.c: '1 argument' instead of '1 arguments' and '1 element' instead of '1 elements'. Fixes: This patch follows existing expressions formatted into argument%s: line 380: (nargs < min ? min : max) == 1 ? "" : "s", lines 1667 and 2093: (len == 1) ? "" : "s", (parens not needed) Scope: I think we should finish the job in the file. The next line in both else clauses, "unpacked tuple should have %s%zd elements," should get the same treatment. This may break existing tests. (These are the only two formatted 'elements'. Fixes for the following will break some test, which will then need fixing also. 542: "expected %d arguments, not %" PY_FORMAT_SIZE_T "d", 1720, "%.200s%s takes %s %d positional arguments" 1799, "%.200s%s takes %s %d positional arguments" 2106, "%200s%s takes %s %d positional arguments (%d given)", 2154: "%.200s%s takes %s %d positional arguments" I checked all PyErr_Format entries and did not see anything other than %d arguments and %d elements. ---------- components: Interpreter Core messages: 322176 nosy: rhettinger, terry.reedy, xtreak priority: normal severity: normal status: open title: Fix pluralization in TypeError messages in getargs.c type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 01:55:18 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 23 Jul 2018 05:55:18 +0000 Subject: [issue30270] Remove sqlite3.Cache display method In-Reply-To: <1493923794.77.0.260659079397.issue30270@psf.upfronthosting.co.za> Message-ID: <1532325318.91.0.56676864532.issue30270@psf.upfronthosting.co.za> Berker Peksag added the comment: Closing this as 'rejected' for the reasons given by Brett and David. Thanks for working on this! ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 01:55:57 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 23 Jul 2018 05:55:57 +0000 Subject: [issue34127] Gramatically incorrect error message for some calls with wrong number of arguments In-Reply-To: <1531766313.86.0.56676864532.issue34127@psf.upfronthosting.co.za> Message-ID: <1532325357.53.0.56676864532.issue34127@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks, I have created https://bugs.python.org/issue34193 to address PR comments and further enhancements in getargs.c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 02:09:03 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 23 Jul 2018 06:09:03 +0000 Subject: [issue21950] import sqlite3 not running after configure --prefix=/alt/path; make; make install In-Reply-To: <1404986436.3.0.183605850141.issue21950@psf.upfronthosting.co.za> Message-ID: <1532326143.07.0.56676864532.issue21950@psf.upfronthosting.co.za> Berker Peksag added the comment: Closing this for now since we couldn't reproduce the problem and haven't heard back from the OP in a while. ---------- resolution: -> works for me stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 02:20:01 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 23 Jul 2018 06:20:01 +0000 Subject: [issue34192] FunctionType.__new__ can generate functions that immediately crash In-Reply-To: <1532318245.8.0.56676864532.issue34192@psf.upfronthosting.co.za> Message-ID: <1532326801.91.0.56676864532.issue34192@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 02:40:16 2018 From: report at bugs.python.org (Michael Felt) Date: Mon, 23 Jul 2018 06:40:16 +0000 Subject: [issue34194] test_ssl, AIX, and defaults for _ssl connections Message-ID: <1532328016.0.0.56676864532.issue34194@psf.upfronthosting.co.za> New submission from Michael Felt : As far as I can tell _ssl works properly. However, test_ssl returns FAIL at some very basic levels, e.g. ... test_constructor (test.test_ssl.ContextTests) ... ERROR ... test_protocol (test.test_ssl.ContextTests) ... ERROR test_python_ciphers (test.test_ssl.ContextTests) ... ok test_session_stats (test.test_ssl.ContextTests) ... ERROR When using applications that depend on python (e.g., git) and getting "SSL" related errors - doing export SSL_CERT_FILE=/var/ssl/somefile.pem the problems go away. However, it looks asif that variable is not being used by python (3.7). Given: AIX openssl does not have a default CAFile nor CAPath, etc., only that openssl.cnf is at /var/ssl/openssl.cnf. Also - AIX openssl.base does not include any certificates. Question: does python have a documented (or undocumented) env variable it uses to look for, provide, or override a system/distribution default? ---------- assignee: christian.heimes components: Library (Lib), SSL, Tests messages: 322180 nosy: Michael.Felt, christian.heimes priority: normal severity: normal status: open title: test_ssl, AIX, and defaults for _ssl connections type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 02:45:37 2018 From: report at bugs.python.org (Michael Felt) Date: Mon, 23 Jul 2018 06:45:37 +0000 Subject: [issue21826] Performance issue (+fix) AIX ctypes.util with no /sbin/ldconfig present In-Reply-To: <1403452871.25.0.30621640858.issue21826@psf.upfronthosting.co.za> Message-ID: <1532328337.02.0.56676864532.issue21826@psf.upfronthosting.co.za> Michael Felt added the comment: as this is fixed is Python3.7 (see issue26439) and has been stated several times that it will not be fixed in Python2.7 I suspect this issue may also be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 02:49:11 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 23 Jul 2018 06:49:11 +0000 Subject: [issue21446] Update reload fixer to use importlib instead of imp In-Reply-To: <1399369899.96.0.959859751651.issue21446@psf.upfronthosting.co.za> Message-ID: <1532328551.57.0.56676864532.issue21446@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 7a3056fa7dd1223fe7112e53b236c43d71f33f64 by Berker Peksag in branch 'master': bpo-21446: Update reload fixer to use importlib (GH-8391) https://github.com/python/cpython/commit/7a3056fa7dd1223fe7112e53b236c43d71f33f64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 02:49:22 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 23 Jul 2018 06:49:22 +0000 Subject: [issue21446] Update reload fixer to use importlib instead of imp In-Reply-To: <1399369899.96.0.959859751651.issue21446@psf.upfronthosting.co.za> Message-ID: <1532328562.27.0.56676864532.issue21446@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7930 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 02:51:30 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 23 Jul 2018 06:51:30 +0000 Subject: [issue940286] pydoc.Helper.help() ignores input/output init parameters Message-ID: <1532328690.93.0.56676864532.issue940286@psf.upfronthosting.co.za> miss-islington added the comment: New changeset e9e6495eedd7fb588964ffa50e8bf2c5ce9c6051 by Miss Islington (bot) in branch '3.6': bpo-940286: Fix pydoc to show cross refs correctly (GH-8390) https://github.com/python/cpython/commit/e9e6495eedd7fb588964ffa50e8bf2c5ce9c6051 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 02:51:57 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 23 Jul 2018 06:51:57 +0000 Subject: [issue940286] pydoc.Helper.help() ignores input/output init parameters Message-ID: <1532328717.29.0.56676864532.issue940286@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 14f58f0ff823ba71e3f21803c509d348626b6089 by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-940286: Fix pydoc to show cross refs correctly (GH-8390) https://github.com/python/cpython/commit/14f58f0ff823ba71e3f21803c509d348626b6089 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 02:53:53 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 23 Jul 2018 06:53:53 +0000 Subject: [issue940286] pydoc.Helper.help() ignores input/output init parameters Message-ID: <1532328833.4.0.56676864532.issue940286@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 02:55:39 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 23 Jul 2018 06:55:39 +0000 Subject: [issue21826] Performance issue (+fix) AIX ctypes.util with no /sbin/ldconfig present In-Reply-To: <1403452871.25.0.30621640858.issue21826@psf.upfronthosting.co.za> Message-ID: <1532328939.46.0.56676864532.issue21826@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- resolution: -> wont fix stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 03:41:36 2018 From: report at bugs.python.org (Tim Golden) Date: Mon, 23 Jul 2018 07:41:36 +0000 Subject: [issue34195] test_nt_helpers fails with case difference in drive letter Message-ID: <1532331695.99.0.56676864532.issue34195@psf.upfronthosting.co.za> New submission from Tim Golden : >From a fresh build on Win10 with VS2017: python -munittest -v test.test_ntpath.TestNtpath.test_nt_helpers gives the following error: ====================================================================== FAIL: test_nt_helpers (test.test_ntpath.TestNtpath) ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\work-in-progress\python\cpython\lib\test\test_ntpath.py", line 432, in test_nt_helpers self.assertEqual(drive, nt._getvolumepathname(sys.executable)) AssertionError: 'c:\\' != 'C:\\' - c:\ ? ^ + C:\ ? ^ Ad hoc, it appears that: `sys.executable` gives a lower-case path while `nt._getvolumepathname` gives an upper-case drive letter. While the test could be trivially fixed, it seems worth investigating a little further to see what's happening inside `nt._getvolumepathname` ---------- assignee: tim.golden components: Windows messages: 322185 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: test_nt_helpers fails with case difference in drive letter type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 04:11:33 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 23 Jul 2018 08:11:33 +0000 Subject: [issue21446] Update reload fixer to use importlib instead of imp In-Reply-To: <1399369899.96.0.959859751651.issue21446@psf.upfronthosting.co.za> Message-ID: <1532333493.22.0.56676864532.issue21446@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 05a72f15f76301c505a91728f0818b421fddd290 by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-21446: Update reload fixer to use importlib (GH-8391) https://github.com/python/cpython/commit/05a72f15f76301c505a91728f0818b421fddd290 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 04:11:50 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 23 Jul 2018 08:11:50 +0000 Subject: [issue21446] Update reload fixer to use importlib instead of imp In-Reply-To: <1399369899.96.0.959859751651.issue21446@psf.upfronthosting.co.za> Message-ID: <1532333510.56.0.56676864532.issue21446@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 Mon Jul 23 06:09:28 2018 From: report at bugs.python.org (Tim Golden) Date: Mon, 23 Jul 2018 10:09:28 +0000 Subject: [issue34195] test_nt_helpers fails with case difference in drive letter In-Reply-To: <1532331695.99.0.56676864532.issue34195@psf.upfronthosting.co.za> Message-ID: <1532340568.79.0.56676864532.issue34195@psf.upfronthosting.co.za> Tim Golden added the comment: import nt, sys; assert sys.executable.startswith(nt._getvolumepathname(sys.executable)) This code fails only when run from the python.bat as created by pcbuild\build.bat. The obvious difference is that the batch file sets PYTHONHOME which, presumably, is used to form sys.executable (haven't checked the startup code yet). The docs for GetVolumePathName [*] don't specify that the drive letter of the path returned will be upper-case, but it doesn't seem unlikely. So... it looks as though the test is unduly sensitive to case-differences in the face of something like PYTHONHOME which affects the way in which sys.executable is formed. Phew! I'll put a test patch together later... [*] https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-getvolumepathnamew ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 06:15:08 2018 From: report at bugs.python.org (Leeland Morgan) Date: Mon, 23 Jul 2018 10:15:08 +0000 Subject: [issue34196] @staticmethod mangles name of outside class with __ (it is not inside class with staticmethod, but name mangled anyway), so NameError is produced Message-ID: <1532340908.45.0.56676864532.issue34196@psf.upfronthosting.co.za> New submission from Leeland Morgan : Hi! I'm not sure this is bug, but I did not find info about outside classes name mangling. Here is a repro url: https://repl.it/@LeelandMorgan/FlatSociableResource ---------- components: Interpreter Core messages: 322188 nosy: Leeland Morgan priority: normal severity: normal status: open title: @staticmethod mangles name of outside class with __ (it is not inside class with staticmethod, but name mangled anyway), so NameError is produced versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 06:26:23 2018 From: report at bugs.python.org (Eryk Sun) Date: Mon, 23 Jul 2018 10:26:23 +0000 Subject: [issue34195] test_nt_helpers fails with case difference in drive letter In-Reply-To: <1532331695.99.0.56676864532.issue34195@psf.upfronthosting.co.za> Message-ID: <1532341583.35.0.56676864532.issue34195@psf.upfronthosting.co.za> Eryk Sun added the comment: os__getvolumepathname_impl in Modules/posixmodule.c doesn't directly modify the case. So that leaves WinAPI GetVolumePathNameW as the culprit, but, according to the following test, apparently not in Windows 10.0.17134: kernel32 = ctypes.WinDLL('kernel32', use_last_error=True) path = (ctypes.c_wchar * 4)() kernel32.GetVolumePathNameW(r'c:\windows', path, 4) >>> path.value 'c:\\' On a related note, nowadays we need to be careful to only use a case-insensitive comparison for drive letters and other device names. On account of WSL, recent versions of NTFS support flagging directories as case sensitive [1][2]. For example, a volume may be mounted using a junction in a case-sensitive directory. [1]: https://blogs.msdn.microsoft.com/commandline/2018/02/28/per-directory-case-sensitivity-and-wsl [2]: https://blogs.msdn.microsoft.com/commandline/2018/06/14/improved-per-directory-case-sensitivity-support-in-wsl ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 06:30:37 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 23 Jul 2018 10:30:37 +0000 Subject: [issue19072] classmethod doesn't honour descriptor protocol of wrapped callable In-Reply-To: <1379856164.11.0.6368818134.issue19072@psf.upfronthosting.co.za> Message-ID: <1532341837.15.0.56676864532.issue19072@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- pull_requests: +7931 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 06:32:31 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 23 Jul 2018 10:32:31 +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: <1532341951.69.0.56676864532.issue34172@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Indeed, I think this simply needs a documentation fix. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python versions: +Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 06:38:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 10:38:37 +0000 Subject: [issue25094] [EASY][Windows] test_tools fails on Windows when passing In-Reply-To: <1442202178.75.0.918340459191.issue25094@psf.upfronthosting.co.za> Message-ID: <1532342317.41.0.56676864532.issue25094@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +7932 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 06:52:53 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 10:52:53 +0000 Subject: [issue25094] [EASY][Windows] test_tools fails on Windows when passing In-Reply-To: <1442202178.75.0.918340459191.issue25094@psf.upfronthosting.co.za> Message-ID: <1532343173.63.0.56676864532.issue25094@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh. I identified the root issue: Tools/scripts/2to3 is installed as Tools/scripts/2to3.py, a ".py" suffix is added. This script is tested on all non-Windows and skipped on Windows when run from source code, but test_sundry() imports 2to3.py which causes the test to fail, since the script expects an argument on the command line and fails with SystemExit which is not catched by test_sundry(). I wrote PR 8406 to skip 2to3.py. My PR also removes imported modules to remove side effects of the test. -- Python 2.7 is not affected: test_tools is skipped on installed Python: vstinner at WIN C:\>py -2.7 -m test test_tools ... test_tools skipped -- test irrelevant for an installed Python ... Tests result: SUCCESS ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 07:00:07 2018 From: report at bugs.python.org (Tim Golden) Date: Mon, 23 Jul 2018 11:00:07 +0000 Subject: [issue34195] test_nt_helpers fails with case difference in drive letter In-Reply-To: <1532331695.99.0.56676864532.issue34195@psf.upfronthosting.co.za> Message-ID: <1532343607.2.0.56676864532.issue34195@psf.upfronthosting.co.za> Tim Golden added the comment: Thanks, @eryksun. Whatever the reason, it's consistently failing in the way I describe. A case-insensitive test is obviously good for that and for the other reasons you give, so I'll patch the test anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 07:06:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 11:06:28 +0000 Subject: [issue34197] Make csv.Dialect attributes skipinitialspace, doublequote and strict booleans Message-ID: <1532343988.37.0.56676864532.issue34197@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Currently attributes skipinitialspace, doublequote and strict of the csv.Dialect class are integers 0 or 1. >>> import csv >>> d = csv.reader([]).dialect >>> d.skipinitialspace 0 >>> d.doublequote 1 >>> d.strict 0 The proposed PR makes them False or True. ---------- assignee: serhiy.storchaka components: Library (Lib) messages: 322193 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Make csv.Dialect attributes skipinitialspace, doublequote and strict booleans type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 07:10:27 2018 From: report at bugs.python.org (tzickel) Date: Mon, 23 Jul 2018 11:10:27 +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: <1532344227.61.0.56676864532.issue34172@psf.upfronthosting.co.za> tzickel added the comment: What other object in the standard lib, leaks resources when deleted in CPython ? Even that documentation says the garbage collector will eventually destroy it, just like here... I think there is an implementation bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 07:18:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 11:18:02 +0000 Subject: [issue25094] [EASY][Windows] test_tools fails on Windows when passing In-Reply-To: <1442202178.75.0.918340459191.issue25094@psf.upfronthosting.co.za> Message-ID: <1532344682.04.0.56676864532.issue25094@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 752d4b7531093c55d6f0a5846748f981d79b29d3 by Victor Stinner in branch 'master': bpo-25094: Fix test_tools.test_sundry() on Windows (GH-8406) https://github.com/python/cpython/commit/752d4b7531093c55d6f0a5846748f981d79b29d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 07:18:12 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 23 Jul 2018 11:18:12 +0000 Subject: [issue25094] [EASY][Windows] test_tools fails on Windows when passing In-Reply-To: <1442202178.75.0.918340459191.issue25094@psf.upfronthosting.co.za> Message-ID: <1532344692.0.0.56676864532.issue25094@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7933 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 07:19:10 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 23 Jul 2018 11:19:10 +0000 Subject: [issue25094] [EASY][Windows] test_tools fails on Windows when passing In-Reply-To: <1442202178.75.0.918340459191.issue25094@psf.upfronthosting.co.za> Message-ID: <1532344750.04.0.56676864532.issue25094@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7934 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 07:22:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 11:22:58 +0000 Subject: [issue34190] x86 Gentoo Refleaks 3.x: test_sys_setprofile leaked [1, 1, 1] references, sum=3 In-Reply-To: <1532287321.5.0.56676864532.issue34190@psf.upfronthosting.co.za> Message-ID: <1532344978.53.0.56676864532.issue34190@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm able to reproduce the issue on master: vstinner at apu$ ./python -m test -R 3:3 test_sys_setprofile -m test.test_sys_setprofile.ProfileSimulatorTestCase.test_unbound_method_invalid_args Run tests sequentially 0:00:00 load avg: 0.82 [1/1] test_sys_setprofile beginning 6 repetitions 123456 ...... test_sys_setprofile leaked [1, 1, 1] references, sum=3 test_sys_setprofile failed == Tests result: FAILURE == 1 test failed: test_sys_setprofile Total duration: 113 ms Tests result: FAILURE The test has been modified recently: commit 56868f940e0cc0b35d33c0070107ff3bed2d8766 Author: jdemeyer Date: Sat Jul 21 10:30:59 2018 +0200 bpo-34126: Fix crashes while profiling invalid calls. (GH-8300) ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 07:23:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 11:23:50 +0000 Subject: [issue34126] Profiling certain invalid calls crashes Python In-Reply-To: <1531761430.57.0.56676864532.issue34126@psf.upfronthosting.co.za> Message-ID: <1532345030.95.0.56676864532.issue34126@psf.upfronthosting.co.za> STINNER Victor added the comment: The new test_sys_setprofile.test_unbound_method_invalid_args() test leaks Python references and spotted an old reference leak: bpo-34190. ---------- nosy: +vstinner resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 07:24:05 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 11:24:05 +0000 Subject: [issue34190] x86 Gentoo Refleaks 3.x: test_sys_setprofile leaked [1, 1, 1] references, sum=3 In-Reply-To: <1532287321.5.0.56676864532.issue34190@psf.upfronthosting.co.za> Message-ID: <1532345045.84.0.56676864532.issue34190@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +jdemeyer, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 07:28:55 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 23 Jul 2018 11:28:55 +0000 Subject: [issue34190] x86 Gentoo Refleaks 3.x: test_sys_setprofile leaked [1, 1, 1] references, sum=3 In-Reply-To: <1532287321.5.0.56676864532.issue34190@psf.upfronthosting.co.za> Message-ID: <1532345335.57.0.56676864532.issue34190@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: Just to avoid duplicate work: I can have a look at this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 07:28:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 11:28:57 +0000 Subject: [issue33336] [imaplib] MOVE is a legal command In-Reply-To: <1524436182.1.0.682650639539.issue33336@psf.upfronthosting.co.za> Message-ID: <1532345337.81.0.56676864532.issue33336@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset caa331d492acc67d8f4edd16542cebfabbbe1e79 by Victor Stinner (Mat?j Cepl) in branch 'master': bpo-33336, imaplib: Legalize MOVE command (GH-6569) https://github.com/python/cpython/commit/caa331d492acc67d8f4edd16542cebfabbbe1e79 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 07:29:04 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 23 Jul 2018 11:29:04 +0000 Subject: [issue33336] [imaplib] MOVE is a legal command In-Reply-To: <1524436182.1.0.682650639539.issue33336@psf.upfronthosting.co.za> Message-ID: <1532345344.37.0.56676864532.issue33336@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7935 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 07:30:04 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 23 Jul 2018 11:30:04 +0000 Subject: [issue33336] [imaplib] MOVE is a legal command In-Reply-To: <1524436182.1.0.682650639539.issue33336@psf.upfronthosting.co.za> Message-ID: <1532345404.22.0.56676864532.issue33336@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7936 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 07:31:05 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 23 Jul 2018 11:31:05 +0000 Subject: [issue33336] [imaplib] MOVE is a legal command In-Reply-To: <1524436182.1.0.682650639539.issue33336@psf.upfronthosting.co.za> Message-ID: <1532345465.95.0.56676864532.issue33336@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7937 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 07:31:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 11:31:13 +0000 Subject: [issue33336] [imaplib] MOVE is a legal command In-Reply-To: <1524436182.1.0.682650639539.issue33336@psf.upfronthosting.co.za> Message-ID: <1532345473.54.0.56676864532.issue33336@psf.upfronthosting.co.za> STINNER Victor added the comment: Mat?j Cepl: There is a bot to backport changes to other branches. I closed your backport PRs. I prefer to polish the change for the master branch, and only backport later. For example, I modified the commit message of your PR. The bot also uses "git cherry-pick -x" to mention the sha1 of the backported commit which helps to track the origin of backports. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 07:32:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 11:32:10 +0000 Subject: [issue33336] [imaplib] MOVE is a legal command In-Reply-To: <1524436182.1.0.682650639539.issue33336@psf.upfronthosting.co.za> Message-ID: <1532345530.59.0.56676864532.issue33336@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't think that "git cherry-pick -x" can be used before a PR is merged, since the merge changes the SHA1 (using our current workflow). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 07:48:17 2018 From: report at bugs.python.org (Narito Takizawa) Date: Mon, 23 Jul 2018 11:48:17 +0000 Subject: [issue34198] Additional encoding options to tkinter.filedialog Message-ID: <1532346497.63.0.56676864532.issue34198@psf.upfronthosting.co.za> Change by Narito Takizawa : ---------- components: Tkinter nosy: narito priority: normal severity: normal status: open title: Additional encoding options to tkinter.filedialog type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 08:09:31 2018 From: report at bugs.python.org (Chetan kolhe) Date: Mon, 23 Jul 2018 12:09:31 +0000 Subject: [issue34199] Add support for delete logger in log module. Message-ID: <1532347771.53.0.56676864532.issue34199@psf.upfronthosting.co.za> New submission from Chetan kolhe : Hi, Currently, there is no support for whether the logger object is present or not. when logging module imported in current namespace all logger object get imported. which uses the memory. Add the option explicitly to delete the logger object. e.g logging.deletLoger("name for logger object") ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 322202 nosy: chetankolhe priority: normal severity: normal status: open title: Add support for delete logger in log module. type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 08:16:35 2018 From: report at bugs.python.org (Narito Takizawa) Date: Mon, 23 Jul 2018 12:16:35 +0000 Subject: [issue34198] Additional encoding options to tkinter.filedialog Message-ID: <1532348195.45.0.56676864532.issue34198@psf.upfronthosting.co.za> Change by Narito Takizawa : ---------- keywords: +patch pull_requests: +7938 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 08:16:45 2018 From: report at bugs.python.org (Tim Golden) Date: Mon, 23 Jul 2018 12:16:45 +0000 Subject: [issue34195] test_nt_helpers fails with case difference in drive letter In-Reply-To: <1532331695.99.0.56676864532.issue34195@psf.upfronthosting.co.za> Message-ID: <1532348205.78.0.56676864532.issue34195@psf.upfronthosting.co.za> Tim Golden added the comment: @eryksun almost idly I ran your ctypes code in the built interpreter. As written, it produces a lower-case c:\\ as yours did. But... Running Debug|Win32 interpreter... Python 3.8.0a0 (heads/master:7a3056f, Jul 23 2018, 08:23:33) [MSC v.1912 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import ctypes, sys >>> >>> sys.executable 'c:\\work-in-progress\\python\\cpython\\PCbuild\\win32\\python_d.exe' >>> kernel32 = ctypes.WinDLL('kernel32', use_last_error=True) >>> path = (ctypes.c_wchar * 4)() >>> kernel32.GetVolumePathNameW(sys.executable, path, 4) 1 >>> path.value 'C:\\' >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 08:34:26 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 23 Jul 2018 12:34:26 +0000 Subject: [issue25094] [EASY][Windows] test_tools fails on Windows when passing In-Reply-To: <1442202178.75.0.918340459191.issue25094@psf.upfronthosting.co.za> Message-ID: <1532349266.9.0.56676864532.issue25094@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 1724c0c984e6406d80d8ebe3bb7b70f23c8b5f45 by Miss Islington (bot) in branch '3.6': bpo-25094: Fix test_tools.test_sundry() on Windows (GH-8406) https://github.com/python/cpython/commit/1724c0c984e6406d80d8ebe3bb7b70f23c8b5f45 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 08:39:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 12:39:14 +0000 Subject: [issue25094] [EASY][Windows] test_tools fails on Windows when passing In-Reply-To: <1442202178.75.0.918340459191.issue25094@psf.upfronthosting.co.za> Message-ID: <1532349554.1.0.56676864532.issue25094@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset ba1810e1ec8973e48128e17845b981d8894c0550 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-25094: Fix test_tools.test_sundry() on Windows (GH-8406) (GH-8407) https://github.com/python/cpython/commit/ba1810e1ec8973e48128e17845b981d8894c0550 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 08:40:21 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 12:40:21 +0000 Subject: [issue25094] [EASY][Windows] test_tools fails on Windows when passing In-Reply-To: <1442202178.75.0.918340459191.issue25094@psf.upfronthosting.co.za> Message-ID: <1532349621.67.0.56676864532.issue25094@psf.upfronthosting.co.za> STINNER Victor added the comment: The issue should now be fixed in 3.6, 3.7 and master branches. You will have to wait for the next release in each branch to get the fix! In the meanwhile, you can skip manually the 2to3 by modifying manually the test. Thanks for everybody who helped to report and identify the origin of the bug! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 08:40:41 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 23 Jul 2018 12:40:41 +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: <1532349641.32.0.56676864532.issue34177@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Adding @vstinner as a friendly reminder since buildbot related failures are notified. This issue causes all the PRs for 3.7 on Mac OS VSTS builds to fail since July 19 though other Mac related builds are passing. Feel free to remove yourself or close this if it's irrelevant. Thanks ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 08:45:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 12:45:09 +0000 Subject: [issue34200] [Windows] python -X utf8 -m test test_pkg fails Message-ID: <1532349909.53.0.56676864532.issue34200@psf.upfronthosting.co.za> New submission from STINNER Victor : vstinner at WIN C:\vstinner\python\master>python -X utf8 -m test -v test_pkg ====================================================================== ERROR: test_4 (test.test_pkg.TestPkg) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\vstinner\python\master\lib\test\test_pkg.py", line 180, in test_4 self.run_code(s) File "C:\vstinner\python\master\lib\test\test_pkg.py", line 69, in run_code exec(textwrap.dedent(code), globals(), {"self": self}) File "", line 2, in File "C:\Users\vstinner\AppData\Local\Temp\tmpgr2te1hp\t4.py", line 1, in RuntimeError: Shouldnt load t4.py ====================================================================== FAIL: test_7 (test.test_pkg.TestPkg) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\vstinner\python\master\lib\test\test_pkg.py", line 260, in test_7 '__name__', '__package__', '__path__', '__spec__']) AssertionError: Lists differ: ['__c[34 chars]__loader__', '__name__', '__package __', '__spec__'] != ['__c[34 chars]__loader__', '__name__', '__package__', '__pa th__', '__spec__'] First differing element 6: '__spec__' '__path__' Second list contains 1 additional elements. First extra element 7: '__spec__' ['__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', + '__path__', '__spec__'] ---------------------------------------------------------------------- ---------- components: Tests, Windows messages: 322208 nosy: paul.moore, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal status: open title: [Windows] python -X utf8 -m test test_pkg fails versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 08:46:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 12:46:17 +0000 Subject: [issue33719] Test failures on Python 3.7 beta 5 and Windows 10 In-Reply-To: <1527778386.67.0.682650639539.issue33719@psf.upfronthosting.co.za> Message-ID: <1532349977.83.0.56676864532.issue33719@psf.upfronthosting.co.za> STINNER Victor added the comment: * test_mashal has been fixed: bpo-33720 * test_tools has been fixed: bpo-25094 * test_pkg -X utf8: I just created bpo-34200 It seems like all test failures reported in this issue have been fixed or got their own dedicated issue, so I close thie issue. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 08:48:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 12:48:23 +0000 Subject: [issue34200] python -X utf8 -m test test_pkg fails In-Reply-To: <1532349909.53.0.56676864532.issue34200@psf.upfronthosting.co.za> Message-ID: <1532350103.76.0.56676864532.issue34200@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm able to reproduce the bug on Linux as well. I able to reproduce the bug on 3.7 and master, but the bug seems random. Example on Linux with master: vstinner at apu$ ./python -X utf8 -m test test_pkg Run tests sequentially 0:00:00 load avg: 1.30 [1/1] test_pkg == Tests result: SUCCESS == 1 test OK. Total duration: 73 ms Tests result: SUCCESS vstinner at apu$ ./python -X utf8 -m test test_pkg Run tests sequentially 0:00:00 load avg: 1.35 [1/1] test_pkg == Tests result: SUCCESS == 1 test OK. Total duration: 72 ms Tests result: SUCCESS vstinner at apu$ ./python -X utf8 -m test test_pkg Run tests sequentially 0:00:00 load avg: 1.35 [1/1] test_pkg test test_pkg failed -- Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/test/test_pkg.py", line 260, in test_7 '__name__', '__package__', '__path__', '__spec__']) AssertionError: Lists differ: ['__c[34 chars]__loader__', '__name__', '__package__', '__spec__'] != ['__c[34 chars]__loader__', '__name__', '__package__', '__path__', '__spec__'] First differing element 6: '__spec__' '__path__' Second list contains 1 additional elements. First extra element 7: '__spec__' ['__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', + '__path__', '__spec__'] test_pkg failed == Tests result: FAILURE == 1 test failed: test_pkg Total duration: 74 ms Tests result: FAILURE ---------- title: [Windows] python -X utf8 -m test test_pkg fails -> python -X utf8 -m test test_pkg fails _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 08:50:32 2018 From: report at bugs.python.org (Tim Golden) Date: Mon, 23 Jul 2018 12:50:32 +0000 Subject: [issue34195] test_nt_helpers fails with case difference in drive letter In-Reply-To: <1532331695.99.0.56676864532.issue34195@psf.upfronthosting.co.za> Message-ID: <1532350232.03.0.56676864532.issue34195@psf.upfronthosting.co.za> Tim Golden added the comment: I think I've got down to the determining factor. For info: PYTHONHOME has nothing to do with it: the same thing happens if I cd into PCBuild\win32 and run python_d.exe directly For historical reasons the directory in which I'm building (c:\work-in-progress) is actually a junction to c:\users\\work-in-progress. There is some commentary in the API docs about traversing junctions, so presumably that's special-cased in some way which results in an uppercase drive letter. If I rebuild in, eg, c:\temp which is a normal directory, I don't see the uppercase conversion. So, while I still need to fix the underlying test to be case-insensitive, it looks like the Mystery of the Uppercase Drive Letter is at least mostly solved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 08:55:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 12:55:04 +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: <1532350504.63.0.56676864532.issue34200@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: python -X utf8 -m test test_pkg fails -> importlib: python -m test test_pkg -m test_7 fails randomly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 08:55:53 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 23 Jul 2018 12:55:53 +0000 Subject: [issue34199] Add support for delete logger in log module. In-Reply-To: <1532347771.53.0.56676864532.issue34199@psf.upfronthosting.co.za> Message-ID: <1532350553.06.0.56676864532.issue34199@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 08:56:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 12:56:55 +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: <1532350615.01.0.56676864532.issue34200@psf.upfronthosting.co.za> STINNER Victor added the comment: The test creates the following files: /tmp/tmpsobc8gzf/t7.py /tmp/tmpsobc8gzf/t7 /tmp/tmpsobc8gzf/t7/__init__.py /tmp/tmpsobc8gzf/t7/sub.py /tmp/tmpsobc8gzf/t7/sub /tmp/tmpsobc8gzf/t7/sub/__init__.py /tmp/tmpsobc8gzf/t7/sub/.py /tmp/tmpsobc8gzf/t7/sub/subsub /tmp/tmpsobc8gzf/t7/sub/subsub/__init__.py /tmp/tmpsobc8gzf contains t7.py file and t7/ subdirectory. The test pass when the directory is loaded: vstinner at apu$ ./python -m test test_pkg -m test_7 Run tests sequentially 0:00:00 load avg: 0.96 [1/1] test_pkg MODULE == Tests result: SUCCESS == 1 test OK. Total duration: 51 ms Tests result: SUCCESS But fail when it gets the t7.py file: vstinner at apu$ ./python -m test test_pkg -m test_7 Run tests sequentially 0:00:00 load avg: 0.96 [1/1] test_pkg MODULE test test_pkg failed -- Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/test/test_pkg.py", line 261, in test_7 '__name__', '__package__', '__path__', '__spec__']) AssertionError: Lists differ: ['__c[34 chars]__loader__', '__name__', '__package__', '__spec__'] != ['__c[34 chars]__loader__', '__name__', '__package__', '__path__', '__spec__'] First differing element 6: '__spec__' '__path__' Second list contains 1 additional elements. First extra element 7: '__spec__' ['__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', + '__path__', '__spec__'] test_pkg failed == Tests result: FAILURE == 1 test failed: test_pkg Total duration: 49 ms Tests result: FAILURE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 08:57:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 12:57: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: <1532350667.92.0.56676864532.issue34200@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm also able to reproduce the bug on Python 3.6. Note: -X utf8 option is unrelated to this issue. ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 09:04:07 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 23 Jul 2018 13:04:07 +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: <1532351047.69.0.56676864532.issue34200@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Almost always fails 8/10 times. cpython git:(master) $ ./python -m unittest -v test.test_pkg test_1 (test.test_pkg.TestPkg) ... ok test_2 (test.test_pkg.TestPkg) ... ok test_3 (test.test_pkg.TestPkg) ... ok test_4 (test.test_pkg.TestPkg) ... ERROR test_5 (test.test_pkg.TestPkg) ... ok test_6 (test.test_pkg.TestPkg) ... ok test_7 (test.test_pkg.TestPkg) ... FAIL test_8 (test.test_pkg.TestPkg) ... ok ====================================================================== ERROR: test_4 (test.test_pkg.TestPkg) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/Lib/test/test_pkg.py", line 180, in test_4 self.run_code(s) File "/home/cpython/Lib/test/test_pkg.py", line 69, in run_code exec(textwrap.dedent(code), globals(), {"self": self}) File "", line 2, in File "/tmp/tmpfxqne6o1/t4.py", line 1, in RuntimeError: Shouldnt load t4.py ====================================================================== FAIL: test_7 (test.test_pkg.TestPkg) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/Lib/test/test_pkg.py", line 260, in test_7 '__name__', '__package__', '__path__', '__spec__']) AssertionError: Lists differ: ['__c[34 chars]__loader__', '__name__', '__package__', '__spec__'] != ['__c[34 chars]__loader__', '__name__', '__package__', '__path__', '__spec__'] First differing element 6: '__spec__' '__path__' Second list contains 1 additional elements. First extra element 7: '__spec__' ['__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', + '__path__', '__spec__'] ---------------------------------------------------------------------- Ran 8 tests in 0.040s FAILED (failures=1, errors=1) ---------- nosy: +xtreak versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 09:06:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 13:06:38 +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: <1532351198.72.0.56676864532.issue34200@psf.upfronthosting.co.za> STINNER Victor added the comment: I removed Windows experts from the nosy list, since the issue is related to importlib, no Windows. ---------- components: -Windows nosy: +barry, brett.cannon, ncoghlan -paul.moore, steve.dower, tim.golden, xtreak, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 09:06:55 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 23 Jul 2018 13:06:55 +0000 Subject: [issue34199] Add support for delete logger in log module. In-Reply-To: <1532347771.53.0.56676864532.issue34199@psf.upfronthosting.co.za> Message-ID: <1532351215.99.0.56676864532.issue34199@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: This seems related : https://mail.python.org/pipermail/python-list/2011-November/615602.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 09:17:28 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 23 Jul 2018 13:17:28 +0000 Subject: [issue33336] [imaplib] MOVE is a legal command In-Reply-To: <1524436182.1.0.682650639539.issue33336@psf.upfronthosting.co.za> Message-ID: <1532351848.45.0.56676864532.issue33336@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 112784984784199d54176132edc38ce8c9b007c1 by Miss Islington (bot) in branch '3.6': bpo-33336, imaplib: Legalize MOVE command (GH-6569) https://github.com/python/cpython/commit/112784984784199d54176132edc38ce8c9b007c1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 09:21:31 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 23 Jul 2018 13:21:31 +0000 Subject: [issue34190] x86 Gentoo Refleaks 3.x: test_sys_setprofile leaked [1, 1, 1] references, sum=3 In-Reply-To: <1532287321.5.0.56676864532.issue34190@psf.upfronthosting.co.za> Message-ID: <1532352091.37.0.56676864532.issue34190@psf.upfronthosting.co.za> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +7939 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 09:42:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 13:42:18 +0000 Subject: [issue34190] x86 Gentoo Refleaks 3.x: test_sys_setprofile leaked [1, 1, 1] references, sum=3 In-Reply-To: <1532287321.5.0.56676864532.issue34190@psf.upfronthosting.co.za> Message-ID: <1532353338.48.0.56676864532.issue34190@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, so it's a real bug, a reference leak, which have been introduced by: commit 93fac8dd358cd0e85e7b59115db226ce685d3f6f Author: INADA Naoki Date: Tue Mar 7 14:24:37 2017 +0900 bpo-29676: fix lsprof can't profile C method call. (GH523) When LOAD_METHOD is used for calling C mehtod, PyMethodDescrObject was passed to profilefunc from 5566bbb. But lsprof traces only PyCFunctionObject. Additionally, there can be some third party extension which assumes passed arg is PyCFunctionObject without calling PyCFunction_Check(). So make PyCFunctionObject from PyMethodDescrObject when tstate->c_profilefunc is set. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 09:43:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 13:43:13 +0000 Subject: [issue34190] x86 Gentoo Refleaks 3.x: test_sys_setprofile leaked [1, 1, 1] references, sum=3 In-Reply-To: <1532287321.5.0.56676864532.issue34190@psf.upfronthosting.co.za> Message-ID: <1532353393.95.0.56676864532.issue34190@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +inada.naoki, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 09:48:37 2018 From: report at bugs.python.org (Eryk Sun) Date: Mon, 23 Jul 2018 13:48:37 +0000 Subject: [issue34195] test_nt_helpers fails with case difference in drive letter In-Reply-To: <1532331695.99.0.56676864532.issue34195@psf.upfronthosting.co.za> Message-ID: <1532353717.12.0.56676864532.issue34195@psf.upfronthosting.co.za> Eryk Sun added the comment: > the directory in which I'm building (c:\work-in-progress) is actually > a junction to c:\users\\work-in-progress That makes sense. GetVolumePathName traverses backwards from the final component. If it reaches a reparse point (other than a junction that targets a volume name of the form "\??\Volume{GUID}\"), it has to start over from the reparsed final path obtained from GetFinalPathNameByHandle. Subsequently it's traversing back from "C:\Users\\work-in-progress" down to upper-case "C:\". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 09:54:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 13:54:04 +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: <1532354044.27.0.56676864532.issue34177@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- components: +macOS nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 09:54:11 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 13:54:11 +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: <1532354051.06.0.56676864532.issue34177@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- components: +Tests -Build _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 09:54:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 13:54:50 +0000 Subject: [issue33336] [imaplib] MOVE is a legal command In-Reply-To: <1524436182.1.0.682650639539.issue33336@psf.upfronthosting.co.za> Message-ID: <1532354090.02.0.56676864532.issue33336@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 96bba049f4bd4d030a72326fd1a67586454f6e2c by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-33336, imaplib: Legalize MOVE command (GH-6569) (GH-8409) https://github.com/python/cpython/commit/96bba049f4bd4d030a72326fd1a67586454f6e2c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 10:01:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 14:01:22 +0000 Subject: [issue34201] Make ndarray.readonly a bool Message-ID: <1532354482.59.0.56676864532.issue34201@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : memoryview.readonly is a bool, but ndarray.readonly is an int 0 or 1. The proposed PR makes ndarray.readonly a bool and makes test_buffer using more strict assertIs() instead of assertEqual() for testing boolean values. ---------- components: Tests messages: 322221 nosy: serhiy.storchaka, skrah priority: normal severity: normal status: open title: Make ndarray.readonly a bool type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 10:05:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 14:05:28 +0000 Subject: [issue34201] Make ndarray.readonly a bool In-Reply-To: <1532354482.59.0.56676864532.issue34201@psf.upfronthosting.co.za> Message-ID: <1532354728.82.0.56676864532.issue34201@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +7940 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 10:07:05 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 23 Jul 2018 14:07:05 +0000 Subject: [issue33336] [imaplib] MOVE is a legal command In-Reply-To: <1524436182.1.0.682650639539.issue33336@psf.upfronthosting.co.za> Message-ID: <1532354825.52.0.56676864532.issue33336@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 7868426c1fe562d2d70bbfd0bb3d0da82f909001 by Miss Islington (bot) in branch '2.7': bpo-33336, imaplib: Legalize MOVE command (GH-6569) https://github.com/python/cpython/commit/7868426c1fe562d2d70bbfd0bb3d0da82f909001 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 10:08:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 14:08:22 +0000 Subject: [issue33336] [imaplib] MOVE is a legal command In-Reply-To: <1524436182.1.0.682650639539.issue33336@psf.upfronthosting.co.za> Message-ID: <1532354902.07.0.56676864532.issue33336@psf.upfronthosting.co.za> STINNER Victor added the comment: Mat?j Cepl: Thanks for your change. I applied it to 2.7, 3.6, 3.7 and master branches. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 10:08:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 14:08:45 +0000 Subject: [issue33336] [imaplib] MOVE is a legal command In-Reply-To: <1524436182.1.0.682650639539.issue33336@psf.upfronthosting.co.za> Message-ID: <1532354925.01.0.56676864532.issue33336@psf.upfronthosting.co.za> STINNER Victor added the comment: Anthony Singleton: "Fuck you" What does justify this verbal violence? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 10:09:10 2018 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 23 Jul 2018 14:09:10 +0000 Subject: [issue34158] Documentation of datetime '%z' format code is odd In-Reply-To: <1532036087.85.0.56676864532.issue34158@psf.upfronthosting.co.za> Message-ID: <1532354950.02.0.56676864532.issue34158@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 10:17:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 14:17:29 +0000 Subject: [issue34190] x86 Gentoo Refleaks 3.x: test_sys_setprofile leaked [1, 1, 1] references, sum=3 In-Reply-To: <1532287321.5.0.56676864532.issue34190@psf.upfronthosting.co.za> Message-ID: <1532355449.08.0.56676864532.issue34190@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 10:19:25 2018 From: report at bugs.python.org (Eric Wieser) Date: Mon, 23 Jul 2018 14:19:25 +0000 Subject: [issue32780] ctypes: memoryview gives incorrect PEP3118 format strings for both packed and unpacked structs In-Reply-To: <1517894879.39.0.467229070634.issue32780@psf.upfronthosting.co.za> Message-ID: <1532355565.71.0.56676864532.issue32780@psf.upfronthosting.co.za> Eric Wieser added the comment: > It should be fairly simple to modify the code to use a format of "B" for unions, so that it at least matches the itemsize Seems reasonable, although: * I think it should be "B" or "()B" * I'd rather leave that for a later patch. While it would be correct, it's still not correct enough to be that useful, since ultimately the union layout is still lost. I'd prefer to focus on fixing the part of the PEPE3118 implementation that is most useful, rather than committing to fixing the whole thing all at once. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 10:22:29 2018 From: report at bugs.python.org (ppperry) Date: Mon, 23 Jul 2018 14:22:29 +0000 Subject: [issue34193] Fix pluralization in TypeError messages in getargs.c In-Reply-To: <1532325256.19.0.56676864532.issue34193@psf.upfronthosting.co.za> Message-ID: <1532355749.39.0.56676864532.issue34193@psf.upfronthosting.co.za> Change by ppperry : ---------- nosy: +ppperry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 10:29:32 2018 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 23 Jul 2018 14:29:32 +0000 Subject: [issue27195] Crash when RawIOBase.write(b) evaluates b.format In-Reply-To: <1464929981.41.0.2917772561.issue27195@psf.upfronthosting.co.za> Message-ID: <1532356172.35.0.56676864532.issue27195@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +7941 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 10:31:39 2018 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 23 Jul 2018 14:31:39 +0000 Subject: [issue27195] Crash when RawIOBase.write(b) evaluates b.format In-Reply-To: <1464929981.41.0.2917772561.issue27195@psf.upfronthosting.co.za> Message-ID: <1532356299.72.0.56676864532.issue27195@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 10:44:26 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 23 Jul 2018 14:44:26 +0000 Subject: [issue34125] Profiling depends on whether **kwargs is given In-Reply-To: <1531761360.51.0.56676864532.issue34125@psf.upfronthosting.co.za> Message-ID: <1532357066.93.0.56676864532.issue34125@psf.upfronthosting.co.za> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +7942 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 11:49:52 2018 From: report at bugs.python.org (Eric Wieser) Date: Mon, 23 Jul 2018 15:49:52 +0000 Subject: [issue8525] Display exceptions' subclasses in help() In-Reply-To: <1272150602.3.0.323796636819.issue8525@psf.upfronthosting.co.za> Message-ID: <1532360992.82.0.56676864532.issue8525@psf.upfronthosting.co.za> Eric Wieser added the comment: > I get the following results for builtin objects that have defined subclasses >From that list, the only unhelpful ones with > 4 items, in my opinion, appear to be `object`, since that just tells you every type that exists, and `tuple`, because that lists every single namedtuple. > So it is USEFUL to know ALL subclasses of a given Exception class I agree with this - most of the value here comes from showing the full set of exceptions. If we don't do that, we should probably point the user to calling `cls.__subclasses__()` so they can inspect the full list ---------- nosy: +Eric.Wieser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 11:52:15 2018 From: report at bugs.python.org (paul j3) Date: Mon, 23 Jul 2018 15:52:15 +0000 Subject: [issue34046] subparsers -> add_parser doesn't support hyphen char '-' In-Reply-To: <1530721199.23.0.56676864532.issue34046@psf.upfronthosting.co.za> Message-ID: <1532361135.3.0.56676864532.issue34046@psf.upfronthosting.co.za> paul j3 added the comment: Do you understand why this is happening? Subparsers is, in effect, a positional argument with 'choices' - the choices being the parsers (and their aliases). But '-dr' looks like an flagged (optionals) argument. Since you didn't define such an argument, it gets put in the 'unrecognized' category. So, no, you can't used a flag-like name for a parser. Why are you trying to do this? ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 12:00:05 2018 From: report at bugs.python.org (paul j3) Date: Mon, 23 Jul 2018 16:00:05 +0000 Subject: [issue34174] argparse formatter_class issue for RawDescriptionHelpFormatter In-Reply-To: <1532118890.75.0.56676864532.issue34174@psf.upfronthosting.co.za> Message-ID: <1532361605.35.0.56676864532.issue34174@psf.upfronthosting.co.za> paul j3 added the comment: argparse does import 'textwrap', but as '_textwrap', so it could be used with: argparse._textwrap.dedent(...) Importing your own is cleaner. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 12:16:37 2018 From: report at bugs.python.org (paul j3) Date: Mon, 23 Jul 2018 16:16:37 +0000 Subject: [issue34191] argparse: Missing subparser error message should be more clear In-Reply-To: <1532289510.54.0.56676864532.issue34191@psf.upfronthosting.co.za> Message-ID: <1532362597.92.0.56676864532.issue34191@psf.upfronthosting.co.za> paul j3 added the comment: Your code runs fine under 3.6.5. But if I add 'subparsers.required=True', I get your error. It's having problems formatting the name of the subparsers command when issuing the error message. If I add a 'dest' to the add_subparsers I get the expected error message: import argparse parser = argparse.ArgumentParser(description="Automatically process XML") subparsers = parser.add_subparsers(title='subcommands', dest='cmd') subparsers.required=True chain_parser = subparsers.add_parser('chain', aliases=['c'], help='Automatically run a chain of transformations') args = parser.parse_args() print(args) The default 'dest' for subparsers is None, and the error arises from ','.join([None]) The problems with a missing 'dest' came up in earlier discussions about making required/not required subparsers. 3.7 made subparsers 'required' by default, but it appears that it hasn't addressed this missing 'dest' problem. But I haven't followed the latest release details closely. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 12:25:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 16:25:50 +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: <1532363150.15.0.56676864532.issue34170@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +7943 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 12:26:46 2018 From: report at bugs.python.org (tzickel) Date: Mon, 23 Jul 2018 16:26:46 +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: <1532363206.63.0.56676864532.issue34172@psf.upfronthosting.co.za> tzickel added the comment: I think I've found the code bug causing the leak: https://github.com/python/cpython/blob/caa331d492acc67d8f4edd16542cebfabbbe1e79/Lib/multiprocessing/pool.py#L180 There is a circular reference between the Pool object, and the self._worker_handler Thread object (and it's also saved in the frame locals for the thread object, which prevents it from being garbage collected). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 12:38:06 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 23 Jul 2018 16:38:06 +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: <1532363886.07.0.56676864532.issue34172@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > What other object in the standard lib, leaks resources when deleted in CPython ? Threads come to mind, for example: >>> import time, threading, weakref >>> t = threading.Thread(target=time.sleep, args=(100000,)) >>> t.start() >>> wr = weakref.ref(t) >>> del t >>> wr() Note I'm not against fixing this issue, just saying it's not that surprising for Pool to keep lingering around when you lost any user-visible reference to it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 12:41:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 16:41:23 +0000 Subject: [issue34190] x86 Gentoo Refleaks 3.x: test_sys_setprofile leaked [1, 1, 1] references, sum=3 In-Reply-To: <1532287321.5.0.56676864532.issue34190@psf.upfronthosting.co.za> Message-ID: <1532364083.95.0.56676864532.issue34190@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 147d95511f59cfdd2d522f9d736f2335457bae20 by Victor Stinner (jdemeyer) in branch 'master': bpo-34190: Fix reference leak in call_function() (GH-8413) https://github.com/python/cpython/commit/147d95511f59cfdd2d522f9d736f2335457bae20 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 12:41:34 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 23 Jul 2018 16:41:34 +0000 Subject: [issue34190] x86 Gentoo Refleaks 3.x: test_sys_setprofile leaked [1, 1, 1] references, sum=3 In-Reply-To: <1532287321.5.0.56676864532.issue34190@psf.upfronthosting.co.za> Message-ID: <1532364094.26.0.56676864532.issue34190@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7944 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 12:46:22 2018 From: report at bugs.python.org (paul j3) Date: Mon, 23 Jul 2018 16:46:22 +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: <1532364382.53.0.56676864532.issue34188@psf.upfronthosting.co.za> paul j3 added the comment: The 'choices' mechanism is a simple 'value in choices' test. A dictionary (or other mapping) works because it works with 'in'. 'type' as noted is the means that argparse provides for transforming an input string into some other object (most commonly a number with 'int' or 'float'). The choices test is performed after the type transformation. The 'set_defaults()' with subparsers is offered almost as a parenthetical idea, and has nothing to do with 'choices' or 'type'. 'set_defaults' is just another way of setting default values, and works even with 'dest' which aren't otherwise defined. If that isn't clear, I'd suggest testing it with the main parser. In Python functions are first class objects, and thus can be used just like strings or numbers - assigned to variables, put in lists, etc. In: adict = {'I':int, 'F':float} parser.add_argument('foo', type=lambda x: adict.get(x), choices=adict.values()) the 'type' transforms the commandline string into a the dictionary value, and 'choices' then tests that against the values of the dictionary. (I had to use `lambda` instead of 'adict.get' directly because of testing that 'type' does.) ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 13:13:20 2018 From: report at bugs.python.org (Jared Deckard) Date: Mon, 23 Jul 2018 17:13:20 +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: <1532366000.15.0.56676864532.issue32752@psf.upfronthosting.co.za> Jared Deckard added the comment: typing_inspect is now filled with python version checks for 3.7. The implementation got significantly more complex when differentiating generics at runtime. 3.6 was undocumented, but the OO API was intuitive: >>> T = typing.Union[int, float] >>> assert T.__class__ == typing.Union >>> assert T.__args__ == (int, float) 3.7 is less convenient and less consistent: >>> T = typing.Union[int, float] >>> assert T.__class__ == typing._GenericAlias >>> assert T.__origin__ == typing.Union >>> L = typing.List[int] >>> assert L.__class__ == typing._GenericAlias >>> assert L.__origin__ == list ---------- nosy: +Jared Deckard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 13:46:26 2018 From: report at bugs.python.org (Preston Moore) Date: Mon, 23 Jul 2018 17:46:26 +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: <1532367986.24.0.56676864532.issue30400@psf.upfronthosting.co.za> Preston Moore added the comment: Hey everyone, I have updated the pull request to include a version of copyfile() that attempts to address the discussed race condition by open()?ing a file descriptor to the relevant files as early as possible and maintaining it throughout processing. In order for this to work I had to use some lower level posix-only features. Specifically, I had to open() the files non-blocking initially and using fcntl() to make them blocking once some initial checks have been performed. The functions behavior under Windows should be unchanged. I chose this course because Windows doesn?t support fcntl() or os.open() with O_NONBLOCK. I will add a few additional tests around the new checks and get things ready for a merge. I would also be glad to use a strategy of this nature to fix similar bugs in the other areas discussed above. Thanks, Preston ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 13:56:09 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Mon, 23 Jul 2018 17:56:09 +0000 Subject: [issue13407] tarfile doesn't support multistream bzipped tar files In-Reply-To: <1321352961.33.0.0944615995053.issue13407@psf.upfronthosting.co.za> Message-ID: <1532368569.38.0.56676864532.issue13407@psf.upfronthosting.co.za> Andr?s Delfino added the comment: This is no longer reproducible under 3.7.0. >>> import tarfile >>> tf = tarfile.open("kdelibs-4.7.3.tar.bz2", "r") >>> print(len(tf.getnames())) 9237 Not sure I should be the one closing this. ---------- nosy: +adelfino _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 14:05:22 2018 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 23 Jul 2018 18:05:22 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1532369122.26.0.56676864532.issue29710@psf.upfronthosting.co.za> Mark Dickinson added the comment: > 4. Performing these calculations with at least one extra sign extension bit in a finite two's complement representation (a working bit-width of ``1 + max(x.bit_length(), y.bit_length()`` or more) is sufficient to get the same result as if there were an infinite number of sign bits. LGTM ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 14:08:32 2018 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 23 Jul 2018 18:08:32 +0000 Subject: [issue34189] Add simple tests for new Tk widget options In-Reply-To: <1532275673.86.0.56676864532.issue34189@psf.upfronthosting.co.za> Message-ID: <1532369312.8.0.56676864532.issue34189@psf.upfronthosting.co.za> Zackery Spytz added the comment: It appears that a file was backported to 2.7 by accident. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 14:31:04 2018 From: report at bugs.python.org (Sanyam Khurana) Date: Mon, 23 Jul 2018 18:31:04 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1532370664.5.0.56676864532.issue29710@psf.upfronthosting.co.za> Sanyam Khurana added the comment: Seems good to me. I've made the changes in the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 14:42:31 2018 From: report at bugs.python.org (Sanyam Khurana) Date: Mon, 23 Jul 2018 18:42:31 +0000 Subject: [issue8525] Display exceptions' subclasses in help() In-Reply-To: <1272150602.3.0.323796636819.issue8525@psf.upfronthosting.co.za> Message-ID: <1532371351.49.0.56676864532.issue8525@psf.upfronthosting.co.za> Sanyam Khurana added the comment: Hi, My perception with all the discussion and WIP patch is that we can ideally limit the no. of subclasses shown only for object, and not for any other class. >From that list, the only unhelpful ones with > 4 items, in my opinion, appear to be `object`, since that just tells you every type that exists, and `tuple`, because that lists every single namedtuple. > So it is USEFUL to know ALL subclasses of a given Exception class +1 > I agree with this - most of the value here comes from showing the full set of exceptions. If we don't do that, we should probably point the user to calling `cls.__subclasses__()` so they can inspect the full list I agree with this. I would propose to only limit to 4 classes for subclasses of `object` and for everything else displaying all the subclasses. We can optionally display the message to call `cls.__subclasses()` in the case when `help(object)` is called. How does it sound? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 14:53:52 2018 From: report at bugs.python.org (paul j3) Date: Mon, 23 Jul 2018 18:53:52 +0000 Subject: [issue34191] argparse: Missing subparser error message should be more clear In-Reply-To: <1532289510.54.0.56676864532.issue34191@psf.upfronthosting.co.za> Message-ID: <1532372032.72.0.56676864532.issue34191@psf.upfronthosting.co.za> paul j3 added the comment: Updating you Python3.7 might change the behavior. If I read https://github.com/python/cpython/commits/master/Lib/argparse.py correctly, subparsers are no longer required by default (it reverted back to earlier Py3 behavior). There is a proposed patch for handling this 'dest=None' issue, but I don't think that's been pushed. But simply adding the 'dest' to subparses should work without update. If you want to identify which subparser was used, you need this 'dest'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 14:54:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 18:54:22 +0000 Subject: [issue13407] tarfile doesn't support multistream bzipped tar files In-Reply-To: <1321352961.33.0.0944615995053.issue13407@psf.upfronthosting.co.za> Message-ID: <1532372062.74.0.56676864532.issue13407@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a 2.7 only documentation issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 14:54:18 2018 From: report at bugs.python.org (Tim Peters) Date: Mon, 23 Jul 2018 18:54:18 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1532372058.96.0.56676864532.issue29710@psf.upfronthosting.co.za> Tim Peters added the comment: @CuriousLearner, does the PR also include Nick's first suggested change? Here: """ 1. Replace the opening paragraph of https://docs.python.org/3/library/stdtypes.html#bitwise-operations-on-integer-types (the one I originally quoted when opening this issue) with the text: ===================== Bitwise operations only make sense for integers. The result of bitwise operations is calculated as though carried out in two's complement with an infinite number of sign bits. ===================== """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 15:00:29 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Mon, 23 Jul 2018 19:00:29 +0000 Subject: [issue13407] tarfile doesn't support multistream bzipped tar files In-Reply-To: <1321352961.33.0.0944615995053.issue13407@psf.upfronthosting.co.za> Message-ID: <1532372429.73.0.56676864532.issue13407@psf.upfronthosting.co.za> Andr?s Delfino added the comment: Sorry, you are right. I'll try on 2.7 when I get home, and make a PR if needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 15:01:04 2018 From: report at bugs.python.org (Sanyam Khurana) Date: Mon, 23 Jul 2018 19:01:04 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1532372464.5.0.56676864532.issue29710@psf.upfronthosting.co.za> Sanyam Khurana added the comment: Hey Tim, > @CuriousLearner, does the PR also include Nick's first suggested change? Here: """ ===================== Bitwise operations only make sense for integers. The result of bitwise operations is calculated as though carried out in two's complement with an infinite number of sign bits. ===================== """ I think it was then discussed to keep this line as: """ =========== Bitwise operations only make sense for integers. Negative numbers are treated as their 2's complement value. =========== """ Does this needs to be changed? Here is the link of the PR: https://github.com/python/cpython/pull/1691/files#diff-7498e907ba97646df434a0eb583c6909 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 15:03:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 19:03:42 +0000 Subject: [issue34189] Add simple tests for new Tk widget options In-Reply-To: <1532275673.86.0.56676864532.issue34189@psf.upfronthosting.co.za> Message-ID: <1532372622.39.0.56676864532.issue34189@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +7945 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 15:03:46 2018 From: report at bugs.python.org (Tim Peters) Date: Mon, 23 Jul 2018 19:03:46 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1532372626.32.0.56676864532.issue29710@psf.upfronthosting.co.za> Tim Peters added the comment: Nick suggested two changes on 2018-07-15 (look above). Mark & I agreed about the first change, so it wasn't mentioned again after that. All the rest has been refining the second change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 15:05:00 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 19:05:00 +0000 Subject: [issue34189] Add simple tests for new Tk widget options In-Reply-To: <1532275673.86.0.56676864532.issue34189@psf.upfronthosting.co.za> Message-ID: <1532372700.64.0.56676864532.issue34189@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Good point Zackery! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 15:21:03 2018 From: report at bugs.python.org (Sanyam Khurana) Date: Mon, 23 Jul 2018 19:21:03 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1532373663.18.0.56676864532.issue29710@psf.upfronthosting.co.za> Sanyam Khurana added the comment: On, yes, I think I missed the first point, earlier. Thank You! I did the changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 15:32:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 19:32:13 +0000 Subject: [issue34189] Add simple tests for new Tk widget options In-Reply-To: <1532275673.86.0.56676864532.issue34189@psf.upfronthosting.co.za> Message-ID: <1532374333.53.0.56676864532.issue34189@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset fbcb6fae6233efbde1f6bb9fe51e33baec4767b8 by Serhiy Storchaka in branch '2.7': bpo-34189: Remove a file backported by accident. (GH-8419) https://github.com/python/cpython/commit/fbcb6fae6233efbde1f6bb9fe51e33baec4767b8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 15:38:12 2018 From: report at bugs.python.org (Joe Jevnik) Date: Mon, 23 Jul 2018 19:38:12 +0000 Subject: [issue23927] getargs.c skipitem() doesn't skip 'w*' In-Reply-To: <1428893068.41.0.966263121411.issue23927@psf.upfronthosting.co.za> Message-ID: <1532374692.31.0.56676864532.issue23927@psf.upfronthosting.co.za> Change by Joe Jevnik : ---------- pull_requests: +7946 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 15:38:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 19:38:55 +0000 Subject: [issue23927] getargs.c skipitem() doesn't skip 'w*' In-Reply-To: <1428893068.41.0.966263121411.issue23927@psf.upfronthosting.co.za> Message-ID: <1532374735.32.0.56676864532.issue23927@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 Mon Jul 23 16:01:04 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 20:01:04 +0000 Subject: [issue15127] Supressing warnings with -w "whether gcc supports ParseTuple" In-Reply-To: <1340298177.77.0.231186835152.issue15127@psf.upfronthosting.co.za> Message-ID: <1532376064.2.0.56676864532.issue15127@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This code was removed in f6b687fcd4d62e53443e23376dc02c177fecc0d4. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 16:09:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 20:09:11 +0000 Subject: [issue30863] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() In-Reply-To: <1499327601.89.0.422030261957.issue30863@psf.upfronthosting.co.za> Message-ID: <1532376551.4.0.56676864532.issue30863@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Victor already wrote similar patch in issue16254. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 16:10:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 20:10:59 +0000 Subject: [issue30863] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() In-Reply-To: <1499327601.89.0.422030261957.issue30863@psf.upfronthosting.co.za> Message-ID: <1532376659.7.0.56676864532.issue30863@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Victor already wrote similar patch in issue22323. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 16:11:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 20:11:11 +0000 Subject: [issue30863] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() In-Reply-To: <1499327601.89.0.422030261957.issue30863@psf.upfronthosting.co.za> Message-ID: <1532376671.28.0.56676864532.issue30863@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- Removed message: https://bugs.python.org/msg322251 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 16:12:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 20:12:05 +0000 Subject: [issue22323] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString(): don't cache the result In-Reply-To: <1409607134.14.0.210351686888.issue22323@psf.upfronthosting.co.za> Message-ID: <1532376725.88.0.56676864532.issue22323@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oh, I have reimplemented this in issue30863. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 16:37:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 20:37:58 +0000 Subject: [issue34184] Lib/test/test_dataclasses.py failed when ran as a script In-Reply-To: <1532195246.19.0.56676864532.issue34184@psf.upfronthosting.co.za> Message-ID: <1532378278.66.0.56676864532.issue34184@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 3fe5cccb08283f5f4817ac432560972a4c0f5290 by Serhiy Storchaka in branch 'master': bpo-34184: Fix running Lib/test/test_dataclasses.py as a script. (GH-8382) https://github.com/python/cpython/commit/3fe5cccb08283f5f4817ac432560972a4c0f5290 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 16:38:06 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 23 Jul 2018 20:38:06 +0000 Subject: [issue34184] Lib/test/test_dataclasses.py failed when ran as a script In-Reply-To: <1532195246.19.0.56676864532.issue34184@psf.upfronthosting.co.za> Message-ID: <1532378286.7.0.56676864532.issue34184@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7947 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 16:38:33 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 20:38:33 +0000 Subject: [issue34183] Lib/test/test_contextlib_async.py failed when ran as a script In-Reply-To: <1532194837.43.0.56676864532.issue34183@psf.upfronthosting.co.za> Message-ID: <1532378313.64.0.56676864532.issue34183@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset db8e3a1e4476620b2b5aaf57acfc3ef58a08213b by Serhiy Storchaka in branch 'master': bpo-34183: Fix running Lib/test/test_contextlib_async.py as a script. (GH-8381) https://github.com/python/cpython/commit/db8e3a1e4476620b2b5aaf57acfc3ef58a08213b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 16:38:52 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 23 Jul 2018 20:38:52 +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: <1532378332.41.0.56676864532.issue32752@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 16:39:05 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 23 Jul 2018 20:39:05 +0000 Subject: [issue34183] Lib/test/test_contextlib_async.py failed when ran as a script In-Reply-To: <1532194837.43.0.56676864532.issue34183@psf.upfronthosting.co.za> Message-ID: <1532378345.58.0.56676864532.issue34183@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7948 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 16:41:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 20:41:13 +0000 Subject: [issue34084] possible free statically allocated string in compiler when easter egg on In-Reply-To: <1531222621.9.0.56676864532.issue34084@psf.upfronthosting.co.za> Message-ID: <1532378473.77.0.56676864532.issue34084@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset aba24ff3601ddc86b85e01880a8be596fb799287 by Serhiy Storchaka in branch 'master': bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg. (GH-8262) https://github.com/python/cpython/commit/aba24ff3601ddc86b85e01880a8be596fb799287 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 16:41:20 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 23 Jul 2018 20:41:20 +0000 Subject: [issue34084] possible free statically allocated string in compiler when easter egg on In-Reply-To: <1531222621.9.0.56676864532.issue34084@psf.upfronthosting.co.za> Message-ID: <1532378480.13.0.56676864532.issue34084@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7949 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 16:42:20 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 23 Jul 2018 20:42:20 +0000 Subject: [issue34084] possible free statically allocated string in compiler when easter egg on In-Reply-To: <1531222621.9.0.56676864532.issue34084@psf.upfronthosting.co.za> Message-ID: <1532378540.77.0.56676864532.issue34084@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7950 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 16:43:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 20:43:44 +0000 Subject: [issue32500] PySequence_Length() raises TypeError on dict type In-Reply-To: <1515199107.36.0.467229070634.issue32500@psf.upfronthosting.co.za> Message-ID: <1532378624.68.0.56676864532.issue32500@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset a6fdddb7df00aefad2ec6e362dbf10d4bd8bff32 by Serhiy Storchaka in branch 'master': bpo-32500: Fix error messages for sequence and mapping C API. (GH-7846) https://github.com/python/cpython/commit/a6fdddb7df00aefad2ec6e362dbf10d4bd8bff32 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 16:45:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 20:45:19 +0000 Subject: [issue32500] PySequence_Length() raises TypeError on dict type In-Reply-To: <1515199107.36.0.467229070634.issue32500@psf.upfronthosting.co.za> Message-ID: <1532378719.32.0.56676864532.issue32500@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 17:10:58 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 23 Jul 2018 21:10:58 +0000 Subject: [issue33468] Add try-finally contextlib.contextmanager example In-Reply-To: <1526077887.55.0.682650639539.issue33468@psf.upfronthosting.co.za> Message-ID: <1532380258.58.0.56676864532.issue33468@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset bde782bb594edffeabe978abeee2b7082ab9bc2a by Tal Einat (Matthias Bussonnier) in branch 'master': bpo-33468: Add try-finally contextlib.contextmanager example (GH-7816) https://github.com/python/cpython/commit/bde782bb594edffeabe978abeee2b7082ab9bc2a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 17:11:06 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 23 Jul 2018 21:11:06 +0000 Subject: [issue33468] Add try-finally contextlib.contextmanager example In-Reply-To: <1526077887.55.0.682650639539.issue33468@psf.upfronthosting.co.za> Message-ID: <1532380266.2.0.56676864532.issue33468@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7951 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 17:12:08 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 23 Jul 2018 21:12:08 +0000 Subject: [issue33468] Add try-finally contextlib.contextmanager example In-Reply-To: <1526077887.55.0.682650639539.issue33468@psf.upfronthosting.co.za> Message-ID: <1532380328.05.0.56676864532.issue33468@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7952 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 17:18:21 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 23 Jul 2018 21:18:21 +0000 Subject: [issue33468] Add try-finally contextlib.contextmanager example In-Reply-To: <1526077887.55.0.682650639539.issue33468@psf.upfronthosting.co.za> Message-ID: <1532380701.39.0.56676864532.issue33468@psf.upfronthosting.co.za> Change by Tal Einat : ---------- pull_requests: +7953 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 17:25:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 21:25:13 +0000 Subject: [issue34184] Lib/test/test_dataclasses.py failed when ran as a script In-Reply-To: <1532195246.19.0.56676864532.issue34184@psf.upfronthosting.co.za> Message-ID: <1532381113.88.0.56676864532.issue34184@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 635338248f967728f13b7bc4b9969aedff51eef6 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-34184: Fix running Lib/test/test_dataclasses.py as a script. (GH-8382) (GH-8421) https://github.com/python/cpython/commit/635338248f967728f13b7bc4b9969aedff51eef6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 17:27:19 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 23 Jul 2018 21:27:19 +0000 Subject: [issue34021] [2.7] test_regrtest: test_env_changed() fails on x86 Windows XP VS9.0 2.7 In-Reply-To: <1530525938.11.0.56676864532.issue34021@psf.upfronthosting.co.za> Message-ID: <1532381239.92.0.56676864532.issue34021@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Another failure in sx86 Windows XP VS9.0 2.7: https://buildbot.python.org/all/#/builders/105/builds/195 Total duration: 28 min 12 sec Tests result: FAILURE then FAILURE test test_regrtest failed -- Traceback (most recent call last): File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\test_regrtest.py", line 665, in test_env_changed output = self.run_tests("--fail-env-changed", testname, exitcode=3) File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\test_regrtest.py", line 335, in run_tests return self.run_python(cmdargs, **kw) File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\test_regrtest.py", line 216, in run_python proc = self.run_command(args, **kw) File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\test_regrtest.py", line 211, in run_command self.fail(msg) AssertionError: Command ['d:\\cygwin\\home\\db3l\\buildarea\\2.7.bolen-windowsvs9\\build\\PC\\VS9.0\\python_d.exe', '-m', 'test', '--testdir=c:\\docume~1\\db3l\\locals~1\\temp\\tmpqsasla', '--fail-env-changed', 'test_regrtest_noop33'] failed with exit code 0 stdout: --- Run tests sequentially 0:00:00 [1/1] test_regrtest_noop33 == Tests result: SUCCESS == 1 test OK. Total duration: 20 ms Tests result: SUCCESS --- stderr: --- d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\lib\test\support\__init__.py:808: RuntimeWarning: tests may fail, unable to create temp dir: d:\cygwin\home\db3l\buildarea\2.7.bolen-windowsvs9\build\build\test_python_2916 with temp_dir(path=name, quiet=quiet) as temp_path: --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 17:38:21 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 23 Jul 2018 21:38:21 +0000 Subject: [issue33468] Add try-finally contextlib.contextmanager example In-Reply-To: <1526077887.55.0.682650639539.issue33468@psf.upfronthosting.co.za> Message-ID: <1532381901.02.0.56676864532.issue33468@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset 4e166ffd29b675238ccd94964743f6cb206d2235 by Tal Einat (Miss Islington (bot)) in branch '3.7': bpo-33468: Add try-finally contextlib.contextmanager example (GH-7816) (GH-8425) https://github.com/python/cpython/commit/4e166ffd29b675238ccd94964743f6cb206d2235 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 17:38:26 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 23 Jul 2018 21:38:26 +0000 Subject: [issue33468] Add try-finally contextlib.contextmanager example In-Reply-To: <1526077887.55.0.682650639539.issue33468@psf.upfronthosting.co.za> Message-ID: <1532381906.59.0.56676864532.issue33468@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset 5b3643d1a5114551350a9d17fb0aaab2d503c290 by Tal Einat (Miss Islington (bot)) in branch '3.6': bpo-33468: Add try-finally contextlib.contextmanager example (GH-7816) (GH-8426) https://github.com/python/cpython/commit/5b3643d1a5114551350a9d17fb0aaab2d503c290 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 17:38:36 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 23 Jul 2018 21:38:36 +0000 Subject: [issue33468] Add try-finally contextlib.contextmanager example In-Reply-To: <1526077887.55.0.682650639539.issue33468@psf.upfronthosting.co.za> Message-ID: <1532381916.77.0.56676864532.issue33468@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset f7e60a69485097dc28f000c55615038278f84333 by Tal Einat in branch '2.7': [2.7] bpo-33468: Add try-finally contextlib.contextmanager example (GH-7816) (GH-8427) https://github.com/python/cpython/commit/f7e60a69485097dc28f000c55615038278f84333 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 17:41:42 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 23 Jul 2018 21:41:42 +0000 Subject: [issue33468] Add try-finally contextlib.contextmanager example In-Reply-To: <1526077887.55.0.682650639539.issue33468@psf.upfronthosting.co.za> Message-ID: <1532382102.04.0.56676864532.issue33468@psf.upfronthosting.co.za> Tal Einat added the comment: Thanks for the PR, Matthias Bussonnier! ---------- nosy: +mbussonn resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 17:42:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 21:42:08 +0000 Subject: [issue30863] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() In-Reply-To: <1499327601.89.0.422030261957.issue30863@psf.upfronthosting.co.za> Message-ID: <1532382128.84.0.56676864532.issue30863@psf.upfronthosting.co.za> STINNER Victor added the comment: Would it be possible to remove the wchar_t* cache? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 17:45:28 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 21:45:28 +0000 Subject: [issue34190] x86 Gentoo Refleaks 3.x: test_sys_setprofile leaked [1, 1, 1] references, sum=3 In-Reply-To: <1532287321.5.0.56676864532.issue34190@psf.upfronthosting.co.za> Message-ID: <1532382328.54.0.56676864532.issue34190@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 25b87d35675301a929982db6d37836666af4f715 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-34190: Fix reference leak in call_function() (GH-8413) (GH-8418) https://github.com/python/cpython/commit/25b87d35675301a929982db6d37836666af4f715 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 17:46:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Jul 2018 21:46:41 +0000 Subject: [issue34190] x86 Gentoo Refleaks 3.x: test_sys_setprofile leaked [1, 1, 1] references, sum=3 In-Reply-To: <1532287321.5.0.56676864532.issue34190@psf.upfronthosting.co.za> Message-ID: <1532382401.41.0.56676864532.issue34190@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Jeroen Demeyer for the good and quick fix! I applied it to 3.7 and master branches. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 18:00:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 22:00:26 +0000 Subject: [issue30863] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() In-Reply-To: <1499327601.89.0.422030261957.issue30863@psf.upfronthosting.co.za> Message-ID: <1532383226.79.0.56676864532.issue30863@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Only after removing PyUnicode_AsUnicodeAndSize() and related PyArg_ParseTuple codes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 18:02:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 22:02:03 +0000 Subject: [issue34183] Lib/test/test_contextlib_async.py failed when ran as a script In-Reply-To: <1532194837.43.0.56676864532.issue34183@psf.upfronthosting.co.za> Message-ID: <1532383323.28.0.56676864532.issue34183@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 519fc551d7778ac698033846bb052a12b7d491e2 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-34183: Fix running Lib/test/test_contextlib_async.py as a script. (GH-8381) (GH-8422) https://github.com/python/cpython/commit/519fc551d7778ac698033846bb052a12b7d491e2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 18:05:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 22:05:18 +0000 Subject: [issue34184] Lib/test/test_dataclasses.py failed when ran as a script In-Reply-To: <1532195246.19.0.56676864532.issue34184@psf.upfronthosting.co.za> Message-ID: <1532383518.53.0.56676864532.issue34184@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 Mon Jul 23 18:05:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 22:05:43 +0000 Subject: [issue34183] Lib/test/test_contextlib_async.py failed when ran as a script In-Reply-To: <1532194837.43.0.56676864532.issue34183@psf.upfronthosting.co.za> Message-ID: <1532383543.19.0.56676864532.issue34183@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 Mon Jul 23 18:41:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 22:41:31 +0000 Subject: [issue34084] possible free statically allocated string in compiler when easter egg on In-Reply-To: <1531222621.9.0.56676864532.issue34084@psf.upfronthosting.co.za> Message-ID: <1532385691.87.0.56676864532.issue34084@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 220afffb683af1ba9e04c37535cfaa41348e9ebb by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg. (GH-8262) (GH-8423) https://github.com/python/cpython/commit/220afffb683af1ba9e04c37535cfaa41348e9ebb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 18:41:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Jul 2018 22:41:51 +0000 Subject: [issue34084] possible free statically allocated string in compiler when easter egg on In-Reply-To: <1531222621.9.0.56676864532.issue34084@psf.upfronthosting.co.za> Message-ID: <1532385711.68.0.56676864532.issue34084@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset ec729d5407adafaae566136448ef0551bb29c070 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg. (GH-8262) (GH-8424) https://github.com/python/cpython/commit/ec729d5407adafaae566136448ef0551bb29c070 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 18:56:46 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Mon, 23 Jul 2018 22:56:46 +0000 Subject: [issue13407] tarfile doesn't support multistream bzipped tar files In-Reply-To: <1321352961.33.0.0944615995053.issue13407@psf.upfronthosting.co.za> Message-ID: <1532386606.71.0.56676864532.issue13407@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- keywords: +patch pull_requests: +7954 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 19:17:13 2018 From: report at bugs.python.org (Michael Kleehammer) Date: Mon, 23 Jul 2018 23:17:13 +0000 Subject: [issue34202] 3.6 ZipFile fails with Path Message-ID: <1532387833.75.0.56676864532.issue34202@psf.upfronthosting.co.za> New submission from Michael Kleehammer : ZipFile is documented to accept "path-like" objects but is failing when I try to create one. I've distilled it down to this small test: import zipfile from pathlib import Path path = Path('test.zip') zf = zipfile.ZipFile(path, 'w') zf.writestr('test.txt', 'Hello, Sailor!') zf.close() On macOS I'm getting this error: Traceback (most recent call last): File "test.py", line 7, in zf.writestr('test.txt', 'Hello, Sailor!') File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/zipfile.py", line 1644, in writestr with self.open(zinfo, mode='w') as dest: File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/zipfile.py", line 1348, in open return self._open_to_write(zinfo, force_zip64=force_zip64) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/zipfile.py", line 1461, in _open_to_write self.fp.write(zinfo.FileHeader(zip64)) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/zipfile.py", line 721, in write n = self.fp.write(data) AttributeError: 'PosixPath' object has no attribute 'write' Using str(path) works fine. ---------- components: Library (Lib) messages: 322272 nosy: mkleehammer priority: normal severity: normal status: open title: 3.6 ZipFile fails with Path type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 21:55:28 2018 From: report at bugs.python.org (abcdef) Date: Tue, 24 Jul 2018 01:55:28 +0000 Subject: [issue34203] documentation: recommend Python 3 over 2 in faq Message-ID: <1532397328.96.0.56676864532.issue34203@psf.upfronthosting.co.za> New submission from abcdef : FAQ "How stable is Python" https://docs.python.org/3/faq/general.html#how-stable-is-python" states "There are two recommended production-ready versions at this point in time, because at the moment there are two branches of stable releases: 2.x and 3.x. Python 3.x may be less useful than 2.x, since currently there is more third party software available for Python 2 than for Python 3. Python 2 code will generally not run unchanged in Python 3." According to git blame, this is from 2009. Could we change this to recommend Python 3 over Python 2 now? ---------- assignee: docs at python components: Documentation messages: 322273 nosy: abcdef, docs at python priority: normal severity: normal status: open title: documentation: recommend Python 3 over 2 in faq versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 22:03:37 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 24 Jul 2018 02:03:37 +0000 Subject: [issue34203] documentation: recommend Python 3 over 2 in faq In-Reply-To: <1532397328.96.0.56676864532.issue34203@psf.upfronthosting.co.za> Message-ID: <1532397817.22.0.56676864532.issue34203@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Yep. Please propose a patch. I think this should be updated even for Python 2.7 docs, which is nearing EOL. ---------- nosy: +Mariatta stage: -> needs patch versions: +Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 22:28:41 2018 From: report at bugs.python.org (Narito Takizawa) Date: Tue, 24 Jul 2018 02:28:41 +0000 Subject: [issue34198] Additional encoding options to tkinter.filedialog Message-ID: <1532399321.48.0.56676864532.issue34198@psf.upfronthosting.co.za> Change by Narito Takizawa : ---------- pull_requests: -7938 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 22:40:44 2018 From: report at bugs.python.org (bbayles) Date: Tue, 24 Jul 2018 02:40:44 +0000 Subject: [issue34202] 3.6 ZipFile fails with Path In-Reply-To: <1532387833.75.0.56676864532.issue34202@psf.upfronthosting.co.za> Message-ID: <1532400044.69.0.56676864532.issue34202@psf.upfronthosting.co.za> Change by bbayles : ---------- nosy: +bbayles _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 22:41:04 2018 From: report at bugs.python.org (Narito Takizawa) Date: Tue, 24 Jul 2018 02:41:04 +0000 Subject: [issue34198] Additional encoding options to tkinter.filedialog Message-ID: <1532400064.65.0.56676864532.issue34198@psf.upfronthosting.co.za> Change by Narito Takizawa : ---------- pull_requests: +7955 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 23:14:35 2018 From: report at bugs.python.org (Berker Peksag) Date: Tue, 24 Jul 2018 03:14:35 +0000 Subject: [issue34202] 3.6 ZipFile fails with Path In-Reply-To: <1532387833.75.0.56676864532.issue34202@psf.upfronthosting.co.za> Message-ID: <1532402075.83.0.56676864532.issue34202@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report! Support for path-like objects was added in 3.6.2. I think you either have 3.6.0 or 3.6.1 installed on your system. Please upgrade it to the latest bugfix release. With 3.6.6, I got the following results: >>> import zipfile >>> from pathlib import Path >>> path = Path('spam.zip') >>> zf = zipfile.ZipFile(path, 'w') >>> zf.writestr('test.txt', 'Hello, Sailor!') >>> zf.close() $ ./python -m zipfile -l spam.zip File Name Modified Size test.txt 2018-07-24 06:10:52 14 ---------- nosy: +berker.peksag resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 23:58:28 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 24 Jul 2018 03:58:28 +0000 Subject: [issue34149] Behavior of the min/max with key=None In-Reply-To: <1531929969.94.0.56676864532.issue34149@psf.upfronthosting.co.za> Message-ID: <1532404708.8.0.56676864532.issue34149@psf.upfronthosting.co.za> Raymond Hettinger added the comment: New changeset e22072fb11246f125aa9ff7629c832b9e2407ef0 by Raymond Hettinger (Alexander Marshalov) in branch 'master': bpo-34149: Behavior of the min/max with key=None (GH-8328) https://github.com/python/cpython/commit/e22072fb11246f125aa9ff7629c832b9e2407ef0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 23 23:59:33 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 24 Jul 2018 03:59:33 +0000 Subject: [issue34149] Behavior of the min/max with key=None In-Reply-To: <1531929969.94.0.56676864532.issue34149@psf.upfronthosting.co.za> Message-ID: <1532404773.96.0.56676864532.issue34149@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Alexander, thanks for the suggestion and patch. ---------- components: +Library (Lib) resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 00:18:10 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 24 Jul 2018 04:18:10 +0000 Subject: [issue33073] Add as_integer_ratio() to int() objects In-Reply-To: <1520976305.18.0.467229070634.issue33073@psf.upfronthosting.co.za> Message-ID: <1532405890.2.0.56676864532.issue33073@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- assignee: Nofar Schnider -> lisroach nosy: +lisroach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 00:18:40 2018 From: report at bugs.python.org (Chetan kolhe) Date: Tue, 24 Jul 2018 04:18:40 +0000 Subject: [issue34199] Add support for delete logger in log module. In-Reply-To: <1532347771.53.0.56676864532.issue34199@psf.upfronthosting.co.za> Message-ID: <1532405920.73.0.56676864532.issue34199@psf.upfronthosting.co.za> Chetan kolhe added the comment: Hi Loggers are static objects managed by the module itself. When you create one, it won't be removed until you leave the shell all logger instance is stored in this location. "Logger.manager.loggerDict" which is the dictionary. we can delete logger instance using that dictionary. so why don't we give the support for deleting the logger object? Scenario:- I am writing the one Django project which consists produce the number of logger object depending on the requirement to store the log properly. Currently, I am using "Logger.manager.loggerDict" to delete unnecessary logger object using this dictionary. Currently, i have written code which deletes the parent to child logger object depending on their name. Storing those unrequired logger object in the current namespace is better to delete the logger object explicitly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 01:42:34 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 24 Jul 2018 05:42:34 +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: <1532410954.42.0.56676864532.issue34177@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- keywords: +patch pull_requests: +7956 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 02:21:52 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 24 Jul 2018 06:21:52 +0000 Subject: [issue27671] FAQ: len() is still function for good reason. In-Reply-To: <1470214886.13.0.870924776007.issue27671@psf.upfronthosting.co.za> Message-ID: <1532413312.96.0.56676864532.issue27671@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- pull_requests: +7957 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 02:35:17 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 24 Jul 2018 06:35:17 +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: <1532414117.78.0.56676864532.issue34177@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- pull_requests: +7958 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 03:37:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Jul 2018 07:37:31 +0000 Subject: [issue20260] Argument Clinic: add unsigned integers converters In-Reply-To: <1389720718.78.0.860738296491.issue20260@psf.upfronthosting.co.za> Message-ID: <1532417851.82.0.56676864532.issue20260@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +7959 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 03:55:52 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Jul 2018 07:55:52 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1532418952.57.0.56676864532.issue33720@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c5734998d91e9953fd179ba6ed7015b6343e8191 by Serhiy Storchaka in branch 'master': bpo-33720: Refactor marshalling/unmarshalling floats. (GH-8071) https://github.com/python/cpython/commit/c5734998d91e9953fd179ba6ed7015b6343e8191 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 04:07:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Jul 2018 08:07:53 +0000 Subject: [issue33720] test_marshal: crash in Python 3.7b5 on Windows 10 In-Reply-To: <1527779615.11.0.682650639539.issue33720@psf.upfronthosting.co.za> Message-ID: <1532419673.07.0.56676864532.issue33720@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 Tue Jul 24 04:09:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Jul 2018 08:09:32 +0000 Subject: [issue34084] possible free statically allocated string in compiler when easter egg on In-Reply-To: <1531222621.9.0.56676864532.issue34084@psf.upfronthosting.co.za> Message-ID: <1532419772.95.0.56676864532.issue34084@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 Tue Jul 24 05:03:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Jul 2018 09:03:40 +0000 Subject: [issue29209] Remove old-deprecated ElementTree features In-Reply-To: <1483898185.03.0.0187159979308.issue29209@psf.upfronthosting.co.za> Message-ID: <1532423020.49.0.56676864532.issue29209@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 02ec92fa7b1dddc23d479ee0b87dc283793505a8 by Serhiy Storchaka in branch 'master': bpo-29209: Remove old-deprecated features in ElementTree. (GH-6769) https://github.com/python/cpython/commit/02ec92fa7b1dddc23d479ee0b87dc283793505a8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 05:16:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Jul 2018 09:16:42 +0000 Subject: [issue34204] Bump the default pickle protocol in shelve Message-ID: <1532423802.47.0.56676864532.issue34204@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The default pickle protocol is 4 now. But shelve still uses the pickle protocol 3. Shouldn't it be bumped? Shouldn't shelve use pickle.DEFAULT_PROTOCOL by default? Disadvantages: 1. This will make shelve files incompatible with Python 3.3 by default. 2. Protocol 4 adds 9 bytes of overhead in comparison with protocol 3. This can be too large for the shelve containing a lot of small objects. Maybe strip redundant frame header for small pickles? ---------- components: Library (Lib) messages: 322281 nosy: alexandre.vassalotti, lukasz.langa, serhiy.storchaka priority: normal severity: normal status: open title: Bump the default pickle protocol in shelve type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 05:17:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Jul 2018 09:17:01 +0000 Subject: [issue23403] Use pickle protocol 4 by default? In-Reply-To: <1423258098.35.0.366066771775.issue23403@psf.upfronthosting.co.za> Message-ID: <1532423821.25.0.56676864532.issue23403@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Opened issue34204 for shelve. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 05:17:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Jul 2018 09:17:14 +0000 Subject: [issue23403] Use pickle protocol 4 by default? In-Reply-To: <1423258098.35.0.366066771775.issue23403@psf.upfronthosting.co.za> Message-ID: <1532423834.3.0.56676864532.issue23403@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 Tue Jul 24 05:33:33 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 24 Jul 2018 09:33:33 +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: <1532424813.51.0.56676864532.issue34177@psf.upfronthosting.co.za> INADA Naoki added the comment: Maybe, vsts machine installs Homebrew's Python. Homebrew's Python installes /usr/local/lib/python3.7/sitecustomize.py https://github.com/Homebrew/homebrew-core/blob/0ce9a5a481b3472608fe4e4188cb5d243deebb99/Formula/python.rb#L295-L329 When running tests, it is imported. It causes test_startup_imports fail. Maybe, we can use random prefix instead of default /usr/local to avoid this conflict. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 05:52:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Jul 2018 09:52:59 +0000 Subject: [issue34164] base64.b32decode() leads into UnboundLocalError and OverflowError on some data In-Reply-To: <1532078469.74.0.56676864532.issue34164@psf.upfronthosting.co.za> Message-ID: <1532425979.4.0.56676864532.issue34164@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset ac0b3c2f4d86fc056b833a4e6b9a380741244a63 by Serhiy Storchaka in branch 'master': bpo-34164: Fix handling of incorrect padding in base64.b32decode(). (GH-8351) https://github.com/python/cpython/commit/ac0b3c2f4d86fc056b833a4e6b9a380741244a63 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 05:53:12 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Jul 2018 09:53:12 +0000 Subject: [issue34164] base64.b32decode() leads into UnboundLocalError and OverflowError on some data In-Reply-To: <1532078469.74.0.56676864532.issue34164@psf.upfronthosting.co.za> Message-ID: <1532425991.99.0.56676864532.issue34164@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7960 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 05:58:44 2018 From: report at bugs.python.org (Julien Palard) Date: Tue, 24 Jul 2018 09:58:44 +0000 Subject: [issue34205] Segmentation fault in _PyObject_Dump Message-ID: <1532426324.25.0.56676864532.issue34205@psf.upfronthosting.co.za> New submission from Julien Palard : On a freshly installed python3.6.6 using "pyenv install --debug 3.6.6", on a freshly created venv, after running a `pip install ansible`, I'm getting exactly those dependencies: ansible==2.6.1 asn1crypto==0.24.0 bcrypt==3.1.4 cffi==1.11.5 cryptography==2.3 idna==2.7 Jinja2==2.10 MarkupSafe==1.0 paramiko==2.4.1 pyasn1==0.4.3 pycparser==2.18 PyNaCl==1.2.1 PyYAML==3.13 six==1.11.0 If I run: $ python $(which ansible-playbook) I'm getting: * ob object : type : bytes refcount: 0 address : 0x7f2600ecc820 * op->_ob_prev->_ob_next object : Segmentation fault An excerpt of the stack trace: #0 _PyObject_Dump (op=0x7ffff0e667bf) at Objects/object.c:450 #1 0x000055555566a4cf in _Py_ForgetReference (op=0x7ffff0e667c0) at Objects/object.c:1767 #2 0x000055555566a579 in _Py_Dealloc (op=0x7ffff0e667c0) at Objects/object.c:1790 #3 0x00005555557982c2 in _PyImport_LoadDynamicModuleWithSpec (spec=0x7ffff130ec20, fp=0x0) at ./Python/importdl.c:227 #4 0x0000555555797439 in _imp_create_dynamic_impl (module=0x7ffff7f3e558, spec=0x7ffff130ec20, file=0x0) at Python/import.c:1994 #5 0x0000555555791760 in _imp_create_dynamic (module=0x7ffff7f3e558, args=0x7ffff1307e90) at Python/clinic/import.c.h:289 #6 0x00005555556618fc in PyCFunction_Call (func=0x7ffff7f43aa8, args=0x7ffff1307e90, kwds=0x7ffff126bb20) at Objects/methodobject.c:114 #7 0x0000555555768e90 in do_call_core (func=0x7ffff7f43aa8, callargs=0x7ffff1307e90, kwdict=0x7ffff126bb20) at Python/ceval.c:5095 #8 0x0000555555760fab in _PyEval_EvalFrameDefault (f=0x7ffff0ecb058, throwflag=0) at Python/ceval.c:3397 #9 0x000055555574e22a in PyEval_EvalFrameEx (f=0x7ffff0ecb058, throwflag=0) at Python/ceval.c:754 And what I see in gdb: (gdb) p (PyObject*)(op) $1 = (PyObject *) 0x7ffff0e667bf (gdb) p *(PyObject*)(op) $2 = {_ob_next = 0x7ffff1307e90fb, _ob_prev = 0x7ffff12df95000, ob_refcnt = 0, ob_type = 0x555555ad9f8000} (gdb) p (((PyObject*)(op))->ob_type) $3 = (struct _typeobject *) 0x555555ad9f8000 (gdb) p *(((PyObject*)(op))->ob_type) Cannot access memory at address 0x555555ad9f8000 I now have to go eat, but don't hesitate to ask me further investigations. ---------- components: Interpreter Core messages: 322285 nosy: mdk, vstinner priority: normal severity: normal status: open title: Segmentation fault in _PyObject_Dump type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 06:10:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Jul 2018 10:10:12 +0000 Subject: [issue34205] Ansible: _PyImport_LoadDynamicModuleWithSpec() crash on an invalid object (UNREF invalid object) In-Reply-To: <1532426324.25.0.56676864532.issue34205@psf.upfronthosting.co.za> Message-ID: <1532427012.32.0.56676864532.issue34205@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: Segmentation fault in _PyObject_Dump -> Ansible: _PyImport_LoadDynamicModuleWithSpec() crash on an invalid object (UNREF invalid object) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 06:11:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Jul 2018 10:11:37 +0000 Subject: [issue34205] Ansible: _PyImport_LoadDynamicModuleWithSpec() crash on an invalid object (UNREF invalid object) In-Reply-To: <1532426324.25.0.56676864532.issue34205@psf.upfronthosting.co.za> Message-ID: <1532427097.56.0.56676864532.issue34205@psf.upfronthosting.co.za> STINNER Victor added the comment: Recently, there was a discussion to find to detect earlier inconsistent objects: https://mail.python.org/pipermail/python-dev/2018-June/153857.html In the meanwhile, if you have time, you can try to run Ansible with a Python compiled in debug mode (./configure --with-pydebug). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 06:32:54 2018 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 24 Jul 2018 10:32:54 +0000 Subject: [issue8525] Display exceptions' subclasses in help() In-Reply-To: <1272150602.3.0.323796636819.issue8525@psf.upfronthosting.co.za> Message-ID: <1532428374.84.0.56676864532.issue8525@psf.upfronthosting.co.za> Nick Coghlan added the comment: This is a UX problem folks: dynamic unbounded lists are inherently problematic in a line based information display. For methods on a class, there's the natural constraint that broad class APIs are a problem for a variety of reasons, but there's no such design constraint for exception hierarchies. In a Fedora Python 3.6 shell (with the Fedora abrt exception handling hook loaded), Exception has 31 subclasses, and OSError has 17. In a 3.6 shell venv (with no Fedora abrt hook), those numbers are 20 and 13. But if you import assorted Django modules then the number of Exception subclasses grows significantly, while the number of OSError subclasses grows slightly: >>> import django >>> len(list(pkgutil.iter_modules(django.__path__))) 17 >>> len(Exception.__subclasses__()) 76 >>> len(OSError.__subclasses__()) 22 Having "help(Exception)" list 50+ different Django exceptions is unlikely to be informative for anyone. In many ways, Python 2 was actually better in this regard, since you could just do "import exceptions; help(exceptions)" to get a nice overview of the full exception hierarchy using the standard logic for displaying. The closest Python 3 currently gets to that is "import builtins; help(builtins)", which is significantly harder to discover. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 06:47:46 2018 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 24 Jul 2018 10:47:46 +0000 Subject: [issue8525] Display exceptions' subclasses in help() In-Reply-To: <1272150602.3.0.323796636819.issue8525@psf.upfronthosting.co.za> Message-ID: <1532429266.33.0.56676864532.issue8525@psf.upfronthosting.co.za> Nick Coghlan added the comment: I think the way modules display this information may actually provide a solid precedent that addresses the dynamic state problem I'm concerned about: filter the subclass list to only include subclasses that come from the same module as the object being displayed, and use the existing showtree/getclasstree interfaces to display the nested hierarchy nicely (the same way modules do). Then the "... and NNN other subclasses in other modules" would only be appended when there was cross-module inheritance involved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 06:53:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Jul 2018 10:53:45 +0000 Subject: [issue34164] base64.b32decode() leads into UnboundLocalError and OverflowError on some data In-Reply-To: <1532078469.74.0.56676864532.issue34164@psf.upfronthosting.co.za> Message-ID: <1532429625.44.0.56676864532.issue34164@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 0b2716918345b2bff0bb5c36086d5de368125536 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-34164: Fix handling of incorrect padding in base64.b32decode(). (GH-8351) (GH-8435) https://github.com/python/cpython/commit/0b2716918345b2bff0bb5c36086d5de368125536 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 06:55:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Jul 2018 10:55:37 +0000 Subject: [issue34164] base64.b32decode() leads into UnboundLocalError and OverflowError on some data In-Reply-To: <1532078469.74.0.56676864532.issue34164@psf.upfronthosting.co.za> Message-ID: <1532429737.18.0.56676864532.issue34164@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +7961 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 07:02:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Jul 2018 11:02:38 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1532430158.72.0.56676864532.issue34136@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +7962 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 07:55:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Jul 2018 11:55:54 +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: <1532433354.66.0.56676864532.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d19d8d5279f156bc8f6736b5f16f069879b9519b by Victor Stinner in branch 'master': bpo-34170: Add _PyCoreConfig.isolated (GH-8417) https://github.com/python/cpython/commit/d19d8d5279f156bc8f6736b5f16f069879b9519b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 08:05:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Jul 2018 12:05:31 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1532433931.33.0.56676864532.issue34136@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c206f0d1375fab7b58c19a6be3e68e316f718c66 by Serhiy Storchaka in branch 'master': bpo-34136: Make test_do_not_recreate_annotations more lenient. (GH-8437) https://github.com/python/cpython/commit/c206f0d1375fab7b58c19a6be3e68e316f718c66 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 08:06:00 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Jul 2018 12:06:00 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1532433960.43.0.56676864532.issue34136@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 23a3297ff1076d91ca6d70caadf9606f1fee0776 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': [3.7] bpo-34136: Make test_do_not_recreate_annotations more reliable. (GH-8364) (GH-8365) https://github.com/python/cpython/commit/23a3297ff1076d91ca6d70caadf9606f1fee0776 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 08:06:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Jul 2018 12:06:21 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1532433981.87.0.56676864532.issue34136@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 9b33ca0f4d459c165d711778734b6e1bdc3ec35d by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': [3.6] bpo-34136: Make test_do_not_recreate_annotations more reliable. (GH-8364) (GH-8366) https://github.com/python/cpython/commit/9b33ca0f4d459c165d711778734b6e1bdc3ec35d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 08:07:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Jul 2018 12:07:01 +0000 Subject: [issue34164] base64.b32decode() leads into UnboundLocalError and OverflowError on some data In-Reply-To: <1532078469.74.0.56676864532.issue34164@psf.upfronthosting.co.za> Message-ID: <1532434021.9.0.56676864532.issue34164@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 113f86e7487e9312a2494667b088854ac942ab00 by Serhiy Storchaka in branch '3.6': [3.6] bpo-34164: Fix handling of incorrect padding in base64.b32decode(). (GH-8351) (GH-8436) https://github.com/python/cpython/commit/113f86e7487e9312a2494667b088854ac942ab00 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 08:11:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Jul 2018 12:11:22 +0000 Subject: [issue34136] Del on class __annotations__ regressed, failing test In-Reply-To: <1531815316.63.0.56676864532.issue34136@psf.upfronthosting.co.za> Message-ID: <1532434282.93.0.56676864532.issue34136@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- components: +Tests -Interpreter Core resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 08:12:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Jul 2018 12:12:19 +0000 Subject: [issue34164] base64.b32decode() leads into UnboundLocalError and OverflowError on some data In-Reply-To: <1532078469.74.0.56676864532.issue34164@psf.upfronthosting.co.za> Message-ID: <1532434339.41.0.56676864532.issue34164@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 Tue Jul 24 08:17:17 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 24 Jul 2018 12:17:17 +0000 Subject: [issue34193] Fix pluralization in TypeError messages in getargs.c In-Reply-To: <1532325256.19.0.56676864532.issue34193@psf.upfronthosting.co.za> Message-ID: <1532434637.56.0.56676864532.issue34193@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +7963 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 08:18:41 2018 From: report at bugs.python.org (Julien Palard) Date: Tue, 24 Jul 2018 12:18:41 +0000 Subject: [issue34205] Ansible: _PyImport_LoadDynamicModuleWithSpec() crash on an invalid object (UNREF invalid object) In-Reply-To: <1532426324.25.0.56676864532.issue34205@psf.upfronthosting.co.za> Message-ID: <1532434721.18.0.56676864532.issue34205@psf.upfronthosting.co.za> Julien Palard added the comment: I think it's already compiled in debug mode (https://github.com/pyenv/pyenv/blob/c057a80c8296a7c694e4ef80ecbac0d0c169df7a/plugins/python-build/bin/python-build#L2050). `-X dev` won't help (it's a 3.6.6 not a 3.7). The debug come from _Py_ForgetReference which prints op, op->_ob_prev->_ob_next and op->_ob_next->_ob_prev, crash occurs on the 2nd one, which make sense according to: (gdb) p *(((PyObject*)(op))) $12 = {_ob_next = 0x7ffff1307e90, _ob_prev = 0x7ffff12df950, ob_refcnt = 0, ob_type = 0x555555ad9f80 } (gdb) p *(((PyObject*)(op->_ob_prev))) $13 = {_ob_next = 0x7ffff0e667bf, _ob_prev = 0x7ffff10c58b0, ob_refcnt = 1, ob_type = 0x555555ae89a0 } (gdb) p *(((PyObject*)(op->_ob_prev->_ob_next))) $14 = {_ob_next = 0x7ffff1307e90fb, _ob_prev = 0x7ffff12df95000, ob_refcnt = 0, ob_type = 0x555555ad9f8000} ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 08:23:50 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 24 Jul 2018 12:23:50 +0000 Subject: [issue8525] Display exceptions' subclasses in help() In-Reply-To: <1272150602.3.0.323796636819.issue8525@psf.upfronthosting.co.za> Message-ID: <1532435030.54.0.56676864532.issue8525@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 08:28:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Jul 2018 12:28:53 +0000 Subject: [issue34193] Fix pluralization in TypeError messages in getargs.c In-Reply-To: <1532325256.19.0.56676864532.issue34193@psf.upfronthosting.co.za> Message-ID: <1532435333.69.0.56676864532.issue34193@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also "expected %d arguments, got %zd" in Objects/typeobject.c. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 08:50:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Jul 2018 12:50:24 +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: <1532436624.75.0.56676864532.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: Reminder for myself: I have to write unit tests :-) https://github.com/python/cpython/pull/8417#pullrequestreview-139835391 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 08:58:46 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 24 Jul 2018 12:58:46 +0000 Subject: [issue34193] Fix pluralization in TypeError messages in getargs.c In-Reply-To: <1532325256.19.0.56676864532.issue34193@psf.upfronthosting.co.za> Message-ID: <1532437126.26.0.56676864532.issue34193@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks, this needs to be fixed only in `check_num_args` and can help in all the other functions like __lt__, __delattr__ etc. in the file that use this. Before suggestion : ? cpython git:(bpo34193) ? ./python -c "a = {}; a.__delattr__()" Traceback (most recent call last): File "", line 1, in TypeError: expected 1 arguments, got 0 After suggested change : ? cpython git:(bpo34193) ? ./python -c "a = {}; a.__delattr__()" Traceback (most recent call last): File "", line 1, in TypeError: expected 1 argument, got 0 Is there some doc on clarification of the difference between 'required' argument and positional argument errors. I was trying to write to tests for the changes and I couldn't find functions that hit the exact branch of code. Some of them generate required argument error and some of them generate positional argument expected error. I looked up in the argument clinic docs (https://docs.python.org/3/howto/clinic.html) but it's little hard for me to grasp as a beginner. Any pointers will be helpful. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 09:13:19 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 24 Jul 2018 13:13:19 +0000 Subject: [issue34196] @staticmethod mangles name of outside class with __ (it is not inside class with staticmethod, but name mangled anyway), so NameError is produced In-Reply-To: <1532340908.45.0.56676864532.issue34196@psf.upfronthosting.co.za> Message-ID: <1532437999.78.0.56676864532.issue34196@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I think below doc gives some indication that it always occurs within the definition of the class (hence inside a static method) irrespective of the syntactic position for any valid identifier and hence for class __SuperPrivateClass too. I will let others explain on this better or give more information. https://docs.python.org/3/tutorial/classes.html#private-variables (second paragraph) Since there is a valid use-case for class-private members (namely to avoid name clashes of names with names defined by subclasses), there is limited support for such a mechanism, called name mangling. Any identifier of the form __spam (at least two leading underscores, at most one trailing underscore) is textually replaced with _classname__spam, where classname is the current class name with leading underscore(s) stripped. This mangling is done without regard to the syntactic position of the identifier, as long as it occurs within the definition of a class. SO answer that gave me the link : https://stackoverflow.com/a/1301369/2610955 Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 09:24:51 2018 From: report at bugs.python.org (Corey Bryant) Date: Tue, 24 Jul 2018 13:24:51 +0000 Subject: [issue34173] [3.7] possible race condition in /usr/lib/python3.7/concurrent/futures/thread.py In-Reply-To: <1532115107.08.0.56676864532.issue34173@psf.upfronthosting.co.za> Message-ID: <1532438691.74.0.56676864532.issue34173@psf.upfronthosting.co.za> Corey Bryant added the comment: Karthikeyan, thanks for taking a look. I'm also unable to recreate with your test. I'm not sure what the difference is. I'll report back if I can figure it out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 09:37:49 2018 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 24 Jul 2018 13:37:49 +0000 Subject: [issue34206] Move and clarify Py_Main documentation Message-ID: <1532439469.19.0.56676864532.issue34206@psf.upfronthosting.co.za> New submission from Nick Coghlan : In resolving issue 34008, we determined that we *do* support calling Py_Main after Py_Initialize, but it's not clear from that current documentation that this implies a Py_Finalize() call, so you don't need to call that again yourself (and it's actually an error to do so). So this issue covers updating the draft PR I wrote at https://github.com/python/cpython/pull/8023 to move the Py_Main documentation into the initialization and finalization section, and clarify how it relates to the other initialization and finalization functions. ---------- assignee: ncoghlan components: Documentation messages: 322301 nosy: ncoghlan, vstinner priority: normal severity: normal stage: patch review status: open title: Move and clarify Py_Main documentation type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 09:37:59 2018 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 24 Jul 2018 13:37:59 +0000 Subject: [issue34206] Move and clarify Py_Main documentation In-Reply-To: <1532439469.19.0.56676864532.issue34206@psf.upfronthosting.co.za> Message-ID: <1532439479.66.0.56676864532.issue34206@psf.upfronthosting.co.za> Change by Nick Coghlan : ---------- dependencies: +Do we support calling Py_Main() after Py_Initialize()? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 09:39:09 2018 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 24 Jul 2018 13:39:09 +0000 Subject: [issue34008] Do we support calling Py_Main() after Py_Initialize()? In-Reply-To: <1530341921.37.0.56676864532.issue34008@psf.upfronthosting.co.za> Message-ID: <1532439549.05.0.56676864532.issue34008@psf.upfronthosting.co.za> Nick Coghlan added the comment: Since we decided the correct resolution here was to restore the Python 3.6 behaviour, I've filed https://bugs.python.org/issue34206 as a separate docs clarification issue (I'll amend my PR accordingly) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 09:40:23 2018 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 24 Jul 2018 13:40:23 +0000 Subject: [issue34206] Move and clarify Py_Main documentation In-Reply-To: <1532439469.19.0.56676864532.issue34206@psf.upfronthosting.co.za> Message-ID: <1532439623.63.0.56676864532.issue34206@psf.upfronthosting.co.za> Change by Nick Coghlan : ---------- keywords: +patch pull_requests: +7964 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 10:08:35 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 24 Jul 2018 14:08:35 +0000 Subject: [issue34207] test_cmd_line test_utf8_mode test_warnings fail in AMD64 FreeBSD CURRENT buildbots Message-ID: <1532441315.45.0.56676864532.issue34207@psf.upfronthosting.co.za> New submission from Pablo Galindo Salgado : test_cmd_line test_utf8_mode test_warnings fail in AMD64 FreeBSD CURRENT buildbots: https://buildbot.python.org/all/#/builders/79/builds/186 https://buildbot.python.org/all/#/builders/60/builds/182 Sample error: 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 test_cmd_line failed test_sys_flags_not_set (test.test_cmd_line.IgnoreEnvironmentTest) ... ok ====================================================================== FAIL: test_non_ascii (test.test_cmd_line.CmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/Lib/test/test_cmd_line.py", line 149, in test_non_ascii assert_python_ok('-c', command) File "/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/Lib/test/support/script_helper.py", line 157, in assert_python_ok return _assert_python(True, *args, **env_vars) File "/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/Lib/test/support/script_helper.py", line 143, in _assert_python res.fail(cmd_line) File "/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/Lib/test/support/script_helper.py", line 84, in fail err)) AssertionError: Process return code is 1 command line: ['/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/python', '-X', 'faulthandler', '-I', '-c', "assert(ord('??') == 230)"] stdout: --- --- stderr: --- Unable to decode the command from the command line: UnicodeEncodeError: 'utf-8' codec can't encode characters in position 12-13: surrogates not allowed --- ---------------------------------------------------------------------- Ran 43 tests in 17.680s FAILED (failures=1, skipped=2) 3 tests failed again: test_cmd_line test_utf8_mode test_warnings and est_showwarning_not_callable (test.test_warnings._WarningsTests) ... ok test_showwarnmsg_missing (test.test_warnings._WarningsTests) ... ok test test_warnings failed test_stderr_none (test.test_warnings._WarningsTests) ... ok ====================================================================== FAIL: test_nonascii (test.test_warnings.CEnvironmentVariableTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_warnings/__init__.py", line 1151, in test_nonascii "['ignore:Deprecaci??nWarning']".encode('utf-8')) AssertionError: b"['ignore:Deprecaci\\udcc3\\udcb3nWarning']" != b"['ignore:Deprecaci\xc3\xb3nWarning']" ====================================================================== FAIL: test_nonascii (test.test_warnings.PyEnvironmentVariableTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_warnings/__init__.py", line 1151, in test_nonascii "['ignore:Deprecaci??nWarning']".encode('utf-8')) AssertionError: b"['ignore:Deprecaci\\udcc3\\udcb3nWarning']" != b"['ignore:Deprecaci\xc3\xb3nWarning']" ---------------------------------------------------------------------- Ran 111 tests in 4.635s FAILED (failures=2) 3 tests failed again: test_cmd_line test_utf8_mode test_warnings == Tests result: FAILURE then FAILURE == ---------- components: Tests messages: 322303 nosy: pablogsal priority: normal severity: normal status: open title: test_cmd_line test_utf8_mode test_warnings fail in AMD64 FreeBSD CURRENT buildbots type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 10:21:42 2018 From: report at bugs.python.org (Dave Opstad) Date: Tue, 24 Jul 2018 14:21:42 +0000 Subject: [issue34208] Change in 3.7 expression evaluation? Message-ID: <1532442102.57.0.56676864532.issue34208@psf.upfronthosting.co.za> New submission from Dave Opstad : In 3.6 I get this: >>> x = (100 * 20) >>> x is 2000 False >>> (100 * 20) is 2000 False But in 3.7, I get this: >>> x = (100 * 20) >>> x is 2000 False >>> (100 * 20) is 2000 True This isn't necessarily a problem, but I'm curious why this behavior changed from 3.6 to 3.7. ---------- components: Interpreter Core messages: 322304 nosy: opstad priority: normal severity: normal status: open title: Change in 3.7 expression evaluation? type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 10:31:37 2018 From: report at bugs.python.org (Dhiraj) Date: Tue, 24 Jul 2018 14:31:37 +0000 Subject: [issue34209] racecondition Message-ID: <1532442697.44.0.56676864532.issue34209@psf.upfronthosting.co.za> New submission from Dhiraj : File: /cpython/blob/master/Modules/posixmodule.c#L2657 #endif result = access(path->narrow, mode); Py_END_ALLOW_THREADS return_value = !result; #endif If an attacker could change anything along the path between the call `access()` and the files actually used, it may exploit the race condition or a time-of-check, time-of-use race condition https://linux.die.net/man/2/access ---------- components: Build messages: 322305 nosy: Dhiraj_Mishra priority: normal severity: normal status: open title: racecondition type: security versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 10:47:54 2018 From: report at bugs.python.org (Eryk Sun) Date: Tue, 24 Jul 2018 14:47:54 +0000 Subject: [issue34208] Change in 3.7 expression evaluation? In-Reply-To: <1532442102.57.0.56676864532.issue34208@psf.upfronthosting.co.za> Message-ID: <1532443674.62.0.56676864532.issue34208@psf.upfronthosting.co.za> Eryk Sun added the comment: Please refrain from using the issue tracker to satisfy your curiosity. This is a question about compiler optimizations that should be asked on python-list, or maybe python-dev. You can use the dis module to get a superficial answer in terms of the constants in the code object. 3.6: >>> dis.dis('(100 * 20) is 2000') 1 0 LOAD_CONST 3 (2000) 2 LOAD_CONST 2 (2000) 4 COMPARE_OP 8 (is) 6 RETURN_VALUE 3.7: >>> dis.dis('(100 * 20) is 2000') 1 0 LOAD_CONST 0 (2000) 2 LOAD_CONST 0 (2000) 4 COMPARE_OP 8 (is) 6 RETURN_VALUE The argument of the LOAD_CONST opcode is the index of the constant in the code object's co_consts tuple. In 3.6 you can see it's separate int objects, but in 3.7 the operation uses the same int object (index 0). ---------- nosy: +eryksun resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 10:57:38 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 24 Jul 2018 14:57:38 +0000 Subject: [issue34207] test_cmd_line test_utf8_mode test_warnings fail in AMD64 FreeBSD CURRENT buildbots In-Reply-To: <1532441315.45.0.56676864532.issue34207@psf.upfronthosting.co.za> Message-ID: <1532444258.4.0.56676864532.issue34207@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 11:06:20 2018 From: report at bugs.python.org (Alexander Marshalov) Date: Tue, 24 Jul 2018 15:06:20 +0000 Subject: [issue34210] Small improvements in heapq (refatoring) Message-ID: <1532444780.82.0.56676864532.issue34210@psf.upfronthosting.co.za> New submission from Alexander Marshalov <_ at marshalov.org>: I would like to make three small improvements to the "heapq" module. 1) The "nsmallest" function has the following code (a similar code exists in the "nlargest" function): # When n>=size, it's faster to use sorted() try: size = len(iterable) except (TypeError, AttributeError): pass else: if n >= size: return sorted(iterable, key=key)[:n] I think "[:n]" is redundant, because "iterable" contains no more than n elements. Therefore, that code can be rewritten as follows: # When n>=size, it's faster to use sorted() try: size = len(iterable) except (TypeError, AttributeError): pass else: if n >= size: return sorted(iterable, key=key) 2) It seems to me that the line: ????for i in reversed(range(n//2)): ???will be more optimal in this version: ????for i in range(n//2 + 1, -1, -1): 3) Top-level functions can be surrounded with two blank lines for greater compliance with PEP-8. ---------- messages: 322307 nosy: amper priority: normal severity: normal status: open title: Small improvements in heapq (refatoring) type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 11:08:03 2018 From: report at bugs.python.org (Alexander Marshalov) Date: Tue, 24 Jul 2018 15:08:03 +0000 Subject: [issue34210] Small improvements in heapq (refatoring) In-Reply-To: <1532444780.82.0.56676864532.issue34210@psf.upfronthosting.co.za> Message-ID: <1532444883.16.0.56676864532.issue34210@psf.upfronthosting.co.za> Change by Alexander Marshalov <_ at marshalov.org>: ---------- keywords: +patch pull_requests: +7965 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 11:08:48 2018 From: report at bugs.python.org (Alexander Marshalov) Date: Tue, 24 Jul 2018 15:08:48 +0000 Subject: [issue34210] Small improvements in heapq (refactoring) In-Reply-To: <1532444780.82.0.56676864532.issue34210@psf.upfronthosting.co.za> Message-ID: <1532444928.07.0.56676864532.issue34210@psf.upfronthosting.co.za> Change by Alexander Marshalov <_ at marshalov.org>: ---------- title: Small improvements in heapq (refatoring) -> Small improvements in heapq (refactoring) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 11:08:49 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 24 Jul 2018 15:08:49 +0000 Subject: [issue33635] OSError when using pathlib.Path.rglob() to list device files In-Reply-To: <1532079855.26.0.56676864532.issue33635@psf.upfronthosting.co.za> Message-ID: <9BCC00E0-7295-43AE-9EE1-C936FB3ADAC9@mac.com> Ronald Oussoren added the comment: Os.stat is defined in C code, in particular in Modules/posixmodule.c. Op 20 jul. 2018 om 10:44 heeft Windson Yang het volgende geschreven: > > Windson Yang added the comment: > > I tried to fix this issue and I found this should be related to os.stat() in os.py. But I can't find the os.stat() API in the file, any ideas? > > ---------- > nosy: +Windson Yang > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 11:09:55 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 24 Jul 2018 15:09:55 +0000 Subject: [issue34204] Bump the default pickle protocol in shelve In-Reply-To: <1532423802.47.0.56676864532.issue34204@psf.upfronthosting.co.za> Message-ID: <1532444995.02.0.56676864532.issue34204@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 11:36:33 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 24 Jul 2018 15:36:33 +0000 Subject: [issue34197] Make csv.Dialect attributes skipinitialspace, doublequote and strict booleans In-Reply-To: <1532343988.37.0.56676864532.issue34197@psf.upfronthosting.co.za> Message-ID: <1532446593.69.0.56676864532.issue34197@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: > The proposed PR makes them False or True. Sorry, is there a PR missing here? I hope you are referring to https://github.com/serhiy-storchaka/cpython/commit/f96e6969b7f73c3fd6ed2166ba3405f9e63b88f7 Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 11:40:00 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 24 Jul 2018 15:40:00 +0000 Subject: [issue34210] Small improvements in heapq (refactoring) In-Reply-To: <1532444780.82.0.56676864532.issue34210@psf.upfronthosting.co.za> Message-ID: <1532446800.51.0.56676864532.issue34210@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry, I don't consider any of these changes to be improvements and some make the code worse in some ways, overriding intentional coding decisions. ---------- nosy: +rhettinger resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 11:44:24 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 24 Jul 2018 15:44:24 +0000 Subject: [issue34196] @staticmethod mangles name of outside class with __ (it is not inside class with staticmethod, but name mangled anyway), so NameError is produced In-Reply-To: <1532340908.45.0.56676864532.issue34196@psf.upfronthosting.co.za> Message-ID: <1532447064.38.0.56676864532.issue34196@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Name mangling is intended to create class local references (that is why the class name is prepended) and can be used to add a layer of privacy to calls *within* a class. It is not intended to do what you're trying to do outside of class definitions. ---------- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 11:46:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Jul 2018 15:46:54 +0000 Subject: [issue34197] Make csv.Dialect attributes skipinitialspace, doublequote and strict booleans In-Reply-To: <1532343988.37.0.56676864532.issue34197@psf.upfronthosting.co.za> Message-ID: <1532447214.74.0.56676864532.issue34197@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +7966 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 11:48:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Jul 2018 15:48:21 +0000 Subject: [issue34197] Make csv.Dialect attributes skipinitialspace, doublequote and strict booleans In-Reply-To: <1532343988.37.0.56676864532.issue34197@psf.upfronthosting.co.za> Message-ID: <1532447301.21.0.56676864532.issue34197@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Hmm, indeed, I forgot to create a PR. Thank you for catching this Karthikeyan! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 12:23:23 2018 From: report at bugs.python.org (Segev Finer) Date: Tue, 24 Jul 2018 16:23:23 +0000 Subject: [issue34167] Standard library docs: prev/next skip right over 16.11 In-Reply-To: <1532090112.81.0.56676864532.issue34167@psf.upfronthosting.co.za> Message-ID: <1532449403.87.0.56676864532.issue34167@psf.upfronthosting.co.za> Segev Finer added the comment: I think the prev/next links link to the previous/next document while 16.11 is in the same document as 16.10 at the bottom. ---------- nosy: +Segev Finer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 12:53:55 2018 From: report at bugs.python.org (Sheng Zhong) Date: Tue, 24 Jul 2018 16:53:55 +0000 Subject: [issue34159] asyncio basic event loop stuck with no tasks scheduled or ready In-Reply-To: <1532038775.06.0.56676864532.issue34159@psf.upfronthosting.co.za> Message-ID: <1532451235.09.0.56676864532.issue34159@psf.upfronthosting.co.za> Sheng Zhong added the comment: Sorry I'm having trouble extracting a bug-producing portion of the code but I can describe the different components, what I think the problem was, and how I resolved it. There is one main coroutine (aka handler) responsible for handling the logic of communicating with a socket (build packet, respond to incoming packet). At the start of this coroutine it launches another coroutine with ensure_future (aka server) that sends to and receives UDP packets from a socket and puts the responses into an `asyncio.queue` for the corresponding transaction. When the handler expects a responding packet, it awaits a get from the queue for this transaction. The handler's execution is wrapped in an `async_timeout.timeout`. The server is a while True loop that gets its packets from an `asyncio.DatagramProtocol` in which its `datagram_received` method feeds an internal server queue. The server awaits packets on its queue and forwards it to a transaction queue when it receives any. There were no timeouts in the server coroutine. I expected that waiting for a packet through the Protocol would block the server coroutine but not the handler coroutine, but the problem was that the handler timeout never had a chance to be processed. This issue was resolved by putting a timeout in the server coroutine on waiting for a get on its internal queue with `wait_for`. ---------- resolution: -> postponed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 13:00:16 2018 From: report at bugs.python.org (Erik Bray) Date: Tue, 24 Jul 2018 17:00:16 +0000 Subject: [issue34211] Cygwin build broken due to use of &PyType_Type in static declaration in _abc module Message-ID: <1532451616.3.0.56676864532.issue34211@psf.upfronthosting.co.za> New submission from Erik Bray : This is essentially the same as issue21124, but introduced more recently with the addition of the _abc_data_type in the _abc module. The workaround is simply to use PyVarObject_HEAD_INIT(NULL, 0) instead of PyVarObject_HEAD_INIT(&PyType_Type, 0); PyType_Ready should take care of the rest. P.S. I'm trying to get going again on the project of adding an AppVeyor build, and eventually a buildbot for Cygwin. My previous attempt was doomed because I wanted to fix all failing tests on Cygwin *first*. This time I am going for a more "instant gratification" approach of just skipping the tests that fail (for now) so that I can at least catch new regressions, and then gradually re-enabled skipped tests as I can find fixes for them. However, for that to happen we at least need a minimal build to work. ---------- components: Build keywords: 3.7regression messages: 322315 nosy: erik.bray priority: normal severity: normal stage: needs patch status: open title: Cygwin build broken due to use of &PyType_Type in static declaration in _abc module type: compile error versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 13:03:16 2018 From: report at bugs.python.org (Erik Bray) Date: Tue, 24 Jul 2018 17:03:16 +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: <1532451796.32.0.56676864532.issue34211@psf.upfronthosting.co.za> Change by Erik Bray : ---------- keywords: +patch pull_requests: +7967 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 13:09:29 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 24 Jul 2018 17:09:29 +0000 Subject: [issue34192] FunctionType.__new__ can generate functions that immediately crash In-Reply-To: <1532318245.8.0.56676864532.issue34192@psf.upfronthosting.co.za> Message-ID: <1532452169.74.0.56676864532.issue34192@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 13:10:52 2018 From: report at bugs.python.org (Erik Bray) Date: Tue, 24 Jul 2018 17:10:52 +0000 Subject: [issue34212] Cygwin link failure with builtin modules since issue30860 Message-ID: <1532452252.87.0.56676864532.issue34212@psf.upfronthosting.co.za> New submission from Erik Bray : Since issue30860, libpython is no longer able to be linked as a shared library, because built-in modules are not compiled with the correct external linkage flags. This is due to the removal of -DPy_BUILD_CORE, which in pyport.h is used to control wither __declspec(dllexport) is used as opposed to __declspec(dllimport). Fortunately Eric Snow already added in https://github.com/python/cpython/pull/3458 a new flag Py_BUILD_CORE_BUILTIN which is used sparingly on Windows, and which should also be used, e.g. on Cygwin or MinGW, when compiling modules that are linked into libpython as built-ins. It sets the right external linkage flags without carrying the additional weight of Py_BUILD_CORE. This along with issue34211 need to be fixed in order to get Python 3.7+ building on Cygwin again. ---------- components: Build keywords: 3.7regression messages: 322316 nosy: erik.bray priority: normal severity: normal status: open title: Cygwin link failure with builtin modules since issue30860 versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 13:13:12 2018 From: report at bugs.python.org (Erik Bray) Date: Tue, 24 Jul 2018 17:13:12 +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: <1532452392.15.0.56676864532.issue34212@psf.upfronthosting.co.za> Change by Erik Bray : ---------- keywords: +patch pull_requests: +7968 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 13:27:01 2018 From: report at bugs.python.org (Corey Bryant) Date: Tue, 24 Jul 2018 17:27:01 +0000 Subject: [issue34173] [3.7] possible race condition in /usr/lib/python3.7/concurrent/futures/thread.py In-Reply-To: <1532115107.08.0.56676864532.issue34173@psf.upfronthosting.co.za> Message-ID: <1532453221.17.0.56676864532.issue34173@psf.upfronthosting.co.za> Corey Bryant added the comment: I've narrowed this down a bit more. It appears to be caused by eventlet patching of standard library thread modules. See new attached patch bp034173-recreate.py. I'll get a bug opened against eventlet. ---------- Added file: https://bugs.python.org/file47709/bpo34173-recreate.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 13:40:53 2018 From: report at bugs.python.org (Corey Bryant) Date: Tue, 24 Jul 2018 17:40:53 +0000 Subject: [issue34173] [3.7] possible race condition in /usr/lib/python3.7/concurrent/futures/thread.py In-Reply-To: <1532115107.08.0.56676864532.issue34173@psf.upfronthosting.co.za> Message-ID: <1532454053.15.0.56676864532.issue34173@psf.upfronthosting.co.za> Corey Bryant added the comment: eventlet issue opened at: https://github.com/eventlet/eventlet/issues/508 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 13:50:51 2018 From: report at bugs.python.org (Corey Bryant) Date: Tue, 24 Jul 2018 17:50:51 +0000 Subject: [issue34173] [3.7] deadlock in /usr/lib/python3.7/concurrent/futures/thread.py In-Reply-To: <1532115107.08.0.56676864532.issue34173@psf.upfronthosting.co.za> Message-ID: <1532454651.4.0.56676864532.issue34173@psf.upfronthosting.co.za> Change by Corey Bryant : ---------- title: [3.7] possible race condition in /usr/lib/python3.7/concurrent/futures/thread.py -> [3.7] deadlock in /usr/lib/python3.7/concurrent/futures/thread.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 13:51:33 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 24 Jul 2018 17:51:33 +0000 Subject: [issue34173] [3.7] possible race condition in /usr/lib/python3.7/concurrent/futures/thread.py In-Reply-To: <1532115107.08.0.56676864532.issue34173@psf.upfronthosting.co.za> Message-ID: <1532454693.79.0.56676864532.issue34173@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks, can confirm it on Python 3.7 . Unfortunately I couldn't test it with master since I have some problems setting up virtualenv and pip with the compiled binary. Running it on Python 3.7 hangs (bpo34173-env) ? cpython git:(master) ? python Python 3.7.0 (default, Jun 28 2018, 02:32:19) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> (bpo34173-env) ? cpython git:(master) ? python bpo34173-recreate.py ^CException in worker Traceback (most recent call last): File "/usr/lib/python3.7/concurrent/futures/thread.py", line 78, in _worker work_item = work_queue.get(block=True) KeyboardInterrupt ^CException in worker Traceback (most recent call last): File "/usr/lib/python3.7/concurrent/futures/thread.py", line 78, in _worker work_item = work_queue.get(block=True) KeyboardInterrupt ^CException in worker Traceback (most recent call last): File "/usr/lib/python3.7/concurrent/futures/thread.py", line 78, in _worker work_item = work_queue.get(block=True) KeyboardInterrupt ^CException in worker Traceback (most recent call last): File "/usr/lib/python3.7/concurrent/futures/thread.py", line 78, in _worker work_item = work_queue.get(block=True) KeyboardInterrupt ^CException in worker Traceback (most recent call last): File "/usr/lib/python3.7/concurrent/futures/thread.py", line 78, in _worker work_item = work_queue.get(block=True) KeyboardInterrupt Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask']s in 14.368564367294312fs Thanks ---------- title: [3.7] deadlock in /usr/lib/python3.7/concurrent/futures/thread.py -> [3.7] possible race condition in /usr/lib/python3.7/concurrent/futures/thread.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 13:54:48 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 24 Jul 2018 17:54:48 +0000 Subject: [issue34173] [3.7] deadlock in /usr/lib/python3.7/concurrent/futures/thread.py In-Reply-To: <1532115107.08.0.56676864532.issue34173@psf.upfronthosting.co.za> Message-ID: <1532454888.31.0.56676864532.issue34173@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Sorry for the noise about the title change. It seems you have edited it while I was typing my comment. There was a form error while I tried submit but I ignored it to try again and it had set my title. I have reverted back to your edit. Thanks ---------- title: [3.7] possible race condition in /usr/lib/python3.7/concurrent/futures/thread.py -> [3.7] deadlock in /usr/lib/python3.7/concurrent/futures/thread.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 14:34:20 2018 From: report at bugs.python.org (Edward Jones) Date: Tue, 24 Jul 2018 18:34:20 +0000 Subject: [issue34213] Frozen dataclass __init__ fails for "object" property" Message-ID: <1532457260.21.0.56676864532.issue34213@psf.upfronthosting.co.za> New submission from Edward Jones : When `__init__` is called for a class which 1) is annotated with `@dataclasses.dataclass(frozen=True)` and 2) has a attribute named `object` a TypeError is raised because `object` is overridden for the local scope and as a result `__setattr__` is called on the passed in argument value instead of the standard `object` base type. I was able to reproduce this in a Docker container running https://github.com/docker-library/python/blob/7a794688c7246e7eff898f5288716a3e7dc08484/3.7/stretch/Dockerfile with the attached .py file. Python 3.7.0 (default, Jul 17 2018, 11:04:33) [GCC 6.3.0 20170516] on linux ---------- components: Library (Lib) files: frozen_dataclass_init_typeerror.py messages: 322321 nosy: Omenien priority: normal severity: normal status: open title: Frozen dataclass __init__ fails for "object" property" type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file47710/frozen_dataclass_init_typeerror.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 14:39:10 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 24 Jul 2018 18:39:10 +0000 Subject: [issue34060] regrtest: log "CPU usage" on Windows In-Reply-To: <1530892869.55.0.56676864532.issue34060@psf.upfronthosting.co.za> Message-ID: <1532457550.87.0.56676864532.issue34060@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > PR 8287 seems short to me and it seems like psutils doesn't expose Processor Queue Length, so I'm not sure why we are talking about depending on psutils? I'm not sure if you're strictly interested in getting system load or if CPU utilization is also fine. FWIW with psutil you would be able to get the system-wide CPU utilization occurred in a given period of time: >>> import psutil, time >>> psutil.cpu_percent(interval=None) # non-blocking 0.0 >>> time.sleep(60) >>> psutil.cpu_percent(interval=None) # average of the last 60 secs 23.6 >>> ...and you can do the same for the current process too (psutil.Process().cpu_percent()). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 14:44:43 2018 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 24 Jul 2018 18:44:43 +0000 Subject: [issue34213] Frozen dataclass __init__ fails for "object" property" In-Reply-To: <1532457260.21.0.56676864532.issue34213@psf.upfronthosting.co.za> Message-ID: <1532457883.56.0.56676864532.issue34213@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- assignee: -> eric.smith nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 14:53:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Jul 2018 18:53: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: <1532458394.68.0.56676864532.issue34170@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +7969 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 15:03:32 2018 From: report at bugs.python.org (Tim Golden) Date: Tue, 24 Jul 2018 19:03:32 +0000 Subject: [issue34195] test_nt_helpers fails with case difference in drive letter In-Reply-To: <1532331695.99.0.56676864532.issue34195@psf.upfronthosting.co.za> Message-ID: <1532459012.58.0.56676864532.issue34195@psf.upfronthosting.co.za> Change by Tim Golden : ---------- keywords: +patch pull_requests: +7970 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 15:07:02 2018 From: report at bugs.python.org (Alan Justino) Date: Tue, 24 Jul 2018 19:07:02 +0000 Subject: [issue1539381] Add readinto method to StringIO and cStringIO Message-ID: <1532459222.95.0.56676864532.issue1539381@psf.upfronthosting.co.za> Alan Justino added the comment: It affects SpooledTemporaryFile too. Because it switches between StringIO, BytesIO and TemporaryFile internally. Only StringIO have not this interface. Discovered trying to `pickle.load` a remote storage file. Please reopen. ---------- nosy: +alanjds _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 15:08:16 2018 From: report at bugs.python.org (Christophe Nanteuil) Date: Tue, 24 Jul 2018 19:08:16 +0000 Subject: [issue34158] Documentation of datetime '%z' format code is odd In-Reply-To: <1532036087.85.0.56676864532.issue34158@psf.upfronthosting.co.za> Message-ID: <1532459296.83.0.56676864532.issue34158@psf.upfronthosting.co.za> Christophe Nanteuil added the comment: PR updated according to Martin Panter comments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 15:08:32 2018 From: report at bugs.python.org (tzickel) Date: Tue, 24 Jul 2018 19:08:32 +0000 Subject: [issue25083] Python can sometimes create incorrect .pyc files In-Reply-To: <1442143572.78.0.211523310189.issue25083@psf.upfronthosting.co.za> Message-ID: <1532459312.19.0.56676864532.issue25083@psf.upfronthosting.co.za> Change by tzickel : ---------- pull_requests: +7971 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 15:18:33 2018 From: report at bugs.python.org (tzickel) Date: Tue, 24 Jul 2018 19:18:33 +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: <1532459913.97.0.56676864532.issue34172@psf.upfronthosting.co.za> Change by tzickel : ---------- keywords: +patch pull_requests: +7972 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 15:24:54 2018 From: report at bugs.python.org (Brett Cannon) Date: Tue, 24 Jul 2018 19:24:54 +0000 Subject: [issue25083] Python can sometimes create incorrect .pyc files In-Reply-To: <1442143572.78.0.211523310189.issue25083@psf.upfronthosting.co.za> Message-ID: <1532460294.42.0.56676864532.issue25083@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 15:43:20 2018 From: report at bugs.python.org (Roundup Robot) Date: Tue, 24 Jul 2018 19:43:20 +0000 Subject: [issue1539381] Add readinto method to StringIO and cStringIO Message-ID: <1532461400.75.0.56676864532.issue1539381@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +7973 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 15:43:22 2018 From: report at bugs.python.org (Yonatan Zunger) Date: Tue, 24 Jul 2018 19:43:22 +0000 Subject: [issue34115] code.InteractiveConsole.interact() closes stdin In-Reply-To: <1532250721.21.0.56676864532.issue34115@psf.upfronthosting.co.za> Message-ID: Yonatan Zunger added the comment: Eryk: Thanks for finding that! So that I'm sure I understand, if 34187 is resolved, does that mean the stdin.close() is no longer required at all in _Quitter? On Sun, Jul 22, 2018 at 2:12 AM Eryk Sun wrote: > > Eryk Sun added the comment: > > > On Windows Console, sys.stdin.close() does not prevent a second > > interact call. This might be considered a bug. > > This is a bug in io._WindowsConsoleIO. > > In Python 3, the sys.std* file objects that get created at startup use > closefd=False: > > >>> sys.stdin.buffer.raw.closefd > False > >>> sys.stdout.buffer.raw.closefd > False > >>> sys.stderr.buffer.raw.closefd > False > > Since the REPL uses C FILE streams (or in 3.6+ the underlying console file > handle in Windows), closing sys.stdin does not cause the REPL to exit, and > the PyOS_ReadLine call in the interactive loop continues to work in both > POSIX and Windows. > > That said, closing sys.stdin should cause input() to raise ValueError due > to sys.stdin.fileno() failing (i.e. take the non-tty path) and subsequently > sys.stdin.readline() failing. A second call to > code.InteractiveConsole.interact() should thus fail. The issue is that the > fileno() method of _WindowsConsoleIO isn't raising ValueError like it > should when the file is closed and closefd is false. I've created issue > 34187 with a suggested fix. > > ---------- > nosy: +eryksun > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 15:45:24 2018 From: report at bugs.python.org (Alan Justino) Date: Tue, 24 Jul 2018 19:45:24 +0000 Subject: [issue1539381] Add readinto method to StringIO and cStringIO Message-ID: <1532461524.74.0.56676864532.issue1539381@psf.upfronthosting.co.za> Alan Justino added the comment: Issued a related PR (https://github.com/python/cpython/pull/8451) to allow SpooledTemporaryFile to propagate `readinto` calls to TemporaryFile, BytesIO or StringIO. Of this ones, only StringIO will fail. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 16:16:21 2018 From: report at bugs.python.org (Nick Drozd) Date: Tue, 24 Jul 2018 20:16:21 +0000 Subject: [issue34214] Pylint recusion stack overflow abort Message-ID: <1532463381.11.0.56676864532.issue34214@psf.upfronthosting.co.za> New submission from Nick Drozd : In certain very, very specific circumstances, Pylint can cause the interpreter to abort with a stack overflow error. I've seen this issue on 3.5, 3.6, and 3.8 (I assume it affects 3.7 as well) and on both Mac and Ubuntu. It requires: * 1.7 <= Pylint version < 1.9 * 1.6.0 <= Astroid version < 1.6.2 - (For interpreter versions > 3.6, commit https://github.com/PyCQA/astroid/commit/ceeee09743079d07ffc3918969ab203f766b29e0 is also required.) * The dependencies of Pylint and Astroid (I'm not aware of any specific versions needed.) The crash comes from running Pylint on the file stack-overflow-abort.py (https://github.com/nickdrozd/pylint/blob/80b05dace5049b8a837b8c530a57321381717ddb/stack-overflow-abort.py). This causes the interpreter to abort with the message "Fatal Python error: Cannot recover from stack overflow." Now, it's not surprising that some kind of stack depth error occurs here, as the target code is recursive, Pylint is recursive, and and Astroid 1.6.0 had a bug in its handling of augmented assign statements (this bug was fixed in 1.6.2 with a one-line change: https://github.com/PyCQA/astroid/commit/3fae32f99c7f432a1281b151ea17e163a2e8dc47). But this recursion bug should be handled with a RecursionError instead of an abort. What's strange is that running Pylint on the file caught-recursion-error.py (https://github.com/nickdrozd/pylint/blob/80b05dace5049b8a837b8c530a57321381717ddb/caught-recursion-error.py), which differs from stack-overflow-abort.py in just three characters, does end up with a RecursionError (neither file is large at all). So it looks like something subtle is happening here. I tried looking around to see if I could figure it out, and I could not. All I was able to discover is that changing 50 to other numbers in _Py_CheckRecursiveCall causes the error to come from different places: at the beginning of the eval loop, "while calling a Python object" at several points, and "in comparison". I've included the text of a shell session showing the errors. Repo links to versions of Pylint and Astroid that cause the error: https://github.com/nickdrozd/pylint/tree/crash https://github.com/nickdrozd/astroid/tree/crash See https://github.com/PyCQA/pylint/issues/1805 for further discussion. ---------- components: Interpreter Core files: shell-session messages: 322328 nosy: nickdrozd priority: normal severity: normal status: open title: Pylint recusion stack overflow abort type: crash versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file47711/shell-session _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 16:37:03 2018 From: report at bugs.python.org (Vadim Pushtaev) Date: Tue, 24 Jul 2018 20:37:03 +0000 Subject: [issue34213] Frozen dataclass __init__ fails for "object" property" In-Reply-To: <1532457260.21.0.56676864532.issue34213@psf.upfronthosting.co.za> Message-ID: <1532464623.13.0.56676864532.issue34213@psf.upfronthosting.co.za> Change by Vadim Pushtaev : ---------- nosy: +Vadim Pushtaev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 16:43:44 2018 From: report at bugs.python.org (Tyler Bell) Date: Tue, 24 Jul 2018 20:43:44 +0000 Subject: [issue34215] streams.py:readuntil IncompleteReadError is message is incorrect Message-ID: <1532465024.45.0.56676864532.issue34215@psf.upfronthosting.co.za> New submission from Tyler Bell : This may have already been cleared as I opened the PR months ago But the gist is that the Exception is misleading and the test is incorrect. ---------- components: Library (Lib) messages: 322329 nosy: mrbell321 at gmail.com priority: normal pull_requests: 7975 severity: normal status: open title: streams.py:readuntil IncompleteReadError is message is incorrect type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 17:02:51 2018 From: report at bugs.python.org (sachin) Date: Tue, 24 Jul 2018 21:02:51 +0000 Subject: [issue34216] python platform no child error Message-ID: <1532466171.52.0.56676864532.issue34216@psf.upfronthosting.co.za> New submission from sachin : We are trying to utilize librosa library for some processing. When we try to load the librosa library, python platform library is triggered via the Numba library. Numba is trying to find the underlying OS which is installed. Function "_syscmd_uname" is triggered to find out the underlying os, but in the above function the os.popen object which is opened to determine the OS , but when the object is closed it throws a no child process error. This is mainly due to the closure of the popen object before the close fuction is called. we can get around this problem by catching the error and returning a default value if the closing of the popen pipeline fails python platform.py file def _syscmd_uname(option, default=''): """ Interface to the system's uname command. """ if sys.platform in ('dos', 'win32', 'win16'): # XXX Others too ? return default try: f = os.popen('uname %s 2> %s' % (option, DEV_NULL)) except (AttributeError, OSError): return default output = f.read().strip() rc = f.close() # error at this place enclose in a try except statement to catrch the exception if not output or rc: return default else: return output ---------- components: Build messages: 322330 nosy: sskamble619 priority: normal severity: normal status: open title: python platform no child error type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 17:28:55 2018 From: report at bugs.python.org (Roundup Robot) Date: Tue, 24 Jul 2018 21:28:55 +0000 Subject: [issue34213] Frozen dataclass __init__ fails for "object" property" In-Reply-To: <1532457260.21.0.56676864532.issue34213@psf.upfronthosting.co.za> Message-ID: <1532467735.81.0.56676864532.issue34213@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +7976 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 17:33:33 2018 From: report at bugs.python.org (Vadim Pushtaev) Date: Tue, 24 Jul 2018 21:33:33 +0000 Subject: [issue34213] Frozen dataclass __init__ fails for "object" property" In-Reply-To: <1532457260.21.0.56676864532.issue34213@psf.upfronthosting.co.za> Message-ID: <1532468012.99.0.56676864532.issue34213@psf.upfronthosting.co.za> Vadim Pushtaev added the comment: Hello. This is my solution for this problem - https://github.com/python/cpython/pull/8452 Sorry if I'm not supposed to do anything about the already assigned issue, feel free to ignore my PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 19:42:09 2018 From: report at bugs.python.org (Erik Janssens) Date: Tue, 24 Jul 2018 23:42:09 +0000 Subject: [issue34217] windows: cross compilation fails due to headers with uppercase Message-ID: <1532475729.27.0.56676864532.issue34217@psf.upfronthosting.co.za> New submission from Erik Janssens : When cross compiling python on a linux host with a case sensitive file system for a windows target. The compilation will fail due to header files which contain uppercases. ---------- components: Cross-Build, Windows messages: 322333 nosy: Alex.Willmer, erikjanss, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: windows: cross compilation fails due to headers with uppercase type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 19:47:37 2018 From: report at bugs.python.org (Erik Janssens) Date: Tue, 24 Jul 2018 23:47:37 +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: <1532476057.24.0.56676864532.issue34217@psf.upfronthosting.co.za> Change by Erik Janssens : ---------- keywords: +patch pull_requests: +7978 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 20:01:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Jul 2018 00: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: <1532476878.46.0.56676864532.issue34170@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +7979 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 20:12:49 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 25 Jul 2018 00:12:49 +0000 Subject: [issue34209] racecondition In-Reply-To: <1532442697.44.0.56676864532.issue34209@psf.upfronthosting.co.za> Message-ID: <1532477569.98.0.56676864532.issue34209@psf.upfronthosting.co.za> INADA Naoki added the comment: https://docs.python.org/3/library/os.html#os.access It is already documented. What's point of this issue? ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 20:41:50 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 25 Jul 2018 00:41:50 +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: <1532479310.1.0.56676864532.issue34217@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 6cf8255912c36fec6f87f62513034d0818f61390 by INADA Naoki (erikjanss) in branch 'master': bpo-34217: Use lowercase header for Windows (GH-8453) https://github.com/python/cpython/commit/6cf8255912c36fec6f87f62513034d0818f61390 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 20:42:08 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 25 Jul 2018 00:42: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: <1532479328.28.0.56676864532.issue34217@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 Tue Jul 24 20:49:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Jul 2018 00:49:20 +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: <1532479760.13.0.56676864532.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 1dc6e3906acb81163725e98378bf4d1bd1ce771a by Victor Stinner in branch 'master': bpo-34170: Add _Py_InitializeFromConfig() (GH-8454) https://github.com/python/cpython/commit/1dc6e3906acb81163725e98378bf4d1bd1ce771a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 20:51:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Jul 2018 00:51:59 +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: <1532479919.82.0.56676864532.issue34170@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +7980 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 24 20:58:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Jul 2018 00:58: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: <1532480331.19.0.56676864532.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: I added many fields to _PyCoreConfig which duplicate global configuration varibles: _PyConfigCore.isolated duplicates Py_IsolatedFlag. I started to modify Python to read the core configuration rather than global configuration flags. The problem is that sometimes, global configuration flags are updated, but not their duplicated core configuration fields. Example from Modules/main.c: static void pymain_repl(_PyMain *pymain, _PyCoreConfig *config, PyCompilerFlags *cf) { /* Check this environment variable at the end, to give programs the opportunity to set it from Python. */ if (!Py_InspectFlag && config_get_env_var(config, "PYTHONINSPECT")) { Py_InspectFlag = 1; } ... } Only Py_InspectFlag is not, not core_config.inspect. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 02:48:34 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 25 Jul 2018 06:48:34 +0000 Subject: [issue34192] FunctionType.__new__ can generate functions that immediately crash In-Reply-To: <1532318245.8.0.56676864532.issue34192@psf.upfronthosting.co.za> Message-ID: <1532501314.76.0.56676864532.issue34192@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: The assertion also fails on master. I did some manual git blame work. The assertion passes with commit 7324b5ce8e7c031a0a3832a6a8d7c639111ae0ff. It fails with the next commit 078f1814f1a4413a2a0fdb8cf4490ee0fc98ef34 (https://bugs.python.org/issue32176) that has some changes with respect to CO_NOFREE. The change was released with 3.7.0a3 as noted in the comment (https://bugs.python.org/issue32176#msg307512) and hence the assertion should fail on 3.7.0b3 also. # commit 7324b5c ? cpython git:(7324b5c) ? ./python Python 3.7.0a2+ (v3.7.0a2-334-g7324b5c:7324b5c, Jul 25 2018, 06:34:52) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> ? cpython git:(7324b5c) ? ./python bpo34192.py calling a... Blow up the universe? y/n : n # commit 078f181 ? cpython git:(078f181) ? ./python Python 3.7.0a2+ (v3.7.0a2-335-g078f181:078f181, Jul 25 2018, 06:36:32) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> ? cpython git:(078f181) ? ./python bpo34192.py Traceback (most recent call last): File "bpo34192.py", line 44, in assert b.__code__.co_flags == OPTIMIZED|NEWLOCALS|NOFREE AssertionError Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 03:30:05 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 25 Jul 2018 07:30:05 +0000 Subject: [issue34167] Standard library docs: prev/next skip right over 16.11 In-Reply-To: <1532090112.81.0.56676864532.issue34167@psf.upfronthosting.co.za> Message-ID: <1532503805.88.0.56676864532.issue34167@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 04:19:31 2018 From: report at bugs.python.org (Michael Felt) Date: Wed, 25 Jul 2018 08:19:31 +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: <1532506771.99.0.56676864532.issue34194@psf.upfronthosting.co.za> Michael Felt added the comment: Any comments re: environment variables - even if the answer is None! ---------- versions: +Python 2.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 04:21:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Jul 2018 08:21: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: <1532506870.75.0.56676864532.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d3b191992e0f3c1eb27cb68478b875d60e859976 by Victor Stinner in branch 'master': bpo-34170: Cleanup pymain_run_python() (GH-8455) https://github.com/python/cpython/commit/d3b191992e0f3c1eb27cb68478b875d60e859976 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 04:31:01 2018 From: report at bugs.python.org (Michael Felt) Date: Wed, 25 Jul 2018 08:31:01 +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: <1532507461.55.0.56676864532.issue34194@psf.upfronthosting.co.za> Michael Felt added the comment: update: went back to check what worked, did not work without the environment variable set. I am going to guess that pip(3) is able to make use of the environment variable SSL_CERT_FILE as pip download fails (in some cases) without it, but succeeds with it. I thought to recall something similar while using git (mine leaning on python2-2.7) but I have not had the time to test it again (using git fetch and git pull from cpython). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 04:38:46 2018 From: report at bugs.python.org (Michael Felt) Date: Wed, 25 Jul 2018 08:38:46 +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: <1532507926.51.0.56676864532.issue28009@psf.upfronthosting.co.za> Michael Felt added the comment: @pitrou: re: Is nohup required in the example you just posted or is that a red herring? I just use nohup to merge stdout and stderr when grepping for messages - and to, ideally, have the stdout and stderr messages properly synced in the output stream. So, I hope "red herring" :) My apologies for the belated reply. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 04:43:04 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 25 Jul 2018 08:43:04 +0000 Subject: [issue12743] C API marshalling doc contains XXX In-Reply-To: <1313160183.82.0.137409262179.issue12743@psf.upfronthosting.co.za> Message-ID: <1532508184.28.0.56676864532.issue12743@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- pull_requests: +7981 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 04:43:53 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 25 Jul 2018 08:43:53 +0000 Subject: [issue34218] test_xml_etree_c leaked [68, 68, 74] references, sum=210 Message-ID: <1532508233.04.0.56676864532.issue34218@psf.upfronthosting.co.za> New submission from Pablo Galindo Salgado : Builder x86 Gentoo Refleaks 3.x reports that test_xml_etree_c is potentially leaking references and blocks: https://buildbot.python.org/all/#builders/1/builds/295 ---------------------------------------------------------------------- Ran 148 tests in 0.487s OK . test_xml_etree_c leaked [68, 68, 74] references, sum=210 test_xml_etree_c leaked [51, 52, 52] memory blocks, sum=155 1 test failed again: test_xml_etree_c == Tests result: FAILURE then FAILURE == ---------- components: Tests messages: 322343 nosy: pablogsal priority: normal severity: normal status: open title: test_xml_etree_c leaked [68, 68, 74] references, sum=210 type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 04:58:00 2018 From: report at bugs.python.org (monson) Date: Wed, 25 Jul 2018 08:58:00 +0000 Subject: [issue34219] distutils: build_ext -D wrongly assume defining a symbol with no value Message-ID: <1532509080.28.0.56676864532.issue34219@psf.upfronthosting.co.za> New submission from monson : `python setup.py build_ext -D zero,one=v1,two=k2=v2` will generate preprocessor argument `-D zero=1 -D one=v1=1 -D two=k2=v2=1`. Expect `-D zero=1 -D one=v1 -D two=k2=v2`. ---------- components: Library (Lib) messages: 322344 nosy: monson priority: normal severity: normal status: open title: distutils: build_ext -D wrongly assume defining a symbol with no value type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 04:59:45 2018 From: report at bugs.python.org (monson) Date: Wed, 25 Jul 2018 08:59:45 +0000 Subject: [issue34219] distutils: build_ext -D wrongly assume defining a symbol with no value In-Reply-To: <1532509080.28.0.56676864532.issue34219@psf.upfronthosting.co.za> Message-ID: <1532509185.24.0.56676864532.issue34219@psf.upfronthosting.co.za> Change by monson : ---------- keywords: +patch pull_requests: +7982 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 05:11:28 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 25 Jul 2018 09:11:28 +0000 Subject: [issue13041] argparse: terminal width is not detected properly In-Reply-To: <1316902039.33.0.744560309521.issue13041@psf.upfronthosting.co.za> Message-ID: <1532509888.15.0.56676864532.issue13041@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- pull_requests: +7983 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 06:02:25 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 25 Jul 2018 10:02:25 +0000 Subject: [issue27794] setattr a read-only property; the AttributeError should show the attribute that failed In-Reply-To: <1471528639.63.0.0729109170448.issue27794@psf.upfronthosting.co.za> Message-ID: <1532512945.7.0.56676864532.issue27794@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 06:23:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 25 Jul 2018 10:23:07 +0000 Subject: [issue34218] test_xml_etree_c leaked [68, 68, 74] references, sum=210 In-Reply-To: <1532508233.04.0.56676864532.issue34218@psf.upfronthosting.co.za> Message-ID: <1532514187.5.0.56676864532.issue34218@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Looks like a regression introduced in issue29209 (02ec92fa7b1dddc23d479ee0b87dc283793505a8). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 06:34:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 25 Jul 2018 10:34:07 +0000 Subject: [issue34218] test_xml_etree_c leaked [68, 68, 74] references, sum=210 In-Reply-To: <1532508233.04.0.56676864532.issue34218@psf.upfronthosting.co.za> Message-ID: <1532514847.89.0.56676864532.issue34218@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +7984 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 13:37:22 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 25 Jul 2018 17:37:22 +0000 Subject: [issue34168] RAM consumption too high using concurrent.futures (Python 3.7 / 3.6 ) In-Reply-To: <1532091230.61.0.56676864532.issue34168@psf.upfronthosting.co.za> Message-ID: <1532540242.06.0.56676864532.issue34168@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Note: While this particular use case wouldn't be fixed (map returns in order, not as completed), applying the fix from #29842 would make many similar use cases both simpler to implement and more efficient/possible. That said, no action has been taken on #29842 (no objections, but no action either), so I'm not sure what to do to push it to completion. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 12:25:17 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 25 Jul 2018 16:25:17 +0000 Subject: [issue34227] Weighted random.sample() (weighted sampling without replacement) In-Reply-To: <1532534314.27.0.56676864532.issue34227@psf.upfronthosting.co.za> Message-ID: <1532535917.96.0.56676864532.issue34227@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 08:56:44 2018 From: report at bugs.python.org (Grigory Statsenko) Date: Wed, 25 Jul 2018 12:56:44 +0000 Subject: [issue34222] Email message serialization enters an infinite loop when folding non-ASCII headers with long words Message-ID: <1532523404.04.0.56676864532.issue34222@psf.upfronthosting.co.za> New submission from Grigory Statsenko : (Discovered together with https://bugs.python.org/msg322348) Email message serialization (in function _fold_as_ew) enters an infinite loop when folding non-ASCII headers whose words (after encoding) are longer than the given maxlen. Besides being stuck in an infinite loop, it keeps appending to the `lines` list, so its memory usage keeps on growing also infinitely. The code keeps appending encoded empty strings to the list like this: lines: [ 'Subject: =?utf-8?q??=', ' =?utf-8?q??=', ' =?utf-8?q??=', ' =?utf-8?q??=', ' =?utf-8?q??=', ' =?utf-8?q??=', ' ' ] (and it keeps on growing) Here is my code that can reproduce this issue (as a unittest): import email.generator import email.policy from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from unittest import TestCase def create_message(subject, sender, recipients, body): msg = MIMEMultipart() msg.set_charset('utf-8') msg.policy = email.policy.SMTP msg.attach(MIMEText(body, 'html')) msg['Subject'] = subject msg['From'] = sender msg['To'] = ';'.join(recipients) return msg class TestEmailMessage(TestCase): def _make_message(self, subject): return create_message( subject=subject, sender='me at site.com', recipients=['me at site.com'], body='Some text', ) def test_ascii_message_with_len_limit(self): # very long subject consisting of a single word subject = 'Q' * 100 msg = self._make_message(subject) self.assertTrue(msg.as_string(maxheaderlen=76)) def test_non_ascii_message_with_len_limit(self): # very long subject consisting of a single word subject = '?' * 100 msg = self._make_message(subject) self.assertTrue(msg.as_string(maxheaderlen=76)) The ASCII test passes, but the non-ASCII one never finishes. >From what I can tell, the problem is in line 2728 of email/_header_value_parser.py: first_part = first_part[:-excess] where `excess` is calculated from the encoded string (which is several times longer than the original one), but it truncates the original (non-encoded string). The problem arises when `excess` is actually greater than `first_part` So, it attempts to encode the exact same part of the header and fails in every iteration, instead appending an empty string to the list and encoding it as ' =?utf-8?q??=' What this amounts to is that it's now practically impossible to send emails with non-ACSII subjects without either disregarding the RFC recommendations and requirements for line length or risking hangs and memory leaks. Just like in https://bugs.python.org/msg322348, this behavior is new in Python 3.6. Also does not work in 3.7 and 3.8 ---------- components: email messages: 322351 nosy: altvod, barry, r.david.murray priority: normal severity: normal status: open title: Email message serialization enters an infinite loop when folding non-ASCII headers with long words versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 14:44:42 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 25 Jul 2018 18:44:42 +0000 Subject: [issue33102] get the nth folder of a given path In-Reply-To: <1521465956.78.0.467229070634.issue33102@psf.upfronthosting.co.za> Message-ID: <1532544282.74.0.56676864532.issue33102@psf.upfronthosting.co.za> Change by Tal Einat : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 11:16:05 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 25 Jul 2018 15:16:05 +0000 Subject: [issue34224] python 3.7 inside venv tries to write back to read-only installation directory (Grammar3.7.0.final.0.pickle) In-Reply-To: <1532528725.67.0.56676864532.issue34224@psf.upfronthosting.co.za> Message-ID: <1532531765.34.0.56676864532.issue34224@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Seems related : https://bugs.python.org/issue15317 Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 08:56:19 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 25 Jul 2018 12:56:19 +0000 Subject: [issue34220] Serialization of email message without header line length limit and a non-ASCII subject fails with TypeError In-Reply-To: <1532521160.35.0.56676864532.issue34220@psf.upfronthosting.co.za> Message-ID: <1532523379.82.0.56676864532.issue34220@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 12:27:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Jul 2018 16:27:06 +0000 Subject: [issue34218] test_xml_etree_c leaked [68, 68, 74] references, sum=210 In-Reply-To: <1532508233.04.0.56676864532.issue34218@psf.upfronthosting.co.za> Message-ID: <1532536026.93.0.56676864532.issue34218@psf.upfronthosting.co.za> STINNER Victor added the comment: Is this issue really fixed? https://buildbot.python.org/all/#builders/1/builds/295 still detects leaks. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 15:54:55 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 25 Jul 2018 19:54:55 +0000 Subject: [issue29842] Make Executor.map work with infinite/large inputs correctly In-Reply-To: <1489800776.56.0.575396558681.issue29842@psf.upfronthosting.co.za> Message-ID: <1532548495.65.0.56676864532.issue29842@psf.upfronthosting.co.za> Josh Rosenberg added the comment: In any event, sorry to be a pain, but is there any way to get some movement on this issue? One person reviewed the code with no significant concerns to address. There have been a duplicate (#30323) and closely related (#34168) issues opened that this would address; I'd really like to see Executor.map made more bulletproof against cases that plain map handles with equanimity. Even if it's not applied as is, something similar (with prefetch count defaults tweaked, or, at the expense of code complexity, a separate worker thread to perform the prefetch to address Max's concerns) would be a vast improvement over the status quo. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 14:44:23 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 25 Jul 2018 18:44:23 +0000 Subject: [issue33102] get the nth folder of a given path In-Reply-To: <1521465956.78.0.467229070634.issue33102@psf.upfronthosting.co.za> Message-ID: <1532544263.82.0.56676864532.issue33102@psf.upfronthosting.co.za> Tal Einat added the comment: I'm closing this as "wontfix". Amjad, if you'd like to discuss this further, please bring it up on python-ideas. Serhiy, as the expert for the os.path module, FYI. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 13:40:13 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 25 Jul 2018 17:40:13 +0000 Subject: [issue28677] difficult to parse sentence structure in "When an instance attribute is referenced that isn't a data attribute" In-Reply-To: <1478986337.93.0.398450030776.issue28677@psf.upfronthosting.co.za> Message-ID: <1532540413.33.0.56676864532.issue28677@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 1c8f6553ad5a7f97495972da8f35f4dabcb372d4 by Miss Islington (bot) in branch '2.7': bpo-28677: Improve phrasing of when instance attribute is referenced (GH-6208) https://github.com/python/cpython/commit/1c8f6553ad5a7f97495972da8f35f4dabcb372d4 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 11:23:47 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 25 Jul 2018 15:23:47 +0000 Subject: [issue13041] argparse: terminal width is not detected properly In-Reply-To: <1316902039.33.0.744560309521.issue13041@psf.upfronthosting.co.za> Message-ID: <1532532227.47.0.56676864532.issue13041@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 74102c9a5f2327c4fc47feefa072854a53551d1f by Berker Peksag in branch 'master': bpo-13041: Use shutil.get_terminal_size() in argparse.HelpFormatter (GH-8459) https://github.com/python/cpython/commit/74102c9a5f2327c4fc47feefa072854a53551d1f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 07:52:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 25 Jul 2018 11:52:48 +0000 Subject: [issue34218] test_xml_etree_c leaked [68, 68, 74] references, sum=210 In-Reply-To: <1532508233.04.0.56676864532.issue34218@psf.upfronthosting.co.za> Message-ID: <1532519568.37.0.56676864532.issue34218@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset ee98e7bbde45fcf24d769353e29337d5ccdbaac5 by Serhiy Storchaka in branch 'master': bpo-34218: Fix a leak in _elementtree.c introduced in GH-6769. (GH-8460) https://github.com/python/cpython/commit/ee98e7bbde45fcf24d769353e29337d5ccdbaac5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 13:40:36 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 25 Jul 2018 17:40:36 +0000 Subject: [issue28677] difficult to parse sentence structure in "When an instance attribute is referenced that isn't a data attribute" In-Reply-To: <1478986337.93.0.398450030776.issue28677@psf.upfronthosting.co.za> Message-ID: <1532540436.89.0.56676864532.issue28677@psf.upfronthosting.co.za> miss-islington added the comment: New changeset cfadd1c2421e13d76d588982147d4fbdc71d5527 by Miss Islington (bot) in branch '3.6': bpo-28677: Improve phrasing of when instance attribute is referenced (GH-6208) https://github.com/python/cpython/commit/cfadd1c2421e13d76d588982147d4fbdc71d5527 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 14:54:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 25 Jul 2018 18:54:36 +0000 Subject: [issue34218] test_xml_etree_c leaked [68, 68, 74] references, sum=210 In-Reply-To: <1532508233.04.0.56676864532.issue34218@psf.upfronthosting.co.za> Message-ID: <1532544876.26.0.56676864532.issue34218@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This test was finished 4 hours before the leak was fixed, and a hour before this issue was opened. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 07:54:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 25 Jul 2018 11:54:45 +0000 Subject: [issue34218] test_xml_etree_c leaked [68, 68, 74] references, sum=210 In-Reply-To: <1532508233.04.0.56676864532.issue34218@psf.upfronthosting.co.za> Message-ID: <1532519685.92.0.56676864532.issue34218@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 Wed Jul 25 13:47:41 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 25 Jul 2018 17:47:41 +0000 Subject: [issue33102] get the nth folder of a given path In-Reply-To: <1521465956.78.0.467229070634.issue33102@psf.upfronthosting.co.za> Message-ID: <1532540861.39.0.56676864532.issue33102@psf.upfronthosting.co.za> Tal Einat added the comment: -1 on adding this to os.path given the existence in pathlib. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 10:22:36 2018 From: report at bugs.python.org (Andreas Jung) Date: Wed, 25 Jul 2018 14:22:36 +0000 Subject: [issue34224] python 3.7 inside venv tries to write back to installation directory Message-ID: <1532528556.54.0.56676864532.issue34224@psf.upfronthosting.co.za> Change by Andreas Jung : ---------- components: Installation nosy: ajung priority: normal severity: normal status: open title: python 3.7 inside venv tries to write back to installation directory _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 10:21:36 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 25 Jul 2018 14:21:36 +0000 Subject: [issue28677] difficult to parse sentence structure in "When an instance attribute is referenced that isn't a data attribute" In-Reply-To: <1478986337.93.0.398450030776.issue28677@psf.upfronthosting.co.za> Message-ID: <1532528496.1.0.56676864532.issue28677@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset c0f0a7669c73c0d444851dd4c5299de2479214cc by Tal Einat (Aaron Ang) in branch 'master': bpo-28677: Improve phrasing of when instance attribute is referenced (GH-6208) https://github.com/python/cpython/commit/c0f0a7669c73c0d444851dd4c5299de2479214cc ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 10:22:17 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 25 Jul 2018 14:22:17 +0000 Subject: [issue34220] Serialization of email message without header line length limit and a non-ASCII subject fails with TypeError In-Reply-To: <1532521160.35.0.56676864532.issue34220@psf.upfronthosting.co.za> Message-ID: <1532528537.93.0.56676864532.issue34220@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I took all the commits made to Lib/email from 3.5 to latest of 3.6 branch with `git log --oneline --format="%h" upstream/3.5..upstream/3.6 Lib/email > commits.txt` I could see the test fails with a87ba60 and passes with d94ef8f. Probably something to do with a87ba60fe56ae2ebe80ab9ada6d280a6a1f3d552 that had a rewrite the email header folding algorithm as I can see from the issue https://bugs.python.org/issue27240 cpython git:(master) ? ./python Python 3.8.0a0 (heads/bpo34193-dirty:bfdde5a, Jul 25 2018, 07:51:50) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> # commit a87ba60 cpython git:(master) $ git checkout a87ba60 Lib/email && ./python -m unittest bpo34220.py && git reset --quiet HEAD . && git checkout . .E ====================================================================== ERROR: test_non_ascii_message_no_len_limit (bpo34220.TestEmailMessage) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/bpo34220.py", line 35, in test_non_ascii_message_no_len_limit self.assertTrue(str(msg)) File "/home/cpython/Lib/email/message.py", line 135, in __str__ return self.as_string() File "/home/cpython/Lib/email/message.py", line 158, in as_string g.flatten(self, unixfrom=unixfrom) File "/home/cpython/Lib/email/generator.py", line 116, in flatten self._write(msg) File "/home/cpython/Lib/email/generator.py", line 195, in _write self._write_headers(msg) File "/home/cpython/Lib/email/generator.py", line 222, in _write_headers self.write(self.policy.fold(h, v)) File "/home/cpython/Lib/email/policy.py", line 183, in fold return self._fold(name, value, refold_binary=True) File "/home/cpython/Lib/email/policy.py", line 205, in _fold return value.fold(policy=self) File "/home/cpython/Lib/email/headerregistry.py", line 258, in fold return header.fold(policy=policy) File "/home/cpython/Lib/email/_header_value_parser.py", line 144, in fold return _refold_parse_tree(self, policy=policy) File "/home/cpython/Lib/email/_header_value_parser.py", line 2645, in _refold_parse_tree part.ew_combine_allowed, charset) File "/home/cpython/Lib/email/_header_value_parser.py", line 2722, in _fold_as_ew first_part = to_encode[:text_space] TypeError: slice indices must be integers or None or have an __index__ method ---------------------------------------------------------------------- Ran 2 tests in 0.022s FAILED (errors=1) # commit d94ef8f cpython git:(master) $ git checkout d94ef8f Lib/email && ./python -m unittest bpo34220.py && git reset --quiet HEAD . && git checkout . .. ---------------------------------------------------------------------- Ran 2 tests in 0.017s OK Hope I am correct on the above approach and there are no C code related changes that need to be made to recompile Python. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 15:01:33 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 25 Jul 2018 19:01:33 +0000 Subject: [issue32663] SMTPUTF8SimTests are not actually being run In-Reply-To: <1516869716.21.0.467229070634.issue32663@psf.upfronthosting.co.za> Message-ID: <1532545293.81.0.56676864532.issue32663@psf.upfronthosting.co.za> R. David Murray added the comment: New changeset 48ed88a93bb0bbeaae9a4cfaa533e4edf13bcb51 by R. David Murray (chason) in branch 'master': bpo-32663 Make SMTPUTF8SimTests run (#5314) https://github.com/python/cpython/commit/48ed88a93bb0bbeaae9a4cfaa533e4edf13bcb51 ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 15:00:18 2018 From: report at bugs.python.org (Anton Patrushev) Date: Wed, 25 Jul 2018 19:00:18 +0000 Subject: [issue33193] Cannot create a venv on Windows when directory path contains dollar character In-Reply-To: <1522549543.99.0.467229070634.issue33193@psf.upfronthosting.co.za> Message-ID: <1532545218.74.0.56676864532.issue33193@psf.upfronthosting.co.za> Anton Patrushev added the comment: I found when this "feature" was implemented: gitff2d9b71547d95566416fa968872910ca9c4adb1 Part of commit message: ``` in command-line options, and in two phases at that: first, we expand 'install_base' and 'install_platbase', and then the other 'install_*' options. This lets us do tricky stuff like install --prefix='/tmp$sys_prefix' ...oooh, neat. ``` So this was intentional change in distutils. The only suggestion I have to fix this issue without break something in the wild is to suppress exception in Lib/distutils/util.py:189 and leave variable without available substitutions as it is. To be on safe side this can be even optional and disabled by default. I am newcomer so some guidance will be helpful. ---------- nosy: +Anton Patrushev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 10:21:54 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 25 Jul 2018 14:21:54 +0000 Subject: [issue28677] difficult to parse sentence structure in "When an instance attribute is referenced that isn't a data attribute" In-Reply-To: <1478986337.93.0.398450030776.issue28677@psf.upfronthosting.co.za> Message-ID: <1532528514.5.0.56676864532.issue28677@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7985 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 13:52:21 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 25 Jul 2018 17:52:21 +0000 Subject: [issue28677] difficult to parse sentence structure in "When an instance attribute is referenced that isn't a data attribute" In-Reply-To: <1478986337.93.0.398450030776.issue28677@psf.upfronthosting.co.za> Message-ID: <1532541141.64.0.56676864532.issue28677@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset ec02c58f5a6fdb06b769f53255fcb5d393812160 by Tal Einat (Miss Islington (bot)) in branch '3.7': bpo-28677: Improve phrasing of when instance attribute is referenced (GH-6208) https://github.com/python/cpython/commit/ec02c58f5a6fdb06b769f53255fcb5d393812160 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 10:22:47 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 25 Jul 2018 14:22:47 +0000 Subject: [issue28677] difficult to parse sentence structure in "When an instance attribute is referenced that isn't a data attribute" In-Reply-To: <1478986337.93.0.398450030776.issue28677@psf.upfronthosting.co.za> Message-ID: <1532528567.47.0.56676864532.issue28677@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7986 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 13:53:04 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 25 Jul 2018 17:53:04 +0000 Subject: [issue28677] difficult to parse sentence structure in "When an instance attribute is referenced that isn't a data attribute" In-Reply-To: <1478986337.93.0.398450030776.issue28677@psf.upfronthosting.co.za> Message-ID: <1532541184.89.0.56676864532.issue28677@psf.upfronthosting.co.za> Tal Einat added the comment: Thanks for the PR, Aaron! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 15:03:28 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 25 Jul 2018 19:03:28 +0000 Subject: [issue32663] SMTPUTF8SimTests are not actually being run In-Reply-To: <1516869716.21.0.467229070634.issue32663@psf.upfronthosting.co.za> Message-ID: <1532545408.66.0.56676864532.issue32663@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7994 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 13:57:39 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 25 Jul 2018 17:57:39 +0000 Subject: [issue33092] The bytecode for f-string formatting is inefficient. In-Reply-To: <1521289990.47.0.467229070634.issue33092@psf.upfronthosting.co.za> Message-ID: <1532541459.16.0.56676864532.issue33092@psf.upfronthosting.co.za> Change by Tal Einat : ---------- nosy: -taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 11:24:21 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 25 Jul 2018 15:24:21 +0000 Subject: [issue34225] distutils._msvccompiler should trim INCLUDE/LIB directories In-Reply-To: <1532530468.57.0.56676864532.issue34225@psf.upfronthosting.co.za> Message-ID: <1532532261.57.0.56676864532.issue34225@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: +patch pull_requests: +7987 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 13:57:24 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 25 Jul 2018 17:57:24 +0000 Subject: [issue33092] The bytecode for f-string formatting is inefficient. In-Reply-To: <1521289990.47.0.467229070634.issue33092@psf.upfronthosting.co.za> Message-ID: <1532541444.53.0.56676864532.issue33092@psf.upfronthosting.co.za> Tal Einat added the comment: Mark, since you have a working version of this, perhaps you can supply some performance benchmark results to help in making a decision? ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 11:35:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Jul 2018 15:35:59 +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: <1532532959.4.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? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 15:04:24 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 25 Jul 2018 19:04:24 +0000 Subject: [issue32663] SMTPUTF8SimTests are not actually being run In-Reply-To: <1516869716.21.0.467229070634.issue32663@psf.upfronthosting.co.za> Message-ID: <1532545464.3.0.56676864532.issue32663@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7995 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 10:25:25 2018 From: report at bugs.python.org (Andreas Jung) Date: Wed, 25 Jul 2018 14:25:25 +0000 Subject: [issue34224] python 3.7 inside venv tries to write back to read-only installation directory (Grammar3.7.0.final.0.pickle) Message-ID: <1532528725.67.0.56676864532.issue34224@psf.upfronthosting.co.za> New submission from Andreas Jung : I installed Python 3.7.0 from source inside /opt/python-3.7.0 (make install as root). Then I created a virtual environment for a package and tried to develop the package. Python 3.7.0 tries to create a file /opt/python-3.7.0/lib/python3.7/lib2to3/Grammar3.7.0.final.0.pickle which fails obviously because the installation directory is owned by root and is not writable for an normal user account (my-3.7) ajung at dev ~/src/zopyx.txng3.ext (master) $ /opt/python-3.7.0/bin/python3 -m venv . (my-3.7) ajung at dev ~/src/zopyx.txng3.ext (master) $ bin/python Python 3.7.0 (default, Jul 25 2018, 16:08:13) [GCC 7.3.1 20180130 (Red Hat 7.3.1-2)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> (my-3.7) ajung at dev ~/src/zopyx.txng3.ext (master) $ bin/python setup.py develop running develop running egg_info writing zopyx.txng3.ext.egg-info/PKG-INFO writing dependency_links to zopyx.txng3.ext.egg-info/dependency_links.txt writing namespace_packages to zopyx.txng3.ext.egg-info/namespace_packages.txt writing requirements to zopyx.txng3.ext.egg-info/requires.txt writing top-level names to zopyx.txng3.ext.egg-info/top_level.txt error: [Errno 13] Permission denied: '/opt/python-3.7.0/lib/python3.7/lib2to3/Grammar3.7.0.final.0.pickle' ---------- title: python 3.7 inside venv tries to write back to installation directory -> python 3.7 inside venv tries to write back to read-only installation directory (Grammar3.7.0.final.0.pickle) versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 16:19:54 2018 From: report at bugs.python.org (Doug) Date: Wed, 25 Jul 2018 20:19:54 +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: <1532549994.96.0.56676864532.issue12458@psf.upfronthosting.co.za> Change by Doug : ---------- nosy: +beck _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 15:12:46 2018 From: report at bugs.python.org (Tim Golden) Date: Wed, 25 Jul 2018 19:12:46 +0000 Subject: [issue34195] test_nt_helpers fails with case difference in drive letter In-Reply-To: <1532331695.99.0.56676864532.issue34195@psf.upfronthosting.co.za> Message-ID: <1532545966.97.0.56676864532.issue34195@psf.upfronthosting.co.za> Tim Golden added the comment: Test fixed to ignore case and volume differences between paths ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 12:54:55 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Jul 2018 16:54:55 +0000 Subject: [issue34228] Allow PYTHONTRACEMALLOC=0 and -X tracemalloc=0 to disable explicitly tracemalloc Message-ID: <1532537695.14.0.56676864532.issue34228@psf.upfronthosting.co.za> New submission from STINNER Victor : Currently, -X tracemalloc=0 command line option is reject as an invalid value. I would like to allow to explicitly disable tracemalloc. That's useful to ignore the PYTHONTRACEMALLOC environment variable: "PYTHONTRACEMALLOC=1 python3 -X tracemalloc=0" would not enable tracemalloc at startup. ---------- components: Library (Lib) messages: 322369 nosy: vstinner priority: normal severity: normal status: open title: Allow PYTHONTRACEMALLOC=0 and -X tracemalloc=0 to disable explicitly tracemalloc versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 10:36:48 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 25 Jul 2018 14:36:48 +0000 Subject: [issue34223] PYTHONDUMPREFS=1 ./python -c pass does crash In-Reply-To: <1532526817.78.0.56676864532.issue34223@psf.upfronthosting.co.za> Message-ID: <1532529408.56.0.56676864532.issue34223@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Can reproduce this on Python 3.5 and 3.6 too # Python 3.5 ? cpython git:(f497e74) $ ./python Python 3.5.6rc1+ (remotes/upstream/3.5:f497e74, Jul 25 2018, 14:32:33) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> ? cpython git:(f497e74) $ PYTHONDUMPREFS=1 ./python -c pass (...) 0x7f9bac534478 [1] 'Thread-local data' 0x7f9bac538d78 [1] (, ) 0x7f9bac5343a0 [1] 0x7f9bac53d358 [1] 0x7f9bac53d2d8 [1] 0x7f9bac53d258 [1] 0x7f9bac541288 [1] {'__getattribute__': , '__delattr__': , '__new__': , '__setattr__': , '__doc__': 'Thread-local data'} 0x7f9bac53b398 [1] (,) 0x8b1a00 [6] 0x7f9bac53d1d8 [1] 0x7f9bac537270 [1] 9116576 0x7f9bac534400 [1] 'Thread-local dummy' 0x7f9bac538c28 [1] (, ) 0x7f9bac541218 [1] {'__doc__': 'Thread-local dummy'} 0x7f9bac53b330 [1] (,) 0x8b1ba0 [2] 0x7f9bac598ef8 [1] [1] 15208 segmentation fault (core dumped) PYTHONDUMPREFS=1 ./python -c pass # Python 3.6 cpython git:(a096cc6) $ ./python Python 3.6.6+ (remotes/upstream/3.6:a096cc6, Jul 25 2018, 14:28:43) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> ? cpython git:(a096cc6) $ PYTHONDUMPREFS=1 ./python -c pass 0x7fab5a968758 [1] 0x7fab5a965310 [1] 9142112 0x7fab5a962568 [1] 'Thread-local dummy' 0x7fab5a960c28 [1] (, ) 0x7fab5a962508 [1] {'__doc__': 'Thread-local dummy'} 0x7fab5a95f128 [1] (,) 0x8b7f60 [2] 0x7fab5a9622b0 [1] {'__name__': None, '__doc__': None, '__package__': None, '__loader__': None, '__spec__': None, 'warn': None, 'warn_explicit': None, '_filters_mutated': None, 'filters': None, '_onceregistry': None, '_defaultaction': None} 0x7fab5a9686d8 [1] 0x7fab5a966740 [1] '_warnings' 0x7fab5a9497a8 [1] [1] 2975 segmentation fault (core dumped) PYTHONDUMPREFS=1 ./python -c pass Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 12:55:01 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 25 Jul 2018 16:55:01 +0000 Subject: [issue29097] [Windows] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6 In-Reply-To: <1482958160.11.0.32337159902.issue29097@psf.upfronthosting.co.za> Message-ID: <1532537701.29.0.56676864532.issue29097@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: New changeset 96d1e69a12ed8ab80203277e1abdaf573457a964 by Alexander Belopolsky (Ammar Askar) in branch 'master': bpo-29097: Forego fold detection on windows for low timestamp values (GH-2385) https://github.com/python/cpython/commit/96d1e69a12ed8ab80203277e1abdaf573457a964 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 12:55:11 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 25 Jul 2018 16:55:11 +0000 Subject: [issue29097] [Windows] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6 In-Reply-To: <1482958160.11.0.32337159902.issue29097@psf.upfronthosting.co.za> Message-ID: <1532537711.82.0.56676864532.issue29097@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7990 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 15:23:29 2018 From: report at bugs.python.org (Anton Patrushev) Date: Wed, 25 Jul 2018 19:23:29 +0000 Subject: [issue33193] Cannot create a venv on Windows when directory path contains dollar character In-Reply-To: <1522549543.99.0.467229070634.issue33193@psf.upfronthosting.co.za> Message-ID: <1532546609.72.0.56676864532.issue33193@psf.upfronthosting.co.za> Anton Patrushev added the comment: The same problem is reproducible with different but obvious way on Python 2.7. ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 14:11:20 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 25 Jul 2018 18:11:20 +0000 Subject: [issue33121] recv returning 0 on closed connection not documented In-Reply-To: <1521728108.91.0.467229070634.issue33121@psf.upfronthosting.co.za> Message-ID: <1532542280.19.0.56676864532.issue33121@psf.upfronthosting.co.za> Tal Einat added the comment: My guess would be the docs for socket.recv()[1], which indeed don't mention what the return value is after a socket has been closed, nor can I find that info elsewhere on that page. Those docs for socket generally avoid going into detail, including specifically regarding returned values. Apparently the approach is that this general note about the class explains where to look for more info: "Socket objects have the following methods. Except for makefile(), these correspond to Unix system calls applicable to sockets." Given this, I don't think adding this one small detail would be in line with the existing approach to documenting the socket class. ..[1]: https://docs.python.org/3/library/socket.html#socket.socket.recv ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 16:34:16 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 25 Jul 2018 20:34:16 +0000 Subject: [issue29097] [Windows] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6 In-Reply-To: <1482958160.11.0.32337159902.issue29097@psf.upfronthosting.co.za> Message-ID: <1532550856.3.0.56676864532.issue29097@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: New changeset 973649342cee3869409f341ff0f0e3d2b1547c2a by Alexander Belopolsky (Miss Islington (bot)) in branch '3.7': bpo-29097: Forego fold detection on windows for low timestamp values (GH-2385) (GH-8466) https://github.com/python/cpython/commit/973649342cee3869409f341ff0f0e3d2b1547c2a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 13:03:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Jul 2018 17:03:23 +0000 Subject: [issue34228] Allow PYTHONTRACEMALLOC=0 and -X tracemalloc=0 to disable explicitly tracemalloc In-Reply-To: <1532537695.14.0.56676864532.issue34228@psf.upfronthosting.co.za> Message-ID: <1532538203.9.0.56676864532.issue34228@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +7991 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 10:42:07 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 25 Jul 2018 14:42:07 +0000 Subject: [issue34223] PYTHONDUMPREFS=1 ./python -c pass does crash In-Reply-To: <1532526817.78.0.56676864532.issue34223@psf.upfronthosting.co.za> Message-ID: <1532529727.01.0.56676864532.issue34223@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Python 3.4 seems fine ? cpython git:(57b85d3) ./python Python 3.4.9rc1+ (default, Jul 25 2018, 14:39:07) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> ? cpython git:(57b85d3) time PYTHONDUMPREFS=1 ./python -c pass (...) 0x7fbe97f52110 [57] str 0x7fbe97f520a8 [57] str 0x7fbe97f52040 [39] str 0x7fbe97f50350 [23] str 0x7fbe97f502e0 [48] str 0x7fbe97f50270 [143] str 0x7fbe97f50200 [24] str 0x7fbe97f50190 [24] str 0x7fbe97f50120 [8] str 0x7fbe97f500c8 [1] dict 0x7fbe97f51040 [138] str 0x7fbe97f50058 [1] dict 0x7fbe97f4f058 [154] tuple 0x86c6e0 [381] type 0x86cb00 [31] type PYTHONDUMPREFS=1 ./python -c pass 0.08s user 0.08s system 45% cpu 0.342 total Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 11:24:20 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 25 Jul 2018 15:24:20 +0000 Subject: [issue13041] argparse: terminal width is not detected properly In-Reply-To: <1316902039.33.0.744560309521.issue13041@psf.upfronthosting.co.za> Message-ID: <1532532260.41.0.56676864532.issue13041@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 13:04:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Jul 2018 17:04:13 +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: <1532538253.49.0.56676864532.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: I created bpo-34228 "Allow PYTHONTRACEMALLOC=0 and -X tracemalloc=0 to disable explicitly tracemalloc" that I need to write unit tests on Python initiallization. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 14:16:01 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 25 Jul 2018 18:16:01 +0000 Subject: [issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords In-Reply-To: <1242980336.93.0.332167282409.issue6083@psf.upfronthosting.co.za> Message-ID: <1532542561.06.0.56676864532.issue6083@psf.upfronthosting.co.za> Tal Einat added the comment: Ivan, can you supply a PR or would you like someone else to do so? ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 11:58:34 2018 From: report at bugs.python.org (Piotr Jurkiewicz) Date: Wed, 25 Jul 2018 15:58:34 +0000 Subject: [issue34227] Weighted random.sample() (weighted sampling without replacement) Message-ID: <1532534314.27.0.56676864532.issue34227@psf.upfronthosting.co.za> New submission from Piotr Jurkiewicz : Function random.choices(), which appeared in Python 3.6, allows to perform weighted random sampling with replacement. Function random.sample() performs random sampling without replacement, but cannot do it weighted. I propose to enhance random.sample() to perform weighted sampling. That way all four possibilities will be supported: - non-weighted sampling with replacement: random.choices(..., weights=None) (exists) - weighted sampling with replacement: random.choices(..., weights=weights) (exists) - non-weighted sampling without replacement: random.sample(..., weights=None) (exists) - weighted sampling without replacement: random.sample(..., weights=weights) (NEW) Rationale: Weighted sampling without replacement is a popular problem. There are lot of questions on StackOverflow and similar sites how to implement it. Unfortunately, many proposed solutions are wrong, for example: https://stackoverflow.com/a/353510/2178047 https://softwareengineering.stackexchange.com/a/233552/161807 or have excessive computational complexity (e.g. quadratic). There are lot of suggestions to use numpy.random.choice() to do that, which supports all four possibilities with a single function: numpy.random.choice(a, size=None, replace=True, p=None) But of course this is an overkill to install numpy just to do that. I think that this should be possible with stdlib, without the need to implement it by yourself or to install numpy. Especially, that it can be implemented in 2 lines (plus 4 lines of error checking), as you can see in the PR. ---------- components: Library (Lib) messages: 322367 nosy: piotrjurkiewicz priority: normal severity: normal status: open title: Weighted random.sample() (weighted sampling without replacement) type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 09:36:57 2018 From: report at bugs.python.org (Tim Golden) Date: Wed, 25 Jul 2018 13:36:57 +0000 Subject: [issue34195] test_nt_helpers fails with case difference in drive letter In-Reply-To: <1532331695.99.0.56676864532.issue34195@psf.upfronthosting.co.za> Message-ID: <1532525817.83.0.56676864532.issue34195@psf.upfronthosting.co.za> Tim Golden added the comment: New changeset ff64add8d4be2e37c552ba702f629b0b6639cd33 by Tim Golden in branch 'master': bpo-34195: Fix case-sensitive comparison in test_nt_helpers (GH-8448) https://github.com/python/cpython/commit/ff64add8d4be2e37c552ba702f629b0b6639cd33 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 10:51:41 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 25 Jul 2018 14:51:41 +0000 Subject: [issue33524] non-ascii characters in headers causes TypeError on email.policy.Policy.fold In-Reply-To: <1526402130.36.0.682650639539.issue33524@psf.upfronthosting.co.za> Message-ID: <1532530301.18.0.56676864532.issue33524@psf.upfronthosting.co.za> Change by R. David Murray : ---------- nosy: +altvod versions: +Python 3.7, Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 08:19:20 2018 From: report at bugs.python.org (Grigory Statsenko) Date: Wed, 25 Jul 2018 12:19:20 +0000 Subject: [issue34220] Serialization of email message without header line length limit and a non-ASCII subject fails with TypeError Message-ID: <1532521160.35.0.56676864532.issue34220@psf.upfronthosting.co.za> New submission from Grigory Statsenko : I have the following code that creates a simple email message with a) a pure-ASCII subject, b) non-ASCII subject (I made it into a unittest): import email.generator import email.policy from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from unittest import TestCase def create_message(subject, sender, recipients, body): msg = MIMEMultipart() msg.set_charset('utf-8') msg.policy = email.policy.SMTP msg.attach(MIMEText(body, 'html')) msg['Subject'] = subject msg['From'] = sender msg['To'] = ';'.join(recipients) return msg class TestEmailMessage(TestCase): def _make_message(self, subject): return create_message( subject=subject, sender='me at site.com', recipients=['me at site.com'], body='Some text', ) def test_ascii_message_no_len_limit(self): # very long subject consisting of a single word subject = 'Q' * 100 msg = self._make_message(subject) self.assertTrue(str(msg)) def test_non_ascii_message_no_len_limit(self): # very long subject consisting of a single word subject = '?' * 100 msg = self._make_message(subject) self.assertTrue(str(msg)) The ASCII one passes, while the non-ASCII version fails with the following exception: Traceback (most recent call last): File "/home/grigory/.pyenv/versions/3.6.4/lib/python3.6/unittest/case.py", line 59, in testPartExecutor yield File "/home/grigory/.pyenv/versions/3.6.4/lib/python3.6/unittest/case.py", line 605, in run testMethod() File "/home/grigory/PycharmProjects/smtptest/test_message.py", line 36, in test_non_ascii_message_no_len_limit self.assertTrue(str(msg)) File "/home/grigory/.pyenv/versions/3.6.4/lib/python3.6/email/message.py", line 135, in __str__ return self.as_string() File "/home/grigory/.pyenv/versions/3.6.4/lib/python3.6/email/message.py", line 158, in as_string g.flatten(self, unixfrom=unixfrom) File "/home/grigory/.pyenv/versions/3.6.4/lib/python3.6/email/generator.py", line 116, in flatten self._write(msg) File "/home/grigory/.pyenv/versions/3.6.4/lib/python3.6/email/generator.py", line 195, in _write self._write_headers(msg) File "/home/grigory/.pyenv/versions/3.6.4/lib/python3.6/email/generator.py", line 222, in _write_headers self.write(self.policy.fold(h, v)) File "/home/grigory/.pyenv/versions/3.6.4/lib/python3.6/email/policy.py", line 183, in fold return self._fold(name, value, refold_binary=True) File "/home/grigory/.pyenv/versions/3.6.4/lib/python3.6/email/policy.py", line 205, in _fold return value.fold(policy=self) File "/home/grigory/.pyenv/versions/3.6.4/lib/python3.6/email/headerregistry.py", line 258, in fold return header.fold(policy=policy) File "/home/grigory/.pyenv/versions/3.6.4/lib/python3.6/email/_header_value_parser.py", line 144, in fold return _refold_parse_tree(self, policy=policy) File "/home/grigory/.pyenv/versions/3.6.4/lib/python3.6/email/_header_value_parser.py", line 2645, in _refold_parse_tree part.ew_combine_allowed, charset) File "/home/grigory/.pyenv/versions/3.6.4/lib/python3.6/email/_header_value_parser.py", line 2722, in _fold_as_ew first_part = to_encode[:text_space] TypeError: slice indices must be integers or None or have an __index__ method The problem is that _fold_as_ew treats maxlen as an integer, but it can also have inf and None as valid values. In my case it's inf, but None can also get there if the HTTP email policy is used and its max_line_length value is not overridden when serializing. I am supposing that the correct behavior in both of these cases should be no wrapping at all. And/or maybe one of these (inf & None) should be converted to the other at some point, so only one special case has to handled in the low-level code This behavior is new in Python 3.6. It works in 3.5. Also fails in 3.7 and 3.8 ---------- components: email messages: 322348 nosy: altvod, barry, r.david.murray priority: normal severity: normal status: open title: Serialization of email message without header line length limit and a non-ASCII subject fails with TypeError type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 10:51:04 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 25 Jul 2018 14:51:04 +0000 Subject: [issue34220] Serialization of email message without header line length limit and a non-ASCII subject fails with TypeError In-Reply-To: <1532521160.35.0.56676864532.issue34220@psf.upfronthosting.co.za> Message-ID: <1532530264.74.0.56676864532.issue34220@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the report. This is a duplicate of #33524. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> non-ascii characters in headers causes TypeError on email.policy.Policy.fold _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 11:59:48 2018 From: report at bugs.python.org (Piotr Jurkiewicz) Date: Wed, 25 Jul 2018 15:59:48 +0000 Subject: [issue34227] Weighted random.sample() (weighted sampling without replacement) In-Reply-To: <1532534314.27.0.56676864532.issue34227@psf.upfronthosting.co.za> Message-ID: <1532534388.39.0.56676864532.issue34227@psf.upfronthosting.co.za> Change by Piotr Jurkiewicz : ---------- keywords: +patch pull_requests: +7988 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 10:55:40 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Wed, 25 Jul 2018 14:55:40 +0000 Subject: [issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7 Message-ID: <1532530540.72.0.56676864532.issue34226@psf.upfronthosting.co.za> New submission from Chih-Hsuan Yen : In Python 3.7, cgi.parse_multipart() requires "CONTENT-LENGTH" in the second parameter `pdict`. This is not necesary in Python 3.6. For example, the following code runs with 3.6: $ python3.6 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 cgi, io >>> data = b'--heyDavid\r\nContent-Disposition: form-data; name="cfield"\r\n\r\njust a string\r\n\r\n--heyDavid--\r\n' >>> cgi.parse_multipart(io.BytesIO(data), {"boundary": b"heyDavid"}) {'cfield': [b'just a string\r\n']} While not on 3.7: $ python3.7 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 cgi, io >>> data = b'--heyDavid\r\nContent-Disposition: form-data; name="cfield"\r\n\r\njust a string\r\n\r\n--heyDavid--\r\n' >>> cgi.parse_multipart(io.BytesIO(data), {"boundary": b"heyDavid"}) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.7/cgi.py", line 220, in parse_multipart headers['Content-Length'] = pdict['CONTENT-LENGTH'] KeyError: 'CONTENT-LENGTH' I looked into the source code of CPython, and found CONTENT-LENGTH in nowhere but cgi.py and test_cgi.py. I guess it has the same meaning as the Content-Length header in HTTP or CONTENT_LENGTH environment variable in CGI? It would be great to document such a backward-incompatible behavior. Environment: Arch Linux with Python 3.6.6 from [extra] repo and 3.7.0 from [staging] repo. CC the author and the reviewer of issue29979, where relevant codes are introduced. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 322362 nosy: docs at python, orsenthil, quentel, yan12125 priority: normal severity: normal status: open title: cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7 type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 10:54:28 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 25 Jul 2018 14:54:28 +0000 Subject: [issue34225] distutils._msvccompiler should trim INCLUDE/LIB directories Message-ID: <1532530468.57.0.56676864532.issue34225@psf.upfronthosting.co.za> New submission from Steve Dower : _msvccompiler reads the INCLUDE and LIB environment variables when building and adds each directory to the command line. However, if any of these end with os.sep (specifically, '\'), then it will escape the quoting and break the entire command. We should rstrip(os.sep) on each item from this list. ---------- assignee: steve.dower components: Distutils, Windows messages: 322361 nosy: dstufft, eric.araujo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: distutils._msvccompiler should trim INCLUDE/LIB directories versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 13:23:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Jul 2018 17:23:56 +0000 Subject: [issue34228] Allow PYTHONTRACEMALLOC=0 and -X tracemalloc=0 to disable explicitly tracemalloc In-Reply-To: <1532537695.14.0.56676864532.issue34228@psf.upfronthosting.co.za> Message-ID: <1532539436.96.0.56676864532.issue34228@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 60b04c9f6fb87522a62ab6b95db9f8a09aef42d4 by Victor Stinner in branch 'master': bpo-34228: Allow PYTHONTRACEMALLOC=0 (GH-8467) https://github.com/python/cpython/commit/60b04c9f6fb87522a62ab6b95db9f8a09aef42d4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 08:43:24 2018 From: report at bugs.python.org (iMath) Date: Wed, 25 Jul 2018 12:43:24 +0000 Subject: [issue34221] Any plans to combine collections.OrderedDict with dict Message-ID: <1532522604.07.0.56676864532.issue34221@psf.upfronthosting.co.za> New submission from iMath : Since Python 3.7?dicts remember the order that items were inserted, so any plans to combine collections.OrderedDict with dict? https://docs.python.org/3/library/collections.html?#collections.OrderedDict https://docs.python.org/3/library/stdtypes.html#dict BTW, I think it would be better to move "Dictionaries preserve insertion order" part at the end of the doc of https://docs.python.org/3/library/stdtypes.html#dict up below the doc for class dict(**kwarg) class dict(mapping, **kwarg) class dict(iterable, **kwarg) so that people won't miss the feature when consulting the doc ---------- messages: 322349 nosy: redstone-cold priority: normal severity: normal status: open title: Any plans to combine collections.OrderedDict with dict type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 09:53:37 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Jul 2018 13:53:37 +0000 Subject: [issue34223] PYTHONDUMPREFS=1 ./python -c pass does crash Message-ID: <1532526817.78.0.56676864532.issue34223@psf.upfronthosting.co.za> New submission from STINNER Victor : It seems like Python has an invalid object somewhere. PYTHONDUMPREFS=1 makes Python crash at exit. $ PYTHONDUMPREFS=1 ./python -c pass (...) 0x7f1992292448 [1] (, ) 0x7f1992241aa8 [1] {'__doc__': 'Thread-local dummy'} 0x7f199222c740 [1] (,) 0x9c98a0 [2] 0x7f1992217dc0 [1] Segmentation fault (core dumped) ---------- components: Interpreter Core messages: 322353 nosy: vstinner priority: normal severity: normal status: open title: PYTHONDUMPREFS=1 ./python -c pass does crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 11:02:01 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 25 Jul 2018 15:02:01 +0000 Subject: [issue34223] PYTHONDUMPREFS=1 ./python -c pass does crash In-Reply-To: <1532526817.78.0.56676864532.issue34223@psf.upfronthosting.co.za> Message-ID: <1532530921.87.0.56676864532.issue34223@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Seems like this is the same as https://bugs.python.org/issue30156. Relevant commit : https://github.com/python/cpython/commit/7822f151b68e40376af657d267ff774439d9adb9 . Comment on the commit : https://github.com/python/cpython/commit/7822f151b68e40376af657d267ff774439d9adb9#commitcomment-21880815 Python 3.5.1 works fine but Python 3.5.2rc1 will crash. # Python 3.5.2rc1 crash $ git checkout v3.5.2rc1 && git clean -xdf && time ./configure --with-pydebug && make -s -j4 && PYTHONDUMPREFS=1 ./python -c pass (...) 0x7f8915f0b258 [1] 0x7f8915f0d3d8 [1] {'__setattr__': , '__doc__': 'Thread-local data', '__delattr__': , '__getattribute__': , '__new__': } 0x7f8915f09260 [1] (,) 0x8ad8e0 [6] 0x7f8915f0b1d8 [1] 0x7f8915f05270 [1] 9099904 0x7f8915f00298 [1] 'Thread-local dummy' 0x7f8915f06d78 [1] (, ) 0x7f8915f0d368 [1] {'__doc__': 'Thread-local dummy'} 0x7f8915f091f8 [1] (,) 0x8ada80 [2] 0x7f8915f0d218 [1] {'_filters_mutated': None, 'warn': None, 'warn_explicit': None, '__spec__': None, '_defaultaction': None, '__loader__': None, 'filters': None, '__package__': None, '__doc__': None, '_onceregistry': None, '__name__': None} 0x7f8915f0b158 [1] 0x7f8915f0d190 [1] '_warnings' 0x7f8915f65e28 [1] [1] 8258 segmentation fault (core dumped) PYTHONDUMPREFS=1 ./python -c pass # Python 3.5.1 works fine $ git checkout v3.5.1 && git clean -xdf && time ./configure --with-pydebug && make -s -j4 && PYTHONDUMPREFS=1 ./python -c pass (...) 0x7f60ba2e51e0 [58] str 0x7f60ba2e5178 [67] str 0x7f60ba2e5110 [58] str 0x7f60ba2e50a8 [58] str 0x7f60ba2e5040 [38] str 0x7f60ba2e3350 [22] str 0x7f60ba2e32e0 [51] str 0x7f60ba2e3270 [156] str 0x7f60ba2e3200 [22] str 0x7f60ba2e3190 [22] str 0x7f60ba2e3120 [6] str 0x7f60ba2e30c8 [1] dict 0x7f60ba2e4040 [142] str 0x7f60ba2e3058 [1] dict 0x7f60ba2e2058 [352] tuple 0x8986e0 [423] type Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 15:48:19 2018 From: report at bugs.python.org (Segev Finer) Date: Wed, 25 Jul 2018 19:48:19 +0000 Subject: [issue32663] SMTPUTF8SimTests are not actually being run In-Reply-To: <1516869716.21.0.467229070634.issue32663@psf.upfronthosting.co.za> Message-ID: <1532548099.25.0.56676864532.issue32663@psf.upfronthosting.co.za> Change by Segev Finer : ---------- nosy: +Segev Finer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 08:47:35 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 25 Jul 2018 12:47:35 +0000 Subject: [issue33139] Bdb doesn't find instruction in linecache after pdb.set_trace() following os.chdir("/tmp") In-Reply-To: <1522012227.23.0.467229070634.issue33139@psf.upfronthosting.co.za> Message-ID: <1532522855.93.0.56676864532.issue33139@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Seems related : https://bugs.python.org/issue31121 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 13:27:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Jul 2018 17:27:20 +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: <1532539640.6.0.56676864532.issue34170@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +7992 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 14:38:41 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 25 Jul 2018 18:38:41 +0000 Subject: [issue19979] Missing nested scope vars in class scope (bis) In-Reply-To: <1386970277.4.0.799872209267.issue19979@psf.upfronthosting.co.za> Message-ID: <1532543921.71.0.56676864532.issue19979@psf.upfronthosting.co.za> Tal Einat added the comment: This does indeed seem to be a duplicate of issue9226. ---------- nosy: +taleinat resolution: -> duplicate stage: test needed -> resolved status: pending -> closed superseder: -> erroneous behavior when creating classes inside a closure _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 15:48:42 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 25 Jul 2018 19:48:42 +0000 Subject: [issue29842] Make Executor.map work with infinite/large inputs correctly In-Reply-To: <1489800776.56.0.575396558681.issue29842@psf.upfronthosting.co.za> Message-ID: <1532548122.91.0.56676864532.issue29842@psf.upfronthosting.co.za> Josh Rosenberg added the comment: In response to Max's comments: >But consider the case where input is produced slower than it can be processed (`iterables` may fetch data from a database, but the callable `fn` may be a fast in-memory transformation). Now suppose the `Executor.map` is called when the pool is busy, so there'll be a delay before processing begins. In this case, the most efficient approach is to get as much input as possible while the pool is busy, since eventually (when the pool is freed up) it will become the bottleneck. This is exactly what the current implementation does. I'm not sure the "slow input iterable, fast task, competing tasks from other sources" case is all that interesting. Uses of Executor.map in the first place are usually a replacement for complex task submission; perhaps my viewpoint is blinkered, but I see the Executors used for *either* explicit use of submit *or* map, rather than mixing and matching (you might use it for both, but rarely interleave usages). Without a mix and match scenario (and importantly, a mix and match scenario where enough work is submitted before the map to occupy all workers, and very little work is submitted after the map begins to space out map tasks such that additional map input is requested while workers are idle), the smallish default prefetch is an improvement, simply by virtue of getting initial results more quickly. The solution of making a dedicated input thread would introduce quite a lot of additional complexity, well beyond what I think it justifiable for a relatively niche use case, especially one with many available workarounds, e.g. 1. Raising the prefetch count explicitly 2. Having the caller listify the iterable (similar to passing an arbitrarily huge prefetch value, with the large prefetch value having the advantage of sending work to the workers immediately, while listifying has the advantage of allowing you to handle any input exceptions up front rather than receiving them lazily during processing) 3. Use cheaper inputs (e.g. the query string, not the results of the DB query) and perform the expensive work as part of the task (after all, the whole point is to parallelize the most expensive work) 4. Using separate Executors so the manually submitted work doesn't interfere with the mapped work, and vice versa 5. Making a separate ThreadPoolExecutor to generate the expensive input values via its own map function (optionally with a larger prefetch count), e.g. instead of with SomeExecutor() as executor: for result in executor.map(func, (get_from_db(query) for query in queries)): do: with SomeExecutor() as executor, ThreadPoolExecutor() as inputexec: inputs = inputexec.map(get_from_db, queries) for result in executor.map(func, inputs): Point is, yes, there will still be niche cases where Executor.map isn't perfect, but this patch is intentionally a bit more minimal to keep the Python code base simple (no marshaling exceptions across thread boundaries) and avoid extreme behavioral changes; it has some smaller changes, e.g. it necessarily means input-iterator-triggered exceptions can be raised after some results are successfully produced, but it doesn't involve adding more implicit threading, marshaling exceptions across threads, etc. Your proposed alternative, with a thread for prefetching inputs, a thread for sending tasks, and a thread for returning results creates a number of problems: 1. As you mentioned, if no prefetch limit is imposed, memory usage remains unbounded; if the input is cheap to generate and slow to process, memory exhaustion is nearly guaranteed for infinite inputs, and more likely for "very large" inputs. I'd prefer the default arguments to be stable in (almost) all cases, rather than try to maximize performance for rare cases at the expense of stability in many cases. 2. When input generation is CPU bound, you've just introduced an additional source of unavoidable GIL contention; granted, after the GIL fixes in 3.2, GIL contention tends to hurt less (before those fixes, I could easily occupy 1.9 cores doing 0.5 cores worth of actual work with just two CPU bound threads). Particularly in the ProcessPoolExecutor case (where avoiding GIL contention is the goal), it's a little weird if you can end up with unavoidable GIL contention in the main process. 3. Exception handling from the input iterator just became a nightmare; in a "single thread performs input pulls and result yield" scenario, the exceptions from the input thread naturally bubble to the caller of Executor.map (possibly after several results have been produced, but eventually). If a separate thread is caching from the input iterator, we'd need to marshal the exception from that thread back to the thread running Executor.map so it's visible to the caller, and providing a traceback that is both accurate and useful is not obvious. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 14:39:24 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 25 Jul 2018 18:39:24 +0000 Subject: [issue9226] erroneous behavior when creating classes inside a closure In-Reply-To: <1278878196.2.0.124754685152.issue9226@psf.upfronthosting.co.za> Message-ID: <1532543964.82.0.56676864532.issue9226@psf.upfronthosting.co.za> Tal Einat added the comment: See additional discussion in the duplicate issue19979. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 07:41:19 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 25 Jul 2018 11:41:19 +0000 Subject: [issue33028] tempfile.TemporaryDirectory incorrectly documented In-Reply-To: <1520503262.87.0.467229070634.issue33028@psf.upfronthosting.co.za> Message-ID: <1532518879.41.0.56676864532.issue33028@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: On a similar note SpooledTemporaryFile is also documented as a function though it's a class. Ref : https://docs.python.org/3.8/library/tempfile.html#tempfile.SpooledTemporaryFile ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 13:32:48 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 25 Jul 2018 17:32:48 +0000 Subject: [issue28677] difficult to parse sentence structure in "When an instance attribute is referenced that isn't a data attribute" In-Reply-To: <1478986337.93.0.398450030776.issue28677@psf.upfronthosting.co.za> Message-ID: <1532539968.9.0.56676864532.issue28677@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +7993 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 12:19:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 25 Jul 2018 16:19:57 +0000 Subject: [issue34227] Weighted random.sample() (weighted sampling without replacement) In-Reply-To: <1532534314.27.0.56676864532.issue34227@psf.upfronthosting.co.za> Message-ID: <1532535597.41.0.56676864532.issue34227@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> rhettinger nosy: +mark.dickinson, rhettinger versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 10:03:57 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 25 Jul 2018 14:03:57 +0000 Subject: [issue31823] Opaque default value for close_fds argument in Popen.__init__ In-Reply-To: <1508445256.4.0.213398074469.issue31823@psf.upfronthosting.co.za> Message-ID: <1532527437.39.0.56676864532.issue31823@psf.upfronthosting.co.za> Tal Einat added the comment: ISTM that the docs need to be fixed for both 3.7+ and for 3.6. The signature is indeed awkward for 3.6, but it's too minor a detail to address considering it's no longer relevant for 3.7 and later. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) keywords: +easy nosy: +docs at python, taleinat versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 11:19:20 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 25 Jul 2018 15:19:20 +0000 Subject: [issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7 In-Reply-To: <1532530540.72.0.56676864532.issue34226@psf.upfronthosting.co.za> Message-ID: <1532531960.89.0.56676864532.issue34226@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 25 20:37:28 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 26 Jul 2018 00:37:28 +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: <1532565448.34.0.56676864532.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset ecf411c59e33d3760dbfebf6d5b4b205bcc29d5a by Victor Stinner in branch 'master': bpo-34170: Enhance _PyCoreConfig_Read() (GH-8468) https://github.com/python/cpython/commit/ecf411c59e33d3760dbfebf6d5b4b205bcc29d5a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 00:55:28 2018 From: report at bugs.python.org (Petru-Florin Mihancea) Date: Thu, 26 Jul 2018 04:55:28 +0000 Subject: [issue34229] Possible access to unintended variable in "cpython/Objects/sliceobject.c" line 116 Message-ID: <1532580928.78.0.56676864532.issue34229@psf.upfronthosting.co.za> New submission from Petru-Florin Mihancea : While experimenting with a CodeSonar plugin we develop, we noticed a potential bug in file "cpython/Objects/sliceobject.c" line 116 function PySlice_GetIndices. if (r->start == Py_None) { *start = *step < 0 ? length-1 : 0; } else { if (!PyInt_Check(r->start) && !PyLong_Check(r->step)) return -1;//HERE *start = PyInt_AsSsize_t(r->start); if (*start < 0) *start += length; } Shouldn't start field of r be used in the second check (instead of step)? In a related potential issue, in line 123, shouldn't r->stop be checked in the second verification? Thanks, Petru Florin Mihancea ---------- messages: 322394 nosy: petrum at gmail.com priority: normal severity: normal status: open title: Possible access to unintended variable in "cpython/Objects/sliceobject.c" line 116 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 01:27:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Jul 2018 05:27:09 +0000 Subject: [issue34229] Possible access to unintended variable in "cpython/Objects/sliceobject.c" line 116 In-Reply-To: <1532580928.78.0.56676864532.issue34229@psf.upfronthosting.co.za> Message-ID: <1532582829.63.0.56676864532.issue34229@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Good catch! ---------- components: +Interpreter Core keywords: +easy (C) nosy: +serhiy.storchaka stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 01:33:24 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Thu, 26 Jul 2018 05:33:24 +0000 Subject: [issue34230] crashes in pysqlite_build_row_cast_map() on memory allocation failure Message-ID: <1532583204.12.0.56676864532.issue34230@psf.upfronthosting.co.za> New submission from Sergey Fedoseev : pysqlite_build_row_cast_map() can crash on memory allocation failure: 1. it doesn't check that PyList_New() returns non-NULL 2. Py_DECREF() borrowed reference when ---------- components: Extension Modules messages: 322396 nosy: sir-sigurd priority: normal severity: normal status: open title: crashes in pysqlite_build_row_cast_map() on memory allocation failure type: crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 01:37:12 2018 From: report at bugs.python.org (Berker Peksag) Date: Thu, 26 Jul 2018 05:37:12 +0000 Subject: [issue22374] Replace contextmanager example and improve explanation In-Reply-To: <1410296292.35.0.34327651623.issue22374@psf.upfronthosting.co.za> Message-ID: <1532583432.16.0.56676864532.issue22374@psf.upfronthosting.co.za> Berker Peksag added the comment: The old tag() example has been replaced with a different example in https://github.com/python/cpython/commit/bde782bb594edffeabe978abeee2b7082ab9bc2a (bpo-33468) ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Add try-finally contextlib.contextmanager example _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 01:39:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Jul 2018 05:39:51 +0000 Subject: [issue34230] crashes in pysqlite_build_row_cast_map() on memory allocation failure In-Reply-To: <1532583204.12.0.56676864532.issue34230@psf.upfronthosting.co.za> Message-ID: <1532583591.39.0.56676864532.issue34230@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Better error handling in sqlite3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 01:42:11 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Thu, 26 Jul 2018 05:42:11 +0000 Subject: [issue34230] crashes in pysqlite_build_row_cast_map() on memory allocation failure In-Reply-To: <1532583204.12.0.56676864532.issue34230@psf.upfronthosting.co.za> Message-ID: <1532583731.53.0.56676864532.issue34230@psf.upfronthosting.co.za> Change by Sergey Fedoseev : ---------- pull_requests: +7996 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 01:54:38 2018 From: report at bugs.python.org (Berker Peksag) Date: Thu, 26 Jul 2018 05:54:38 +0000 Subject: [issue14266] pyunit script as shorthand for python -m unittest In-Reply-To: <1331586037.12.0.876793471383.issue14266@psf.upfronthosting.co.za> Message-ID: <1532584478.33.0.56676864532.issue14266@psf.upfronthosting.co.za> Berker Peksag added the comment: I agree with Ned. I've been using "python -m foo" instead of "foo" more in the past few years. pyvenv has been deprecated in Python 3.6 and its documentation now uses "python -m venv". +1 for closing this as "rejected". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 01:57:19 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 26 Jul 2018 05:57:19 +0000 Subject: [issue34229] Possible access to unintended variable in "cpython/Objects/sliceobject.c" line 116 In-Reply-To: <1532580928.78.0.56676864532.issue34229@psf.upfronthosting.co.za> Message-ID: <1532584639.18.0.56676864532.issue34229@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 01:57:25 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 26 Jul 2018 05:57:25 +0000 Subject: [issue33089] Add multi-dimensional Euclidean distance function to the math module In-Reply-To: <1521226258.78.0.467229070634.issue33089@psf.upfronthosting.co.za> Message-ID: <1532584645.94.0.56676864532.issue33089@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +7997 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 01:58:50 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Thu, 26 Jul 2018 05:58:50 +0000 Subject: [issue32788] Better error handling in sqlite3 In-Reply-To: <1518004914.65.0.467229070634.issue32788@psf.upfronthosting.co.za> Message-ID: <1532584730.63.0.56676864532.issue32788@psf.upfronthosting.co.za> Change by Sergey Fedoseev : ---------- pull_requests: +7998 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 02:00:17 2018 From: report at bugs.python.org (Berker Peksag) Date: Thu, 26 Jul 2018 06:00:17 +0000 Subject: [issue32788] Better error handling in sqlite3 In-Reply-To: <1518004914.65.0.467229070634.issue32788@psf.upfronthosting.co.za> Message-ID: <1532584817.35.0.56676864532.issue32788@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- pull_requests: -7998 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 02:19:47 2018 From: report at bugs.python.org (Berker Peksag) Date: Thu, 26 Jul 2018 06:19:47 +0000 Subject: [issue30271] Make sqlite3 statement cache optional In-Reply-To: <1493924630.07.0.362744800273.issue30271@psf.upfronthosting.co.za> Message-ID: <1532585987.95.0.56676864532.issue30271@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report. What is your use case for making the statement caching optional? Did you notice any performance improvement when you use it with newer SQLite versions? ---------- stage: -> patch review versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 02:20:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Jul 2018 06:20:28 +0000 Subject: [issue33089] Add multi-dimensional Euclidean distance function to the math module In-Reply-To: <1521226258.78.0.467229070634.issue33089@psf.upfronthosting.co.za> Message-ID: <1532586028.76.0.56676864532.issue33089@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think we should guarantee some properties: 1. The result of hypot(x, y, z, ...) shouldn't depend on the order of arguments. 2. It should be monotonic for all arguments: hypot(..., x, ...) <= hypot(..., y, ...) for abs(x) < abs(y). 3. hypot(..., inf, ...) = inf 4. hypot(..., nan, ...) = nan (if no infinities) 5. hypot(x, x, x, x) == 2*abs(x) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 02:25:36 2018 From: report at bugs.python.org (XiangSong Zeng) Date: Thu, 26 Jul 2018 06:25:36 +0000 Subject: [issue23794] http package should support HTTP/2 In-Reply-To: <1427479110.25.0.801999785412.issue23794@psf.upfronthosting.co.za> Message-ID: <1532586336.85.0.56676864532.issue23794@psf.upfronthosting.co.za> Change by XiangSong Zeng : ---------- nosy: +zengxs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 02:25:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Jul 2018 06:25:50 +0000 Subject: [issue33089] Add multi-dimensional Euclidean distance function to the math module In-Reply-To: <1521226258.78.0.467229070634.issue33089@psf.upfronthosting.co.za> Message-ID: <1532586350.15.0.56676864532.issue33089@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: 6. hypot(x) == abs(x) 7. hypot(x, y) should return the same result as in previous Python version, e.g. should call C lib implementation. 8. hypot(x, y, 0, ...) == hypot(x, y) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 02:42:37 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 26 Jul 2018 06:42:37 +0000 Subject: [issue34227] Weighted random.sample() (weighted sampling without replacement) In-Reply-To: <1532534314.27.0.56676864532.issue34227@psf.upfronthosting.co.za> Message-ID: <1532587357.54.0.56676864532.issue34227@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thank for the suggestion and patch, but I will decline. To me, the reseviour style algorithm doesn't fit in well (with the slow sorting step and the frequent calls to the random in the key function). For large population sizes (which sample() was designed for), the API and algorithm perform badly. For typical student "urn problems", the better approach is to pre-weight the population by the exact counts specified in the problem. I recommend that you post a recipe for what you want to do, but I don't think the standard library is the place for it. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 02:46:11 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 26 Jul 2018 06:46:11 +0000 Subject: [issue34221] Any plans to combine collections.OrderedDict with dict In-Reply-To: <1532522604.07.0.56676864532.issue34221@psf.upfronthosting.co.za> Message-ID: <1532587571.42.0.56676864532.issue34221@psf.upfronthosting.co.za> Raymond Hettinger added the comment: See the related discussion on python-dev and other tracker entries where this was discussed previously. ---------- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 02:53:54 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 26 Jul 2018 06:53:54 +0000 Subject: [issue34210] Small improvements in heapq (refactoring) In-Reply-To: <1532444780.82.0.56676864532.issue34210@psf.upfronthosting.co.za> Message-ID: <1532588034.15.0.56676864532.issue34210@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Additional notes: * reversed() is preferred over the range(n-1, -1, -1) style both for clarity and speed. If reversed is slower, then it would be mean that something is sly wrong with range.__reversed__ which should be able to iterate backwards as fast as range.__iter__ can go forwards (in part because they would use substantially the same code). * Minor PEP 8 whitespace changes are generally not accepted. Usually, the code churn isn't worth it. * [:n] is superfluous but it serves as a nice reminder of the definition of the function and will prevent a bug when I tweak the cut-over point from n >= size to some large fraction of the size (a change I'm currently considering). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 03:07:01 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 26 Jul 2018 07:07:01 +0000 Subject: [issue34229] Possible access to unintended variable in "cpython/Objects/sliceobject.c" line 116 In-Reply-To: <1532580928.78.0.56676864532.issue34229@psf.upfronthosting.co.za> Message-ID: <1532588821.63.0.56676864532.issue34229@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Is there a way to test this or trigger this code using Python syntax? `slice(start, stop, step).indices()` uses slice_indices in Objects/sliceobject.c . I checked the function docs https://docs.python.org/2.7/c-api/slice.html#c.PySlice_GetIndices and it states below > You probably do not want to use this function. If you want to use slice objects in versions of Python prior to 2.3, you would probably do well to incorporate the source of PySlice_GetIndicesEx(), suitably renamed, in the source of your extension. I couldn't see it's usage too anywhere and with Python 3 we have all integers are implemented as ?long? integer objects of arbitrary size and can see only PyLong_Check at https://github.com/python/cpython/blob/master/Objects/sliceobject.c#L178 Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 03:21:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Jul 2018 07:21:32 +0000 Subject: [issue34229] Possible access to unintended variable in "cpython/Objects/sliceobject.c" line 116 In-Reply-To: <1532580928.78.0.56676864532.issue34229@psf.upfronthosting.co.za> Message-ID: <1532589692.94.0.56676864532.issue34229@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You need to expose it in the _testcapi module as Python function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 04:06:59 2018 From: report at bugs.python.org (Berker Peksag) Date: Thu, 26 Jul 2018 08:06:59 +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: <1532592419.9.0.56676864532.issue29036@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 04:18:18 2018 From: report at bugs.python.org (Berker Peksag) Date: Thu, 26 Jul 2018 08:18:18 +0000 Subject: [issue28536] Show the qualified name when a call fails In-Reply-To: <1477432049.19.0.837809051965.issue28536@psf.upfronthosting.co.za> Message-ID: <1532593098.95.0.56676864532.issue28536@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- stage: -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 04:53:13 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 26 Jul 2018 08:53:13 +0000 Subject: [issue34228] Allow PYTHONTRACEMALLOC=0 and -X tracemalloc=0 to disable explicitly tracemalloc In-Reply-To: <1532537695.14.0.56676864532.issue34228@psf.upfronthosting.co.za> Message-ID: <1532595193.34.0.56676864532.issue34228@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't think that it's worth it to backport this change. It's really a corner case and it's almsot a bugfix. I mostly need it for testing _PyCoreConfig and Python initialisation. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 04:53:13 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 26 Jul 2018 08:53:13 +0000 Subject: [issue34231] PYTHONBREAKPOINT is not documented with python --help Message-ID: <1532595193.74.0.56676864532.issue34231@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- assignee: matrixise nosy: matrixise priority: normal severity: normal status: open title: PYTHONBREAKPOINT is not documented with python --help versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 04:56:57 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 26 Jul 2018 08:56:57 +0000 Subject: [issue34231] PYTHONBREAKPOINT is not documented with python --help Message-ID: <1532595417.35.0.56676864532.issue34231@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- keywords: +patch pull_requests: +7999 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 05:05:40 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 26 Jul 2018 09:05:40 +0000 Subject: [issue34231] PYTHONBREAKPOINT is not documented with python --help Message-ID: <1532595940.24.0.56676864532.issue34231@psf.upfronthosting.co.za> New submission from St?phane Wirtel : there is no documentation about PYTHONBREAKPOINT when we execute python --help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 06:14:29 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 26 Jul 2018 10:14:29 +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: <1532600069.6.0.56676864532.issue34170@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +8000 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 06:15:52 2018 From: report at bugs.python.org (Wolfgang Maier) Date: Thu, 26 Jul 2018 10:15:52 +0000 Subject: [issue34232] Python3.7.0 exe installers (32 and 64 bit) failing on Windows7 Message-ID: <1532600152.06.0.56676864532.issue34232@psf.upfronthosting.co.za> New submission from Wolfgang Maier : System: Windows7 Enterprise SP1 64-bit Downloaded the executable installer from python.org (tried both 32- and 64-bit -> same error) Selected the default user-install and got an almost immediate Error message: The TARGETDIR variable must be provided when invoking this installer. Clicking OK reveals 0x80070643 - Fatal error during installation and the attached log file. Rebooting didn't help and I also tried playing with custom installation settings, too, but no success so far. ---------- components: Installation messages: 322409 nosy: steve.dower, wolma priority: normal severity: normal status: open title: Python3.7.0 exe installers (32 and 64 bit) failing on Windows7 versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 06:16:18 2018 From: report at bugs.python.org (Wolfgang Maier) Date: Thu, 26 Jul 2018 10:16:18 +0000 Subject: [issue34232] Python3.7.0 exe installers (32 and 64 bit) failing on Windows7 In-Reply-To: <1532600152.06.0.56676864532.issue34232@psf.upfronthosting.co.za> Message-ID: <1532600178.15.0.56676864532.issue34232@psf.upfronthosting.co.za> Change by Wolfgang Maier : Added file: https://bugs.python.org/file47712/Python 3.7.0 (64-bit)_20180726120531.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 06:21:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Jul 2018 10:21:13 +0000 Subject: [issue34197] Make csv.Dialect attributes skipinitialspace, doublequote and strict booleans In-Reply-To: <1532343988.37.0.56676864532.issue34197@psf.upfronthosting.co.za> Message-ID: <1532600473.34.0.56676864532.issue34197@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 323748ad7446c76972c80dbbf510534dc5c22ae8 by Serhiy Storchaka in branch 'master': bpo-34197: Make _csv.Dialect attributes booleans. (GH-8440) https://github.com/python/cpython/commit/323748ad7446c76972c80dbbf510534dc5c22ae8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 06:22:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Jul 2018 10:22:18 +0000 Subject: [issue20260] Argument Clinic: add unsigned integers converters In-Reply-To: <1389720718.78.0.860738296491.issue20260@psf.upfronthosting.co.za> Message-ID: <1532600538.74.0.56676864532.issue20260@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 7cb7bcff20a386bba59cbc51e2419542de358bd2 by Serhiy Storchaka in branch 'master': bpo-20260: Implement non-bitwise unsigned int converters for Argument Clinic. (GH-8434) https://github.com/python/cpython/commit/7cb7bcff20a386bba59cbc51e2419542de358bd2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 06:23:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Jul 2018 10:23:06 +0000 Subject: [issue34201] Make ndarray.readonly a bool In-Reply-To: <1532354482.59.0.56676864532.issue34201@psf.upfronthosting.co.za> Message-ID: <1532600586.03.0.56676864532.issue34201@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset e0d67f17ccb4645ff88c9a018679b8a5b4fe0a7e by Serhiy Storchaka in branch 'master': bpo-34201: Make ndarray.readonly a bool and use stricter tests in test_buffer. (GH-8414) https://github.com/python/cpython/commit/e0d67f17ccb4645ff88c9a018679b8a5b4fe0a7e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 06:44:12 2018 From: report at bugs.python.org (sanjay patel) Date: Thu, 26 Jul 2018 10:44:12 +0000 Subject: [issue34233] subprocess.check_output goes to infinte loop Message-ID: <1532601852.46.0.56676864532.issue34233@psf.upfronthosting.co.za> New submission from sanjay patel : Below snipped goes to infinite loop when running through windows command prompt but works in python IDLE import subprocess subprocess.check_output('cmd.exe dir', stderr=subprocess.STDOUT) save as:test.py in windows cmd use command: python test.py then it goes to infine loop but the same program works in Python IDLE. ---------- components: Library (Lib) messages: 322413 nosy: sanjay patel priority: normal severity: normal status: open title: subprocess.check_output goes to infinte loop type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 07:23:16 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 26 Jul 2018 11:23:16 +0000 Subject: [issue34225] distutils._msvccompiler should trim INCLUDE/LIB directories In-Reply-To: <1532530468.57.0.56676864532.issue34225@psf.upfronthosting.co.za> Message-ID: <1532604196.41.0.56676864532.issue34225@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 5473f061f518aef5367a535999a407305fb12aff by Steve Dower in branch 'master': bpo-34225: Ensure INCLUDE and LIB directories do not end with a backslash. (GH-8464) https://github.com/python/cpython/commit/5473f061f518aef5367a535999a407305fb12aff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 07:26:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Jul 2018 11:26:19 +0000 Subject: [issue34201] Make ndarray.readonly a bool In-Reply-To: <1532354482.59.0.56676864532.issue34201@psf.upfronthosting.co.za> Message-ID: <1532604379.28.0.56676864532.issue34201@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 Thu Jul 26 07:26:56 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 26 Jul 2018 11:26:56 +0000 Subject: [issue34225] distutils._msvccompiler should trim INCLUDE/LIB directories In-Reply-To: <1532530468.57.0.56676864532.issue34225@psf.upfronthosting.co.za> Message-ID: <1532604416.3.0.56676864532.issue34225@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +8001 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 07:28:00 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Jul 2018 11:28:00 +0000 Subject: [issue34234] Use _PyAnyInt_Check() and _PyAnyInt_CheckExact() in 2.7 Message-ID: <1532604480.11.0.56676864532.issue34234@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The proposed PR adds two private helpers #define _PyAnyInt_Check(op) (PyInt_Check(op) || PyLong_Check(op)) #define _PyAnyInt_CheckExact(op) (PyInt_CheckExact(op) || PyLong_CheckExact(op)) and make it used it in the code. This may help to avoid bugs like issue34229. ---------- components: Interpreter Core messages: 322415 nosy: benjamin.peterson, serhiy.storchaka priority: normal severity: normal status: open title: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact() in 2.7 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 07:29:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Jul 2018 11:29:44 +0000 Subject: [issue34234] Use _PyAnyInt_Check() and _PyAnyInt_CheckExact() in 2.7 In-Reply-To: <1532604480.11.0.56676864532.issue34234@psf.upfronthosting.co.za> Message-ID: <1532604584.44.0.56676864532.issue34234@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +8002 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 07:30:01 2018 From: report at bugs.python.org (Eryk Sun) Date: Thu, 26 Jul 2018 11:30:01 +0000 Subject: [issue34233] subprocess.check_output goes to infinte loop In-Reply-To: <1532601852.46.0.56676864532.issue34233@psf.upfronthosting.co.za> Message-ID: <1532604601.0.0.56676864532.issue34233@psf.upfronthosting.co.za> Eryk Sun added the comment: `cmd.exe dir` ignores the unrecognized `dir` argument and runs the interactive shell. The shell is waiting for input on stdin. You can type "exit" and press enter to return to Python. When you run this from IDLE (i.e. via pythonw.exe), there's no StandardInput handle to inherit, so subprocess executes cmd.exe with its stdin set to a closed pipe. (I don't know why a closed pipe is used. I think "NUL" would be better.) The shell exits immediately because ReadFile fails with ERROR_BROKEN_PIPE. ---------- nosy: +eryksun resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 07:32:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Jul 2018 11:32:58 +0000 Subject: [issue34234] Use _PyAnyInt_Check() and _PyAnyInt_CheckExact() in 2.7 In-Reply-To: <1532604480.11.0.56676864532.issue34234@psf.upfronthosting.co.za> Message-ID: <1532604778.86.0.56676864532.issue34234@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Most changes are made automatically by the Coccinelle (http://coccinelle.lip6.fr) script. spatch --sp-file anyint.cocci --dir . --in-place ---------- Added file: https://bugs.python.org/file47713/anyint.cocci _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 07:35:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Jul 2018 11:35:25 +0000 Subject: [issue20260] Argument Clinic: add unsigned integers converters In-Reply-To: <1389720718.78.0.860738296491.issue20260@psf.upfronthosting.co.za> Message-ID: <1532604925.69.0.56676864532.issue20260@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 07:35:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Jul 2018 11:35:42 +0000 Subject: [issue34197] Make csv.Dialect attributes skipinitialspace, doublequote and strict booleans In-Reply-To: <1532343988.37.0.56676864532.issue34197@psf.upfronthosting.co.za> Message-ID: <1532604942.86.0.56676864532.issue34197@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 Thu Jul 26 08:31:43 2018 From: report at bugs.python.org (Anton Patrushev) Date: Thu, 26 Jul 2018 12:31:43 +0000 Subject: [issue33837] Closing asyncio.Server on asyncio.ProactorEventLoop causes all active servers to stop listening In-Reply-To: <1528732780.1.0.592728768989.issue33837@psf.upfronthosting.co.za> Message-ID: <1532608303.36.0.56676864532.issue33837@psf.upfronthosting.co.za> Anton Patrushev added the comment: This issue was fixed in: git319c0345cdd8fddb49d235462e71883f1dd51b99 ---------- nosy: +apatrushev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 08:59:17 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 26 Jul 2018 12:59:17 +0000 Subject: [issue34229] Possible access to unintended variable in "cpython/Objects/sliceobject.c" line 116 In-Reply-To: <1532580928.78.0.56676864532.issue34229@psf.upfronthosting.co.za> Message-ID: <1532609957.15.0.56676864532.issue34229@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +8003 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 09:04:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Jul 2018 13:04:17 +0000 Subject: [issue34235] PyArg_ParseTupleAndKeywords: support required keyword arguments Message-ID: <1532610257.0.0.56676864532.issue34235@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : In Python the function can have 4 kinds of parameters: def f(a, b=1, *, c, d=2): 1. a is a required positional-or-keyword parameter. 2. b is an optional positional-or-keyword parameter. 3. c is a required keyword-only parameter. 4. d is an optional keyword-only parameter. But PyArg_ParseTupleAndKeywords() supports only 3 of them. Keyword-only parameters can only be optional. PyArg_ParseTupleAndKeywords(args, kwds, "O|O$O", kwlist, &a, &b, &d) This makes impossible using PyArg_ParseTupleAndKeywords() for haslib.scrypt(). Currently it parses all keyword-only arguments as optional, and checks that they are specified specially, but this does not allow to use the full power of the PyArg_Parse* API. ---------- assignee: serhiy.storchaka components: Interpreter Core messages: 322419 nosy: serhiy.storchaka priority: normal severity: normal status: open title: PyArg_ParseTupleAndKeywords: support required keyword arguments type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 09:14:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Jul 2018 13:14:25 +0000 Subject: [issue34201] Make ndarray.readonly a bool In-Reply-To: <1532354482.59.0.56676864532.issue34201@psf.upfronthosting.co.za> Message-ID: <1532610865.45.0.56676864532.issue34201@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +8004 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 09:22:53 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 26 Jul 2018 13:22:53 +0000 Subject: [issue34231] PYTHONBREAKPOINT is not documented with python --help In-Reply-To: <1532595940.24.0.56676864532.issue34231@psf.upfronthosting.co.za> Message-ID: <1532611373.24.0.56676864532.issue34231@psf.upfronthosting.co.za> St?phane Wirtel added the comment: just updated the python man page ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 09:29:56 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 26 Jul 2018 13:29:56 +0000 Subject: [issue34231] PYTHONBREAKPOINT is not documented with python --help In-Reply-To: <1532595940.24.0.56676864532.issue34231@psf.upfronthosting.co.za> Message-ID: <1532611796.52.0.56676864532.issue34231@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- components: +Documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 09:35:28 2018 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 26 Jul 2018 13:35:28 +0000 Subject: [issue32083] sqlite3 Cursor.description can't return column types In-Reply-To: <1511183323.28.0.213398074469.issue32083@psf.upfronthosting.co.za> Message-ID: <1532612128.91.0.56676864532.issue32083@psf.upfronthosting.co.za> Zackery Spytz added the comment: This seems to be a duplicate of #11691. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 09:40:08 2018 From: report at bugs.python.org (Anton Patrushev) Date: Thu, 26 Jul 2018 13:40:08 +0000 Subject: [issue31830] asyncio.create_subprocess_exec doesn't capture all stdout output Message-ID: <1532612408.7.0.56676864532.issue31830@psf.upfronthosting.co.za> New submission from Anton Patrushev : The issue is invalid. I just added the following lines to the end of your main: ``` line = await asyncio.wait_for(process.stderr.readline(), 10) print(line) ``` and got additional info: ``` b'/bin/bash: echo local: command not found\n' ``` So the problem is not in asyncio. ---------- nosy: +apatrushev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 09:42:17 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 26 Jul 2018 13:42:17 +0000 Subject: [issue34236] Test6012 in test_capi is not run as part of make test Message-ID: <1532612537.28.0.56676864532.issue34236@psf.upfronthosting.co.za> New submission from Karthikeyan Singaravelan : Test6012 is not run as part of make test since it's not added to support.run_unittest at the end of the file. Hence running the test as a single file causes error. It seems argparsing related test which is a part of _testcapi.module.c in Python 3 branch was not cleanly backported and I tried backporting it but it requires PyUnicode_FSConverter which I think is Python 3 only. Since the test was not running during make test there was no error about this during backporting during merge. Relevant backport commit : ef19fd200d0768919f1658466f8b6080b191fba0 # No argparsing defined in _testcapimodule.c ? cpython git:(1c8f655) grep -inr argparsing * Lib/test/test_capi.py:108: self.assertEqual(_testcapi.argparsing("Hello", "World"), 1) ? cpython git:(1c8f655) grep -inr PyUnicode_FSConverter * # Test case failure ? cpython git:(1c8f655) ./python -m unittest -v test.test_capi test_buildvalue_N (test.test_capi.CAPITest) ... ok test_bad_use (test.test_capi.SkipitemTest) ... ok test_parse_tuple_and_keywords (test.test_capi.SkipitemTest) ... ok test_skipitem (test.test_capi.SkipitemTest) ... ok test_skipitem_with_suffix (test.test_capi.SkipitemTest) ... ok test (test.test_capi.Test6012) ... ERROR test_pendingcalls_non_threaded (test.test_capi.TestPendingCalls) ... ok test_pendingcalls_threaded (test.test_capi.TestPendingCalls) ... ok test_thread_state (test.test_capi.TestThreadState) ... ok ====================================================================== ERROR: test (test.test_capi.Test6012) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/Lib/test/test_capi.py", line 108, in test self.assertEqual(_testcapi.argparsing("Hello", "World"), 1) AttributeError: 'module' object has no attribute 'argparsing' ---------------------------------------------------------------------- Ran 9 tests in 2.753s FAILED (errors=1) # Test passes because Test6012 is not added to support.run_unittest ? cpython git:(1c8f655) ./python Lib/test/test_capi.py internal test_L_code internal test_broken_memoryview internal test_buildvalue_N internal test_capsule internal test_config internal test_datetime_capi internal test_dict_iteration internal test_empty_argparse internal test_from_contiguous internal test_k_code internal test_lazy_hash_inheritance internal test_list_api internal test_long_and_overflow internal test_long_api internal test_long_long_and_overflow internal test_long_numbits internal test_longlong_api internal test_null_strings internal test_string_from_format internal test_to_contiguous internal test_u_code internal test_widechar internal test_with_docstring test_buildvalue_N (__main__.CAPITest) ... ok test_pendingcalls_non_threaded (__main__.TestPendingCalls) ... ok test_pendingcalls_threaded (__main__.TestPendingCalls) ... ok test_bad_use (__main__.SkipitemTest) ... ok test_parse_tuple_and_keywords (__main__.SkipitemTest) ... ok test_skipitem (__main__.SkipitemTest) ... ok test_skipitem_with_suffix (__main__.SkipitemTest) ... ok test_thread_state (__main__.TestThreadState) ... ok ---------------------------------------------------------------------- Ran 8 tests in 2.741s OK Adding serhiy.storchaka who did the relevant backport. Thanks ---------- components: Build messages: 322423 nosy: serhiy.storchaka, xtreak priority: normal severity: normal status: open title: Test6012 in test_capi is not run as part of make test versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 09:58:18 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 26 Jul 2018 13:58:18 +0000 Subject: [issue32663] SMTPUTF8SimTests are not actually being run In-Reply-To: <1516869716.21.0.467229070634.issue32663@psf.upfronthosting.co.za> Message-ID: <1532613498.65.0.56676864532.issue32663@psf.upfronthosting.co.za> R. David Murray added the comment: New changeset 89352b08aad447d046551fa0cd374becd7941c91 by R. David Murray (Miss Islington (bot)) in branch '3.7': bpo-32663 Make SMTPUTF8SimTests run (GH-5314) (#8471) https://github.com/python/cpython/commit/89352b08aad447d046551fa0cd374becd7941c91 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 10:02:26 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 26 Jul 2018 14:02:26 +0000 Subject: [issue32663] SMTPUTF8SimTests are not actually being run In-Reply-To: <1516869716.21.0.467229070634.issue32663@psf.upfronthosting.co.za> Message-ID: <1532613746.64.0.56676864532.issue32663@psf.upfronthosting.co.za> R. David Murray added the comment: New changeset cecbe0ade87360cd37cc1389fe33dd92f2cf52ba by R. David Murray (Miss Islington (bot)) in branch '3.6': bpo-32663 Make SMTPUTF8SimTests run (GH-5314) (#8470) https://github.com/python/cpython/commit/cecbe0ade87360cd37cc1389fe33dd92f2cf52ba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 10:03:43 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 26 Jul 2018 14:03:43 +0000 Subject: [issue32663] SMTPUTF8SimTests are not actually being run In-Reply-To: <1516869716.21.0.467229070634.issue32663@psf.upfronthosting.co.za> Message-ID: <1532613823.73.0.56676864532.issue32663@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Chason. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 10:04:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 26 Jul 2018 14:04:58 +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: <1532613898.62.0.56676864532.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d145775b451bbae549391eb49ed612fb3b03bde1 by Victor Stinner in branch 'master': bpo-34170: Cleanup pymain_read_conf() (GH-8476) https://github.com/python/cpython/commit/d145775b451bbae549391eb49ed612fb3b03bde1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 10:06:13 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 26 Jul 2018 14:06:13 +0000 Subject: [issue32814] smtplib.send_message mishandles 8BITMIME RFC 6152 In-Reply-To: <1518259581.24.0.467229070634.issue32814@psf.upfronthosting.co.za> Message-ID: <1532613973.66.0.56676864532.issue32814@psf.upfronthosting.co.za> R. David Murray added the comment: OK, the #32663 test fix I mentioned in the review is merged. ---------- versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 10:11:57 2018 From: report at bugs.python.org (Anton Patrushev) Date: Thu, 26 Jul 2018 14:11:57 +0000 Subject: [issue33678] selector_events.BaseSelectorEventLoop.sock_connect should preserve socket type In-Reply-To: <1527587007.35.0.682650639539.issue33678@psf.upfronthosting.co.za> Message-ID: <1532614317.75.0.56676864532.issue33678@psf.upfronthosting.co.za> Anton Patrushev added the comment: I created small script showing the error. ---------- nosy: +apatrushev versions: +Python 3.7 Added file: https://bugs.python.org/file47714/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 10:19:36 2018 From: report at bugs.python.org (Jonathan Fine) Date: Thu, 26 Jul 2018 14:19:36 +0000 Subject: [issue34237] faq/design: PEP 572 adds assignment expressions Message-ID: <1532614776.63.0.56676864532.issue34237@psf.upfronthosting.co.za> New submission from Jonathan Fine : The title says it all. faq/design: PEP 572 adds assignment expressions https://docs.python.org/3.8/faq/design.html#why-can-t-i-use-an-assignment-in-an-expression [Can't use] this C idiom: while (line = readline(f)) { // do something with line } https://www.python.org/dev/peps/pep-0572/ while chunk := file.read(8192): process(chunk) ---------- assignee: docs at python components: Documentation messages: 322430 nosy: docs at python, jfine2358 priority: normal severity: normal status: open title: faq/design: PEP 572 adds assignment expressions type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 10:24:19 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 26 Jul 2018 14:24:19 +0000 Subject: [issue29750] smtplib doesn't handle unicode passwords In-Reply-To: <1488919224.48.0.0966376973087.issue29750@psf.upfronthosting.co.za> Message-ID: <1532615059.38.0.56676864532.issue29750@psf.upfronthosting.co.za> Tal Einat added the comment: Never mind, I won't have time for this any time soon, better if someone else can do it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 10:25:51 2018 From: report at bugs.python.org (Berker Peksag) Date: Thu, 26 Jul 2018 14:25:51 +0000 Subject: [issue32083] sqlite3 Cursor.description can't return column types In-Reply-To: <1511183323.28.0.213398074469.issue32083@psf.upfronthosting.co.za> Message-ID: <1532615151.23.0.56676864532.issue32083@psf.upfronthosting.co.za> Berker Peksag added the comment: Good catch, Zackery, thanks! This is indeed a duplicate of issue 11691. ---------- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> sqlite3 Cursor.description doesn't set type_code _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 10:27:39 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 26 Jul 2018 14:27:39 +0000 Subject: [issue34206] Move and clarify Py_Main documentation In-Reply-To: <1532439469.19.0.56676864532.issue34206@psf.upfronthosting.co.za> Message-ID: <1532615259.77.0.56676864532.issue34206@psf.upfronthosting.co.za> Change by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 10:28:13 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 26 Jul 2018 14:28:13 +0000 Subject: [issue34206] Move and clarify Py_Main documentation In-Reply-To: <1532439469.19.0.56676864532.issue34206@psf.upfronthosting.co.za> Message-ID: <1532615293.07.0.56676864532.issue34206@psf.upfronthosting.co.za> Change by Eric Snow : ---------- nosy: +emilyemorehouse _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 11:02:12 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 26 Jul 2018 15:02:12 +0000 Subject: [issue33089] Add multi-dimensional Euclidean distance function to the math module In-Reply-To: <1521226258.78.0.467229070634.issue33089@psf.upfronthosting.co.za> Message-ID: <1532617332.15.0.56676864532.issue33089@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I don't want to make any guarantees beyond what the doc patch says. Commutativity guarantees are difficult to deliver without exact summation. A switchover to C's hypot() creates an external dependency such that we can't make any more guarantees than were given to us (which is nothing). Also, algorithmic switchovers risk impairing monotonicity. The Inf/NaN rules already existed before this patch and I believe that Mark elected to not document them on a function by function basis. Another reason not to make guarantees is that this is a "mostly good-enough patch" and I expect that either Mark or Tim will someday improve it with a "single-rounding dot product". My aim is to make it good before any effort is given to making it perfect. In the meantime, it makes little sense to guarantee implementation details. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 11:11:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Jul 2018 15:11:55 +0000 Subject: [issue33089] Add multi-dimensional Euclidean distance function to the math module In-Reply-To: <1521226258.78.0.467229070634.issue33089@psf.upfronthosting.co.za> Message-ID: <1532617915.1.0.56676864532.issue33089@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Commutativity guarantees can be delivered by sorting arguments before summation. In any case the sorting is needed for more accurate summation (from smaller to larger). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 11:43:00 2018 From: report at bugs.python.org (Anthony Sottile) Date: Thu, 26 Jul 2018 15:43:00 +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: <1532619780.19.0.56676864532.issue19891@psf.upfronthosting.co.za> Change by Anthony Sottile : ---------- keywords: +patch pull_requests: +8005 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 11:56:36 2018 From: report at bugs.python.org (Anthony Sottile) Date: Thu, 26 Jul 2018 15:56:36 +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: <1532620596.7.0.56676864532.issue19891@psf.upfronthosting.co.za> Anthony Sottile added the comment: I was able to reproduce both the `PermissionError` and the `FileNotFoundError` under these circumstances: $ docker run --user 123:123 -ti python python Python 3.7.0 (default, Jul 17 2018, 11:04:33) [GCC 6.3.0 20170516] on linux Type "help", "copyright", "credits" or "license" for more information. >>> Error in atexit._run_exitfuncs: PermissionError: [Errno 13] Permission denied $ docker run --user nobody -ti python python Python 3.7.0 (default, Jul 17 2018, 11:04:33) [GCC 6.3.0 20170516] on linux Type "help", "copyright", "credits" or "license" for more information. >>> Error in atexit._run_exitfuncs: FileNotFoundError: [Errno 2] No such file or directory In the former, the home directory is `/` (not writable). In the latter, the homedir is `/nonexistent`, which, well, doesn't exist. My patch addresses both of these errors. ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 12:04:35 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 26 Jul 2018 16:04:35 +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: <1532621075.27.0.56676864532.issue34170@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +8006 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 12:19:24 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 26 Jul 2018 16:19:24 +0000 Subject: [issue34225] distutils._msvccompiler should trim INCLUDE/LIB directories In-Reply-To: <1532530468.57.0.56676864532.issue34225@psf.upfronthosting.co.za> Message-ID: <1532621964.26.0.56676864532.issue34225@psf.upfronthosting.co.za> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 12:20:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Jul 2018 16:20:36 +0000 Subject: [issue34229] Possible access to unintended variable in "cpython/Objects/sliceobject.c" line 116 In-Reply-To: <1532580928.78.0.56676864532.issue34229@psf.upfronthosting.co.za> Message-ID: <1532622036.88.0.56676864532.issue34229@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 2bea7716093012319b5e6a4260fe802b15031f21 by Serhiy Storchaka (Xtreak) in branch '2.7': bpo-34229: Check start and stop of slice object to be long when they are not int in PySlice_GetIndices (GH-8480) https://github.com/python/cpython/commit/2bea7716093012319b5e6a4260fe802b15031f21 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 12:25:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Jul 2018 16:25:53 +0000 Subject: [issue34229] Possible access to unintended variable in "cpython/Objects/sliceobject.c" line 116 In-Reply-To: <1532580928.78.0.56676864532.issue34229@psf.upfronthosting.co.za> Message-ID: <1532622353.58.0.56676864532.issue34229@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your PR Karthikeyan! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 12:27:20 2018 From: report at bugs.python.org (Segev Finer) Date: Thu, 26 Jul 2018 16:27:20 +0000 Subject: [issue32814] smtplib.send_message mishandles 8BITMIME RFC 6152 In-Reply-To: <1518259581.24.0.467229070634.issue32814@psf.upfronthosting.co.za> Message-ID: <1532622440.89.0.56676864532.issue32814@psf.upfronthosting.co.za> Segev Finer added the comment: > OK, the #32663 test fix I mentioned in the review is merged. Yeah. I already merged it in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 12:44:44 2018 From: report at bugs.python.org (Jason) Date: Thu, 26 Jul 2018 16:44:44 +0000 Subject: [issue34238] When BROWSER is set on Mac webbrowser.register_standard_browsers doesn't work Message-ID: <1532623484.23.0.56676864532.issue34238@psf.upfronthosting.co.za> New submission from Jason : Description: When BROWSER is set, webbrowser.get fails because register_standard_browsers throws an error. Work around: You can still use `webbroswer._browsers[key][1].open(url)` to open a browser. Operating system: macOS High Sierra v10.13.6 Reproduction 1: ``` ? BROWSER=lynx python3 Python 3.7.0 (default, Jul 23 2018, 20:22:55) [Clang 9.1.0 (clang-902.0.39.2)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import webbrowser >>> webbrowser.get() Traceback (most recent call last): File "", line 1, in File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/webbrowser.py", line 42, in get register_standard_browsers() File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/webbrowser.py", line 567, in register_standard_browsers cmd = _synthesize(cmdline, -1) File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/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 ``` Reproduction 2: ``` ? BROWSER=lynx python3 Python 3.7.0 (default, Jul 23 2018, 20:22:55) [Clang 9.1.0 (clang-902.0.39.2)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import webbrowser >>> webbrowser.register_standard_browsers() Traceback (most recent call last): File "", line 1, in File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/webbrowser.py", line 567, in register_standard_browsers cmd = _synthesize(cmdline, -1) File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/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 >>> webbrowser.lynx Traceback (most recent call last): File "", line 1, in AttributeError: module 'webbrowser' has no attribute 'lynx' >>> webbrowser._browsers {'macosx': [None, ], 'chrome': [None, ], 'firefox': [None, ], 'safari': [None, ], 'lynx': [None, ]} >>> webbrowser._browsers['lynx'].open('http://google.com') Traceback (most recent call last): File "", line 1, in AttributeError: 'list' object has no attribute 'open' >>> webbrowser._browsers['lynx'][1].open('http://google.com') # This works True ``` ---------- components: macOS messages: 322439 nosy: ned.deily, ograycode, ronaldoussoren priority: normal severity: normal status: open title: When BROWSER is set on Mac webbrowser.register_standard_browsers doesn't work type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 12:58:02 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 26 Jul 2018 16:58:02 +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: <1532624282.22.0.56676864532.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 56b29b6d6fa3eb32bb1533ee3f21b1e7135648a0 by Victor Stinner in branch 'master': bpo-34170, test_embed: write Py_Initialize() tests (GH-8484) https://github.com/python/cpython/commit/56b29b6d6fa3eb32bb1533ee3f21b1e7135648a0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 13:06:23 2018 From: report at bugs.python.org (Jason) Date: Thu, 26 Jul 2018 17:06:23 +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: <1532624783.13.0.56676864532.issue34238@psf.upfronthosting.co.za> Change by Jason : ---------- type: crash -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 13:28:08 2018 From: report at bugs.python.org (Tim Golden) Date: Thu, 26 Jul 2018 17:28:08 +0000 Subject: [issue34239] Convert test_bz2 to use tempfile Message-ID: <1532626088.94.0.56676864532.issue34239@psf.upfronthosting.co.za> New submission from Tim Golden : test_bz2 currently uses the test.support.TESTFN functionality which creates a temporary file local to the test directory named around the pid. This can give rise to race conditions where tests are competing with each other to delete and recreate the file. ---------- assignee: tim.golden messages: 322441 nosy: tim.golden priority: normal severity: normal status: open title: Convert test_bz2 to use tempfile type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 13:34:19 2018 From: report at bugs.python.org (Segev Finer) Date: Thu, 26 Jul 2018 17:34:19 +0000 Subject: [issue32814] smtplib.send_message mishandles 8BITMIME RFC 6152 In-Reply-To: <1518259581.24.0.467229070634.issue32814@psf.upfronthosting.co.za> Message-ID: <1532626459.62.0.56676864532.issue32814@psf.upfronthosting.co.za> Segev Finer added the comment: Merged into the PR that is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 13:43:23 2018 From: report at bugs.python.org (Tim Golden) Date: Thu, 26 Jul 2018 17:43:23 +0000 Subject: [issue34239] Convert test_bz2 to use tempfile In-Reply-To: <1532626088.94.0.56676864532.issue34239@psf.upfronthosting.co.za> Message-ID: <1532627003.69.0.56676864532.issue34239@psf.upfronthosting.co.za> Change by Tim Golden : ---------- keywords: +patch pull_requests: +8007 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 13:49:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Jul 2018 17:49:03 +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: <1532627343.36.0.56676864532.issue34238@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think it is fixed in issue31014. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 15:22:54 2018 From: report at bugs.python.org (Tim Golden) Date: Thu, 26 Jul 2018 19:22:54 +0000 Subject: [issue34240] Convert test_mmap to use tempfile Message-ID: <1532632974.46.0.56676864532.issue34240@psf.upfronthosting.co.za> New submission from Tim Golden : test_mmap currently uses the test.support.TESTFN functionality which creates a temporary file local to the test directory named around the pid. This can give rise to race conditions where tests are competing with each other to delete and recreate the file. ---------- assignee: tim.golden messages: 322444 nosy: tim.golden priority: normal severity: normal status: open title: Convert test_mmap to use tempfile versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 15:35:33 2018 From: report at bugs.python.org (vhelke) Date: Thu, 26 Jul 2018 19:35:33 +0000 Subject: [issue34241] Segfault while Django template rendering Message-ID: <1532633733.84.0.56676864532.issue34241@psf.upfronthosting.co.za> New submission from vhelke : I have found a segfault in Django 2.0 while rendering a template. Detailed info here, and instructions of how to reproduce the fault: ?https://github.com/vhelke/django-cas-crash *** Here are the traces I was able to collect. $ gdb python Program received signal SIGSEGV, Segmentation fault. 0x00007ffff711f547 in kill () at ../sysdeps/unix/syscall-template.S:81 81 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS) (gdb) py-bt Traceback (most recent call first): File "/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/utils/autoreload.py", line 303, in python_reloader os.kill(os.getpid(), -exit_code) File "/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/utils/autoreload.py", line 317, in main python_reloader(wrapped_main_func, args, kwargs) File "/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 105, in run autoreload.main(self.inner_run, None, options) File "/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 98, in handle self.run(**options) File "/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/base.py", line 335, in execute output = self.handle(*args, **options) File "/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 61, in execute super().execute(*args, **options) File "/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/base.py", line 288, in run_from_argv self.execute(*args, **cmd_options) File "/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/__init__.py", line 365, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line utility.execute() File "manage.py", line 15, in execute_from_command_line(sys.argv) (gdb) bt #0 0x00007ffff711f547 in kill () at ../sysdeps/unix/syscall-template.S:81 #1 0x000000000054c420 in os_kill_impl (module=, signal=, pid=) at ./Modules/posixmodule.c:6534 #2 os_kill (module=module at entry=, args=args at entry=0x7fffea24d5b0, nargs=) at ./Modules/clinic/posixmodule.c.h:2624 #3 0x0000000000439dcd in _PyMethodDef_RawFastCallKeywords (kwnames=0x0, nargs=0, args=0x7fffea24d5b0, self=, method=0x8c8aa0 ) at Objects/call.c:651 #4 _PyCFunction_FastCallKeywords (func=, args=args at entry=0x7fffea24d5b0, nargs=nargs at entry=2, kwnames=kwnames at entry=0x0) at Objects/call.c:730 #5 0x0000000000428f1c in call_function (kwnames=0x0, oparg=2, pp_stack=) at Python/ceval.c:4547 #6 _PyEval_EvalFrameDefault (f=, throwflag=) at Python/ceval.c:3086 #7 0x000000000041fc18 in function_code_fastcall (co=, args=, nargs=3, globals=) at Objects/call.c:283 #8 0x00000000004392f6 in _PyFunction_FastCallKeywords (func=, stack=, nargs=, kwnames=) at Objects/call.c:415 #9 0x00000000004284bc in call_function (kwnames=0x0, oparg=, pp_stack=) at Python/ceval.c:4586 #10 _PyEval_EvalFrameDefault (f=, throwflag=) at Python/ceval.c:3117 #11 0x00000000004ec058 in PyEval_EvalFrameEx (throwflag=0, f=Frame 0x7fffea3ecaf8, for file /home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/utils/autoreload.py, line 317, in main (main_func=, args=(), kwargs={'verbosity': 1, 'settings': None, 'pythonpath': None, 'traceback': False, 'no_color': False, 'addrport': None, 'use_ipv6': False, 'use_threading': True, 'use_reloader': True, 'use_static_handler': True, 'insecure_serving': False}, wrapped_main_func=)) at Python/ceval.c:547 #12 _PyEval_EvalCodeWithName (_co=, globals=, locals=locals at entry=0x0, args=, argcount=3, kwnames=0x0, kwargs=kwargs at entry=0x7fffeabfa1f0, kwcount=0, kwstep=kwstep at entry=1, defs=defs at entry=0x7fffefc93160, defcount=defcount at entry=2, kwdefs=kwdefs at entry=0x0, closure=closure at entry=0x0, name='main', qualname='main') at Python/ceval.c:3923 #13 0x0000000000439228 in _PyFunction_FastCallKeywords (func=, stack=, nargs=, kwnames=) at Objects/call.c:433 #14 0x0000000000428beb in call_function (kwnames=0x0, oparg=, pp_stack=) at Python/ceval.c:4586 #15 _PyEval_EvalFrameDefault (f=, throwflag=) at Python/ceval.c:3086 #16 0x00000000004ec058 in PyEval_EvalFrameEx (throwflag=0, f=Frame 0x7fffeabfa048, for file /home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/commands/runserver.py, line 105, in run (self=, _style_func=, ending='\n') at remote 0x7fffeb311438>, stderr=, _style_func=, ending='\n') at remote 0x7fffead2cf60>, style=, SUCCESS=, WARNING=, NOTICE=, SQL_FIELD=, SQL_COLTYPE=, SQL_KEYWORD=, SQL_TABLE=, HTTP_INFO=, HTTP_SUCCESS=, HTTP_REDIRECT=, globals=globals at entry={'__name__': 'django.core.management.commands.runserver', '__doc__': None, '__package__': 'django.core.management.commands', '__loader__': , '__spec__': , origin='/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/commands/runserver.py', loader_state=None, submodule_search_locations=None, _set_fileattr=True, _cached='/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/commands/__pycache__/runserver.cpython-37.pyc', _initializing=False) at remote 0x7fffebecf780>, '__file__': '/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/commands/runserver.py', '__cached__': '/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages...(truncated), locals=locals at entry=0x0, args=args at entry=0x7fffffffc560, argcount=argcount at entry=1, kwnames=kwnames at entry=0x7fffea234e60, kwargs=kwargs at entry=0x7fffea234e68, kwcount=22, kwcount at entry=11, kwstep=kwstep at entry=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name='run', qualname='Command.run') at Python/ceval.c:3923 #18 0x0000000000439017 in _PyFunction_FastCallDict (func=func at entry=, args=args at entry=0x7fffffffc560, nargs=nargs at entry=1, kwargs=kwargs at entry={'verbosity': 1, 'settings': None, 'pythonpath': None, 'traceback': False, 'no_color': False, 'addrport': None, 'use_ipv6': False, 'use_threading': True, 'use_reloader': True, 'use_static_handler': True, 'insecure_serving': False}) at Objects/call.c:376 #19 0x000000000043c739 in _PyObject_FastCallDict ( kwargs={'verbosity': 1, 'settings': None, 'pythonpath': None, 'traceback': False, 'no_color': False, 'addrport': None, 'use_ipv6': False, 'use_threading': True, 'use_reloader': True, 'use_static_handler': True, 'insecure_serving': False}, nargs=1, args=0x7fffffffc560, callable=) at Objects/call.c:98 #20 _PyObject_Call_Prepend (callable=, obj=, args=(), kwargs={'verbosity': 1, 'settings': None, 'pythonpath': None, 'traceback': False, 'no_color': False, 'addrport': None, 'use_ipv6': False, 'use_threading': True, 'use_reloader': True, 'use_static_handler': True, 'insecure_serving': False}) at Objects/call.c:904 #21 0x000000000043a628 in PyObject_Call (callable=callable at entry=, args=args at entry=(), kwargs=kwargs at entry={'verbosity': 1, 'settings': None, 'pythonpath': None, 'traceback': False, 'no_color': False, 'addrport': None, 'use_ipv6': False, 'use_threading': True, 'use_reloader': True, 'use_static_handler': True, 'insecure_serving': False}) at Objects/call.c:245 #22 0x0000000000423747 in do_call_core ( kwdict={'verbosity': 1, 'settings': None, 'pythonpath': None, 'traceback': False, 'no_color': False, 'addrport': None, 'use_ipv6': False, 'use_threading': True, 'use_reloader': True, 'use_static_handler': True, 'insecure_serving': False}, callargs=(), func=) at Python/ceval.c:4615 #23 _PyEval_EvalFrameDefault (f=, throwflag=) at Python/ceval.c:3184 ---Type to continue, or q to quit--- #24 0x00000000004ec058 in PyEval_EvalFrameEx (throwflag=0, f=Frame 0xc87188, for file /home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/commands/runserver.py, line 98, in handle (self=, _style_func=, ending='\n') at remote 0x7fffeb311438>, stderr=, _style_func=, ending='\n') at remote 0x7fffead2cf60>, style=, SUCCESS=, WARNING=, NOTICE=, SQL_FIELD=, SQL_COLTYPE=, SQL_KEYWORD=, SQL_TABLE=, HTTP_INFO=, HTTP_SUCCESS=, HTTP_REDIRECT=, H...(truncated)) at Python/ceval.c:547 #25 _PyEval_EvalCodeWithName (_co=_co at entry=, globals=globals at entry={'__name__': 'django.core.management.commands.runserver', '__doc__': None, '__package__': 'django.core.management.commands', '__loader__': , '__spec__': , origin='/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/commands/runserver.py', loader_state=None, submodule_search_locations=None, _set_fileattr=True, _cached='/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/commands/__pycache__/runserver.cpython-37.pyc', _initializing=False) at remote 0x7fffebecf780>, '__file__': '/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/commands/runserver.py', '__cached__': '/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages...(truncated), locals=locals at entry=0x0, args=args at entry=0x7fffffffc8d0, argcount=argcount at entry=1, kwnames=kwnames at entry=0x7fffea234ae0, kwargs=kwargs at entry=0x7fffea234ae8, kwcount=22, kwcount at entry=11, kwstep=kwstep at entry=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name='handle', qualname='Command.handle') at Python/ceval.c:3923 #26 0x0000000000439017 in _PyFunction_FastCallDict (func=func at entry=, args=args at entry=0x7fffffffc8d0, nargs=nargs at entry=1, kwargs=kwargs at entry={'verbosity': 1, 'settings': None, 'pythonpath': None, 'traceback': False, 'no_color': False, 'addrport': None, 'use_ipv6': False, 'use_threading': True, 'use_reloader': True, 'use_static_handler': True, 'insecure_serving': False}) at Objects/call.c:376 #27 0x000000000043c739 in _PyObject_FastCallDict ( kwargs={'verbosity': 1, 'settings': None, 'pythonpath': None, 'traceback': False, 'no_color': False, 'addrport': None, 'use_ipv6': False, 'use_threading': True, 'use_reloader': True, 'use_static_handler': True, 'insecure_serving': False}, nargs=1, args=0x7fffffffc8d0, callable=) at Objects/call.c:98 #28 _PyObject_Call_Prepend (callable=, obj=, args=(), kwargs={'verbosity': 1, 'settings': None, 'pythonpath': None, 'traceback': False, 'no_color': False, 'addrport': None, 'use_ipv6': False, 'use_threading': True, 'use_reloader': True, 'use_static_handler': True, 'insecure_serving': False}) at Objects/call.c:904 #29 0x000000000043a628 in PyObject_Call (callable=callable at entry=, args=args at entry=(), kwargs=kwargs at entry={'verbosity': 1, 'settings': None, 'pythonpath': None, 'traceback': False, 'no_color': False, 'addrport': None, 'use_ipv6': False, 'use_threading': True, 'use_reloader': True, 'use_static_handler': True, 'insecure_serving': False}) at Objects/call.c:245 #30 0x0000000000423747 in do_call_core ( kwdict={'verbosity': 1, 'settings': None, 'pythonpath': None, 'traceback': False, 'no_color': False, 'addrport': None, 'use_ipv6': False, 'use_threading': True, 'use_reloader': True, 'use_static_handler': True, 'insecure_serving': False}, callargs=(), func=) at Python/ceval.c:4615 #31 _PyEval_EvalFrameDefault (f=, throwflag=) at Python/ceval.c:3184 #32 0x00000000004ec058 in PyEval_EvalFrameEx (throwflag=0, f=Frame 0xed1ec8, for file /home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/base.py, line 335, in execute (self=, _style_func=, ending='\n') at remote 0x7fffeb311438>, stderr=, _style_func=, ending='\n') at remote 0x7fffead2cf60>, style=, SUCCESS=, WARNING=, NOTICE=, SQL_FIELD=, SQL_COLTYPE=, SQL_KEYWORD=, SQL_TABLE=, HTTP_INFO=, HTTP_SUCCESS=, HTTP_REDIRECT=, HTTP_NOT_MODI...(truncated)) at Python/ceval.c:547 #33 _PyEval_EvalCodeWithName (_co=_co at entry=, globals=globals at entry={'__name__': 'django.core.management.base', '__doc__': '\nBase classes for writing management commands (named commands which can\nbe executed through ``django-admin`` or ``manage.py``).\n', '__package__': 'django.core.management', '__loader__': , '__spec__': , origin='/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/base.py', loader_state=None, submodule_search_locations=None, _set_fileattr=True, _cached='/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/__pycache__/base.cpython-37.pyc', _initializing=False) at remote 0x7fffefd0ac50>, '__file__': '/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/base.py', '__cached__': '/home/vhelke/Envs/django-cas-crash/lib/p...(truncated), locals=locals at entry=0x0, args=args at entry=0x7fffffffcc40, argcount=argcount at entry=1, kwnames=kwnames at entry=0x7fffea234a00, kwargs=kwargs at entry=0x7fffea234a08, kwcount=22, kwcount at entry=11, kwstep=kwstep at entry=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name='execute', qualname='BaseCommand.execute') at Python/ceval.c:3923 #34 0x0000000000439017 in _PyFunction_FastCallDict (func=func at entry=, args=args at entry=0x7fffffffcc40, nargs=nargs at entry=1, kwargs=kwargs at entry={'verbosity': 1, 'settings': None, 'pythonpath': None, 'traceback': False, 'no_color': False, 'addrport': None, 'use_ipv6': False, 'use_threading': True, 'use_reloader': True, 'use_static_handler': True, 'insecure_serving': False}) at Objects/call.c:376 #35 0x000000000043c739 in _PyObject_FastCallDict ( kwargs={'verbosity': 1, 'settings': None, 'pythonpath': None, 'traceback': False, 'no_color': False, 'addrport': None, 'use_ipv6': False, 'use_threading': True, 'use_reloader': True, 'use_static_handler': Tr---Type to continue, or q to quit--- ue, 'insecure_serving': False}, nargs=1, args=0x7fffffffcc40, callable=) at Objects/call.c:98 #36 _PyObject_Call_Prepend (callable=, obj=, args=(), kwargs={'verbosity': 1, 'settings': None, 'pythonpath': None, 'traceback': False, 'no_color': False, 'addrport': None, 'use_ipv6': False, 'use_threading': True, 'use_reloader': True, 'use_static_handler': True, 'insecure_serving': False}) at Objects/call.c:904 #37 0x000000000043a628 in PyObject_Call (callable=callable at entry=, args=args at entry=(), kwargs=kwargs at entry={'verbosity': 1, 'settings': None, 'pythonpath': None, 'traceback': False, 'no_color': False, 'addrport': None, 'use_ipv6': False, 'use_threading': True, 'use_reloader': True, 'use_static_handler': True, 'insecure_serving': False}) at Objects/call.c:245 #38 0x0000000000423747 in do_call_core ( kwdict={'verbosity': 1, 'settings': None, 'pythonpath': None, 'traceback': False, 'no_color': False, 'addrport': None, 'use_ipv6': False, 'use_threading': True, 'use_reloader': True, 'use_static_handler': True, 'insecure_serving': False}, callargs=(), func=) at Python/ceval.c:4615 #39 _PyEval_EvalFrameDefault (f=, throwflag=) at Python/ceval.c:3184 #40 0x00000000004ec058 in PyEval_EvalFrameEx (throwflag=0, f=Frame 0xea1fe8, for file /home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/commands/runserver.py, line 61, in execute (self=, _style_func=, ending='\n') at remote 0x7fffeb311438>, stderr=, _style_func=, ending='\n') at remote 0x7fffead2cf60>, style=, SUCCESS=, WARNING=, NOTICE=, SQL_FIELD=, SQL_COLTYPE=, SQL_KEYWORD=, SQL_TABLE=, HTTP_INFO=, HTTP_SUCCESS=, HTTP_REDIRECT=, ...(truncated)) at Python/ceval.c:547 #41 _PyEval_EvalCodeWithName (_co=_co at entry=, globals=globals at entry={'__name__': 'django.core.management.commands.runserver', '__doc__': None, '__package__': 'django.core.management.commands', '__loader__': , '__spec__': , origin='/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/commands/runserver.py', loader_state=None, submodule_search_locations=None, _set_fileattr=True, _cached='/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/commands/__pycache__/runserver.cpython-37.pyc', _initializing=False) at remote 0x7fffebecf780>, '__file__': '/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/commands/runserver.py', '__cached__': '/home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages...(truncated), locals=locals at entry=0x0, args=args at entry=0x7fffffffcfb0, argcount=argcount at entry=1, kwnames=kwnames at entry=0x7fffea3c4d80, kwargs=kwargs at entry=0x7fffea3c4d88, kwcount=22, kwcount at entry=11, kwstep=kwstep at entry=2, defs=0x0, defcount=0, kwdefs=0x0, closure=(,), name='execute', qualname='Command.execute') at Python/ceval.c:3923 #42 0x0000000000439017 in _PyFunction_FastCallDict (func=func at entry=, args=args at entry=0x7fffffffcfb0, nargs=nargs at entry=1, kwargs=kwargs at entry={'verbosity': 1, 'settings': None, 'pythonpath': None, 'traceback': False, 'no_color': False, 'addrport': None, 'use_ipv6': False, 'use_threading': True, 'use_reloader': True, 'use_static_handler': True, 'insecure_serving': False}) at Objects/call.c:376 #43 0x000000000043c739 in _PyObject_FastCallDict ( kwargs={'verbosity': 1, 'settings': None, 'pythonpath': None, 'traceback': False, 'no_color': False, 'addrport': None, 'use_ipv6': False, 'use_threading': True, 'use_reloader': True, 'use_static_handler': True, 'insecure_serving': False}, nargs=1, args=0x7fffffffcfb0, callable=) at Objects/call.c:98 #44 _PyObject_Call_Prepend (callable=, obj=, args=(), kwargs={'verbosity': 1, 'settings': None, 'pythonpath': None, 'traceback': False, 'no_color': False, 'addrport': None, 'use_ipv6': False, 'use_threading': True, 'use_reloader': True, 'use_static_handler': True, 'insecure_serving': False}) at Objects/call.c:904 #45 0x000000000043a628 in PyObject_Call (callable=callable at entry=, args=args at entry=(), kwargs=kwargs at entry={'verbosity': 1, 'settings': None, 'pythonpath': None, 'traceback': False, 'no_color': False, 'addrport': None, 'use_ipv6': False, 'use_threading': True, 'use_reloader': True, 'use_static_handler': True, 'insecure_serving': False}) at Objects/call.c:245 #46 0x0000000000423747 in do_call_core ( kwdict={'verbosity': 1, 'settings': None, 'pythonpath': None, 'traceback': False, 'no_color': False, 'addrport': None, 'use_ipv6': False, 'use_threading': True, 'use_reloader': True, 'use_static_handler': True, 'insecure_serving': False}, callargs=(), func=) at Python/ceval.c:4615 #47 _PyEval_EvalFrameDefault (f=, throwflag=) at Python/ceval.c:3184 #48 0x000000000041fc18 in function_code_fastcall (co=, args=, nargs=2, globals=) at Objects/call.c:283 #49 0x00000000004392f6 in _PyFunction_FastCallKeywords (func=, stack=, nargs=, kwnames=) at Objects/call.c:415 #50 0x0000000000428482 in call_function (kwnames=0x0, oparg=, pp_stack=) at Python/ceval.c:4586 #51 _PyEval_EvalFrameDefault (f=, throwflag=) at Python/ceval.c:3103 #52 0x000000000041fc18 in function_code_fastcall (co=, args=, nargs=1, globals=) at Objects/call.c:283 #53 0x00000000004392f6 in _PyFunction_FastCallKeywords (func=, stack=, nargs=, kwnames=) at Objects/call.c:415 #54 0x0000000000428482 in call_function (kwnames=0x0, oparg=, pp_stack=) at Python/ceval.c:4586 #55 _PyEval_EvalFrameDefault (f=, throwflag=) at Python/ceval.c:3103 #56 0x00000000004ec058 in PyEval_EvalFrameEx (throwflag=0, ---Type to continue, or q to quit--- f=Frame 0x7ffff7f80be8, for file /home/vhelke/Envs/django-cas-crash/lib/python3.7/site-packages/django/core/management/__init__.py, line 371, in execute_from_command_line (argv=['manage.py', 'runserver'], utility=)) at Python/ceval.c:547 #57 _PyEval_EvalCodeWithName (_co=, globals=, locals=locals at entry=0x0, args=, argcount=1, kwnames=0x0, kwargs=kwargs at entry=0x7ffff7f80b70, kwcount=0, kwstep=kwstep at entry=1, defs=defs at entry=0x7fffefd82e28, defcount=defcount at entry=1, kwdefs=kwdefs at entry=0x0, closure=closure at entry=0x0, name='execute_from_command_line', qualname='execute_from_command_line') at Python/ceval.c:3923 #58 0x0000000000439228 in _PyFunction_FastCallKeywords (func=, stack=, nargs=, kwnames=) at Objects/call.c:433 #59 0x00000000004284bc in call_function (kwnames=0x0, oparg=, pp_stack=) at Python/ceval.c:4586 #60 _PyEval_EvalFrameDefault (f=, throwflag=) at Python/ceval.c:3117 #61 0x00000000004ec058 in PyEval_EvalFrameEx (throwflag=0, f=Frame 0x7ffff7f809f8, for file manage.py, line 15, in ()) at Python/ceval.c:547 #62 _PyEval_EvalCodeWithName (_co=_co at entry=, globals=globals at entry=, locals=locals at entry='manage.py', args=args at entry=0x0, argcount=argcount at entry=0, kwnames=kwnames at entry=0x0, kwargs=kwargs at entry=0x0, kwcount=kwcount at entry=0, kwstep=kwstep at entry=2, defs=defs at entry=0x0, defcount=defcount at entry=0, kwdefs=kwdefs at entry=0x0, closure=closure at entry=0x0, name=name at entry=0x0, qualname=qualname at entry=0x0) at Python/ceval.c:3923 #63 0x00000000004ec180 in PyEval_EvalCodeEx (closure=0x0, kwdefs=0x0, defcount=0, defs=0x0, kwcount=0, kws=0x0, argcount=0, args=0x0, locals=locals at entry='manage.py', globals=globals at entry=, _co=_co at entry=) at Python/ceval.c:3952 #64 PyEval_EvalCode (co=co at entry=, globals=globals at entry={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': , '__file__': 'manage.py', '__cached__': None, 'os': , 'sys': , 'execute_from_command_line': }, locals=locals at entry={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': , '__file__': 'manage.py', '__cached__': None, 'os': , 'sys': , 'execute_from_command_line': }) at Python/ceval.c:524 #65 0x0000000000526df8 in run_mod (arena=0x7ffff7fcf180, flags=0x7fffffffda20, locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': , '__file__': 'manage.py', '__cached__': None, 'os': , 'sys': , 'execute_from_command_line': }, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': , '__file__': 'manage.py', '__cached__': None, 'os': , 'sys': , 'execute_from_command_line': }, filename='manage.py', mod=0x96cae0) at Python/pythonrun.c:1035 #66 PyRun_FileExFlags (fp=0x980770, filename_str=, start=, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': , '__file__': 'manage.py', '__cached__': None, 'os': , 'sys': , 'execute_from_command_line': }, locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': , '__file__': 'manage.py', '__cached__': None, 'os': , 'sys': , 'execute_from_command_line': }, closeit=1, flags=0x7fffffffda20) at Python/pythonrun.c:988 #67 0x0000000000526fdd in PyRun_SimpleFileExFlags (fp=0x980770, filename=, closeit=1, flags=0x7fffffffda20) at Python/pythonrun.c:430 #68 0x000000000042d90c in pymain_run_file (p_cf=0x7fffffffda20, filename=0x929450 L"manage.py", fp=0x980770) at Modules/main.c:425 #69 pymain_run_filename (cf=0x7fffffffda20, pymain=0x7fffffffdb20) at Modules/main.c:1520 #70 pymain_run_python (pymain=0x7fffffffdb20) at Modules/main.c:2520 #71 pymain_main (pymain=pymain at entry=0x7fffffffdb20) at Modules/main.c:2662 #72 0x000000000042e0dc in _Py_UnixMain (argc=, argv=) at Modules/main.c:2697 #73 0x00007ffff710b445 in __libc_start_main (main=0x41fba0
, argc=3, ubp_av=0x7fffffffdd48, init=, fini=, rtld_fini=, stack_end=0x7fffffffdd38) at ../csu/libc-start.c:274 #74 0x0000000000429924 in _start () (gdb) ---------- messages: 322445 nosy: vhelke priority: normal severity: normal status: open title: Segfault while Django template rendering type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 15:38:15 2018 From: report at bugs.python.org (Tim Golden) Date: Thu, 26 Jul 2018 19:38:15 +0000 Subject: [issue34240] Convert test_mmap to use tempfile In-Reply-To: <1532632974.46.0.56676864532.issue34240@psf.upfronthosting.co.za> Message-ID: <1532633895.33.0.56676864532.issue34240@psf.upfronthosting.co.za> Change by Tim Golden : ---------- keywords: +patch pull_requests: +8008 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 15:48:50 2018 From: report at bugs.python.org (Anton Patrushev) Date: Thu, 26 Jul 2018 19:48:50 +0000 Subject: [issue32395] asyncio.StreamReader.readuntil is not general enough In-Reply-To: <1513835574.11.0.213398074469.issue32395@psf.upfronthosting.co.za> Message-ID: <1532634530.81.0.56676864532.issue32395@psf.upfronthosting.co.za> Change by Anton Patrushev : ---------- nosy: +socketpair _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 15:51:30 2018 From: report at bugs.python.org (Jonathan Fine) Date: Thu, 26 Jul 2018 19:51:30 +0000 Subject: [issue25461] Unclear language (the word ineffective) in the documentation for os.walk In-Reply-To: <1445533538.52.0.421272081658.issue25461@psf.upfronthosting.co.za> Message-ID: <1532634690.68.0.56676864532.issue25461@psf.upfronthosting.co.za> Change by Jonathan Fine : ---------- nosy: +jfine2358 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 15:55:16 2018 From: report at bugs.python.org (Jason) Date: Thu, 26 Jul 2018 19:55:16 +0000 Subject: [issue34238] When BROWSER is set on Mac webbrowser.register_standard_browsers doesn't work In-Reply-To: <1532627343.36.0.56676864532.issue34238@psf.upfronthosting.co.za> Message-ID: Jason added the comment: Serhiy, I believe you are correct. I updated my local python and it passed. However, I think there might be a bug with the implementation that doesn't correctly respect the BROWSER preference. If I do: ``` ? BROWSER=lynx python3 Python 3.7.0 (default, Jul 23 2018, 20:22:55) [Clang 9.1.0 (clang-902.0.39.2)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import webbrowser >>> webbrowser.register_standard_browsers() >>> webbrowser._tryorder ['MacOSX', 'chrome', 'firefox', 'safari', 'lynx', 'lynx'] >>> webbrowser._browsers {'macosx': [None, ], 'chrome': [None, ], 'firefox': [None, ], 'safari': [None, ], 'lynx': [None, ]} ``` Notice how the webbrowser._tryorder has two 'lynx' items and both of them are last. If you look at the comment in the code, it says that it should be prepended to _tryorder because it's the preferred browser. See https://github.com/python/cpython/blob/56b29b6d6fa3eb32bb1533ee3f21b1e7135648a0/Lib/webbrowser.py#L563 If I change `cmd = _synthesize(cmdline, preferred=False)`, line 566, to preferred=True then the output is like this: ``` >>> webbrowser._tryorder ['lynx', 'MacOSX', 'chrome', 'firefox', 'safari', 'lynx'] ``` Which I believe is closer to being correct based upon the comments in the code. Am I wrong about this, and should I open up a new bug report for it? Thanks. On Thu, Jul 26, 2018 at 1:49 PM Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > I think it is fixed in issue31014. > > ---------- > nosy: +serhiy.storchaka > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 16:11:44 2018 From: report at bugs.python.org (Vadim Pushtaev) Date: Thu, 26 Jul 2018 20:11:44 +0000 Subject: [issue29750] smtplib doesn't handle unicode passwords In-Reply-To: <1488919224.48.0.0966376973087.issue29750@psf.upfronthosting.co.za> Message-ID: <1532635904.25.0.56676864532.issue29750@psf.upfronthosting.co.za> Vadim Pushtaev added the comment: Hello. I would like to work on this, should the issue be assigned on me or this comment is enough? ---------- nosy: +Vadim Pushtaev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 16:23:23 2018 From: report at bugs.python.org (Stig Johan Berggren) Date: Thu, 26 Jul 2018 20:23:23 +0000 Subject: [issue34242] configparser: SectionProxy.get is silent on missing options Message-ID: <1532636603.09.0.56676864532.issue34242@psf.upfronthosting.co.za> New submission from Stig Johan Berggren : `get()` on a ConfigParser object behaves differently from `get()` on a section. The former raises an exception when the key does not exist and no fallback has been explicitly set. The latter returns None, with no option to raise an error for missing keys. I think this is confusing, and that both classes should have the same behaviour. I prefer raising an error, as it makes it easier to find errors such as typos in config files. In addition, the docs state that the "parser-level `get` method provides a custom, more complex interface, maintained for backwards compatibility". The SectionProxy `get` method internally uses the parser-level `get`, so it seems unlikely that it is only maintained for backwards compatibility. My proposed change is not backwards compatible, as any code that relies on a None being returned when a key does not exist would have to make this explicit through the fallback argument in `get`. Here is the current behaviour in the latest build (3.8.0a0): >>> import configparser >>> c = configparser.ConfigParser() >>> c.add_section('spam') >>> c['spam'].get('eggs') # Returns None >>> c['spam']['eggs'] Traceback (most recent call last): ... KeyError: 'eggs' >>> c.get('spam', 'eggs') Traceback (most recent call last): ... configparser.NoOptionError: No option 'eggs' in section: 'spam' >>> ---------- components: Library (Lib) messages: 322448 nosy: Stig Johan Berggren priority: normal severity: normal status: open title: configparser: SectionProxy.get is silent on missing options type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 16:27:05 2018 From: report at bugs.python.org (Stig Johan Berggren) Date: Thu, 26 Jul 2018 20:27:05 +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: <1532636825.98.0.56676864532.issue34242@psf.upfronthosting.co.za> Change by Stig Johan Berggren : ---------- keywords: +patch pull_requests: +8009 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 16:41:21 2018 From: report at bugs.python.org (Slawomir Nowaczyk) Date: Thu, 26 Jul 2018 20:41:21 +0000 Subject: [issue11594] 2to3 does not preserve line endings In-Reply-To: <1300465648.02.0.83291128633.issue11594@psf.upfronthosting.co.za> Message-ID: <1532637681.64.0.56676864532.issue11594@psf.upfronthosting.co.za> Slawomir Nowaczyk added the comment: I've just tried 2to3 in 3.7.0, and it still breaks line endings for me... Seems like one also needs to fix line 517 in refactor.py fp = io.open(filename, "w", encoding=encoding, newline='') ---------- nosy: +Slawomir Nowaczyk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 16:49:21 2018 From: report at bugs.python.org (Anton Patrushev) Date: Thu, 26 Jul 2018 20:49:21 +0000 Subject: [issue27794] setattr a read-only property; the AttributeError should show the attribute that failed In-Reply-To: <1471528639.63.0.0729109170448.issue27794@psf.upfronthosting.co.za> Message-ID: <1532638161.75.0.56676864532.issue27794@psf.upfronthosting.co.za> Change by Anton Patrushev : ---------- nosy: +apatrushev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 17:01:17 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 26 Jul 2018 21:01:17 +0000 Subject: [issue29750] smtplib doesn't handle unicode passwords In-Reply-To: <1488919224.48.0.0966376973087.issue29750@psf.upfronthosting.co.za> Message-ID: <1532638877.11.0.56676864532.issue29750@psf.upfronthosting.co.za> Tal Einat added the comment: A comment here is all that is needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 17:05:08 2018 From: report at bugs.python.org (Tim Golden) Date: Thu, 26 Jul 2018 21:05:08 +0000 Subject: [issue34239] Convert test_bz2 to use tempfile In-Reply-To: <1532626088.94.0.56676864532.issue34239@psf.upfronthosting.co.za> Message-ID: <1532639108.34.0.56676864532.issue34239@psf.upfronthosting.co.za> Tim Golden added the comment: New changeset 6a62e1d365934de82ff7c634981b3fbf218b4d5f by Tim Golden in branch 'master': bpo-34239: Convert test_bz2 to use tempfile (#8485) https://github.com/python/cpython/commit/6a62e1d365934de82ff7c634981b3fbf218b4d5f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 19:54:56 2018 From: report at bugs.python.org (zerx) Date: Thu, 26 Jul 2018 23:54:56 +0000 Subject: [issue34243] pty.spawn: inconsistent interface Message-ID: <1532649296.79.0.56676864532.issue34243@psf.upfronthosting.co.za> New submission from zerx : # spawn(argv, master_read=_read, stdin_read=_read) With stdin_read function it's possible to customize how one can read from stdin, but it makes little sense without stdout counterpart. For example, you cannot use a wrapped ssl socket to forward a terminal over secure connection, because os.write(STDOUT_FILENO, data) is not suitable for ssl sockets. The proposal is to add stdout_write argument. diff --git a/pty.py b/pty.py index e841f12..ed4a12f 100644 --- a/pty.py +++ b/pty.py @@ -126,10 +126,10 @@ def _read(fd): """Default read function.""" return os.read(fd, 1024) -def _copy(master_fd, master_read=_read, stdin_read=_read): +def _copy(master_fd, master_read=_read, stdin_read=_read, stdout_write=_writen): """Parent copy loop. Copies - pty master -> standard output (master_read) + pty master -> standard output (master_read, stdout_write) standard input -> pty master (stdin_read)""" fds = [master_fd, STDIN_FILENO] while True: @@ -139,7 +139,7 @@ def _copy(master_fd, master_read=_read, stdin_read=_read): if not data: # Reached EOF. fds.remove(master_fd) else: - os.write(STDOUT_FILENO, data) + stdout_write(STDOUT_FILENO, data) if STDIN_FILENO in rfds: data = stdin_read(STDIN_FILENO) if not data: @@ -147,7 +147,7 @@ def _copy(master_fd, master_read=_read, stdin_read=_read): else: _writen(master_fd, data) -def spawn(argv, master_read=_read, stdin_read=_read): +def spawn(argv, master_read=_read, stdin_read=_read, stdout_write=_writen): """Create a spawned process.""" if type(argv) == type(''): argv = (argv,) @@ -161,7 +161,7 @@ def spawn(argv, master_read=_read, stdin_read=_read): except tty.error: # This is the same as termios.error restore = 0 try: - _copy(master_fd, master_read, stdin_read) + _copy(master_fd, master_read, stdin_read, stdout_write) except OSError: if restore: tty.tcsetattr(STDIN_FILENO, tty.TCSAFLUSH, mode) ---------- components: Library (Lib) messages: 322452 nosy: statix priority: normal severity: normal status: open title: pty.spawn: inconsistent interface type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 21:11:45 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 27 Jul 2018 01:11:45 +0000 Subject: [issue33089] Add multi-dimensional Euclidean distance function to the math module In-Reply-To: <1521226258.78.0.467229070634.issue33089@psf.upfronthosting.co.za> Message-ID: <1532653905.33.0.56676864532.issue33089@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Commutativity guarantees can be delivered by sorting arguments before summation. No thanks -- that too expensive for such a small payoff. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 21:12:27 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 27 Jul 2018 01:12:27 +0000 Subject: [issue33089] Add multi-dimensional Euclidean distance function to the math module In-Reply-To: <1521226258.78.0.467229070634.issue33089@psf.upfronthosting.co.za> Message-ID: <1532653947.2.0.56676864532.issue33089@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- Removed message: https://bugs.python.org/msg322453 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 21:12:56 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 27 Jul 2018 01:12:56 +0000 Subject: [issue33089] Add multi-dimensional Euclidean distance function to the math module In-Reply-To: <1521226258.78.0.467229070634.issue33089@psf.upfronthosting.co.za> Message-ID: <1532653976.39.0.56676864532.issue33089@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Commutativity guarantees can be delivered by sorting arguments before summation. No thanks -- that's too expensive for such a small payoff. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 21:58:57 2018 From: report at bugs.python.org (Jimbo Jim) Date: Fri, 27 Jul 2018 01:58:57 +0000 Subject: [issue33129] Add kwarg-only option to dataclass In-Reply-To: <1521847997.9.0.467229070634.issue33129@psf.upfronthosting.co.za> Message-ID: <1532656737.33.0.56676864532.issue33129@psf.upfronthosting.co.za> Jimbo Jim added the comment: first post in bugs.python.org... are people normally scary around here? Another usecase of keyword-only arguments is that I can mix default and non-default fields in any order. This could be achieved by either marking all fields as read-only, or by implicitly adding an asterisk before the first "conflicting" non-default argument (or by translating .../etc into an asterisk). (Is it a bad idea to create a private fork of `pip install dataclasses` with implicit asterisk, purely for my own project?) ---------- nosy: +Jimbo Jim _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 21:59:22 2018 From: report at bugs.python.org (Anton Patrushev) Date: Fri, 27 Jul 2018 01:59:22 +0000 Subject: [issue34137] Add Path.lexist() to pathlib In-Reply-To: <1531825181.93.0.56676864532.issue34137@psf.upfronthosting.co.za> Message-ID: <1532656762.09.0.56676864532.issue34137@psf.upfronthosting.co.za> Change by Anton Patrushev : ---------- nosy: +apatrushev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 22:05:31 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Fri, 27 Jul 2018 02:05:31 +0000 Subject: [issue23794] http package should support HTTP/2 In-Reply-To: <1427479110.25.0.801999785412.issue23794@psf.upfronthosting.co.za> Message-ID: <1532657131.91.0.56676864532.issue23794@psf.upfronthosting.co.za> Change by Chih-Hsuan Yen : ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 22:25:07 2018 From: report at bugs.python.org (Eryk Sun) Date: Fri, 27 Jul 2018 02:25:07 +0000 Subject: [issue34240] Convert test_mmap to use tempfile In-Reply-To: <1532632974.46.0.56676864532.issue34240@psf.upfronthosting.co.za> Message-ID: <1532658307.35.0.56676864532.issue34240@psf.upfronthosting.co.za> Eryk Sun added the comment: > tests are competing with each other to delete and recreate the file When is this an issue? Each parallel test process should have its own working directory under "{TEMPDIR}/test_python_{pid}". ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 26 23:26:37 2018 From: report at bugs.python.org (Windson Yang) Date: Fri, 27 Jul 2018 03:26:37 +0000 Subject: [issue29750] smtplib doesn't handle unicode passwords In-Reply-To: <1488919224.48.0.0966376973087.issue29750@psf.upfronthosting.co.za> Message-ID: <1532661997.04.0.56676864532.issue29750@psf.upfronthosting.co.za> Windson Yang added the comment: @Vadim Pushtaev I also want to work on it. If you wanna work together. Maybe we can talk on zulipchat. :D ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 00:35:19 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 27 Jul 2018 04:35:19 +0000 Subject: [issue12743] C API marshalling doc contains XXX In-Reply-To: <1313160183.82.0.137409262179.issue12743@psf.upfronthosting.co.za> Message-ID: <1532666119.84.0.56676864532.issue12743@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset defcffdf86780e3a184ebb25dc9a7b807753d57a by Berker Peksag in branch 'master': bpo-12743: Delete comment from marshal.rst (GH-8457) https://github.com/python/cpython/commit/defcffdf86780e3a184ebb25dc9a7b807753d57a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 00:35:24 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 27 Jul 2018 04:35:24 +0000 Subject: [issue12743] C API marshalling doc contains XXX In-Reply-To: <1313160183.82.0.137409262179.issue12743@psf.upfronthosting.co.za> Message-ID: <1532666124.0.0.56676864532.issue12743@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8010 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 00:36:21 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 27 Jul 2018 04:36:21 +0000 Subject: [issue12743] C API marshalling doc contains XXX In-Reply-To: <1313160183.82.0.137409262179.issue12743@psf.upfronthosting.co.za> Message-ID: <1532666181.15.0.56676864532.issue12743@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8011 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 00:40:40 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 27 Jul 2018 04:40:40 +0000 Subject: [issue12743] C API marshalling doc contains XXX In-Reply-To: <1313160183.82.0.137409262179.issue12743@psf.upfronthosting.co.za> Message-ID: <1532666440.67.0.56676864532.issue12743@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 21ed29ac290b10d31dcac947f9246ae4d8b94a86 by Miss Islington (bot) in branch '3.7': bpo-12743: Delete comment from marshal.rst (GH-8457) https://github.com/python/cpython/commit/21ed29ac290b10d31dcac947f9246ae4d8b94a86 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 00:42:47 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 27 Jul 2018 04:42:47 +0000 Subject: [issue12743] C API marshalling doc contains XXX In-Reply-To: <1313160183.82.0.137409262179.issue12743@psf.upfronthosting.co.za> Message-ID: <1532666567.88.0.56676864532.issue12743@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 146ba436cc0457b8ef7fea8b054b9ccb15e24748 by Miss Islington (bot) in branch '3.6': bpo-12743: Delete comment from marshal.rst (GH-8457) https://github.com/python/cpython/commit/146ba436cc0457b8ef7fea8b054b9ccb15e24748 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 00:47:22 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 27 Jul 2018 04:47:22 +0000 Subject: [issue12743] C API marshalling doc contains XXX In-Reply-To: <1313160183.82.0.137409262179.issue12743@psf.upfronthosting.co.za> Message-ID: <1532666842.88.0.56676864532.issue12743@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 00:49:01 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 27 Jul 2018 04:49:01 +0000 Subject: [issue34241] Segfault while Django template rendering In-Reply-To: <1532633733.84.0.56676864532.issue34241@psf.upfronthosting.co.za> Message-ID: <1532666941.53.0.56676864532.issue34241@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 00:52:52 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 27 Jul 2018 04:52:52 +0000 Subject: [issue34239] Convert test_bz2 to use tempfile In-Reply-To: <1532626088.94.0.56676864532.issue34239@psf.upfronthosting.co.za> Message-ID: <1532667172.32.0.56676864532.issue34239@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is more reliable to use test.support.unlink(). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 01:15:40 2018 From: report at bugs.python.org (Chetan kolhe) Date: Fri, 27 Jul 2018 05:15:40 +0000 Subject: [issue34244] Add support of check logger Message-ID: <1532668540.12.0.56676864532.issue34244@psf.upfronthosting.co.za> New submission from Chetan kolhe : Add support in logging library which will check whether the logger object already created or not . Module:- logging Code:- def check_logger(self, logger_name): """ Description :- It will check whether the logger object is already present or not . :param logger_name: :return: True/False """ if Logger.manager.loggerDict.get(logger_name): return False else: return True ---------- components: Library (Lib) messages: 322462 nosy: chetankolhe priority: normal severity: normal status: open title: Add support of check logger type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 01:20:22 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 27 Jul 2018 05:20:22 +0000 Subject: [issue34244] Add support of check logger In-Reply-To: <1532668540.12.0.56676864532.issue34244@psf.upfronthosting.co.za> Message-ID: <1532668822.0.0.56676864532.issue34244@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 01:37:38 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 27 Jul 2018 05:37:38 +0000 Subject: [issue34241] Segfault while Django template rendering In-Reply-To: <1532633733.84.0.56676864532.issue34241@psf.upfronthosting.co.za> Message-ID: <1532669858.94.0.56676864532.issue34241@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Interesting. It works fine with Python 3.6 and latest master but segfaults in python 3.7.0 . I will try the latest python 3.7 branch later. # Python 3.6 on Mac (bpo34241-env) mysite git:(master) python 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. >>> # Changes made diff --git a/mysite/templates/rest_framework/login_base.html b/mysite/templates/rest_framework/login_base.html index aa91aae..48127ae 100644 --- a/mysite/templates/rest_framework/login_base.html +++ b/mysite/templates/rest_framework/login_base.html @@ -68,7 +68,7 @@ # Rendered content # python 3.8 Python 3.8.0a0 (heads/master:defcffd, Jul 27 2018, 04:59:27) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> # diff diff --git a/mysite/templates/rest_framework/login_base.html b/mysite/templates/rest_framework/login_base.html index aa91aae..48127ae 100644 --- a/mysite/templates/rest_framework/login_base.html +++ b/mysite/templates/rest_framework/login_base.html @@ -68,7 +68,7 @@ # Content rendered # Python 3.7 Python 3.7.0 (default, Jun 28 2018, 02:32:19) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> # segfaults (bpo34241-37-venv) karthi at ubuntu-s-1vcpu-1gb-blr1-01:~/django-cas-crash/mysite$ python manage.py runserver 0.0.0.0:8000 Performing system checks... System check identified no issues (0 silenced). July 27, 2018 - 05:34:36 Django version 2.0.7, using settings 'mysite.settings' Starting development server at http://0.0.0.0:8000/ Quit the server with CONTROL-C. Segmentation fault (core dumped) Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 01:39:18 2018 From: report at bugs.python.org (Eryk Sun) Date: Fri, 27 Jul 2018 05:39:18 +0000 Subject: [issue34240] Convert test_mmap to use tempfile In-Reply-To: <1532632974.46.0.56676864532.issue34240@psf.upfronthosting.co.za> Message-ID: <1532669958.14.0.56676864532.issue34240@psf.upfronthosting.co.za> Eryk Sun added the comment: To clarify, TEMPDIR in this case is from the following code in Lib/test/libregrtest/main.py: # When tests are run from the Python build directory, it is best practice # to keep the test files in a subfolder. This eases the cleanup of leftover # files using the "make distclean" command. if sysconfig.is_python_build(): TEMPDIR = sysconfig.get_config_var('abs_builddir') if TEMPDIR is None: # bpo-30284: On Windows, only srcdir is available. Using abs_builddir # mostly matters on UNIX when building Python out of the source tree, # especially when the source tree is read only. TEMPDIR = sysconfig.get_config_var('srcdir') TEMPDIR = os.path.join(TEMPDIR, 'build') else: TEMPDIR = tempfile.gettempdir() TEMPDIR = os.path.abspath(TEMPDIR) Then in class Regrtest we have: def main(self, tests=None, **kwargs): global TEMPDIR if sysconfig.is_python_build(): try: os.mkdir(TEMPDIR) except FileExistsError: pass # Define a writable temp dir that will be used as cwd while running # the tests. The name of the dir includes the pid to allow parallel # testing (see the -j option). test_cwd = 'test_python_{}'.format(os.getpid()) test_cwd = os.path.join(TEMPDIR, test_cwd) # Run the tests in a context manager that temporarily changes the CWD to a # temporary and writable directory. If it's not possible to create or # change the CWD, the original CWD will be used. The original CWD is # available from support.SAVEDCWD. with support.temp_cwd(test_cwd, quiet=True): self._main(tests, kwargs) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 01:59:16 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 27 Jul 2018 05:59:16 +0000 Subject: [issue34241] Segfault while Django template rendering In-Reply-To: <1532633733.84.0.56676864532.issue34241@psf.upfronthosting.co.za> Message-ID: <1532671156.74.0.56676864532.issue34241@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Not reproducible in latest 3.7 branch. Search for "django segmentation fault" returns me https://bugs.python.org/issue34087 which is also unicode related and contains a django test project . I hope the related ticket is the one. From https://github.com/python/cpython/pull/8280 it's a regression in 3.7 and it doesn't affect 3.6. Feel free to close this if they are related. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 02:33:51 2018 From: report at bugs.python.org (vhelke) Date: Fri, 27 Jul 2018 06:33:51 +0000 Subject: [issue34241] Segfault while Django template rendering In-Reply-To: <1532633733.84.0.56676864532.issue34241@psf.upfronthosting.co.za> Message-ID: <1532673231.45.0.56676864532.issue34241@psf.upfronthosting.co.za> vhelke added the comment: It certainly seems like https://bugs.python.org/issue34087 is related. I can also verify that Python 3.7.0+ (latest of now) does not have the problem anymore. I am closing this ticket now. Thank you for looking over this issue. Cheers! ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 02:38:18 2018 From: report at bugs.python.org (Peter McCormick) Date: Fri, 27 Jul 2018 06:38:18 +0000 Subject: [issue28909] Adding LTTng-UST tracing support In-Reply-To: <1481227474.94.0.337411886613.issue28909@psf.upfronthosting.co.za> Message-ID: <1532673498.29.0.56676864532.issue28909@psf.upfronthosting.co.za> Peter McCormick added the comment: I would like to propose the following patch[0] which generalizes the `PyDTrace_*` definitions to a more generic `PyProbe` structure, in anticipation of including LTTng support side-by-side with the existing DTrace support. A couple of argument types in `Include/pydtrace.h` were also changed to match those in `Include/pydtrace.d`. I can split that out to a separate, pre-PyProbe patch if that would be preferred. Some of the `*_ENABLED()` calls were reorganized such that they will actually be invoked twice (specifically in `Python/ceval.c` were the enabled check was used prior to calling helper functions, which then eventually invoked the DTrace macros.) If this won't work, we could add a sequence of guarded-by-ifdef-instead-of-enabled calls to ensure that there will only ever be one instance of any given `PyDTrace_*_ENABLED()` call. I've tested compilation on macOS with and without DTrace configured. Feedback and comments would be most welcome! Thanks, Peter [0] https://github.com/pdmccormick/cpython/commit/1e399f5ec381276b52e6a4f5a755fc0f23bd6d97 [1] https://github.com/pdmccormick/cpython/tree/bpo-28909-pyprobe-refactor ---------- versions: +Python 3.8 -Python 3.7 Added file: https://bugs.python.org/file47715/bpo-28909-pyprobe-refactor-20180727.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 02:47:48 2018 From: report at bugs.python.org (Vadim Pushtaev) Date: Fri, 27 Jul 2018 06:47:48 +0000 Subject: [issue29750] smtplib doesn't handle unicode passwords In-Reply-To: <1488919224.48.0.0966376973087.issue29750@psf.upfronthosting.co.za> Message-ID: <1532674068.72.0.56676864532.issue29750@psf.upfronthosting.co.za> Vadim Pushtaev added the comment: That's OK, you can do it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 03:48:30 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 27 Jul 2018 07:48:30 +0000 Subject: [issue34245] Python library should be installed writable Message-ID: <1532677710.44.0.56676864532.issue34245@psf.upfronthosting.co.za> New submission from Jeroen Demeyer : In Makefile.pre.in, there is this: # Shared libraries must be installed with executable mode on some systems; # rather than figuring out exactly which, we always give them executable mode. # Also, making them read-only seems to be a good idea... INSTALL_SHARED= ${INSTALL} -m 555 Installing libraries read-only is very non-standard (I'm not aware of any other build system which does that). Python should just use the more standard 755 install mode. ---------- components: Build messages: 322469 nosy: jdemeyer priority: normal severity: normal status: open title: Python library should be installed writable 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 Fri Jul 27 03:53:00 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 27 Jul 2018 07:53:00 +0000 Subject: [issue27717] sqlite documentation bug In-Reply-To: <1470745775.08.0.0704550754852.issue27717@psf.upfronthosting.co.za> Message-ID: <1532677980.44.0.56676864532.issue27717@psf.upfronthosting.co.za> Berker Peksag added the comment: Looking at this again, I think the current version of the documentation should stay as-is. Perhaps my patch can make the insecure example separated from the secure one, but I don't think it's worth to apply it. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 03:54:31 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 27 Jul 2018 07:54:31 +0000 Subject: [issue34245] Python library should be installed writable In-Reply-To: <1532677710.44.0.56676864532.issue34245@psf.upfronthosting.co.za> Message-ID: <1532678071.84.0.56676864532.issue34245@psf.upfronthosting.co.za> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +8012 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 03:55:58 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 27 Jul 2018 07:55:58 +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: <1532678158.08.0.56676864532.issue34177@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8013 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 03:56:55 2018 From: report at bugs.python.org (Tim Golden) Date: Fri, 27 Jul 2018 07:56:55 +0000 Subject: [issue34240] Convert test_mmap to use tempfile In-Reply-To: <1532632974.46.0.56676864532.issue34240@psf.upfronthosting.co.za> Message-ID: <1532678215.37.0.56676864532.issue34240@psf.upfronthosting.co.za> Tim Golden added the comment: Thanks for the information, eryksun. For the moment, I can only say with a fair degree of certainty that using the tempfile functions as I have in test_bz2 & test_mmap appears to solve the issue which is repeatably if intermittently present without that change. I'll be trying to narrow the issue down before making any further changes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 04:07:30 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 27 Jul 2018 08:07:30 +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: <1532678850.29.0.56676864532.issue34177@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- pull_requests: +8014 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 04:27:41 2018 From: report at bugs.python.org (Philip Lee) Date: Fri, 27 Jul 2018 08:27:41 +0000 Subject: [issue34221] Any plans to combine collections.OrderedDict with dict In-Reply-To: <1532587571.42.0.56676864532.issue34221@psf.upfronthosting.co.za> Message-ID: <741fc904.e1.164dad87a42.Coremail.redstone-cold@163.com> Philip Lee added the comment: What about my last suggestion : it would be better to move "Dictionaries preserve insertion order" part at the end of the doc of https://docs.python.org/3/library/stdtypes.html#dict up below the doc for class dict(**kwarg) class dict(mapping, **kwarg) class dict(iterable, **kwarg) so that people won't miss the feature when consulting the doc. ?2018?07?26 14?46?, "Raymond Hettinger"??: Raymond Hettinger added the comment: See the related discussion on python-dev and other tracker entries where this was discussed previously. ---------- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ ---------- nosy: +iMath _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 05:03:58 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 27 Jul 2018 09:03:58 +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: <1532682238.67.0.56676864532.issue34177@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 777cdd94b9bebd5b22df0fc293aa078d5537b988 by INADA Naoki in branch '3.6': bpo-34177: vsts: Avoid conflict with Homebrew Python (GH-8430) https://github.com/python/cpython/commit/777cdd94b9bebd5b22df0fc293aa078d5537b988 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 05:04:15 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 27 Jul 2018 09:04:15 +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: <1532682255.48.0.56676864532.issue34177@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 Fri Jul 27 05:11:49 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 27 Jul 2018 09:11:49 +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: <1532682709.96.0.56676864532.issue34242@psf.upfronthosting.co.za> INADA Naoki added the comment: I don't think it's worth enough to break backward compatibility. Additionally, "section.get(key) returns None if key is not exist" is consistent with dict's behavior. On the other hand, "parser.get(section, key)" has different signature from dict's get method. So inconsistency is not a big problem. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 05:12:31 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 27 Jul 2018 09:12:31 +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: <1532682751.6.0.56676864532.issue34242@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 05:18:14 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 27 Jul 2018 09:18:14 +0000 Subject: [issue34245] Python library should be installed writable In-Reply-To: <1532677710.44.0.56676864532.issue34245@psf.upfronthosting.co.za> Message-ID: <1532683094.83.0.56676864532.issue34245@psf.upfronthosting.co.za> INADA Naoki added the comment: Isn't it useful to avoid accidental change while open files with editor for just reading? Is there any real world problem about read-only library? ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 05:25:46 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 27 Jul 2018 09:25:46 +0000 Subject: [issue34245] Python library should be installed writable In-Reply-To: <1532677710.44.0.56676864532.issue34245@psf.upfronthosting.co.za> Message-ID: <1532683546.65.0.56676864532.issue34245@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > Isn't it useful to avoid accidental change while open files with editor for just reading? Why would that argument apply to a binary file (and only to binary files)? > Is there any real world problem about read-only library? It makes it slightly harder to remove a Python installation. Depending on the OS, you'll get a failure or require some additional confirmation. Furthermore, it's very non-standard. Even if that's not a problem by itself, Python should just install things in the standard way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 05:27:28 2018 From: report at bugs.python.org (Stig Johan Berggren) Date: Fri, 27 Jul 2018 09:27:28 +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: <1532683648.48.0.56676864532.issue34242@psf.upfronthosting.co.za> Stig Johan Berggren added the comment: That's fair, I didn't consider consistency with dicts' `get`. Maybe a ConfigParser object could have an option to raise errors, because they are useful for discovering errors in config files. 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? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 05:28:36 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 27 Jul 2018 09:28:36 +0000 Subject: [issue34245] Python library should be installed writable In-Reply-To: <1532677710.44.0.56676864532.issue34245@psf.upfronthosting.co.za> Message-ID: <1532683716.43.0.56676864532.issue34245@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: Also, some tools may want to edit the library after installation. Rebasing on Cygwin is an example of that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 05:44:13 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 27 Jul 2018 09:44:13 +0000 Subject: [issue34209] racecondition In-Reply-To: <1532442697.44.0.56676864532.issue34209@psf.upfronthosting.co.za> Message-ID: <1532684653.94.0.56676864532.issue34209@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 05:47:20 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 27 Jul 2018 09:47:20 +0000 Subject: [issue24085] large memory overhead when pyc is recompiled In-Reply-To: <1430420344.67.0.572478851339.issue24085@psf.upfronthosting.co.za> Message-ID: <1532684840.0.0.56676864532.issue24085@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 05:52:04 2018 From: report at bugs.python.org (Vadim Pushtaev) Date: Fri, 27 Jul 2018 09:52:04 +0000 Subject: [issue34237] faq/design: PEP 572 adds assignment expressions In-Reply-To: <1532614776.63.0.56676864532.issue34237@psf.upfronthosting.co.za> Message-ID: <1532685124.98.0.56676864532.issue34237@psf.upfronthosting.co.za> Vadim Pushtaev added the comment: This indeed doesn't make much sense now. I'll try to send a PR today. ---------- nosy: +Vadim Pushtaev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 05:55:45 2018 From: report at bugs.python.org (Ammar Askar) Date: Fri, 27 Jul 2018 09:55:45 +0000 Subject: [issue34237] faq/design: PEP 572 adds assignment expressions In-Reply-To: <1532614776.63.0.56676864532.issue34237@psf.upfronthosting.co.za> Message-ID: <1532685345.78.0.56676864532.issue34237@psf.upfronthosting.co.za> Ammar Askar added the comment: This should be done as part of the doc changes for the full PEP 572 implementation, no point in independently doing it now when it hasn't even been implemented yet. ---------- nosy: +ammar2 resolution: -> postponed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 05:56:57 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 27 Jul 2018 09:56:57 +0000 Subject: [issue33666] Document removal of os.errno In-Reply-To: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> Message-ID: <1532685417.35.0.56676864532.issue33666@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- keywords: +patch pull_requests: +8015 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 06:02:13 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 27 Jul 2018 10:02:13 +0000 Subject: [issue34246] Gentoo Refleaks 3.7: test_smtplib has dangling threads Message-ID: <1532685733.19.0.56676864532.issue34246@psf.upfronthosting.co.za> New submission from Pablo Galindo Salgado : The Gentoo Refleaks 3.7 buildbot is reporting that test_smtplib may be leaving with dangling threads: https://buildbot.python.org/all/#builders/114/builds/179 FAILED (errors=7) Warning -- threading._dangling was modified by test_smtplib Before: <_weakrefset.WeakSet object at 0xb6918bcc> After: <_weakrefset.WeakSet object at 0xb68e761c> test test_smtplib failed 1 test failed again: test_smtplib == Tests result: FAILURE then FAILURE == ---------- messages: 322481 nosy: pablogsal priority: normal severity: normal status: open title: Gentoo Refleaks 3.7: test_smtplib has dangling threads _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 06:04:02 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 27 Jul 2018 10:04:02 +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: <1532685842.02.0.56676864532.issue34246@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New failure on AMD64 Windows8.1 Refleaks 3.6: https://buildbot.python.org/all/#builders/64/builds/301 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 06:13:32 2018 From: report at bugs.python.org (Ammar Askar) Date: Fri, 27 Jul 2018 10:13:32 +0000 Subject: [issue29097] [Windows] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6 In-Reply-To: <1482958160.11.0.32337159902.issue29097@psf.upfronthosting.co.za> Message-ID: <1532686412.71.0.56676864532.issue29097@psf.upfronthosting.co.za> Change by Ammar Askar : ---------- pull_requests: +8016 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 06:21:01 2018 From: report at bugs.python.org (Vadim Pushtaev) Date: Fri, 27 Jul 2018 10:21:01 +0000 Subject: [issue34237] faq/design: PEP 572 adds assignment expressions In-Reply-To: <1532614776.63.0.56676864532.issue34237@psf.upfronthosting.co.za> Message-ID: <1532686861.14.0.56676864532.issue34237@psf.upfronthosting.co.za> Vadim Pushtaev added the comment: Okay then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 06:26:56 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 27 Jul 2018 10:26:56 +0000 Subject: [issue8145] Documentation about sqlite3 isolation_level In-Reply-To: <1268643705.49.0.319902511171.issue8145@psf.upfronthosting.co.za> Message-ID: <1532687216.05.0.56676864532.issue8145@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- pull_requests: +8017 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 06:28:55 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 27 Jul 2018 10:28:55 +0000 Subject: [issue31166] null pointer deref and segfault in _PyObject_Alloc (obmalloc.c:1258) In-Reply-To: <1502330677.73.0.512215884622.issue31166@psf.upfronthosting.co.za> Message-ID: <1532687335.16.0.56676864532.issue31166@psf.upfronthosting.co.za> INADA Naoki added the comment: We ignores several crashes caused by exposing internal object through gc or weakref module. This case is not special enough to care. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 06:37:15 2018 From: report at bugs.python.org (Andrey Ovchinnikov) Date: Fri, 27 Jul 2018 10:37:15 +0000 Subject: [issue31267] threading.Timer object is affected by changes to system time: Python locks should use a monotonic clock if available In-Reply-To: <1503521255.96.0.0977006158294.issue31267@psf.upfronthosting.co.za> Message-ID: <1532687835.05.0.56676864532.issue31267@psf.upfronthosting.co.za> Change by Andrey Ovchinnikov : ---------- nosy: +anikey _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 06:46:07 2018 From: report at bugs.python.org (Jonathan Fine) Date: Fri, 27 Jul 2018 10:46:07 +0000 Subject: [issue34237] faq/design: PEP 572 adds assignment expressions In-Reply-To: <1532614776.63.0.56676864532.issue34237@psf.upfronthosting.co.za> Message-ID: <1532688367.61.0.56676864532.issue34237@psf.upfronthosting.co.za> Jonathan Fine added the comment: My mistake. But not mine only. According to https://www.python.org/dev/peps/pep-0572/ the PEP is Python-Version: 3.8 I took this to mean that it had been implemented in Python 3.8. Reading the PEP more closely, it also says Status: Accepted. According to https://www.python.org/dev/peps/pep-0001/#pep-header-preamble each PEP can have an optional Python-Version, which is "described below". I thus find === Standards Track PEPs will typically have a Python-Version header which indicates the version of Python that the feature will be released with. === I seems to me that there is a bug in the PEP, perhaps caused either by a failure to increment its Python-Version as part of the release of Python 3.8, or the PEP itself providing too early the optional Python-Version. I'll email Chris Angelico about this. I'm very happy for the issue to remain closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 06:47:35 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 27 Jul 2018 10:47:35 +0000 Subject: [issue34245] Python library should be installed writable In-Reply-To: <1532683546.65.0.56676864532.issue34245@psf.upfronthosting.co.za> Message-ID: INADA Naoki added the comment: On Fri, Jul 27, 2018 at 6:25 PM Jeroen Demeyer wrote: > > Isn't it useful to avoid accidental change while open files with editor for just reading? > > Why would that argument apply to a binary file (and only to binary files)? I didn't notice it's used only for binary libraries. > > Is there any real world problem about read-only library? > > It makes it slightly harder to remove a Python installation. Depending on the OS, you'll get a failure or require some additional confirmation. Make sense. > Furthermore, it's very non-standard. Even if that's not a problem by itself, Python should just install things in the standard way. It's not true if there are some merits and there are no real problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 07:07:48 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Jul 2018 11:07:48 +0000 Subject: [issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error In-Reply-To: <1527069849.43.0.682650639539.issue33613@psf.upfronthosting.co.za> Message-ID: <1532689668.66.0.56676864532.issue33613@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +8018 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 08:07:30 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 27 Jul 2018 12:07:30 +0000 Subject: [issue34247] PYTHONOPTIMZE ignored in 3.7.0 when using custom launcher Message-ID: <1532693250.08.0.56676864532.issue34247@psf.upfronthosting.co.za> New submission from Ronald Oussoren : Attached is a very basic launcher for python scripts. This script works as expected in Python 3.6, but not in 3.7.0. In particular, the launcher sets the environment variable PYTHONOPTIMIZE before calling Py_Initialize and that setting is ignored. I haven't tried testing with the tip of the tree yet. ---------- components: Interpreter Core keywords: 3.7regression messages: 322487 nosy: ronaldoussoren priority: normal severity: normal status: open title: PYTHONOPTIMZE ignored in 3.7.0 when using custom launcher type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 08:07:40 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 27 Jul 2018 12:07:40 +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: <1532693260.31.0.56676864532.issue34247@psf.upfronthosting.co.za> Change by Ronald Oussoren : Added file: https://bugs.python.org/file47716/t.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 08:07:53 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 27 Jul 2018 12:07:53 +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: <1532693273.13.0.56676864532.issue34247@psf.upfronthosting.co.za> Change by Ronald Oussoren : Added file: https://bugs.python.org/file47717/foo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 08:41:08 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 27 Jul 2018 12:41:08 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1532695268.87.0.56676864532.issue22021@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- nosy: -berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 08:42:02 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 27 Jul 2018 12:42:02 +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: <1532695322.02.0.56676864532.issue34246@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, sorry. we just modernized test_smtplib's __main__ section, and I think we lost the thread cleanup code that used to be run around the test suite. We need to add the thread cleanup decorators. ---------- nosy: +r.david.murray stage: -> needs patch type: -> behavior versions: +Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 09:06:51 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 27 Jul 2018 13:06:51 +0000 Subject: [issue30722] Tools/demo/redemo.py broken In-Reply-To: <1498035463.93.0.0897725262949.issue30722@psf.upfronthosting.co.za> Message-ID: <1532696811.69.0.56676864532.issue30722@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- pull_requests: +8019 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 09:12:25 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 27 Jul 2018 13:12:25 +0000 Subject: [issue29411] Option --executable for entry_points In-Reply-To: <1485945833.17.0.354426636585.issue29411@psf.upfronthosting.co.za> Message-ID: <1532697145.36.0.56676864532.issue29411@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- nosy: -berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 09:13:35 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 27 Jul 2018 13:13:35 +0000 Subject: [issue25156] shutil.copyfile should internally use os.sendfile when possible In-Reply-To: <1442520485.03.0.419427125487.issue25156@psf.upfronthosting.co.za> Message-ID: <1532697215.52.0.56676864532.issue25156@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Closing as duplicate of #33671. ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 09:23:58 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Fri, 27 Jul 2018 13:23:58 +0000 Subject: [issue32947] Support OpenSSL 1.1.1 In-Reply-To: <1519559680.67.0.467229070634.issue32947@psf.upfronthosting.co.za> Message-ID: <1532697838.01.0.56676864532.issue32947@psf.upfronthosting.co.za> Miro Hron?ok added the comment: Note that Fedora 29 updated openssl from 1.1.0h to 1.1.1-0.pre8 and Python 3.7 tests are failing. Not 100% sure it's related, but full report at: https://bugzilla.redhat.com/show_bug.cgi?id=1609291 ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 09:25:03 2018 From: report at bugs.python.org (Chris Angelico) Date: Fri, 27 Jul 2018 13:25:03 +0000 Subject: [issue34237] faq/design: PEP 572 adds assignment expressions In-Reply-To: <1532614776.63.0.56676864532.issue34237@psf.upfronthosting.co.za> Message-ID: <1532697903.6.0.56676864532.issue34237@psf.upfronthosting.co.za> Chris Angelico added the comment: Yes, the PEP says version 3.8. Why is this a problem? Sit tight, let the implementation land. I don't understand why this needed me to get emailed saying that the PEP has the wrong version number in it. ---------- nosy: +Rosuav _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 09:26:04 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 27 Jul 2018 13:26:04 +0000 Subject: [issue25156] shutil.copyfile should internally use os.sendfile when possible In-Reply-To: <1442520485.03.0.419427125487.issue25156@psf.upfronthosting.co.za> Message-ID: <1532697964.75.0.56676864532.issue25156@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- superseder: -> Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 09:33:58 2018 From: report at bugs.python.org (sds) Date: Fri, 27 Jul 2018 13:33:58 +0000 Subject: [issue34248] dbm errors should contain file names Message-ID: <1532698438.31.0.56676864532.issue34248@psf.upfronthosting.co.za> New submission from sds : `dbm` errors should contain file names when appropriate, just like `OSError`. E.g.: ``` >>> open("fooooo") Traceback (most recent call last): File "", line 1, in FileNotFoundError: [Errno 2] No such file or directory: 'fooooo' >>> import dbm.gnu >>> dbm.gnu.open("fooooo") Traceback (most recent call last): File "", line 1, in _gdbm.error: [Errno 2] No such file or directory ``` the `_gdbm.error` should report the file name `'fooooo'` just like `FileNotFoundError` does (and `exn.args` should contain the file name too!) ---------- components: Extension Modules messages: 322492 nosy: sam-s priority: normal severity: normal status: open title: dbm errors should contain file names 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 Fri Jul 27 10:06:33 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 27 Jul 2018 14:06:33 +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: <1532700393.66.0.56676864532.issue34246@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: I think it may be something extra as test_send_message_error_on_non_ascii_addrs_if_no_smtputf8 is failing when you run the test with -R: ./python -W error -m test test_smtplib -R 3:3 Warning -- threading._dangling was modified by test_smtplib Before: <_weakrefset.WeakSet object at 0x10ed7dd70> After: <_weakrefset.WeakSet object at 0x10f619830> test test_smtplib failed -- Traceback (most recent call last): File "/Users/pgalindo3/cpython/Lib/test/test_smtplib.py", line 1232, in test_send_message_error_on_non_ascii_addrs_if_no_smtputf8 smtp.send_message(msg)) File "/Users/pgalindo3/cpython/Lib/unittest/case.py", line 743, in assertRaises return context.handle('assertRaises', args, kwargs) File "/Users/pgalindo3/cpython/Lib/unittest/case.py", line 178, in handle callable_obj(*args, **kwargs) TypeError: 'dict' object is not callable test_smtplib failed == Tests result: FAILURE == 1 test failed: test_smtplib Total duration: 16 sec 566 ms Tests result: FAILURE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 10:12:47 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 27 Jul 2018 14:12:47 +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: <1532700767.93.0.56676864532.issue34246@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: The TypeError is because the test is misusing the assertRaises API: self.assertRaises(smtplib.SMTPNotSupportedError, smtp.send_message(msg)) should be self.assertRaises(smtplib.SMTPNotSupportedError, smtp.send_message, msg) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 10:24:47 2018 From: report at bugs.python.org (Jonathan Fine) Date: Fri, 27 Jul 2018 14:24:47 +0000 Subject: [issue34237] faq/design: PEP 572 adds assignment expressions In-Reply-To: <1532614776.63.0.56676864532.issue34237@psf.upfronthosting.co.za> Message-ID: <1532701487.04.0.56676864532.issue34237@psf.upfronthosting.co.za> Jonathan Fine added the comment: First, I'm delighted that the current docs are in fact correct regarding assignment expressions. (I should have said this earlier.) I'm happy to wait for the implementation to land. (And if you like, I'm willing to help with the documentation. I seem to have an eye for detail.) Whether or not mine was the only my mistake, I was misled by the PEP 572 header. (And perhaps Vadim was also - msg322479.) This issue is, rightly, closed. Perhaps the discussion should continue in a new issue? And without Chris, if he doesn't want to be involved. Perhaps it's a matter for the release manager? Or perhaps having Python-Version:3.8 in the PEP remain until the change lands (and then both Status and Python-Version will be changed). I'm new here. I'm happy for someone else to decide. No action is one option. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 10:59:34 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 27 Jul 2018 14:59:34 +0000 Subject: [issue29097] [Windows] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6 In-Reply-To: <1482958160.11.0.32337159902.issue29097@psf.upfronthosting.co.za> Message-ID: <1532703574.56.0.56676864532.issue29097@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: New changeset 6ea8a3a0ebf840ca57b6dba9cad26fbb0ddaa5d4 by Alexander Belopolsky (Ammar Askar) in branch '3.6': [3.6] bpo-29097: Forego fold detection on windows for low timestamp values (GH-2385) (GH-8498) https://github.com/python/cpython/commit/6ea8a3a0ebf840ca57b6dba9cad26fbb0ddaa5d4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 10:59:59 2018 From: report at bugs.python.org (Jonathan Fine) Date: Fri, 27 Jul 2018 14:59:59 +0000 Subject: [issue34237] faq/design: PEP 572 adds assignment expressions In-Reply-To: <1532614776.63.0.56676864532.issue34237@psf.upfronthosting.co.za> Message-ID: <1532703599.82.0.56676864532.issue34237@psf.upfronthosting.co.za> Jonathan Fine added the comment: I'm sorry. I apologise. I'm being a bit stupid. Everything is fine. Nothing to do. In case you care, here's the situation. Python 3.8 is in development, and not yet released. Somehow, I'd got it into my mind that it had already been released. So the PEP 572 header is correct. The PEP status is accepted, the feature is in development (including documentation), and all being well the feature and the documentation will appear in Python3.8. By the way, according to https://www.python.org/dev/peps/pep-0569/#id5, the first alpha is due 2019-01-27. So please, all of you, accept my apologies. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 11:07:15 2018 From: report at bugs.python.org (v kats) Date: Fri, 27 Jul 2018 15:07:15 +0000 Subject: [issue34249] Full set of format codes applies to strftime only Message-ID: <1532704035.87.0.56676864532.issue34249@psf.upfronthosting.co.za> New submission from v kats : Section "strftime() and strptime() Behavior" says: "The full set of format codes supported varies across platforms, because Python calls the platform C library?s strftime() function, and platform variations are common. To see the full set of format codes supported on your platform, consult the strftime(3) documentation." It implies that this applies for strftime only, and indeed it refers to C library?s strftime(). However, it's easy to miss (at least I got confused and lost some time), so I propose to clarify the paragraph. strptime and %s # python Python 2.7.6 (default, Nov 23 2017, 15:49:48) [GCC 4.8.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from datetime import datetime >>> datetime.strptime('1532689414','%s') Traceback (most recent call last): File "", line 1, in strftime and %s python Python 2.7.6 (default, Nov 23 2017, 15:49:48) [GCC 4.8.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from datetime import datetime >>> datetime.now().strftime('%s') '1532702817' File "/usr/lib/python2.7/_strptime.py", line 317, in _strptime (bad_directive, format)) ValueError: 's' is a bad directive in format '%s' ---------- assignee: docs at python components: Documentation messages: 322498 nosy: docs at python, v kats priority: normal severity: normal status: open title: Full set of format codes applies to strftime only type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 11:08:05 2018 From: report at bugs.python.org (Roundup Robot) Date: Fri, 27 Jul 2018 15:08:05 +0000 Subject: [issue34249] Full set of format codes applies to strftime only In-Reply-To: <1532704035.87.0.56676864532.issue34249@psf.upfronthosting.co.za> Message-ID: <1532704085.17.0.56676864532.issue34249@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +8020 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 11:19:22 2018 From: report at bugs.python.org (v kats) Date: Fri, 27 Jul 2018 15:19:22 +0000 Subject: [issue34249] Full set of format codes applies to strftime only In-Reply-To: <1532704035.87.0.56676864532.issue34249@psf.upfronthosting.co.za> Message-ID: <1532704762.64.0.56676864532.issue34249@psf.upfronthosting.co.za> v kats added the comment: Note, the last 3 lines of the previous comment seem to be a rogue copy-paste ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 11:32:20 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 27 Jul 2018 15:32:20 +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: <1532705540.04.0.56676864532.issue34246@psf.upfronthosting.co.za> R. David Murray added the comment: That's not the code I thought I merged. I'll have to take a look at what actually got merged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 11:48:02 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 27 Jul 2018 15:48:02 +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: <1532706482.58.0.56676864532.issue34246@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: That was from commit 48ed88a93bb0bbeaae9a4cfaa533e4edf13bcb51 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 11:50:01 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 27 Jul 2018 15:50:01 +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: <1532706601.07.0.56676864532.issue34246@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Oh, sorry, my bad. That was precisely what commit 48ed88a93bb0bbeaae9a4cfaa533e4edf13bcb51 changed. The problem with running with -R still happens: ====================================================================== ERROR: test_name_field_not_included_in_envelop_addresses (test.test_smtplib.SMTPSimTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/pgalindo3/cpython/Lib/test/test_smtplib.py", line 1100, in test_name_field_not_included_in_envelop_addresses self.assertDictEqual(smtp.send_message(message), {}) File "/Users/pgalindo3/cpython/Lib/smtplib.py", line 967, in send_message rcpt_options) File "/Users/pgalindo3/cpython/Lib/smtplib.py", line 861, in sendmail (code, resp) = self.mail(from_addr, esmtp_opts) File "/Users/pgalindo3/cpython/Lib/smtplib.py", line 532, in mail 'SMTPUTF8 not supported by server') smtplib.SMTPNotSupportedError: SMTPUTF8 not supported by server ---------------------------------------------------------------------- Ran 60 tests in 1.365s FAILED (errors=7) Warning -- threading._dangling was modified by test_smtplib Before: <_weakrefset.WeakSet object at 0x10f445e90> After: <_weakrefset.WeakSet object at 0x10fe75ad0> test test_smtplib failed test_smtplib failed == Tests result: FAILURE == 1 test failed: test_smtplib Total duration: 2 sec 920 ms Tests result: FAILURE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 11:50:04 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 27 Jul 2018 15:50:04 +0000 Subject: [issue30722] Tools/demo/redemo.py broken In-Reply-To: <1498035463.93.0.0897725262949.issue30722@psf.upfronthosting.co.za> Message-ID: <1532706604.17.0.56676864532.issue30722@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 612dbefe9dfce0f67bce358613e472e913be8a57 by Berker Peksag in branch 'master': bpo-30722: Fix NEWS entries (GH-8501) https://github.com/python/cpython/commit/612dbefe9dfce0f67bce358613e472e913be8a57 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 11:50:14 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 27 Jul 2018 15:50:14 +0000 Subject: [issue30722] Tools/demo/redemo.py broken In-Reply-To: <1498035463.93.0.0897725262949.issue30722@psf.upfronthosting.co.za> Message-ID: <1532706614.16.0.56676864532.issue30722@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8022 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 11:59:00 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 27 Jul 2018 15:59:00 +0000 Subject: [issue30722] Tools/demo/redemo.py broken In-Reply-To: <1498035463.93.0.0897725262949.issue30722@psf.upfronthosting.co.za> Message-ID: <1532707140.25.0.56676864532.issue30722@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- pull_requests: +8023 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 12:17:24 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 27 Jul 2018 16:17:24 +0000 Subject: [issue30722] Tools/demo/redemo.py broken In-Reply-To: <1498035463.93.0.0897725262949.issue30722@psf.upfronthosting.co.za> Message-ID: <1532708244.36.0.56676864532.issue30722@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 7cbde0e09daba4259565738e48f141851287fe29 by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-30722: Fix NEWS entries (GH-8501) https://github.com/python/cpython/commit/7cbde0e09daba4259565738e48f141851287fe29 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 12:17:54 2018 From: report at bugs.python.org (=?utf-8?q?Fekete_Gy=C3=B6rgy?=) Date: Fri, 27 Jul 2018 16:17:54 +0000 Subject: [issue34250] import xmlrpclib not works in file named "xml.py" Message-ID: <1532708274.27.0.56676864532.issue34250@psf.upfronthosting.co.za> New submission from Fekete Gy?rgy : Big magic in python 2.7.15 win version: Create file: "xml.py" containing 2 code lines: import xmlrpclib proxy = xmlrpclib.ServerProxy("http://localhost:8000/") run it, and it gives u a nice error: C:\work\mitre>\Python27\python.exe xml.py Traceback (most recent call last): File "xml.py", line 1, in import xmlrpclib File "C:\Python27\lib\xmlrpclib.py", line 538, in from xml.parsers import expat File "C:\work\mitre\xml.py", line 3, in proxy = xmlrpclib.ServerProxy("http://localhost:8000/") AttributeError: 'module' object has no attribute 'ServerProxy' U also get this error, when this file present in the directory where u want to import xmlrpclib in another py. ANd if only the compiled xml.pyc exist, the bug comes. But if you rename it to xm.py, it works! Maybe a bad import from wrong directory in xmlrpclib. Not tested on another version or platform. ---------- components: Windows files: xml.py messages: 322505 nosy: fgyuri, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: import xmlrpclib not works in file named "xml.py" type: compile error versions: Python 2.7 Added file: https://bugs.python.org/file47718/xml.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 12:17:55 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 27 Jul 2018 16:17:55 +0000 Subject: [issue30722] Tools/demo/redemo.py broken In-Reply-To: <1498035463.93.0.0897725262949.issue30722@psf.upfronthosting.co.za> Message-ID: <1532708275.69.0.56676864532.issue30722@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 9d85856044a2c7d681ea38b5ff99af375b228a0f by Berker Peksag in branch '3.6': bpo-30722: Fix NEWS entry (GH-8501) https://github.com/python/cpython/commit/9d85856044a2c7d681ea38b5ff99af375b228a0f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 12:18:23 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 27 Jul 2018 16:18:23 +0000 Subject: [issue30722] Tools/demo/redemo.py broken In-Reply-To: <1498035463.93.0.0897725262949.issue30722@psf.upfronthosting.co.za> Message-ID: <1532708303.29.0.56676864532.issue30722@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 12:23:23 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 27 Jul 2018 16:23:23 +0000 Subject: [issue34250] import xmlrpclib not works in file named "xml.py" In-Reply-To: <1532708274.27.0.56676864532.issue34250@psf.upfronthosting.co.za> Message-ID: <1532708603.14.0.56676864532.issue34250@psf.upfronthosting.co.za> Berker Peksag added the comment: This is expected, because there is a package named 'xml' in the Python standard library. See http://python-notes.curiousefficiency.org/en/latest/python_concepts/import_traps.html#the-name-shadowing-trap and http://python-notes.curiousefficiency.org/en/latest/python_concepts/import_traps.html#the-stale-bytecode-file-trap for details. ---------- nosy: +berker.peksag resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 12:33:03 2018 From: report at bugs.python.org (Ammar Askar) Date: Fri, 27 Jul 2018 16:33:03 +0000 Subject: [issue29097] [Windows] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6 In-Reply-To: <1482958160.11.0.32337159902.issue29097@psf.upfronthosting.co.za> Message-ID: <1532709183.38.0.56676864532.issue29097@psf.upfronthosting.co.za> Change by Ammar Askar : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 12:35:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 27 Jul 2018 16:35:42 +0000 Subject: [issue34177] test_site fails in macOS-PR VSTS builds for 3.7 branch In-Reply-To: <1532682255.51.0.902498594338.issue34177@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Thank you for the fix Naokia! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 13:30:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 27 Jul 2018 17:30:45 +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: <1532712645.97.0.56676864532.issue34247@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +brett.cannon, eric.snow, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 14:06:09 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 27 Jul 2018 18:06:09 +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: <1532714769.87.0.56676864532.issue34246@psf.upfronthosting.co.za> R. David Murray added the comment: That's due to another bug, which will get fixed by #32814, unless you'd like to generate a PR with the this fix in it (fixing the mutable default for smtp_options). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 14:53:11 2018 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 27 Jul 2018 18:53:11 +0000 Subject: [issue18372] _Pickler_New() doesn't call PyObject_GC_Track(self) In-Reply-To: <1373064790.68.0.920175606727.issue18372@psf.upfronthosting.co.za> Message-ID: <1532717591.39.0.56676864532.issue18372@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +8024 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 14:54:44 2018 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 27 Jul 2018 18:54:44 +0000 Subject: [issue18372] _Pickler_New() doesn't call PyObject_GC_Track(self) In-Reply-To: <1373064790.68.0.920175606727.issue18372@psf.upfronthosting.co.za> Message-ID: <1532717684.51.0.56676864532.issue18372@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz versions: +Python 3.6, Python 3.7, Python 3.8 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 15:52:35 2018 From: report at bugs.python.org (Kay Hayen) Date: Fri, 27 Jul 2018 19:52:35 +0000 Subject: [issue34251] MSI build fails Message-ID: <1532721155.89.0.56676864532.issue34251@psf.upfronthosting.co.za> New submission from Kay Hayen : Hello there, building an MSI for my project fails. I am calling it like this: assert subprocess.call( ( sys.executable, "setup.py", "bdist_msi", "--target-version=" + sys.version[:3] ) ) == 0 Giving the target version is probably non-sense and from a time, where one script was building multiple MSIs, I no longer do that. and it gives: File "C:\Python37_64\lib\site-packages\setuptools\__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "C:\Python37_64\lib\distutils\core.py", line 148, in setup dist.run_commands() File "C:\Python37_64\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "C:\Python37_64\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Python37_64\lib\distutils\command\bdist_msi.py", line 256, in run self.add_find_python() File "C:\Python37_64\lib\distutils\command\bdist_msi.py", line 346, in add_find_python if msilib.Win64: AttributeError: module 'msilib' has no attribute 'Win64' This happens for 32 and 64 bit CPython 3.7.0 installations. The same code works for all of 2.7, 3.3 through to 3.6, so this is a regression. Any idea? Thanks, Kay ---------- components: Distutils messages: 322510 nosy: dstufft, eric.araujo, kayhayen priority: normal severity: normal status: open title: MSI build fails type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 15:58:39 2018 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 27 Jul 2018 19:58:39 +0000 Subject: [issue11594] 2to3 does not preserve line endings In-Reply-To: <1300465648.02.0.83291128633.issue11594@psf.upfronthosting.co.za> Message-ID: <1532721519.15.0.56676864532.issue11594@psf.upfronthosting.co.za> Jason R. Coombs added the comment: Slawomir, you're probably looking for issue34108. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 15:59:12 2018 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 27 Jul 2018 19:59:12 +0000 Subject: [issue11594] 2to3 does not preserve line endings In-Reply-To: <1300465648.02.0.83291128633.issue11594@psf.upfronthosting.co.za> Message-ID: <1532721552.15.0.56676864532.issue11594@psf.upfronthosting.co.za> Change by Jason R. Coombs : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 16:05:42 2018 From: report at bugs.python.org (Alberto) Date: Fri, 27 Jul 2018 20:05:42 +0000 Subject: [issue34252] Bunch of path leaks on Python 3.7 on Release Message-ID: <1532721942.43.0.56676864532.issue34252@psf.upfronthosting.co.za> New submission from Alberto : I've downloaded and compiled from sources Python 3.7 in windows. The compilation process goes great but there are a lot of paths (using __FILE__ in the source) that gets leaked in the Release version and that should not happen. This is because __FILE__ is used outside of assert or DEBUG ifdefs which should be avoided. Here is the list I've got after doing a strings on a build release: c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\typeobject.c c:\users\mysupersecretuser\downloads\python-3.7.0_\python\import.c c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\moduleobject.c c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\longobject.c c:\users\mysupersecretuser\downloads\python-3.7.0_\python\getargs.c c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\frameobject.c c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\gcmodule.c c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\object.c c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\listobject.c c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\fileobject.c c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\dictobject.c c:\users\mysupersecretuser\downloads\python-3.7.0_\python\traceback.c c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\tupleobject.c c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\classobject.c c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\unicodeobject.c c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\bytearrayobject.c c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\setobject.c c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\bytesobject.c c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\weakrefobject.c c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\cellobject.c c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\iterobject.c c:\users\mysupersecretuser\downloads\python-3.7.0_\objects\codeobject.c c:\users\mysupersecretuser\downloads\python-3.7.0_\python\ast.c c:\users\mysupersecretuser\downloads\python-3.7.0_\python\pystrtod.c c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\_asynciomodule.c c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\arraymodule.c c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\_sha3\sha3module.c c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\parsermodule.c c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\zipimport.c FFI_TRAMPOLINE_SIZE too small in c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\_ctypes\libffi_msvc\ffi.c c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\_decimal\libmpdec\typearith.h c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\_decimal\libmpdec\mpdecimal.c c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\_decimal\libmpdec\context.c c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\_ssl.c c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\pyexpat.c ---------- components: Build messages: 322512 nosy: illera88 priority: normal severity: normal status: open title: Bunch of path leaks on Python 3.7 on Release type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 16:08:37 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 27 Jul 2018 20:08:37 +0000 Subject: [issue34251] MSI build fails In-Reply-To: <1532721155.89.0.56676864532.issue34251@psf.upfronthosting.co.za> Message-ID: <1532722117.99.0.56676864532.issue34251@psf.upfronthosting.co.za> Berker Peksag added the comment: msilib.Win64 has been removed in https://github.com/python/cpython/commit/49ce74efe845a8a91939ff3990a5f233262d3e1f#diff-c762e09a046c2ff3cd91f0643cc58049L12 I guess the ``if msilib.Win64:`` clause can be replaced with ``if msilib.AMD64:``. ---------- keywords: +3.7regression nosy: +berker.peksag, zach.ware stage: -> needs patch type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 16:30:42 2018 From: report at bugs.python.org (Alberto) Date: Fri, 27 Jul 2018 20:30:42 +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: <1532723442.88.0.56676864532.issue34252@psf.upfronthosting.co.za> Alberto added the comment: In Visual Studio /FP should be removed: In C/C++ ? Advanced ? Use Full Paths: No But still for some weird reason there is one path that gets leaked: c:\users\mysupersecretuser\downloads\python-3.7.0_\modules\_decimal\libmpdec\typearith.h In the project from where I'm using python I already removed /FP so even if it is a header it should not be showing the full path AFAIK. Any idea? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 16:44:00 2018 From: report at bugs.python.org (Ben Doremus) Date: Fri, 27 Jul 2018 20:44:00 +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: <1532724240.45.0.56676864532.issue2651@psf.upfronthosting.co.za> Ben Doremus added the comment: Did this patch die? I ran into the same issue noted in the SO post. It's bizarre that KeyError is the only error message to handle things this way. ---------- nosy: +bdoremus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 19:28:13 2018 From: report at bugs.python.org (Novel) Date: Fri, 27 Jul 2018 23:28:13 +0000 Subject: [issue34253] Tkinter- On windows, calling filedialog or messagebox before the window is drawn causes focus issues Message-ID: <1532734093.09.0.56676864532.issue34253@psf.upfronthosting.co.za> New submission from Novel : Code to reproduce the problem: ``` import tkinter as tk from tkinter.messagebox import showinfo root = tk.Tk() entry = tk.Entry(root) entry.pack() # root.update() # remove comment to fix the problem showinfo('alert', 'this parrot is dead!') root.mainloop() ``` Running this code will show the alert, and when the user clicks "ok" the entry widget acts as if it's disabled and won't focus. Minimizing and restoring the tkinter window brings the entry widget back to normal operation. Workaround: Calling `update()` before the messagebox or filedialog call gives normal behaviour. This issue only affects Windows as far as I can tell. ---------- components: Tkinter messages: 322516 nosy: nyt priority: normal severity: normal status: open title: Tkinter- On windows, calling filedialog or messagebox before the window is drawn causes focus issues versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 20:06:09 2018 From: report at bugs.python.org (Brett Cannon) Date: Sat, 28 Jul 2018 00:06:09 +0000 Subject: [issue34239] Convert test_bz2 to use tempfile In-Reply-To: <1532626088.94.0.56676864532.issue34239@psf.upfronthosting.co.za> Message-ID: <1532736369.61.0.56676864532.issue34239@psf.upfronthosting.co.za> Brett Cannon added the comment: Should this issue be closed, Tim, after you update for Serhiy's suggestion? (Basically I'm just making sure you know issues are not automatically closed after merge :) . ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 21:45:25 2018 From: report at bugs.python.org (INADA Naoki) Date: Sat, 28 Jul 2018 01:45:25 +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: <1532742325.22.0.56676864532.issue2651@psf.upfronthosting.co.za> INADA Naoki added the comment: Even if we fixed stdlib, there are many KeyError(missing) idiom used in 3rd party code. KeyError: '42' KeyError: '42\n' KeyError: 42 All of the above are looks different. I think it's good. Is it really worth enough to break it? ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 23:25:39 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 28 Jul 2018 03:25:39 +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: <1532748339.24.0.56676864532.issue34247@psf.upfronthosting.co.za> Nick Coghlan added the comment: This feels like a duplicate of https://bugs.python.org/issue31845 (see https://github.com/python/cpython/commit/d7ac06126db86f76ba92cbca4cb702852a321f78 ) Is this definitely with the 3.7.0 release, or is it potentially with one of the earlier alphas before that fix was applied? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 23:44:06 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 28 Jul 2018 03:44:06 +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: <1532749446.88.0.56676864532.issue34247@psf.upfronthosting.co.za> Nick Coghlan added the comment: Ah, wait - I see a relevant difference: the test case for issue31845 uses Py_Main, *not* Py_Initialize (since it's a command line test, not an embedding test). That means it's currently possible for the sequence of operations in https://github.com/python/cpython/blob/7cbde0e09daba4259565738e48f141851287fe29/Python/pylifecycle.c#L913 to be wrong (or missing steps) without causing the test suite to fail. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 27 23:56:39 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 28 Jul 2018 03:56:39 +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: <1532750199.18.0.56676864532.issue34247@psf.upfronthosting.co.za> Nick Coghlan added the comment: Comparing to Python 3.6, we can see that the code to update the C global flags from the environment variables used to live directly in _PyInitializeEx_Private: https://github.com/python/cpython/blob/9d85856044a2c7d681ea38b5ff99af375b228a0f/Python/pylifecycle.c#L305 In Python 3.7 that section (https://github.com/python/cpython/blob/3.7/Python/pylifecycle.c#L913 ) currently calls _PyCoreConfig_Read instead, which *only* updates the config struct - it doesn't update the C level global variables. By contrast, Py_Main eventually calls https://github.com/python/cpython/blob/7cbde0e09daba4259565738e48f141851287fe29/Modules/main.c#L1394 which handles writing the state from the config struct back to the global variables. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 00:04:44 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 28 Jul 2018 04:04:44 +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: <1532750684.52.0.56676864532.issue34247@psf.upfronthosting.co.za> Nick Coghlan added the comment: Ned, I think we should consider this a release blocker for 3.7.1 ---------- nosy: +ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 00:00:08 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 28 Jul 2018 04:00: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: <1532750408.69.0.56676864532.issue34247@psf.upfronthosting.co.za> Nick Coghlan added the comment: Next steps: - add a test case that runs the same sys.flags checks as in https://github.com/python/cpython/commit/d7ac06126db86f76ba92cbca4cb702852a321f78, but as a test_embed embedding test using Py_Initialize rather than Py_Main - create a shared internal API that both Py_Main and Py_Initialize can use to write the environment variable settings back to the global variables ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 01:09:18 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 28 Jul 2018 05:09:18 +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: <1532754558.52.0.56676864532.issue34247@psf.upfronthosting.co.za> Nick Coghlan added the comment: This seems closely related to the work Victor is already pursuing to resolve bpo-34170 for Python 3.8 (e.g. https://github.com/python/cpython/commit/56b29b6d6fa3eb32bb1533ee3f21b1e7135648a0 ). The bpo-34170 changes are more invasive than we'd like for a maintenance release, but it would be preferable to keep at least any new Python 3.7 test cases somewhat aligned with their Python 3.8 counterparts. ---------- assignee: -> vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 01:15:54 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 28 Jul 2018 05:15:54 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1532754954.13.0.56676864532.issue29710@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset b4bc5cab82e6855e4ebc33ba0b669ddffad30fb3 by Nick Coghlan (Sanyam Khurana) in branch 'master': bpo-29710: Clarify documentation for Bitwise binary operation (GH-1691) https://github.com/python/cpython/commit/b4bc5cab82e6855e4ebc33ba0b669ddffad30fb3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 01:16:05 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 28 Jul 2018 05:16:05 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1532754965.32.0.56676864532.issue29710@psf.upfronthosting.co.za> Change by miss-islington : ---------- keywords: +patch pull_requests: +8025 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 01:17:00 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 28 Jul 2018 05:17:00 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1532755020.48.0.56676864532.issue29710@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8026 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 01:18:35 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 28 Jul 2018 05:18:35 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1532755115.25.0.56676864532.issue29710@psf.upfronthosting.co.za> Nick Coghlan added the comment: Mark & Tim: thanks for the discussion and clarifications above, I learned some new things myself! Sanyam: thanks for the patch, and for your patience while we figured out what we wanted the new wording to actually say :) (Technically the backport PRs are still in progress, but I'll track that through the GitHub notifications) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 03:48:32 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 28 Jul 2018 07:48:32 +0000 Subject: [issue34254] Include type annotations in error messages for better errors Message-ID: <1532764112.96.0.56676864532.issue34254@psf.upfronthosting.co.za> New submission from Karthikeyan Singaravelan : Python 3 supports type annotations in functions but when there is a TypeError due to calling a function then only the arguments are given in the error message. If the function has type annotations then adding them to the error message will give better experience and context. This doesn't break any existing code without type annotations but improves errors for code that has type annotations giving a better error reporting experience. Currently format_missing method one of the methods used to raise TypeError that returns the name of the required positional arguments. The function receives the code object and type annotations are present in the function object. Hence I have used the code_object->co_name to get the function object from globals. After getting the function object I go through the annotations if present to form an error message to be attached with the existing error message. I have implemented it in my branch : https://github.com/tirkarthi/cpython/tree/error-message-annotations # foo_signature.py from typing import List, Dict, NoReturn def get_profile_a(user_id: int, likes: Dict[str, int]) -> Dict[str, int]: return {'user_id': user_id, 'likes': len(likes.keys())} if __name__ == "__main__": get_profile_a() # Error message for functions without type hints patch cpython git:(master) ? ./python foo_signature.py Traceback (most recent call last): File "foo_signature.py", line 11, in get_profile_a() TypeError: get_profile_a() missing 2 required positional arguments: 'user_id' and 'likes' # Error message for functions with type hints patch in my branch cpython git:(error-message-annotations) ? ./python foo_signature.py Traceback (most recent call last): File "foo_signature.py", line 11, in get_profile_a() TypeError: get_profile_a() missing 2 required positional arguments: 'user_id' and 'likes' Annotation: (user_id: , likes: typing.Dict[str, int], return: typing.Dict[str, int]) The proposed patch adds the annotations in the end thus giving more context to the user. Pros : * Better error reporting and more context that helps beginners like Elm/Rust that have improved error messages. * This will also motivate developers to write type annotations since error messages become more useful. Cons : * Since code_object is present in the call site where TypeError is raised I need to do a lookup of the globals to get the function object. This can be fixed in the way get_type_hints works on a function object. This also blocks me from writing tests where the function is defined inside a class that inherits from unittest.TestCase. * After getting the annotations I need to form a string with the relevant parameters. Since most of them are hash lookups I don't think there is a cost involved here. Most of the time TypeError is raised to the user. My C skills are also low and I hope code can be improved much better here. I am good with the core team rejecting this patch but just wanted to put forward the idea. I have also created a thread in python-ideas mailing list to gather feedback about this and hope it gains some traction. I received good feedback from Ethan Smith, mypy core developer on Reddit : https://www.reddit.com/r/Python/comments/92eh1g/type_annotations_in_error_messages_for_better/e3655z1/ python-ideas thread : https://mail.python.org/pipermail/python-ideas/2018-July/052463.html I am adding Raymond and Terry since the previous PRs I have raised regarding error messages were reviewed by them. Also from the past discussions they make decisions on whether the change and it's effect is worth enough to be added to the core given the implementation complexity. Feel free to un-assign yourself if this is irrelevant. Thanks ---------- components: Interpreter Core messages: 322527 nosy: rhettinger, terry.reedy, xtreak priority: normal severity: normal status: open title: Include type annotations in error messages for better errors type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 04:52:56 2018 From: report at bugs.python.org (TJG) Date: Sat, 28 Jul 2018 08:52:56 +0000 Subject: [issue34239] Convert test_bz2 to use tempfile In-Reply-To: <1532736369.61.0.56676864532.issue34239@psf.upfronthosting.co.za> Message-ID: <02be625d-93d1-38e7-8512-c18405b13d26@timgolden.me.uk> TJG added the comment: Thanks, Brett. I'll address Serhiy's comment with a new PR and then tidy yup. ---------- nosy: +tjguk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 04:53:00 2018 From: report at bugs.python.org (Berker Peksag) Date: Sat, 28 Jul 2018 08:53:00 +0000 Subject: [issue34251] MSI build fails In-Reply-To: <1532721155.89.0.56676864532.issue34251@psf.upfronthosting.co.za> Message-ID: <1532767980.9.0.56676864532.issue34251@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- keywords: +patch pull_requests: +8027 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 05:10:28 2018 From: report at bugs.python.org (Berker Peksag) Date: Sat, 28 Jul 2018 09:10:28 +0000 Subject: [issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string In-Reply-To: <1512434453.0.0.213398074469.issue32215@psf.upfronthosting.co.za> Message-ID: <1532769028.81.0.56676864532.issue32215@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- keywords: +patch pull_requests: +8028 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 05:13:43 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 28 Jul 2018 09:13:43 +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: <1532769223.56.0.56676864532.issue34247@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'm at the EuroPython sprints and currently working on a testcase for this. Should be a nice way to get back into actively contributing to CPython :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 05:14:36 2018 From: report at bugs.python.org (Berker Peksag) Date: Sat, 28 Jul 2018 09:14:36 +0000 Subject: [issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string In-Reply-To: <1512434453.0.0.213398074469.issue32215@psf.upfronthosting.co.za> Message-ID: <1532769276.55.0.56676864532.issue32215@psf.upfronthosting.co.za> Berker Peksag added the comment: https://github.com/python/cpython/commit/ab994ed8b97e1b0dac151ec827c857f5e7277565 wasn't merged in the 2.7 branch, so this should only be reproduced in Python 3.6+. ---------- components: -Interpreter Core versions: +Python 3.8 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 05:23:42 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 28 Jul 2018 09:23:42 +0000 Subject: [issue34255] test_embed skipped when srcdir != builddir Message-ID: <1532769822.63.0.56676864532.issue34255@psf.upfronthosting.co.za> New submission from Ronald Oussoren : The testsuite skips test_embed when srcdir != builddir, that's because test.test_embed assumes that _testembed is in the source directory. I noticed this while working on issue34247. ---------- components: Tests messages: 322531 nosy: ronaldoussoren priority: normal severity: normal stage: needs patch status: open title: test_embed skipped when srcdir != builddir type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 05:24:48 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 28 Jul 2018 09:24:48 +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: <1532769888.82.0.56676864532.issue34247@psf.upfronthosting.co.za> Ronald Oussoren added the comment: FYI: I've filed issue34255 while working on this, test_embed assumes that you're building in the source directory (which I usually don't do). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 05:52:51 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 28 Jul 2018 09:52:51 +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: <1532771571.29.0.56676864532.issue34247@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Interesting... pylifecycle.c uses code in main.c, I hadn't expected that. If I've read the code correctly Py_Initialize won't look at PYTHONOPTIMZE at all (and other environment variables that have a command-line equivalent). Those are read in main.c:cmdline_get_env_flags, which is only called (indirectly) from Py_Main and _Py_UnixMain. I'm note sure what's the correct solution for this. 1. Reading PYTHONOPTIMZE (and related variables) could be done in _PyCoreConfig_Read, but that would then need to grow a flag to ensure that this won't replace values calculated earlier in the implementation of Py_Main 2. Writing back the global variables is probably best done using a new function (lets _PyCoreConfig_SetGlobals), mirroring pymain_set_global_config but using a _PyCoreConfig config structure instead of the command-line structure used by the latter function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 05:59:12 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 28 Jul 2018 09:59:12 +0000 Subject: [issue4963] mimetypes.guess_extension result changes after mimetypes.init() In-Reply-To: <1232107494.83.0.0570958889295.issue4963@psf.upfronthosting.co.za> Message-ID: <1532771952.6.0.56676864532.issue4963@psf.upfronthosting.co.za> Christian Heimes added the comment: The PR has a merge conflict. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 06:01:27 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 28 Jul 2018 10:01:27 +0000 Subject: [issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0) In-Reply-To: <1241895448.39.0.497331485225.issue5978@psf.upfronthosting.co.za> Message-ID: <1532772087.13.0.56676864532.issue5978@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 937fb55d35373fd2701078251840b6be0465a6e1 by Christian Heimes (Andr?s Delfino) in branch 'master': bpo-5978: Document that profiling needs cmd/function to return (GH-7938) https://github.com/python/cpython/commit/937fb55d35373fd2701078251840b6be0465a6e1 ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 06:01:45 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 28 Jul 2018 10:01:45 +0000 Subject: [issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0) In-Reply-To: <1241895448.39.0.497331485225.issue5978@psf.upfronthosting.co.za> Message-ID: <1532772105.48.0.56676864532.issue5978@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8029 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 06:03:26 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 28 Jul 2018 10:03:26 +0000 Subject: [issue33921] Explain that '' can be used to bind to all interfaces for the AF_INET address family in the docs In-Reply-To: <1529535395.97.0.56676864532.issue33921@psf.upfronthosting.co.za> Message-ID: <1532772206.24.0.56676864532.issue33921@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 95dfb9c3aefdc981d23af700b753a6c97159ccad by Christian Heimes (johnthagen) in branch 'master': bpo-33921: Clarify how to bind to all interfaces using socket (GH-7877) https://github.com/python/cpython/commit/95dfb9c3aefdc981d23af700b753a6c97159ccad ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 06:03:33 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 28 Jul 2018 10:03:33 +0000 Subject: [issue33921] Explain that '' can be used to bind to all interfaces for the AF_INET address family in the docs In-Reply-To: <1529535395.97.0.56676864532.issue33921@psf.upfronthosting.co.za> Message-ID: <1532772213.74.0.56676864532.issue33921@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8030 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 06:04:32 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 28 Jul 2018 10:04:32 +0000 Subject: [issue33921] Explain that '' can be used to bind to all interfaces for the AF_INET address family in the docs In-Reply-To: <1529535395.97.0.56676864532.issue33921@psf.upfronthosting.co.za> Message-ID: <1532772272.55.0.56676864532.issue33921@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8031 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 06:09:09 2018 From: report at bugs.python.org (Tim McNamara) Date: Sat, 28 Jul 2018 10:09:09 +0000 Subject: [issue34256] Python treats ASCII record seperator ('\x1e as a newline Message-ID: <1532772549.2.0.56676864532.issue34256@psf.upfronthosting.co.za> New submission from Tim McNamara : Hello, I apologize if this is expected behavior, however it doesn't appear to be documented haven't. >>> "single\x1eline\x1estring".splitlines() ['single', 'line', 'string'] ---------- messages: 322537 nosy: timClicks priority: normal severity: normal status: open title: Python treats ASCII record seperator ('\x1e as a newline versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 06:14:39 2018 From: report at bugs.python.org (Tim McNamara) Date: Sat, 28 Jul 2018 10:14:39 +0000 Subject: [issue34256] Python treats ASCII record seperator ('\x1e') as a newline In-Reply-To: <1532772549.2.0.56676864532.issue34256@psf.upfronthosting.co.za> Message-ID: <1532772879.32.0.56676864532.issue34256@psf.upfronthosting.co.za> Tim McNamara added the comment: Hello, I apologize if this is expected behavior, however it doesn't appear to be documented. >>> "single\x1eline\x1estring".splitlines() ['single', 'line', 'string'] The glossary refers to the universal newlines as: > universal newlines > A manner of interpreting text streams in which all of the > following are recognized as ending a line: the Unix end-of-line > convention '\n', the Windows convention '\r\n', and the old > Macintosh convention '\r'. See PEP 278 and PEP 3116, as well as > bytes.splitlines() for an additional use. https://docs.python.org/3/glossary.html#term-universal-newlines According to Wikipedia, pre-POSIX QNX uses `\x1e` as a newline (https://en.wikipedia.org/wiki/Newline#Representation), but I don't think that it should be treated as the default. ---------- title: Python treats ASCII record seperator ('\x1e as a newline -> Python treats ASCII record seperator ('\x1e') as a newline _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 06:28:04 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Sat, 28 Jul 2018 10:28:04 +0000 Subject: [issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0) In-Reply-To: <1241895448.39.0.497331485225.issue5978@psf.upfronthosting.co.za> Message-ID: <1532773684.31.0.56676864532.issue5978@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- pull_requests: +8032 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 06:31:52 2018 From: report at bugs.python.org (Rico Lin) Date: Sat, 28 Jul 2018 10:31:52 +0000 Subject: [issue34257] SSL should accept cert content, instead of just cert file path Message-ID: <1532773912.07.0.56676864532.issue34257@psf.upfronthosting.co.za> New submission from Rico Lin : Currently, SSL module [1] only allows file path as input. That led to a lot of libraries only accept file path to a local file. This lead to issues when people who trigger this python code, didn't have any right to access a local file. Here are two examples: 1. In multi-cloud orchestration service design, you (as an operator) like to create resources in another cloud with orchestration service(like Heat in OpenStack), but you like to set up SSL for this connection. You should not allow accessing a local file from the first cloud (where the orchestration service is running). And you can't guarantee the first cloud provider allow you to inject a Cert file in their environment. In this case we need to allow operators to input their own cert information and parse it to ssl option for request. 2. Serverless. In serverless, we give a python code and cloud will provide an environment to run it. We can try to inject cert when we try to create environment for operators, but it will be more secure to directly pass it to python instead of store it around. The first case is what we're looking for an answer. Didn't look into the design for the second case, but I guess that might face the same issue. [1] https://github.com/python/cpython/blob/master/Modules/_ssl.c#L3683 ---------- assignee: christian.heimes components: SSL messages: 322539 nosy: christian.heimes, rico-lin priority: normal severity: normal status: open title: SSL should accept cert content, instead of just cert file path type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 06:32:09 2018 From: report at bugs.python.org (Rico Lin) Date: Sat, 28 Jul 2018 10:32:09 +0000 Subject: [issue34257] SSL should accept cert content, instead of just cert file path In-Reply-To: <1532773912.07.0.56676864532.issue34257@psf.upfronthosting.co.za> Message-ID: <1532773929.69.0.56676864532.issue34257@psf.upfronthosting.co.za> Change by Rico Lin : ---------- versions: +Python 3.5 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 06:40:46 2018 From: report at bugs.python.org (Roundup Robot) Date: Sat, 28 Jul 2018 10:40:46 +0000 Subject: [issue34113] LLTRACE segv In-Reply-To: <1531601662.45.0.56676864532.issue34113@psf.upfronthosting.co.za> Message-ID: <1532774446.4.0.56676864532.issue34113@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +8033 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 06:52:37 2018 From: report at bugs.python.org (=?utf-8?b?TWlja2HDq2wgUy4=?=) Date: Sat, 28 Jul 2018 10:52:37 +0000 Subject: [issue34035] zipfile: AttributeError in "seek" method of "_SharedFile" class In-Reply-To: <1530642274.73.0.56676864532.issue34035@psf.upfronthosting.co.za> Message-ID: <1532775157.88.0.56676864532.issue34035@psf.upfronthosting.co.za> Micka?l S. added the comment: Little word to say I am working on at EuroPython 2018. ---------- nosy: +Tiger-222 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 06:55:08 2018 From: report at bugs.python.org (roger) Date: Sat, 28 Jul 2018 10:55:08 +0000 Subject: [issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7 In-Reply-To: <1532530540.72.0.56676864532.issue34226@psf.upfronthosting.co.za> Message-ID: <1532775308.17.0.56676864532.issue34226@psf.upfronthosting.co.za> roger added the comment: working on this on europython ---------- nosy: +rogerduran _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 06:59:29 2018 From: report at bugs.python.org (Aleksa Bulatovic) Date: Sat, 28 Jul 2018 10:59:29 +0000 Subject: [issue34258] Python shell keeps restarting Message-ID: <1532775569.15.0.56676864532.issue34258@psf.upfronthosting.co.za> New submission from Aleksa Bulatovic : I was writing a code for my test in idle python.When i run the module it's just keeps restarting. This is my code: sins = 0 check = input() if check == "check_sins": print(sins) second = input("Ok,you can start when you are ready,type Im Ready! if you want to start the game") print("Welcome to How smart are you test") name = input("What's your name? ") print(name) if name == "Dimitrije": print("Nice to meet you Dimitrije") start = input("Ready to start the test: ") if start == "Yes": print("A) Gorillaz") print("B) Alvin and the chipmunks") print("C) Despacito 2") print("D) Who are you even") q1 = input("Which was the first animated band ever created? ") a1 = "A) Gorillaz" b1 = "B) Alvin and the chipmunks" c1 = "C) Despacito 2" d1 = "D) Who are you even" if q1 == "A" or q1 == "a": print("You are right,adding 10 sins for that") sins += 10 else: sins = sins - 10 print("A) Milan") print("B) ") print("") print("") else: print(second) if start == "Im ready!": print("Ok,let's start") print(q1) print(a1) print(b1) print(c1) print(d1) if q1 == "A": print("You are right,adding 10 sins for that") sins = sins + 10 Note:I started learning python yesterday and sins are just a refrence of the youtube channel name called CinemaSins.So don't judge. ---------- components: Windows messages: 322542 nosy: Cross!Alex21, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Python shell keeps restarting versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 07:14:21 2018 From: report at bugs.python.org (Eivind Teig) Date: Sat, 28 Jul 2018 11:14:21 +0000 Subject: [issue22062] Fix pathlib.Path.(r)glob doc glitches. In-Reply-To: <1406239862.0.0.293742999811.issue22062@psf.upfronthosting.co.za> Message-ID: <1532776461.73.0.56676864532.issue22062@psf.upfronthosting.co.za> Change by Eivind Teig : ---------- pull_requests: +8034 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 07:24:07 2018 From: report at bugs.python.org (Pablo S Blum de Aguiar) Date: Sat, 28 Jul 2018 11:24:07 +0000 Subject: [issue32814] smtplib.send_message mishandles 8BITMIME RFC 6152 In-Reply-To: <1518259581.24.0.467229070634.issue32814@psf.upfronthosting.co.za> Message-ID: <1532777047.76.0.56676864532.issue32814@psf.upfronthosting.co.za> Pablo S Blum de Aguiar added the comment: This is just to note that I'm investigating this as part of the CPython sprint in EuroPython. ---------- nosy: +scorphus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 07:24:46 2018 From: report at bugs.python.org (Pablo S Blum de Aguiar) Date: Sat, 28 Jul 2018 11:24:46 +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: <1532777086.86.0.56676864532.issue34246@psf.upfronthosting.co.za> Pablo S Blum de Aguiar added the comment: This is just to note that I'm investigating this issue as part of the CPython sprint in EuroPython. ---------- nosy: +scorphus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 07:28:57 2018 From: report at bugs.python.org (Roundup Robot) Date: Sat, 28 Jul 2018 11:28:57 +0000 Subject: [issue33747] Failed separate test_patch_propogrates_exc_on_exit in test_unittest In-Reply-To: <1528027150.62.0.592728768989.issue33747@psf.upfronthosting.co.za> Message-ID: <1532777337.16.0.56676864532.issue33747@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +8035 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 07:52:07 2018 From: report at bugs.python.org (Tim Hoffmann) Date: Sat, 28 Jul 2018 11:52:07 +0000 Subject: [issue34259] Improve docstring of list.sort Message-ID: <1532778727.04.0.56676864532.issue34259@psf.upfronthosting.co.za> New submission from Tim Hoffmann : The current docstring of list.sort is just "Stable sort *IN PLACE*." This is missing a description of the arguments key and reverse. Also a short explanation of stable and in-place would be helpful for less experienced users. ---------- messages: 322545 nosy: timhoffm priority: normal pull_requests: 8036 severity: normal status: open title: Improve docstring of list.sort type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 07:53:40 2018 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 28 Jul 2018 11:53:40 +0000 Subject: [issue18372] _Pickler_New() doesn't call PyObject_GC_Track(self) In-Reply-To: <1373064790.68.0.920175606727.issue18372@psf.upfronthosting.co.za> Message-ID: <1532778820.43.0.56676864532.issue18372@psf.upfronthosting.co.za> Change by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:20:27 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 28 Jul 2018 12:20:27 +0000 Subject: [issue22062] Fix pathlib.Path.(r)glob doc glitches. In-Reply-To: <1406239862.0.0.293742999811.issue22062@psf.upfronthosting.co.za> Message-ID: <1532780427.74.0.56676864532.issue22062@psf.upfronthosting.co.za> Change by Steve Dower : ---------- versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:21:01 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 28 Jul 2018 12:21:01 +0000 Subject: [issue1100942] Add datetime.time.strptime and datetime.date.strptime Message-ID: <1532780461.42.0.56676864532.issue1100942@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:22:58 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 28 Jul 2018 12:22:58 +0000 Subject: [issue22062] Fix pathlib.Path.(r)glob doc glitches. In-Reply-To: <1406239862.0.0.293742999811.issue22062@psf.upfronthosting.co.za> Message-ID: <1532780578.08.0.56676864532.issue22062@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:23:45 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 28 Jul 2018 12:23:45 +0000 Subject: [issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0) In-Reply-To: <1241895448.39.0.497331485225.issue5978@psf.upfronthosting.co.za> Message-ID: <1532780625.08.0.56676864532.issue5978@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c6801b48a1964d87a77f1303e0c6ddf31f54259b by Miss Islington (bot) in branch '3.7': bpo-5978: Document that profiling needs cmd/function to return (GH-7938) https://github.com/python/cpython/commit/c6801b48a1964d87a77f1303e0c6ddf31f54259b ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:24:37 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 28 Jul 2018 12:24:37 +0000 Subject: [issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0) In-Reply-To: <1241895448.39.0.497331485225.issue5978@psf.upfronthosting.co.za> Message-ID: <1532780677.87.0.56676864532.issue5978@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 0041d721a6f6b312ef762838d390fc4d64cf5e3a by Steve Dower (Andr?s Delfino) in branch '3.6': [3.6] bpo-5978: Document that profiling needs cmd/function to return (GH-8515) https://github.com/python/cpython/commit/0041d721a6f6b312ef762838d390fc4d64cf5e3a ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:26:51 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 28 Jul 2018 12:26:51 +0000 Subject: [issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0) In-Reply-To: <1241895448.39.0.497331485225.issue5978@psf.upfronthosting.co.za> Message-ID: <1532780811.11.0.56676864532.issue5978@psf.upfronthosting.co.za> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:27:18 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 28 Jul 2018 12:27:18 +0000 Subject: [issue33921] Explain that '' can be used to bind to all interfaces for the AF_INET address family in the docs In-Reply-To: <1529535395.97.0.56676864532.issue33921@psf.upfronthosting.co.za> Message-ID: <1532780838.32.0.56676864532.issue33921@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 23355445625b8b41030dbda9decaf2f4aa7035a6 by Miss Islington (bot) in branch '3.7': bpo-33921: Clarify how to bind to all interfaces using socket (GH-7877) https://github.com/python/cpython/commit/23355445625b8b41030dbda9decaf2f4aa7035a6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:27:30 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 28 Jul 2018 12:27:30 +0000 Subject: [issue33921] Explain that '' can be used to bind to all interfaces for the AF_INET address family in the docs In-Reply-To: <1529535395.97.0.56676864532.issue33921@psf.upfronthosting.co.za> Message-ID: <1532780850.12.0.56676864532.issue33921@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 30f295b85ece2dc2b2b65018bd15090efa1de7dc by Miss Islington (bot) in branch '3.6': bpo-33921: Clarify how to bind to all interfaces using socket (GH-7877) https://github.com/python/cpython/commit/30f295b85ece2dc2b2b65018bd15090efa1de7dc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:30:05 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 28 Jul 2018 12:30:05 +0000 Subject: [issue33921] Explain that '' can be used to bind to all interfaces for the AF_INET address family in the docs In-Reply-To: <1529535395.97.0.56676864532.issue33921@psf.upfronthosting.co.za> Message-ID: <1532781005.79.0.56676864532.issue33921@psf.upfronthosting.co.za> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:31:52 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 28 Jul 2018 12:31:52 +0000 Subject: [issue8145] Documentation about sqlite3 isolation_level In-Reply-To: <1268643705.49.0.319902511171.issue8145@psf.upfronthosting.co.za> Message-ID: <1532781112.52.0.56676864532.issue8145@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:36:12 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 28 Jul 2018 12:36:12 +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: <1532781372.35.0.56676864532.issue34247@psf.upfronthosting.co.za> Change by Ronald Oussoren : ---------- keywords: +patch pull_requests: +8037 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:36:12 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 28 Jul 2018 12:36: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: <1532781372.75.0.665841612001.issue34170@psf.upfronthosting.co.za> Change by Ronald Oussoren : ---------- pull_requests: +8038 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:39:34 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 28 Jul 2018 12:39:34 +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: <1532781574.09.0.56676864532.issue34247@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've created a pull request that seems to work properly, although I am not entirely sure that this is the right way to fix this. As I mentioned in the pull request I created it against the 3.7 branch because of bpo-34170, but would happily rebase it for master. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:43:01 2018 From: report at bugs.python.org (Zsolt Cserna) Date: Sat, 28 Jul 2018 12:43:01 +0000 Subject: [issue34260] shutil.copy2 is not the same as cp -p Message-ID: <1532781781.14.0.56676864532.issue34260@psf.upfronthosting.co.za> New submission from Zsolt Cserna : The docstring of shutil.copy2 says the following: Copy data and all stat info ("cp -p src dst"). This can be misleading as it is not the same as 'cp -p', as it does not copy the file owner (uid and gid). That would need to have a chown() call to be made, which is currently not called unavailable. I would like to have the documentation fixed by adding that it does not copies file owner and group. ---------- components: Library (Lib) messages: 322551 nosy: csernazs priority: normal severity: normal status: open title: shutil.copy2 is not the same as cp -p versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:47:29 2018 From: report at bugs.python.org (Tim Hoffmann) Date: Sat, 28 Jul 2018 12:47:29 +0000 Subject: [issue34261] Add description to clinic.py Message-ID: <1532782049.63.0.56676864532.issue34261@psf.upfronthosting.co.za> New submission from Tim Hoffmann : When trying to update a docstring of a CPython builtin, I had problems finding out what Argument Clinic actually does. First, I looked at the devguide, which does only mention that the clinic exists, but not what it does or how it's used. Next, I tried "clinic.py --help". This unfortunately doesn't tell anything about itself. The actual clinic doc is at https://docs.python.org/3/howto/clinic.html To make the clinic a bit more discoverable, I propose a description including the link to clinic.py (see github #8518). ---------- components: Argument Clinic messages: 322552 nosy: larry, timhoffm priority: normal pull_requests: 8039 severity: normal status: open title: Add description to clinic.py versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:47:32 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 28 Jul 2018 12:47:32 +0000 Subject: [issue33289] tkinter askcolor returning floats for r, g, b values instead of ints In-Reply-To: <1523915381.82.0.682650639539.issue33289@psf.upfronthosting.co.za> Message-ID: <1532782052.11.0.56676864532.issue33289@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:47:34 2018 From: report at bugs.python.org (Petr Viktorin) Date: Sat, 28 Jul 2018 12:47:34 +0000 Subject: [issue33666] Document removal of os.errno In-Reply-To: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> Message-ID: <1532782054.08.0.56676864532.issue33666@psf.upfronthosting.co.za> Petr Viktorin added the comment: New changeset 1d2dafa249c7fb34f3d24e7a77d1bea02907d92b by Petr Viktorin (INADA Naoki) in branch 'master': bpo-33666: Add what's new entry for os.errno removal (GH-#8497) https://github.com/python/cpython/commit/1d2dafa249c7fb34f3d24e7a77d1bea02907d92b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:48:30 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 28 Jul 2018 12:48:30 +0000 Subject: [issue34260] shutil.copy2 is not the same as cp -p In-Reply-To: <1532781781.14.0.56676864532.issue34260@psf.upfronthosting.co.za> Message-ID: <1532782110.19.0.56676864532.issue34260@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:49:02 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 28 Jul 2018 12:49:02 +0000 Subject: [issue34088] [EASY] sndhdr.what() throws exceptions on unknown files In-Reply-To: <1531255806.14.0.56676864532.issue34088@psf.upfronthosting.co.za> Message-ID: <1532782142.91.0.56676864532.issue34088@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:55:14 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 28 Jul 2018 12:55:14 +0000 Subject: [issue33476] String index out of range in get_group(), email/_header_value_parser.py In-Reply-To: <1526172602.81.0.682650639539.issue33476@psf.upfronthosting.co.za> Message-ID: <1532782514.07.0.56676864532.issue33476@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 8fe9eed937cb69b5e26ac6e36a90b5360eb11277 by Steve Dower (Dong-hee Na) in branch 'master': bpo-33476: Fix _header_value_parser when address group is missing final ';' (GH-7484) https://github.com/python/cpython/commit/8fe9eed937cb69b5e26ac6e36a90b5360eb11277 ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:55:21 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 28 Jul 2018 12:55:21 +0000 Subject: [issue33476] String index out of range in get_group(), email/_header_value_parser.py In-Reply-To: <1526172602.81.0.682650639539.issue33476@psf.upfronthosting.co.za> Message-ID: <1532782521.46.0.56676864532.issue33476@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8040 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:56:05 2018 From: report at bugs.python.org (Roundup Robot) Date: Sat, 28 Jul 2018 12:56:05 +0000 Subject: [issue34260] shutil.copy2 is not the same as cp -p In-Reply-To: <1532781781.14.0.56676864532.issue34260@psf.upfronthosting.co.za> Message-ID: <1532782565.52.0.56676864532.issue34260@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +8041 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:56:20 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 28 Jul 2018 12:56:20 +0000 Subject: [issue33476] String index out of range in get_group(), email/_header_value_parser.py In-Reply-To: <1526172602.81.0.682650639539.issue33476@psf.upfronthosting.co.za> Message-ID: <1532782580.28.0.56676864532.issue33476@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8042 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:56:35 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 28 Jul 2018 12:56:35 +0000 Subject: [issue30974] Update os.samefile docstring to match documentation In-Reply-To: <1500538030.77.0.17785692497.issue30974@psf.upfronthosting.co.za> Message-ID: <1532782595.63.0.56676864532.issue30974@psf.upfronthosting.co.za> Steve Dower added the comment: I think the docs are too specific about the mechanism used here - if we document *how* it works then we may not be able to make it work correctly (with a different mechanic) on a different platform. ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:56:47 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 28 Jul 2018 12:56:47 +0000 Subject: [issue30974] Update os.samefile docstring to match documentation In-Reply-To: <1500538030.77.0.17785692497.issue30974@psf.upfronthosting.co.za> Message-ID: <1532782607.44.0.56676864532.issue30974@psf.upfronthosting.co.za> Steve Dower added the comment: Sorry, I meant the docs after the patch. Before, it's fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:56:59 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 28 Jul 2018 12:56:59 +0000 Subject: [issue30974] Update os.samefile docstring to match documentation In-Reply-To: <1500538030.77.0.17785692497.issue30974@psf.upfronthosting.co.za> Message-ID: <1532782619.74.0.56676864532.issue30974@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:58:07 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 28 Jul 2018 12:58:07 +0000 Subject: [issue24356] venv documentation incorrect / misleading In-Reply-To: <1433197293.5.0.203233804739.issue24356@psf.upfronthosting.co.za> Message-ID: <1532782687.62.0.56676864532.issue24356@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 50326927465c3f5c6c0168fc43310c8e97db0a47 by Steve Dower (Elena Oat) in branch 'master': bpo-24356: Specify which Python binary will be used with venv (GH-6589) https://github.com/python/cpython/commit/50326927465c3f5c6c0168fc43310c8e97db0a47 ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 08:58:41 2018 From: report at bugs.python.org (=?utf-8?q?W=C3=B6llert?=) Date: Sat, 28 Jul 2018 12:58:41 +0000 Subject: [issue34262] Asyncio test fails under Win 7 Message-ID: <1532782721.54.0.56676864532.issue34262@psf.upfronthosting.co.za> New submission from W?llert : When running tests I encounter the following error for the test: test_sock_sendfile_not_regular_file (test.test_asyncio.test_proactor_events.ProactorEventLoopUnixSockSendfileTests) --------------------------- Microsoft Visual C++ Runtime Library --------------------------- Debug Assertion Failed! Program: ...\EP2018\cpython\PCbuild\win32\python_d.exe File: minkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp Line: 257 Expression: fh >= 0 && (unsigned)fh < (unsigned)_nhandle --------------------------- However, when ignoring the MSCR error, the tests succeed without failing. In addition the following failed (but not consistently): ====================================================================== FAIL: test_sendfile_close_peer_in_the_middle_of_receiving (test.test_asyncio.test_events.ProactorEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Users\woellert\Desktop\EP2018\cpython\lib\test\test_asyncio\test_events.py", line 2510, in test_sendfile_close_peer_in_the_middle_of_receiving self.file.tell()) AssertionError: False is not true : 131072 ---------------------------------------------------------------------- Specs: Windows 7 SP1 64bit, Process: - Cloned master from github - Installed Visual Studio 2017 Community - Compiled with `PCbuild\build.bat -e -d` (also used 64bit via -p x64) - Ran tests with `python.bat -m test.test_asyncio -v` ---------- components: Build, Windows, asyncio messages: 322558 nosy: asvetlov, pansen, paul.moore, steve.dower, tim.golden, yselivanov, zach.ware priority: normal severity: normal status: open title: Asyncio test fails under Win 7 type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 09:02:09 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 28 Jul 2018 13:02:09 +0000 Subject: [issue24356] venv documentation incorrect / misleading In-Reply-To: <1433197293.5.0.203233804739.issue24356@psf.upfronthosting.co.za> Message-ID: <1532782929.52.0.56676864532.issue24356@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +8043 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 09:04:20 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 28 Jul 2018 13:04:20 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1532783060.55.0.56676864532.issue32769@psf.upfronthosting.co.za> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 09:04:42 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 28 Jul 2018 13:04:42 +0000 Subject: [issue33601] [EASY DOC] Py_UTF8Mode is not documented In-Reply-To: <1526996981.47.0.682650639539.issue33601@psf.upfronthosting.co.za> Message-ID: <1532783082.96.0.56676864532.issue33601@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 09:06:29 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 28 Jul 2018 13:06:29 +0000 Subject: [issue13474] Mention of "-m" Flag Missing From Doc on Execution Model In-Reply-To: <1322165458.97.0.989343856998.issue13474@psf.upfronthosting.co.za> Message-ID: <1532783189.21.0.56676864532.issue13474@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 09:10:52 2018 From: report at bugs.python.org (Petr Viktorin) Date: Sat, 28 Jul 2018 13:10:52 +0000 Subject: [issue34113] LLTRACE segv In-Reply-To: <1531601662.45.0.56676864532.issue34113@psf.upfronthosting.co.za> Message-ID: <1532783452.6.0.56676864532.issue34113@psf.upfronthosting.co.za> Change by Petr Viktorin : ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 09:18:32 2018 From: report at bugs.python.org (Petr Viktorin) Date: Sat, 28 Jul 2018 13:18:32 +0000 Subject: [issue34113] LLTRACE segv In-Reply-To: <1531601662.45.0.56676864532.issue34113@psf.upfronthosting.co.za> Message-ID: <1532783912.34.0.56676864532.issue34113@psf.upfronthosting.co.za> Petr Viktorin added the comment: The problem here is that tracing for STACKADJ prints out the top of the stack *after* adjustment. This is OK for growing the stack, but not for shrinking it (e.g. calling STACKADJ(-3) pops off three things at once, which can leave TOP undefined when it's printed out). On the EuroPython sprints, I recommended splitting STACKADJ into STACKADJ_GROW and STACKADJ_SHRINK, since the printing behavior should be different. This is performance-critical code; it needs to be reviewed carefully. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 09:24:45 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 28 Jul 2018 13:24:45 +0000 Subject: [issue33666] Document removal of os.errno In-Reply-To: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> Message-ID: <1532784285.05.0.56676864532.issue33666@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8044 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 09:27:43 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 28 Jul 2018 13:27:43 +0000 Subject: [issue33111] Merely importing tkinter breaks parallel code (multiprocessing, sharedmem) In-Reply-To: <1521573656.32.0.467229070634.issue33111@psf.upfronthosting.co.za> Message-ID: <1532784463.65.0.56676864532.issue33111@psf.upfronthosting.co.za> Ronald Oussoren added the comment: That's annoying, I cannot reproduce the issue on macOS 10.13. I don't have access to my test VM running 10.11 at the moment, I'll work on documenting this when I get back home (and do have access to 10.11 again). BTW. I don't know if providing a reliable test is possible other than testing that the documented procedure works in general. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 09:34:23 2018 From: report at bugs.python.org (=?utf-8?b?TWlja2HDq2wgUy4=?=) Date: Sat, 28 Jul 2018 13:34:23 +0000 Subject: [issue34035] zipfile: AttributeError in "seek" method of "_SharedFile" class In-Reply-To: <1530642274.73.0.56676864532.issue34035@psf.upfronthosting.co.za> Message-ID: <1532784863.9.0.56676864532.issue34035@psf.upfronthosting.co.za> Change by Micka?l S. : ---------- keywords: +patch pull_requests: +8045 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 09:49:09 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 28 Jul 2018 13:49:09 +0000 Subject: [issue34263] asyncio: "relative *delay* or absolute *when* should not exceed one day" Message-ID: <1532785749.04.0.56676864532.issue34263@psf.upfronthosting.co.za> New submission from Yury Selivanov : asyncio documentation has this bit on timeouts: Timeouts (relative *delay* or absolute *when*) should not exceed one day. Victor told me that the actual reason for this recommendation is a limitation in epoll (or other OS/selector) that prevents us from waiting for events longer than a day or so. The solution to this problem is simple: we need to cap the maximum time we pass to the "selector.select()" function (in base_events.py/_run_once) to one day. ---------- components: asyncio messages: 322561 nosy: asvetlov, vstinner, yselivanov priority: normal severity: normal status: open title: asyncio: "relative *delay* or absolute *when* should not exceed one day" versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 09:55:43 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 28 Jul 2018 13:55:43 +0000 Subject: [issue34255] test_embed skipped when srcdir != builddir In-Reply-To: <1532769822.63.0.56676864532.issue34255@psf.upfronthosting.co.za> Message-ID: <1532786143.39.0.56676864532.issue34255@psf.upfronthosting.co.za> Change by Ronald Oussoren : ---------- keywords: +patch pull_requests: +8046 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 10:22:57 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 28 Jul 2018 14:22:57 +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: <1532787777.13.0.56676864532.issue34247@psf.upfronthosting.co.za> Nick Coghlan added the comment: I believe Victor is at the EuroPython sprints as well, so if I'm right about that, I think the best option would be for the two of you to work out a resolution for 3.7.1 in person that at least keeps the test suites reasonably consistent, even if the implementations have diverged (the new tests already added for bpo-34170 were the main reason I stopped working on my initial patch for this). And agreed on fixing the current dependency inversion between pylifecycle and the py_main code - the functions needed by both Py_Main and Py_Initialize should be migrated down the stack into pylifecycle as part of the bpo-34170 work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 10:27:26 2018 From: report at bugs.python.org (=?utf-8?q?W=C3=B6llert?=) Date: Sat, 28 Jul 2018 14:27:26 +0000 Subject: [issue34262] Asyncio test fails under Win 7 In-Reply-To: <1532782721.54.0.56676864532.issue34262@psf.upfronthosting.co.za> Message-ID: <1532788046.88.0.56676864532.issue34262@psf.upfronthosting.co.za> W?llert added the comment: Regarding the MVSC runtime message, there is an issue already here: https://bugs.python.org/issue23919 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 10:48:07 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 28 Jul 2018 14:48:07 +0000 Subject: [issue33089] Add multi-dimensional Euclidean distance function to the math module In-Reply-To: <1521226258.78.0.467229070634.issue33089@psf.upfronthosting.co.za> Message-ID: <1532789287.5.0.56676864532.issue33089@psf.upfronthosting.co.za> Raymond Hettinger added the comment: New changeset c6dabe37e3c4d449562182b044184d1756bea037 by Raymond Hettinger in branch 'master': bpo-33089: Multidimensional math.hypot() (GH-8474) https://github.com/python/cpython/commit/c6dabe37e3c4d449562182b044184d1756bea037 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 11:03:50 2018 From: report at bugs.python.org (Tom Viner) Date: Sat, 28 Jul 2018 15:03:50 +0000 Subject: [issue28140] Attempt to give better errors for pip commands typed into the REPL In-Reply-To: <1473828003.51.0.301742763108.issue28140@psf.upfronthosting.co.za> Message-ID: <1532790230.71.0.56676864532.issue28140@psf.upfronthosting.co.za> Tom Viner added the comment: I am looking at this, as part of the EuroPython 2018 sprint. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 11:07:11 2018 From: report at bugs.python.org (Roundup Robot) Date: Sat, 28 Jul 2018 15:07:11 +0000 Subject: [issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7 In-Reply-To: <1532530540.72.0.56676864532.issue34226@psf.upfronthosting.co.za> Message-ID: <1532790431.83.0.56676864532.issue34226@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +8047 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 11:09:47 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 28 Jul 2018 15:09:47 +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: <1532790587.41.0.56676864532.issue34254@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I have added support for functions defined inside a function and methods of a class along with some basic tests. Since directly taking co_name from code object returns only the name without any context like Foo.square inside square when I try to access co_name. So I have passed the function object available at the calls as an additional parameter. Since the API is not public or documented I think it's okay to add an argument in those places. Thus by directly having the function object I am able to get the annotations directly instead of making a lookup in the globals. This approach makes places where TypeError is raised to pass function object like too much of positional arguments and keyword arguments type of errors etc. The code to form the error string can be refactored out as a helper function thus the logic takes a function object and returns the error message. I think this would require more changes in places to pass function object than my original approach to cover more areas thus adding some complexity. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 11:34:53 2018 From: report at bugs.python.org (Petr Viktorin) Date: Sat, 28 Jul 2018 15:34:53 +0000 Subject: [issue23642] Interaction of ModuleSpec and C Extension Modules In-Reply-To: <1426086531.98.0.531682777516.issue23642@psf.upfronthosting.co.za> Message-ID: <1532792093.14.0.56676864532.issue23642@psf.upfronthosting.co.za> Change by Petr Viktorin : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 11:41:29 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 28 Jul 2018 15:41:29 +0000 Subject: [issue33476] String index out of range in get_group(), email/_header_value_parser.py In-Reply-To: <1526172602.81.0.682650639539.issue33476@psf.upfronthosting.co.za> Message-ID: <1532792489.05.0.56676864532.issue33476@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 2be0124b820729eacc1288950b824e336bd3a4a6 by Miss Islington (bot) in branch '3.7': bpo-33476: Fix _header_value_parser when address group is missing final ';' (GH-7484) https://github.com/python/cpython/commit/2be0124b820729eacc1288950b824e336bd3a4a6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 11:50:04 2018 From: report at bugs.python.org (Martin Altmayer) Date: Sat, 28 Jul 2018 15:50:04 +0000 Subject: [issue34263] asyncio: "relative *delay* or absolute *when* should not exceed one day" In-Reply-To: <1532785749.04.0.56676864532.issue34263@psf.upfronthosting.co.za> Message-ID: <1532793004.86.0.56676864532.issue34263@psf.upfronthosting.co.za> Change by Martin Altmayer : ---------- keywords: +patch pull_requests: +8048 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 11:59:21 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 28 Jul 2018 15:59:21 +0000 Subject: [issue33476] String index out of range in get_group(), email/_header_value_parser.py In-Reply-To: <1526172602.81.0.682650639539.issue33476@psf.upfronthosting.co.za> Message-ID: <1532793561.27.0.56676864532.issue33476@psf.upfronthosting.co.za> miss-islington added the comment: New changeset f17e001746e0f697e9bd49ac3748f2543b0a0d47 by Miss Islington (bot) in branch '3.6': bpo-33476: Fix _header_value_parser when address group is missing final ';' (GH-7484) https://github.com/python/cpython/commit/f17e001746e0f697e9bd49ac3748f2543b0a0d47 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 12:00:44 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 28 Jul 2018 16:00:44 +0000 Subject: [issue34264] Inconsistency between stack size in main thread and secondary threads on macOS Message-ID: <1532793644.93.0.56676864532.issue34264@psf.upfronthosting.co.za> New submission from Ronald Oussoren : configure.ac sets the stack size for the main thread on macOS to 1000000 (hex), while Python/threading_pthread.h sets the default stack size for other threads to 0x500000. The latter is half of the former. IMHO both should be the same, as both claim to have been chosen to be just large enough to accommodate the default recursion limit. I'd prefer to increase the default stack size of secondary threads to match the main thread. I tagged this as a 3.8 thread because there is a (very) small chance that changing the stack size breaks existing programs (although you'd have to create a lot of threads to use a significant amount of memory). This is vaguely related to issue33955. ---------- components: Interpreter Core, macOS messages: 322569 nosy: ned.deily, ronaldoussoren priority: normal severity: normal stage: needs patch status: open title: Inconsistency between stack size in main thread and secondary threads on macOS type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 12:01:36 2018 From: report at bugs.python.org (Kay Hayen) Date: Sat, 28 Jul 2018 16:01:36 +0000 Subject: [issue34265] Dataclasses test doesn't run independently Message-ID: <1532793696.91.0.56676864532.issue34265@psf.upfronthosting.co.za> New submission from Kay Hayen : When I run: python3.7 test/test_dataclasses.py ====================================================================== ERROR: test_classvar_module_level_import (__main__.TestStringAnnotations) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/hayen/repos/Py2C/tests/CPython37/test/test_dataclasses.py", line 2716, in test_classvar_module_level_import from . import dataclass_module_1 ImportError: cannot import name 'dataclass_module_1' from '__main__' (/home/hayen/repos/Py2C/tests/CPython37/test/test_dataclasses.py) ====================================================================== FAIL: test_no_repr (__main__.TestRepr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/hayen/repos/Py2C/tests/CPython37/test/test_dataclasses.py", line 1970, in test_no_repr repr(C(3))) AssertionError: 'test_dataclasses.TestRepr.test_no_repr..C object at' not found in '<__main__.TestRepr.test_no_repr..C object at 0x7f6a2d4ffd68>' The relative imports cannot work, as the main program is not in the test package. Also it has the name __main__ not the module name in repr. As Guido said in another bug report, tests are expected to pass. Can you please adapt them? I hope "Library" is proper component, as tests are below it. Thanks, Kay ---------- components: Library (Lib) messages: 322570 nosy: kayhayen priority: normal severity: normal status: open title: Dataclasses test doesn't run independently versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 12:02:43 2018 From: report at bugs.python.org (Martin Altmayer) Date: Sat, 28 Jul 2018 16:02:43 +0000 Subject: [issue34263] asyncio: "relative *delay* or absolute *when* should not exceed one day" In-Reply-To: <1532785749.04.0.56676864532.issue34263@psf.upfronthosting.co.za> Message-ID: <1532793763.37.0.56676864532.issue34263@psf.upfronthosting.co.za> Martin Altmayer added the comment: Added a small PR. Shall we update the doc? With this PR there is no reason anymore to disallow timeouts greater than one day in asyncio. Greetings from the sprints @ Edinburgh! ---------- nosy: +MartinAltmayer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 12:06:13 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 28 Jul 2018 16:06:13 +0000 Subject: [issue34264] Inconsistency between stack size in main thread and secondary threads on macOS In-Reply-To: <1532793644.93.0.56676864532.issue34264@psf.upfronthosting.co.za> Message-ID: <1532793973.39.0.56676864532.issue34264@psf.upfronthosting.co.za> Ronald Oussoren added the comment: PS. A pull request will follow shortly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 12:07:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 28 Jul 2018 16:07:30 +0000 Subject: [issue34265] Dataclasses test doesn't run independently In-Reply-To: <1532793696.91.0.56676864532.issue34265@psf.upfronthosting.co.za> Message-ID: <1532794050.53.0.56676864532.issue34265@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Looks as a duplicate of issue34184. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 12:09:29 2018 From: report at bugs.python.org (Petr Viktorin) Date: Sat, 28 Jul 2018 16:09:29 +0000 Subject: [issue20177] Derby #8: Convert 28 sites to Argument Clinic across 2 files In-Reply-To: <1389138574.32.0.892814928986.issue20177@psf.upfronthosting.co.za> Message-ID: <1532794169.48.0.56676864532.issue20177@psf.upfronthosting.co.za> Change by Petr Viktorin : ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 12:13:03 2018 From: report at bugs.python.org (Elvis Pranskevichus) Date: Sat, 28 Jul 2018 16:13:03 +0000 Subject: [issue34075] asyncio: We should prohibit setting a ProcessPoolExecutor in with set_default_executor In-Reply-To: <1531150174.99.0.56676864532.issue34075@psf.upfronthosting.co.za> Message-ID: <1532794383.52.0.56676864532.issue34075@psf.upfronthosting.co.za> Change by Elvis Pranskevichus : ---------- keywords: +patch pull_requests: +8050 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 12:15:46 2018 From: report at bugs.python.org (Petr Viktorin) Date: Sat, 28 Jul 2018 16:15:46 +0000 Subject: [issue27201] expose the ABI name as a config variable In-Reply-To: <1464993442.58.0.656419844053.issue27201@psf.upfronthosting.co.za> Message-ID: <1532794546.5.0.56676864532.issue27201@psf.upfronthosting.co.za> Petr Viktorin added the comment: If Debian's talloc is fine without this, maybe we can close the issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 12:20:49 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 28 Jul 2018 16:20:49 +0000 Subject: [issue33223] test_posix fails ERRNO 0 In-Reply-To: <1522851219.93.0.682650639539.issue33223@psf.upfronthosting.co.za> Message-ID: <1532794849.84.0.56676864532.issue33223@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I get the same error on High Sierra, but not on the Mojave beta. I also regularly get a FileNotFound error instead (which is why I ended up at this issue in the first place). I'm not sure yet what causes this, a small reproducer in C works correctly and the code in posixmodule.c looks correct. This might be a platform bug (hence my attempt at writing a reproducer in C). BTW. There is no attached file ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 12:26:00 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 28 Jul 2018 16:26:00 +0000 Subject: [issue34264] Inconsistency between stack size in main thread and secondary threads on macOS In-Reply-To: <1532793644.93.0.56676864532.issue34264@psf.upfronthosting.co.za> Message-ID: <1532795160.72.0.56676864532.issue34264@psf.upfronthosting.co.za> Change by Ronald Oussoren : ---------- keywords: +patch pull_requests: +8051 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 12:40:26 2018 From: report at bugs.python.org (Tim Hoffmann) Date: Sat, 28 Jul 2018 16:40:26 +0000 Subject: [issue20177] Derby #8: Convert 28 sites to Argument Clinic across 2 files In-Reply-To: <1389138574.32.0.892814928986.issue20177@psf.upfronthosting.co.za> Message-ID: <1532796026.47.0.56676864532.issue20177@psf.upfronthosting.co.za> Change by Tim Hoffmann : ---------- pull_requests: +8052 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 12:45:26 2018 From: report at bugs.python.org (Tom Viner) Date: Sat, 28 Jul 2018 16:45:26 +0000 Subject: [issue28140] Attempt to give better errors for pip commands typed into the REPL In-Reply-To: <1473828003.51.0.301742763108.issue28140@psf.upfronthosting.co.za> Message-ID: <1532796326.38.0.56676864532.issue28140@psf.upfronthosting.co.za> Change by Tom Viner : ---------- keywords: +patch pull_requests: +8053 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 12:45:54 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 28 Jul 2018 16:45:54 +0000 Subject: [issue33476] String index out of range in get_group(), email/_header_value_parser.py In-Reply-To: <1526172602.81.0.682650639539.issue33476@psf.upfronthosting.co.za> Message-ID: <1532796354.86.0.56676864532.issue33476@psf.upfronthosting.co.za> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 12:46:22 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 28 Jul 2018 16:46:22 +0000 Subject: [issue33223] test_posix fails ERRNO 0 In-Reply-To: <1522851219.93.0.682650639539.issue33223@psf.upfronthosting.co.za> Message-ID: <1532796382.32.0.56676864532.issue33223@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'm slightly closer to understanding the problem. The value of errno is that of the last error *before* getgrouplist(3) was called, that is, getgrouplist return -1 but does not update errno. And looking at Apple source code this is a bug in CPython after all: getgrouplist(3) return -1 when the buffer is too small, but does not set errno (see ). The manpage also doesn't mention setting errno. I'm pretty sure that the use of posix_error() is wrong here. We're running into a similar issue as with getgroups: on macOS a user can be a member of more than NGROUPS_MAX groups. Because of this I'm not yet sure of the correct fix for this issue. The easy part is that the call to posix_error in the implementation of getgrouplist should be replaced by raising some other error (or possibly just setting errno to EOVERFLOW before calling posix_error()). The harder part is what to do about the definition of MAX_GROUPS for this function. Either force it to a larger default on macOS, or add some code to increase the buffer size (because the user cannot select the size of buffer to use). The latter is annoyingly hard because the system gives no indication on what the correct buffer size should be. BTW. The same is also true on other platforms with getgrouplist(), this is not a macOS specific issue other than that NGROUPS_MAX is bogus there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 12:48:32 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 28 Jul 2018 16:48:32 +0000 Subject: [issue24356] venv documentation incorrect / misleading In-Reply-To: <1433197293.5.0.203233804739.issue24356@psf.upfronthosting.co.za> Message-ID: <1532796512.74.0.56676864532.issue24356@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 83b449d754f4da3be107b508392ef5180f105c8b by Steve Dower in branch '3.7': bpo-24356: Specify which Python binary will be used with venv (GH-6589) https://github.com/python/cpython/commit/83b449d754f4da3be107b508392ef5180f105c8b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 12:50:23 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 28 Jul 2018 16:50:23 +0000 Subject: [issue24356] venv documentation incorrect / misleading In-Reply-To: <1433197293.5.0.203233804739.issue24356@psf.upfronthosting.co.za> Message-ID: <1532796623.15.0.56676864532.issue24356@psf.upfronthosting.co.za> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 12:52:17 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 28 Jul 2018 16:52:17 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1532796737.54.0.56676864532.issue29710@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 8764a6ffda896af4586f07b55d7df916f86dd9b0 by Miss Islington (bot) in branch '3.7': bpo-29710: Clarify documentation for Bitwise binary operation (GH-1691) https://github.com/python/cpython/commit/8764a6ffda896af4586f07b55d7df916f86dd9b0 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 12:52:33 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 28 Jul 2018 16:52:33 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1532796753.89.0.56676864532.issue29710@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 3100b7e710dccdcfbc6991ea7e8985a1881d42e6 by Miss Islington (bot) in branch '3.6': bpo-29710: Clarify documentation for Bitwise binary operation (GH-1691) https://github.com/python/cpython/commit/3100b7e710dccdcfbc6991ea7e8985a1881d42e6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 12:55:13 2018 From: report at bugs.python.org (Alexandre Hajjar) Date: Sat, 28 Jul 2018 16:55:13 +0000 Subject: [issue34185] Lib/test/test_bdb.py failed when ran as a script In-Reply-To: <1532196122.3.0.56676864532.issue34185@psf.upfronthosting.co.za> Message-ID: <1532796913.2.0.56676864532.issue34185@psf.upfronthosting.co.za> Change by Alexandre Hajjar : ---------- keywords: +patch pull_requests: +8054 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 13:28:37 2018 From: report at bugs.python.org (Tim Golden) Date: Sat, 28 Jul 2018 17:28:37 +0000 Subject: [issue34239] Convert test_bz2 to use tempfile In-Reply-To: <1532626088.94.0.56676864532.issue34239@psf.upfronthosting.co.za> Message-ID: <1532798917.37.0.56676864532.issue34239@psf.upfronthosting.co.za> Change by Tim Golden : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 13:51:47 2018 From: report at bugs.python.org (Kay Hayen) Date: Sat, 28 Jul 2018 17:51:47 +0000 Subject: [issue34265] Dataclasses test doesn't run independently In-Reply-To: <1532793696.91.0.56676864532.issue34265@psf.upfronthosting.co.za> Message-ID: <1532800307.05.0.56676864532.issue34265@psf.upfronthosting.co.za> Kay Hayen added the comment: Totally is. Closing, sorry for not seeing that one myself. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 14:03:39 2018 From: report at bugs.python.org (Segev Finer) Date: Sat, 28 Jul 2018 18:03:39 +0000 Subject: [issue32814] smtplib.send_message mishandles 8BITMIME RFC 6152 In-Reply-To: <1518259581.24.0.467229070634.issue32814@psf.upfronthosting.co.za> Message-ID: <1532801019.2.0.56676864532.issue32814@psf.upfronthosting.co.za> Segev Finer added the comment: @scorphus Note that I made a PR for this: PR 8303 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 14:05:17 2018 From: report at bugs.python.org (Tal Einat) Date: Sat, 28 Jul 2018 18:05:17 +0000 Subject: [issue33083] math.factorial accepts non-integral Decimal instances In-Reply-To: <1521146313.09.0.467229070634.issue33083@psf.upfronthosting.co.za> Message-ID: <1532801117.69.0.56676864532.issue33083@psf.upfronthosting.co.za> Tal Einat added the comment: So we keep things consistent by supporting Decimal and Fraction inputs, but raising ValueError if the value isn't a non-negative integer? ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 14:36:11 2018 From: report at bugs.python.org (Tal Einat) Date: Sat, 28 Jul 2018 18:36:11 +0000 Subject: [issue33113] Query performance is very low and can even lead to denial of service In-Reply-To: <1521613695.07.0.467229070634.issue33113@psf.upfronthosting.co.za> Message-ID: <1532802971.29.0.56676864532.issue33113@psf.upfronthosting.co.za> Tal Einat added the comment: I suggest closing this as "wontfix". This is a just an non-optimized regexp pattern leading to long run times. That these are possible is a well-known trait of backtracking regular expression engines in general, and ours in particular. IMO this isn't a security issue since the root of the issue is the pattern. I don't see this as a bug or a significant performance issue either, and there is no concrete enhancement suggestion here. For clarification, the given pattern is equivalent to: pat = r'''^ ( \(? [\w\d\-\.\\]{3,} \|? )+ [\w\d\-\.\\]{3,} \)? $''' ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 14:37:20 2018 From: report at bugs.python.org (Tal Einat) Date: Sat, 28 Jul 2018 18:37:20 +0000 Subject: [issue33113] Query performance is very low and can even lead to denial of service In-Reply-To: <1521613695.07.0.467229070634.issue33113@psf.upfronthosting.co.za> Message-ID: <1532803040.41.0.56676864532.issue33113@psf.upfronthosting.co.za> Tal Einat added the comment: Clarification: The given pattern is equivalent to that in my previous post, assuming the latter is used with the re.VERBOSE flag. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 14:49:54 2018 From: report at bugs.python.org (Tal Einat) Date: Sat, 28 Jul 2018 18:49:54 +0000 Subject: [issue1467929] %-formatting and dicts Message-ID: <1532803794.67.0.56676864532.issue1467929@psf.upfronthosting.co.za> Tal Einat added the comment: Eric, would you like an update PR for this? ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 15:00:45 2018 From: report at bugs.python.org (=?utf-8?b?TWlja2HDq2wgUy4=?=) Date: Sat, 28 Jul 2018 19:00:45 +0000 Subject: [issue34035] Several AttributeError in zipfile seek() methods In-Reply-To: <1530642274.73.0.56676864532.issue34035@psf.upfronthosting.co.za> Message-ID: <1532804445.5.0.56676864532.issue34035@psf.upfronthosting.co.za> Change by Micka?l S. : ---------- title: zipfile: AttributeError in "seek" method of "_SharedFile" class -> Several AttributeError in zipfile seek() methods _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 15:30:52 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 28 Jul 2018 19:30:52 +0000 Subject: [issue34265] Dataclasses test doesn't run independently In-Reply-To: <1532793696.91.0.56676864532.issue34265@psf.upfronthosting.co.za> Message-ID: <1532806252.87.0.56676864532.issue34265@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> duplicate superseder: -> Lib/test/test_dataclasses.py failed when ran as a script _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 15:53:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 28 Jul 2018 19:53:24 +0000 Subject: [issue33113] Query performance is very low and can even lead to denial of service In-Reply-To: <1521613695.07.0.467229070634.issue33113@psf.upfronthosting.co.za> Message-ID: <1532807604.71.0.56676864532.issue33113@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I concur with Tal. This problem is called "catastrophic backtracking". ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 16:27:19 2018 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 28 Jul 2018 20:27:19 +0000 Subject: [issue33089] Add multi-dimensional Euclidean distance function to the math module In-Reply-To: <1521226258.78.0.467229070634.issue33089@psf.upfronthosting.co.za> Message-ID: <1532809639.42.0.56676864532.issue33089@psf.upfronthosting.co.za> Stefan Behnel added the comment: >> Commutativity guarantees can be delivered by sorting arguments before summation. > No thanks -- that's too expensive for such a small payoff. Since I don't really see people use this on vectors with hundreds of dimensions, let me still suggest using insertion sort. It's simple and short to implement into the current code (right in the first loop) and should be plenty fast for any reasonable usage of this function. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 16:29:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 28 Jul 2018 20:29:44 +0000 Subject: [issue34235] PyArg_ParseTupleAndKeywords: support required keyword arguments In-Reply-To: <1532610257.0.0.56676864532.issue34235@psf.upfronthosting.co.za> Message-ID: <1532809784.27.0.56676864532.issue34235@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The problem is that PyArg_ParseTupleAndKeywords() supports required keyword-only parameters, but only if all parameters are required. "O|O$O" -- last two are optional. "OO$O" -- all are required. This makes designing a consistent syntax more difficult. '|' currently is not allowed after '$'. If allow it with the meaning that all arguments before it are required, and after it -- optional, this will allow to declare required and optional keyword-only parameters, but optional positional-or-keyword parameters could not be used in the same function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 16:35:15 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 28 Jul 2018 20:35:15 +0000 Subject: [issue1467929] %-formatting and dicts Message-ID: <1532810115.02.0.56676864532.issue1467929@psf.upfronthosting.co.za> Eric V. Smith added the comment: I unassigned myself from this a few months ago. If someone wants to fix it, I'm not opposed. But the issue is 12 years old and doesn't cause any real problems as far as I can see, so it's hard to get excited about it. And as we've seen there are a lot of corner cases. I'd hate to make things worse. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 17:02:59 2018 From: report at bugs.python.org (Zachary Ware) Date: Sat, 28 Jul 2018 21:02:59 +0000 Subject: [issue34251] MSI build fails In-Reply-To: <1532721155.89.0.56676864532.issue34251@psf.upfronthosting.co.za> Message-ID: <1532811779.8.0.56676864532.issue34251@psf.upfronthosting.co.za> Zachary Ware added the comment: New changeset 11eb1a94704142385ffc07852739863ced8587d2 by Zachary Ware (Berker Peksag) in branch 'master': bpo-34251: Restore msilib.Win64 to preserve compatibility (GH-8510) https://github.com/python/cpython/commit/11eb1a94704142385ffc07852739863ced8587d2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 17:03:07 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 28 Jul 2018 21:03:07 +0000 Subject: [issue34251] MSI build fails In-Reply-To: <1532721155.89.0.56676864532.issue34251@psf.upfronthosting.co.za> Message-ID: <1532811787.15.0.56676864532.issue34251@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8055 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 17:13:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 28 Jul 2018 21:13:06 +0000 Subject: [issue34235] PyArg_ParseTupleAndKeywords: support required keyword arguments In-Reply-To: <1532610257.0.0.56676864532.issue34235@psf.upfronthosting.co.za> Message-ID: <1532812386.46.0.56676864532.issue34235@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Support for keyword-only parameters was added in issue14328. Although the implementation never matched the documentation in the case when '|' is not specified before '$'. ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 18:25:48 2018 From: report at bugs.python.org (Tim Peters) Date: Sat, 28 Jul 2018 22:25:48 +0000 Subject: [issue33113] Query performance is very low and can even lead to denial of service In-Reply-To: <1521613695.07.0.467229070634.issue33113@psf.upfronthosting.co.za> Message-ID: <1532816748.06.0.56676864532.issue33113@psf.upfronthosting.co.za> Tim Peters added the comment: Note: if you found a regexp like this _in_ the Python distribution, then a bug report would be appropriate. It's certainly possible to write regexps that can suffer catastrophic backtracking, and we've repaired a few of those, over the years, that shipped with Python. But we can't stop you from writing such things yourself. If you post your regexp to, e.g., comp.lang.python or StackOverflow, I'm sure someone will show you how to rewrite it in a safe way. But be prepared to explain in English what you're trying to accomplish with it. For example, while it appears you're trying to ensure there are at least 3 characters (of the right kind) between "|" separators, for some reason you made matching "|" optional. That leaves open an exponential number of ways to try to match long strings of non-"|" characters between "|" separators. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 18:26:09 2018 From: report at bugs.python.org (Matthias Klose) Date: Sat, 28 Jul 2018 22:26:09 +0000 Subject: [issue27201] expose the ABI name as a config variable In-Reply-To: <1464993442.58.0.656419844053.issue27201@psf.upfronthosting.co.za> Message-ID: <1532816769.78.0.56676864532.issue27201@psf.upfronthosting.co.za> Matthias Klose added the comment: ok, not working on that currently ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 19:24:25 2018 From: report at bugs.python.org (ppperry) Date: Sat, 28 Jul 2018 23:24:25 +0000 Subject: [issue34266] Bad behavior with "restart \" in pdb Message-ID: <1532820265.2.0.56676864532.issue34266@psf.upfronthosting.co.za> New submission from ppperry : (Pdb) restart \ Traceback (most recent call last): File "C:\Program Files\Python36\lib\pdb.py", line 1667, in main pdb._runscript(mainpyfile) File "C:\Program Files\Python36\lib\pdb.py", line 1548, in _runscript self.run(statement) File "C:\Program Files\Python36\lib\bdb.py", line 431, in run exec(cmd, globals, locals) File "", line 1, in File "C:\Program Files\Python36\lib\bdb.py", line 48, in trace_dispatch return self.dispatch_line(frame) File "C:\Program Files\Python36\lib\bdb.py", line 66, in dispatch_line self.user_line(frame) File "C:\Program Files\Python36\lib\pdb.py", line 261, in user_line self.interaction(frame, None) File "C:\Program Files\Python36\lib\pdb.py", line 352, in interaction self._cmdloop() File "C:\Program Files\Python36\lib\pdb.py", line 321, in _cmdloop self.cmdloop() File "C:\Program Files\Python36\lib\cmd.py", line 138, in cmdloop stop = self.onecmd(line) File "C:\Program Files\Python36\lib\pdb.py", line 418, in onecmd return cmd.Cmd.onecmd(self, line) File "C:\Program Files\Python36\lib\cmd.py", line 217, in onecmd return func(arg) File "C:\Program Files\Python36\lib\pdb.py", line 1025, in do_run sys.argv = shlex.split(arg) File "C:\Program Files\Python36\lib\shlex.py", line 305, in split return list(lex) File "C:\Program Files\Python36\lib\shlex.py", line 295, in __next__ token = self.get_token() File "C:\Program Files\Python36\lib\shlex.py", line 105, in get_token raw = self.read_token() File "C:\Program Files\Python36\lib\shlex.py", line 206, in read_token raise ValueError("No escaped character") ---------- components: Library (Lib) messages: 322595 nosy: ppperry priority: normal severity: normal status: open title: Bad behavior with "restart \" in pdb type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 19:26:28 2018 From: report at bugs.python.org (ppperry) Date: Sat, 28 Jul 2018 23:26:28 +0000 Subject: [issue34266] Bad behavior with "restart \" in pdb In-Reply-To: <1532820265.2.0.56676864532.issue34266@psf.upfronthosting.co.za> Message-ID: <1532820388.53.0.56676864532.issue34266@psf.upfronthosting.co.za> ppperry added the comment: Just to be clear, even though the traceback is python 3.6, the same bug occurs in 3.7 with an identical traceback except for some changes in line number ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 19:33:17 2018 From: report at bugs.python.org (Segev Finer) Date: Sat, 28 Jul 2018 23:33:17 +0000 Subject: [issue34267] find_python.bat doesn't find installed Python 3.7 Message-ID: <1532820797.37.0.56676864532.issue34267@psf.upfronthosting.co.za> New submission from Segev Finer : The PCbuild/find_python.bat script doesn't find an installed Python 3.7 and will proceed to download Python using nuget. This is caused by it invoking py with "-3.6" which will only find Python 3.6 (py doesn't seem to support a 3.6 or above flag), despite the fact that the build can use 3.7 and the nuget fallback will install 3.7. ---------- components: Windows messages: 322597 nosy: Segev Finer, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: find_python.bat doesn't find installed Python 3.7 type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 20:14:48 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 29 Jul 2018 00:14:48 +0000 Subject: [issue34251] MSI build fails In-Reply-To: <1532721155.89.0.56676864532.issue34251@psf.upfronthosting.co.za> Message-ID: <1532823288.95.0.56676864532.issue34251@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 1e98d87961ec752a1623135f4d7e8a41820ae256 by Miss Islington (bot) in branch '3.7': bpo-34251: Restore msilib.Win64 to preserve compatibility (GH-8510) https://github.com/python/cpython/commit/1e98d87961ec752a1623135f4d7e8a41820ae256 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 20:18:40 2018 From: report at bugs.python.org (Tim Peters) Date: Sun, 29 Jul 2018 00:18:40 +0000 Subject: [issue33566] re.findall() dead locked whent the expected ending char not occur until end of string In-Reply-To: <1526630765.64.0.682650639539.issue33566@psf.upfronthosting.co.za> Message-ID: <1532823520.95.0.56676864532.issue33566@psf.upfronthosting.co.za> Tim Peters added the comment: Closing as not-a-bug - not enough info to reproduce, but the regexp looked prone to exponential-time backtracking to both MRAB and me, and there's been no response to requests for more info. ---------- components: +Regular Expressions nosy: +ezio.melotti resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 21:30:53 2018 From: report at bugs.python.org (Jared) Date: Sun, 29 Jul 2018 01:30:53 +0000 Subject: [issue34266] Bad behavior with "restart \" in pdb In-Reply-To: <1532820265.2.0.56676864532.issue34266@psf.upfronthosting.co.za> Message-ID: <1532827853.21.0.56676864532.issue34266@psf.upfronthosting.co.za> Jared added the comment: I wouldn't mind taking a look at this. Feel free to assign it to me! ---------- nosy: +j-rewerts _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 21:37:58 2018 From: report at bugs.python.org (ppperry) Date: Sun, 29 Jul 2018 01:37:58 +0000 Subject: [issue34266] Bad behavior with "restart \" or "restart "" in pdb In-Reply-To: <1532820265.2.0.56676864532.issue34266@psf.upfronthosting.co.za> Message-ID: <1532828278.95.0.56676864532.issue34266@psf.upfronthosting.co.za> ppperry added the comment: `restart "` also crashes with the same tb ---------- title: Bad behavior with "restart \" in pdb -> Bad behavior with "restart \" or "restart "" in pdb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 22:34:27 2018 From: report at bugs.python.org (Jared) Date: Sun, 29 Jul 2018 02:34:27 +0000 Subject: [issue34266] Bad behavior with "restart \" or "restart "" in pdb In-Reply-To: <1532820265.2.0.56676864532.issue34266@psf.upfronthosting.co.za> Message-ID: <1532831667.01.0.56676864532.issue34266@psf.upfronthosting.co.za> Jared added the comment: Would it be possible to escape both of those? For the first one, restart "\\" and for the second one, restart "\"" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 22:37:03 2018 From: report at bugs.python.org (ppperry) Date: Sun, 29 Jul 2018 02:37:03 +0000 Subject: [issue34266] Bad behavior with "restart \" or "restart "" in pdb In-Reply-To: <1532820265.2.0.56676864532.issue34266@psf.upfronthosting.co.za> Message-ID: <1532831823.06.0.56676864532.issue34266@psf.upfronthosting.co.za> ppperry added the comment: Both of those work and don't produce an error ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 22:46:15 2018 From: report at bugs.python.org (Jared) Date: Sun, 29 Jul 2018 02:46:15 +0000 Subject: [issue34266] Bad behavior with "restart \" or "restart "" in pdb In-Reply-To: <1532820265.2.0.56676864532.issue34266@psf.upfronthosting.co.za> Message-ID: <1532832375.96.0.56676864532.issue34266@psf.upfronthosting.co.za> Jared added the comment: Good! Is it possible to start a python program with either \ or " as arguments normally (without using character escaping)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 23:25:08 2018 From: report at bugs.python.org (gaoxinge) Date: Sun, 29 Jul 2018 03:25:08 +0000 Subject: [issue34268] run pool.submit in callback when future.set_result Message-ID: <1532834708.12.0.56676864532.issue34268@psf.upfronthosting.co.za> New submission from gaoxinge : ## abstract When using concurrent.futures.ThreadPoolExecutor module, if we code pool.submit in callback, the callback may be not run. This is because main thread will terminate, and call _python_exit to add none to _work_queue before subthread run callback. ## code ``` # -*- coding: utf-8 -*- from concurrent.futures import ThreadPoolExecutor def func(x, y): import time time.sleep(1) return x + y def do_many(n): def callback(fut): nonlocal n result = fut.result() print('Got: ', result) n -= 1 if n > 0: future = pool.submit(func, n, n) future.add_done_callback(callback) if n > 0: future = pool.submit(func, n, n) future.add_done_callback(callback) # _python_exit will be called here, and then # add none to _work_queue pool = ThreadPoolExecutor(max_workers=8) do_many(10) ``` ## result and expectation The code's result may be ``` Got: 20 Got: 18 Got: 16 Got: 14 Got: 12 Got: 10 Got: 8 Got: 6 ``` But my expectation is ``` Got: 20 Got: 18 Got: 16 Got: 14 Got: 12 Got: 10 Got: 8 Got: 6 Got: 4 Got: 2 ``` ## question Is my expectation reasonable? ### if not reasonable If not, my solution is ``` from concurrent.futures import ThreadPoolExecutor def func(x, y): import time time.sleep(1) return x + y def do_many(): def callback(fut): global n result = fut.result() print('Got: ', result) n -= 1 if n > 0: future = pool.submit(func, n, n) future.add_done_callback(callback) if n > 0: future = pool.submit(func, n, n) future.add_done_callback(callback) n = 10 pool = ThreadPoolExecutor(max_workers=8) do_many() while n > 0: # use while to block main thread pass ``` and is there any elegant solution? ### if reasonable ... ---------- components: Library (Lib) messages: 322605 nosy: gaoxinge priority: normal severity: normal status: open title: run pool.submit in callback when future.set_result type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 23:26:08 2018 From: report at bugs.python.org (Jared) Date: Sun, 29 Jul 2018 03:26:08 +0000 Subject: [issue34258] Python shell keeps restarting In-Reply-To: <1532775569.15.0.56676864532.issue34258@psf.upfronthosting.co.za> Message-ID: <1532834768.93.0.56676864532.issue34258@psf.upfronthosting.co.za> Jared added the comment: First off, no judgment! :) I just want to get some more details from you. 1) How are you running your program? 2) How far into your program do you get? 3) What are you passing in as values for your Input() calls? ---------- nosy: +j-rewerts _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 23:43:04 2018 From: report at bugs.python.org (Anton Patrushev) Date: Sun, 29 Jul 2018 03:43:04 +0000 Subject: [issue34256] Python treats ASCII record seperator ('\x1e') as a newline In-Reply-To: <1532772549.2.0.56676864532.issue34256@psf.upfronthosting.co.za> Message-ID: <1532835784.61.0.56676864532.issue34256@psf.upfronthosting.co.za> Anton Patrushev added the comment: 0x1e listed as linebreak char in tests: Lib/test/test_unicodedata.py:317 ---------- nosy: +apatrushev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 28 23:51:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 29 Jul 2018 03:51:47 +0000 Subject: [issue33113] Query performance is very low and can even lead to denial of service In-Reply-To: <1521613695.07.0.467229070634.issue33113@psf.upfronthosting.co.za> Message-ID: <1532836307.33.0.56676864532.issue33113@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Perhaps it would be nice to add a section about catastrophic backtracking and ways of resolving it in the RE Howto. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 00:27:57 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Sun, 29 Jul 2018 04:27:57 +0000 Subject: [issue34257] SSL should accept cert content, instead of just cert file path In-Reply-To: <1532773912.07.0.56676864532.issue34257@psf.upfronthosting.co.za> Message-ID: <1532838477.92.0.56676864532.issue34257@psf.upfronthosting.co.za> Nathaniel Smith added the comment: This is a duplicate of bpo-16487, which has more discussion about how the API might work. ---------- nosy: +njs resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 00:54:21 2018 From: report at bugs.python.org (Jared) Date: Sun, 29 Jul 2018 04:54:21 +0000 Subject: [issue34257] SSL should accept cert content, instead of just cert file path In-Reply-To: <1532773912.07.0.56676864532.issue34257@psf.upfronthosting.co.za> Message-ID: <1532840061.02.0.56676864532.issue34257@psf.upfronthosting.co.za> Jared added the comment: Also [PEP 543](https://www.python.org/dev/peps/pep-0543/) is related to this. In addition, I think [PyOpenSSL](https://pyopenssl.org/en/stable/index.html) provides support for what you want. ---------- nosy: +j-rewerts _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 02:50:44 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 29 Jul 2018 06:50:44 +0000 Subject: [issue33113] Query performance is very low and can even lead to denial of service In-Reply-To: <1521613695.07.0.467229070634.issue33113@psf.upfronthosting.co.za> Message-ID: <1532847044.23.0.56676864532.issue33113@psf.upfronthosting.co.za> Tal Einat added the comment: Serhiy, that would be a good idea. A short mention of the issue with a link to an external reference would also suffice IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 02:51:31 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 29 Jul 2018 06:51:31 +0000 Subject: [issue34251] MSI build fails In-Reply-To: <1532721155.89.0.56676864532.issue34251@psf.upfronthosting.co.za> Message-ID: <1532847091.86.0.56676864532.issue34251@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report! ---------- components: +Library (Lib) -Distutils nosy: -dstufft, eric.araujo resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 02:52:31 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 29 Jul 2018 06:52:31 +0000 Subject: [issue1467929] %-formatting and dicts Message-ID: <1532847151.39.0.56676864532.issue1467929@psf.upfronthosting.co.za> Tal Einat added the comment: Ah, sorry Eric, I misread that change as you assigning this to yourself. ---------- versions: +Python 3.8 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 02:52:53 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 29 Jul 2018 06:52:53 +0000 Subject: [issue1467929] %-formatting and dicts Message-ID: <1532847173.6.0.56676864532.issue1467929@psf.upfronthosting.co.za> Change by Tal Einat : ---------- nosy: -taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 04:32:19 2018 From: report at bugs.python.org (Aleksa Bulatovic) Date: Sun, 29 Jul 2018 08:32:19 +0000 Subject: [issue34258] Python shell keeps restarting In-Reply-To: <1532775569.15.0.56676864532.issue34258@psf.upfronthosting.co.za> Message-ID: <1532853139.11.0.56676864532.issue34258@psf.upfronthosting.co.za> Aleksa Bulatovic added the comment: Im running as a idle python(when im in editor,i run the module) I get like in 3 days(if you asked when did i get into the program,english is not my first language) For my input calls i put a string so that player knows what to answer to. I hope i answered your questions for details.(I don't understand some things when someone says like ' PyArg_ParseTupleAndKeywords' or something like that,im 12 year old so i don't understand some issues) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 05:01:45 2018 From: report at bugs.python.org (Steve Dower) Date: Sun, 29 Jul 2018 09:01:45 +0000 Subject: [issue8145] Documentation about sqlite3 isolation_level In-Reply-To: <1268643705.49.0.319902511171.issue8145@psf.upfronthosting.co.za> Message-ID: <1532854905.56.0.56676864532.issue8145@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset a71fed0b7596f1c11a2fa6c1b7311157148f5f9f by Steve Dower (Berker Peksag) in branch 'master': bpo-8145: Improve isolation_level documentation (GH-8499) https://github.com/python/cpython/commit/a71fed0b7596f1c11a2fa6c1b7311157148f5f9f ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 05:01:55 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 29 Jul 2018 09:01:55 +0000 Subject: [issue8145] Documentation about sqlite3 isolation_level In-Reply-To: <1268643705.49.0.319902511171.issue8145@psf.upfronthosting.co.za> Message-ID: <1532854915.09.0.56676864532.issue8145@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8056 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 05:02:18 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 29 Jul 2018 09:02:18 +0000 Subject: [issue34225] distutils._msvccompiler should trim INCLUDE/LIB directories In-Reply-To: <1532530468.57.0.56676864532.issue34225@psf.upfronthosting.co.za> Message-ID: <1532854938.42.0.56676864532.issue34225@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8057 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 05:02:19 2018 From: report at bugs.python.org (Steve Dower) Date: Sun, 29 Jul 2018 09:02:19 +0000 Subject: [issue34225] distutils._msvccompiler should trim INCLUDE/LIB directories In-Reply-To: <1532530468.57.0.56676864532.issue34225@psf.upfronthosting.co.za> Message-ID: <1532854939.9.0.56676864532.issue34225@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 8f6a7e100d68fddc9fb98f5cbdf1981994360407 by Steve Dower (Miss Islington (bot)) in branch '3.6': bpo-34225: Ensure INCLUDE and LIB directories do not end with a backslash. (GH-8464) https://github.com/python/cpython/commit/8f6a7e100d68fddc9fb98f5cbdf1981994360407 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 05:03:39 2018 From: report at bugs.python.org (Erik Janssens) Date: Sun, 29 Jul 2018 09:03: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: <1532855019.73.0.56676864532.issue34217@psf.upfronthosting.co.za> Change by Erik Janssens : ---------- pull_requests: +8058 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 05:03:56 2018 From: report at bugs.python.org (Thomas Waldmann) Date: Sun, 29 Jul 2018 09:03:56 +0000 Subject: [issue34269] logging in 3.7 behaves different due to caching Message-ID: <1532855036.26.0.56676864532.issue34269@psf.upfronthosting.co.za> New submission from Thomas Waldmann : When running the borgbackup tests on 3.7.0, quite some tests will be broken because expected log output is not emitted. I traced this down up the point when I noticed that reverting the caching feature change of isEnabledFor method in Logger makes the tests work on 3.7. I reviewed the logging code and the caching change, but could not easily find what is broken. There is of course some suspicion that cache invalidation might be the issue (it is present, but maybe it does not cover all the cases). See there for more info: https://github.com/borgbackup/borg/issues/3805 So, I suggest to first revert the caching feature change so we get a fixed logging in 3.7.1 and then to retry to add caching. Note: I'm at EuroPython sprints today at the borgbackup table. ---------- messages: 322617 nosy: Thomas.Waldmann priority: normal severity: normal status: open title: logging in 3.7 behaves different due to caching versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 05:07:11 2018 From: report at bugs.python.org (Thomas Waldmann) Date: Sun, 29 Jul 2018 09:07:11 +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: <1532855231.93.0.56676864532.issue34269@psf.upfronthosting.co.za> Change by Thomas Waldmann : ---------- components: +Library (Lib) type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 05:07:30 2018 From: report at bugs.python.org (Roundup Robot) Date: Sun, 29 Jul 2018 09:07:30 +0000 Subject: [issue33635] OSError when using pathlib.Path.rglob() to list device files In-Reply-To: <1527164127.59.0.682650639539.issue33635@psf.upfronthosting.co.za> Message-ID: <1532855250.08.0.56676864532.issue33635@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +8059 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 05:07:42 2018 From: report at bugs.python.org (Steve Dower) Date: Sun, 29 Jul 2018 09:07:42 +0000 Subject: [issue8145] Documentation about sqlite3 isolation_level In-Reply-To: <1268643705.49.0.319902511171.issue8145@psf.upfronthosting.co.za> Message-ID: <1532855262.58.0.56676864532.issue8145@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 94972d50bda19000bce498bd2c5ace6be9bec711 by Steve Dower (Miss Islington (bot)) in branch '3.6': bpo-8145: Improve isolation_level documentation (GH-8499) https://github.com/python/cpython/commit/94972d50bda19000bce498bd2c5ace6be9bec711 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 05:09:44 2018 From: report at bugs.python.org (Steve Dower) Date: Sun, 29 Jul 2018 09:09:44 +0000 Subject: [issue8145] Documentation about sqlite3 isolation_level In-Reply-To: <1268643705.49.0.319902511171.issue8145@psf.upfronthosting.co.za> Message-ID: <1532855384.77.0.56676864532.issue8145@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +8060 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 05:24:40 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 29 Jul 2018 09:24:40 +0000 Subject: [issue34055] IDLE Shell: check syntax before smart indent In-Reply-To: <1530817533.77.0.56676864532.issue34055@psf.upfronthosting.co.za> Message-ID: <1532856280.25.0.56676864532.issue34055@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I did several more experiments to reproduce the reported problems and narrow down when they occur. (Where I say 3.6.3 below, I actually tested 2.7.15 and/or 3.5.4 and assume same behavior until fix for 3.6.4.) >>> a=1 >>> a 1 # no extra space >>> d={1:'a', } # 3 space autoindent in 3.6.3-, 7 in 3.6.4+ after fix. >>> === # 2nd '=' marked with red 'error' background SyntaxError: invalid syntax # no extra space for this SyntaxError >>> a 1 # no extra space >>> d={1:'a |<-- 3 or 7 space indent in 3.6.3-, 3.6.4+ SyntaxError: EOL while scanning string literal >>> a |<-- Regression: persistent only after fix 1 >>> if a : d={1:'a |<-- new indent, 2 tabs + space, correct SyntaxError: EOL while scanning string literal >>> a |<-- extra line with larger indent. 1 >>> if a : e{3:===} |<-- indent not increased with matched {}. SyntaxError: invalid syntax Fresh start: >>> a=1 >>> d==={ # error before unmatched { |<-- indent SyntaxError: invalid syntax >>> a 1 Conclusion: IDLE has had a buglet in adding an indented blank line before 'SyntaxError' when the erroneous line (or maybe statement) has an unmatched opener. Before 3.6.4, indents after unmatched openers in the first line of a statement were wrong because the prompt was ignored. However, the fix introduced a regression in making the corrected indent persistent. I will have to check whether the persistence is from an uninitialized value or from erroneously including prior statements in the calculation. If possible, check syntax first and only request a smart indent when the statement is correct but incomplete. This should fix the buglet and might nullify the persistence, though I would like to fix the persistence also. --- I have occasionally experienced unrequested pasting of previous input or output after the 1st prompt after a restart, but it is so rare for me that I have not yet detected a pattern. ---------- title: IDLE: erroneous 'smart' indents in shell -> IDLE Shell: check syntax before smart indent _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 05:25:37 2018 From: report at bugs.python.org (=?utf-8?q?Alex_Gr=C3=B6nholm?=) Date: Sun, 29 Jul 2018 09:25:37 +0000 Subject: [issue34270] Add names to asyncio tasks Message-ID: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> New submission from Alex Gr?nholm : Having names on tasks helps tremendously when something goes wrong in a complex asyncio application. Threads have names and even trio has the ability to name its tasks. This would also greatly benefit PyCharm's concurrency visualization: https://www.jetbrains.com/help/pycharm/thread-concurrency-visualization.html#asyncio ---------- components: asyncio messages: 322620 nosy: alex.gronholm, asvetlov, yselivanov priority: normal severity: normal status: open title: Add names to asyncio tasks type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 05:32:05 2018 From: report at bugs.python.org (Steve Dower) Date: Sun, 29 Jul 2018 09:32:05 +0000 Subject: [issue30237] Access violation due to CancelSynchronousIo of console read In-Reply-To: <1493747167.63.0.66545140377.issue30237@psf.upfronthosting.co.za> Message-ID: <1532856725.36.0.56676864532.issue30237@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset c3af73d580888b4d444264e79dce6ec0818522cd by Steve Dower (Miss Islington (bot)) in branch '3.7': bpo-30237: Output error when ReadConsole is canceled by CancelSynchronousIo. (GH-7911) https://github.com/python/cpython/commit/c3af73d580888b4d444264e79dce6ec0818522cd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 05:32:32 2018 From: report at bugs.python.org (Steve Dower) Date: Sun, 29 Jul 2018 09:32:32 +0000 Subject: [issue30237] Access violation due to CancelSynchronousIo of console read In-Reply-To: <1493747167.63.0.66545140377.issue30237@psf.upfronthosting.co.za> Message-ID: <1532856752.7.0.56676864532.issue30237@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 28bbbdabb1e3601047530febac1b05b7b89dc65e by Steve Dower in branch '3.6': bpo-30237: Output error when ReadConsole is canceled by CancelSynchronousIo. (GH-7911) https://github.com/python/cpython/commit/28bbbdabb1e3601047530febac1b05b7b89dc65e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 05:33:58 2018 From: report at bugs.python.org (Petr Viktorin) Date: Sun, 29 Jul 2018 09:33:58 +0000 Subject: [issue33435] incorrect detection of information of some distributions In-Reply-To: <1525600412.06.0.682650639539.issue33435@psf.upfronthosting.co.za> Message-ID: <1532856838.47.0.56676864532.issue33435@psf.upfronthosting.co.za> Petr Viktorin added the comment: linux_distribution has beed deprecated for a while and has been removed in GH-6871 (bpo-28167) See https://pypi.org/project/distro for distro detection. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 05:39:52 2018 From: report at bugs.python.org (Petr Viktorin) Date: Sun, 29 Jul 2018 09:39:52 +0000 Subject: [issue33666] Document removal of os.errno In-Reply-To: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> Message-ID: <1532857192.07.0.56676864532.issue33666@psf.upfronthosting.co.za> Petr Viktorin added the comment: New changeset 78c54de575fd121d91749c2316fef1949d76fb07 by Petr Viktorin (Miss Islington (bot)) in branch '3.7': bpo-33666: Add what's new entry for os.errno removal (GH-8497) (GH-8526) https://github.com/python/cpython/commit/78c54de575fd121d91749c2316fef1949d76fb07 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 05:40:40 2018 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 29 Jul 2018 09:40:40 +0000 Subject: [issue33083] math.factorial accepts non-integral Decimal instances In-Reply-To: <1521146313.09.0.467229070634.issue33083@psf.upfronthosting.co.za> Message-ID: <1532857240.06.0.56676864532.issue33083@psf.upfronthosting.co.za> Mark Dickinson added the comment: [Tal Einat] > So we keep things consistent by supporting Decimal and Fraction inputs, but raising ValueError if the value isn't a non-negative integer? Re-reading the issue comments, my preference is still the same as expressed in msg313936: - no behaviour change if the input is a float - if the input is not a float, require it to be integer-like (in the sense of implementing __index__), and complain with a TypeError if it isn't - defer discussion of deprecating acceptance of integer-valued floats to another issue So `math.factorial(x)` would become a `TypeError` for a `Decimal` or `Fraction` instance, whether integral or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 05:58:21 2018 From: report at bugs.python.org (=?utf-8?q?W=C3=B6llert?=) Date: Sun, 29 Jul 2018 09:58:21 +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: <1532858301.0.0.56676864532.issue31047@psf.upfronthosting.co.za> Change by W?llert : ---------- keywords: +patch pull_requests: +8061 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 06:27:19 2018 From: report at bugs.python.org (Steve Dower) Date: Sun, 29 Jul 2018 10:27:19 +0000 Subject: [issue34231] PYTHONBREAKPOINT is not documented with python --help In-Reply-To: <1532595940.24.0.56676864532.issue34231@psf.upfronthosting.co.za> Message-ID: <1532860039.04.0.56676864532.issue34231@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset b7fd73896db5666020e382c010b8da900260ede4 by Steve Dower (St?phane Wirtel) in branch 'master': bpo-34231: PYTHONBREAKPOINT is not documented on python --help (GH-8475) https://github.com/python/cpython/commit/b7fd73896db5666020e382c010b8da900260ede4 ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 06:31:26 2018 From: report at bugs.python.org (Steve Dower) Date: Sun, 29 Jul 2018 10:31:26 +0000 Subject: [issue34231] PYTHONBREAKPOINT is not documented with python --help In-Reply-To: <1532595940.24.0.56676864532.issue34231@psf.upfronthosting.co.za> Message-ID: <1532860286.96.0.56676864532.issue34231@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +8062 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 07:06:38 2018 From: report at bugs.python.org (Steve Dower) Date: Sun, 29 Jul 2018 11:06:38 +0000 Subject: [issue8145] Documentation about sqlite3 isolation_level In-Reply-To: <1268643705.49.0.319902511171.issue8145@psf.upfronthosting.co.za> Message-ID: <1532862398.0.0.56676864532.issue8145@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 3dc8cdf56d056fb7722061ac3b3863e8a385b8de by Steve Dower in branch '3.7': bpo-8145: Improve isolation_level documentation (GH-8499) https://github.com/python/cpython/commit/3dc8cdf56d056fb7722061ac3b3863e8a385b8de ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 07:08:23 2018 From: report at bugs.python.org (INADA Naoki) Date: Sun, 29 Jul 2018 11:08:23 +0000 Subject: [issue33666] Document removal of os.errno In-Reply-To: <1527512817.93.0.682650639539.issue33666@psf.upfronthosting.co.za> Message-ID: <1532862503.24.0.56676864532.issue33666@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 Sun Jul 29 07:08:59 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 29 Jul 2018 11:08:59 +0000 Subject: [issue33083] math.factorial accepts non-integral Decimal instances In-Reply-To: <1521146313.09.0.467229070634.issue33083@psf.upfronthosting.co.za> Message-ID: <1532862539.4.0.56676864532.issue33083@psf.upfronthosting.co.za> Tal Einat added the comment: As a user, I would find Mark's suggestion very confusing, accepting non-integral floats but not non-integral Decimals and Fractions. I agree that ideally it should accept only integral inputs, including floats, but deprecating the behavior for non-integral floats has been deemed out of scope for this issue. Therefore I suggest doing the same for Decimal and Fraction: accept them but raise a ValueError if their values aren't non-negative integers. At a later point we could deprecate this behavior for all non-integer types of numbers. Another alternative, which is also more acceptable IMO, is to raise TypeError if given anything other than an int or a float, while deprecating floats altogether. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 07:12:07 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 29 Jul 2018 11:12:07 +0000 Subject: [issue8145] Documentation about sqlite3 isolation_level In-Reply-To: <1268643705.49.0.319902511171.issue8145@psf.upfronthosting.co.za> Message-ID: <1532862727.09.0.56676864532.issue8145@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- keywords: -needs review resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 07:17:52 2018 From: report at bugs.python.org (Steve Dower) Date: Sun, 29 Jul 2018 11:17:52 +0000 Subject: [issue34231] PYTHONBREAKPOINT is not documented with python --help In-Reply-To: <1532595940.24.0.56676864532.issue34231@psf.upfronthosting.co.za> Message-ID: <1532863072.27.0.56676864532.issue34231@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 6332de10c7ff703d7f9cef62969aa68e7d28d075 by Steve Dower in branch '3.7': bpo-34231: PYTHONBREAKPOINT is not documented on python --help (GH-8475) https://github.com/python/cpython/commit/6332de10c7ff703d7f9cef62969aa68e7d28d075 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 07:23:01 2018 From: report at bugs.python.org (Steve Dower) Date: Sun, 29 Jul 2018 11:23:01 +0000 Subject: [issue34258] Python shell keeps restarting In-Reply-To: <1532775569.15.0.56676864532.issue34258@psf.upfronthosting.co.za> Message-ID: <1532863381.15.0.56676864532.issue34258@psf.upfronthosting.co.za> Steve Dower added the comment: Maybe you could describe what it looks like when it restarts? Or take a screenshot and share it so we can see what is happening? ---------- assignee: -> terry.reedy components: +IDLE nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 07:39:45 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 29 Jul 2018 11:39:45 +0000 Subject: [issue34231] PYTHONBREAKPOINT is not documented with python --help In-Reply-To: <1532595940.24.0.56676864532.issue34231@psf.upfronthosting.co.za> Message-ID: <1532864385.36.0.56676864532.issue34231@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 07:41:30 2018 From: report at bugs.python.org (Roundup Robot) Date: Sun, 29 Jul 2018 11:41:30 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1532864490.09.0.56676864532.issue34270@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +8063 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 07:46:00 2018 From: report at bugs.python.org (Steve Dower) Date: Sun, 29 Jul 2018 11:46:00 +0000 Subject: [issue34232] Python3.7.0 exe installers (32 and 64 bit) failing on Windows7 In-Reply-To: <1532600152.06.0.56676864532.issue34232@psf.upfronthosting.co.za> Message-ID: <1532864760.75.0.56676864532.issue34232@psf.upfronthosting.co.za> Steve Dower added the comment: Thanks. There is at least one other log file in the same location as the one you attached - the log with "core_JustForMe" in the name is what I need to keep diagnosing this problem. ---------- components: +Windows nosy: +paul.moore, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 08:37:41 2018 From: report at bugs.python.org (Robert Wright) Date: Sun, 29 Jul 2018 12:37:41 +0000 Subject: [issue32321] functools.reduce has a redundant guard or needs a pure Python fallback In-Reply-To: <1513257994.59.0.213398074469.issue32321@psf.upfronthosting.co.za> Message-ID: <1532867861.7.0.56676864532.issue32321@psf.upfronthosting.co.za> Change by Robert Wright : ---------- pull_requests: +8064 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 08:38:09 2018 From: report at bugs.python.org (Johannes Frank) Date: Sun, 29 Jul 2018 12:38:09 +0000 Subject: [issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILe Message-ID: <1532867889.16.0.56676864532.issue34271@psf.upfronthosting.co.za> New submission from Johannes Frank : As discussed on the EuroPython 2018 it would be a great improvement if the python SSL module would respect the SSLKEYLOGFILE environment variable to log the master secret and the client random for packet trace decryption. The pycurl module compiled against libopenssl 1.1.0h does already work. OpenSSL 1.1.1 will offer to register a callback that will log the keys. There is also c code available using LD_PRELOAD here: https://git.lekensteyn.nl/peter/wireshark-notes/tree/src/sslkeylog.c It would be great if a call to the requests, aiohttp, urllib3 or asks library would lead to the keys logged if the environment variable is set from within python. Thank you ---------- assignee: christian.heimes components: SSL files: pycurl-get.py messages: 322632 nosy: christian.heimes, jmfrank63 priority: normal severity: normal status: open title: Please support logging of SSL master secret by env variable SSLKEYLOGFILe type: enhancement versions: Python 3.7 Added file: https://bugs.python.org/file47719/pycurl-get.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 08:38:43 2018 From: report at bugs.python.org (Johannes Frank) Date: Sun, 29 Jul 2018 12:38:43 +0000 Subject: [issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILE In-Reply-To: <1532867889.16.0.56676864532.issue34271@psf.upfronthosting.co.za> Message-ID: <1532867923.35.0.56676864532.issue34271@psf.upfronthosting.co.za> Change by Johannes Frank : ---------- title: Please support logging of SSL master secret by env variable SSLKEYLOGFILe -> Please support logging of SSL master secret by env variable SSLKEYLOGFILE _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 08:47:12 2018 From: report at bugs.python.org (Steve Dower) Date: Sun, 29 Jul 2018 12:47:12 +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: <1532868432.32.0.56676864532.issue31047@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset d2e902e4fb304f27e4a72356efbc1fc26be3935d by Steve Dower (Franz W?llert) in branch 'master': bpo-31047: Fix ntpath.abspath for invalid paths (GH-8544) https://github.com/python/cpython/commit/d2e902e4fb304f27e4a72356efbc1fc26be3935d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 08:47:25 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 29 Jul 2018 12:47:25 +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: <1532868445.26.0.56676864532.issue31047@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8065 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 08:50:45 2018 From: report at bugs.python.org (Thomas Waldmann) Date: Sun, 29 Jul 2018 12:50:45 +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: <1532868645.79.0.56676864532.issue34269@psf.upfronthosting.co.za> Thomas Waldmann added the comment: https://github.com/borgbackup/borg/pull/3998 Looks like this fix to our test tearDown method makes the tests work again. If one looks at what this dirty/problematic hack was done, it might be because of a missing logging reset functionality? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 08:56:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 29 Jul 2018 12:56:01 +0000 Subject: [issue34272] Reorganize C API tests Message-ID: <1532868961.04.0.56676864532.issue34272@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The proposed PR reorganizes C API tests. Most C API tests will be moved into the new directory Lib/test/test_capi/. ---------- components: Tests messages: 322635 nosy: ezio.melotti, michael.foord, serhiy.storchaka priority: normal severity: normal status: open title: Reorganize C API tests type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 09:05:08 2018 From: report at bugs.python.org (Steve Dower) Date: Sun, 29 Jul 2018 13:05:08 +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: <1532869508.66.0.56676864532.issue31047@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +8066 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 09:14:23 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 29 Jul 2018 13:14:23 +0000 Subject: [issue34272] Reorganize C API tests In-Reply-To: <1532868961.04.0.56676864532.issue34272@psf.upfronthosting.co.za> Message-ID: <1532870063.69.0.56676864532.issue34272@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 09:14:44 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 29 Jul 2018 13:14:44 +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: <1532870084.24.0.56676864532.issue34269@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 09:15:37 2018 From: report at bugs.python.org (Steve Dower) Date: Sun, 29 Jul 2018 13:15:37 +0000 Subject: [issue34267] find_python.bat doesn't find installed Python 3.7 In-Reply-To: <1532820797.37.0.56676864532.issue34267@psf.upfronthosting.co.za> Message-ID: <1532870137.38.0.56676864532.issue34267@psf.upfronthosting.co.za> Change by Steve Dower : ---------- assignee: -> steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 09:15:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 29 Jul 2018 13:15:48 +0000 Subject: [issue34272] Reorganize C API tests In-Reply-To: <1532868961.04.0.56676864532.issue34272@psf.upfronthosting.co.za> Message-ID: <1532870148.14.0.56676864532.issue34272@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +8067 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 09:21:48 2018 From: report at bugs.python.org (Steve Dower) Date: Sun, 29 Jul 2018 13:21:48 +0000 Subject: [issue34267] find_python.bat doesn't find installed Python 3.7 In-Reply-To: <1532820797.37.0.56676864532.issue34267@psf.upfronthosting.co.za> Message-ID: <1532870508.92.0.56676864532.issue34267@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: +patch pull_requests: +8068 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 10:30:27 2018 From: report at bugs.python.org (=?utf-8?b?TWlja2HDq2wgUy4=?=) Date: Sun, 29 Jul 2018 14:30:27 +0000 Subject: [issue26440] tarfile._FileInFile.seekable is broken in stream mode In-Reply-To: <1456418959.65.0.0948342534374.issue26440@psf.upfronthosting.co.za> Message-ID: <1532874627.7.0.56676864532.issue26440@psf.upfronthosting.co.za> Change by Micka?l S. : ---------- keywords: +patch pull_requests: +8069 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 10:59:36 2018 From: report at bugs.python.org (Pablo Santiago Blum de Aguiar) Date: Sun, 29 Jul 2018 14:59:36 +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: <1532876376.57.0.56676864532.issue34246@psf.upfronthosting.co.za> Change by Pablo Santiago Blum de Aguiar : ---------- keywords: +patch pull_requests: +8070 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 11:42:20 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 29 Jul 2018 15:42:20 +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: <1532878940.96.0.56676864532.issue31047@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 5753b13cb949b939b2b29cec5e2d646f9a30db44 by Miss Islington (bot) in branch '3.7': bpo-31047: Fix ntpath.abspath for invalid paths (GH-8544) https://github.com/python/cpython/commit/5753b13cb949b939b2b29cec5e2d646f9a30db44 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 12:18:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 29 Jul 2018 16:18:41 +0000 Subject: [issue33747] Failed separate test_patch_propogrates_exc_on_exit in test_unittest In-Reply-To: <1528027150.62.0.592728768989.issue33747@psf.upfronthosting.co.za> Message-ID: <1532881121.61.0.56676864532.issue33747@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Michael, could you please make a review? I'm not experienced with mock.patch, and don't know what this test do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 12:43:27 2018 From: report at bugs.python.org (Abdur-rahmaan Janhangeer) Date: Sun, 29 Jul 2018 16:43:27 +0000 Subject: [issue34272] Reorganize C API tests In-Reply-To: <1532868961.04.0.56676864532.issue34272@psf.upfronthosting.co.za> Message-ID: Abdur-rahmaan Janhangeer added the comment: unsubscribe Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ Mauritius On Sun, 29 Jul 2018, 16:56 Serhiy Storchaka, wrote: > > New submission from Serhiy Storchaka : > > The proposed PR reorganizes C API tests. Most C API tests will be moved > into the new directory Lib/test/test_capi/. > > ---------- > components: Tests > messages: 322635 > nosy: ezio.melotti, michael.foord, serhiy.storchaka > priority: normal > severity: normal > status: open > title: Reorganize C API tests > type: enhancement > versions: Python 3.6, Python 3.7, Python 3.8 > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > New-bugs-announce mailing list > New-bugs-announce at python.org > https://mail.python.org/mailman/listinfo/new-bugs-announce > ---------- nosy: +appinv _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 12:46:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 29 Jul 2018 16:46:50 +0000 Subject: [issue34272] Reorganize C API tests In-Reply-To: <1532868961.04.0.56676864532.issue34272@psf.upfronthosting.co.za> Message-ID: <1532882810.68.0.56676864532.issue34272@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- Removed message: https://bugs.python.org/msg322638 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 12:47:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 29 Jul 2018 16:47:05 +0000 Subject: [issue34272] Reorganize C API tests In-Reply-To: <1532868961.04.0.56676864532.issue34272@psf.upfronthosting.co.za> Message-ID: <1532882825.83.0.56676864532.issue34272@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: -appinv _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 13:04:58 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Sun, 29 Jul 2018 17:04:58 +0000 Subject: [issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILE In-Reply-To: <1532867889.16.0.56676864532.issue34271@psf.upfronthosting.co.za> Message-ID: <1532883898.25.0.56676864532.issue34271@psf.upfronthosting.co.za> Change by Chih-Hsuan Yen : ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 14:26:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 29 Jul 2018 18:26:54 +0000 Subject: [issue34035] Several AttributeError in zipfile seek() methods In-Reply-To: <1530642274.73.0.56676864532.issue34035@psf.upfronthosting.co.za> Message-ID: <1532888814.38.0.56676864532.issue34035@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 3f8c6913b82ed9c05e57175bcbfeacde46c598e3 by Serhiy Storchaka (Micka?l Schoentgen) in branch 'master': bpo-34035: Fix several AttributeError in zipfile seek() methods. (GH-8527) https://github.com/python/cpython/commit/3f8c6913b82ed9c05e57175bcbfeacde46c598e3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 14:27:17 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 29 Jul 2018 18:27:17 +0000 Subject: [issue34035] Several AttributeError in zipfile seek() methods In-Reply-To: <1530642274.73.0.56676864532.issue34035@psf.upfronthosting.co.za> Message-ID: <1532888836.99.0.56676864532.issue34035@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8072 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 15:15:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 29 Jul 2018 19:15:17 +0000 Subject: [issue34182] Lib/test/test_pydoc.py failed when ran as a script In-Reply-To: <1532194373.75.0.56676864532.issue34182@psf.upfronthosting.co.za> Message-ID: <1532891717.11.0.56676864532.issue34182@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 4e11c461ed39085b8495a35c9367b46d8a0d306d by Serhiy Storchaka (Bo Bayles) in branch 'master': bpo-34182: Fix test_pydoc running as a script. (GH-8389) https://github.com/python/cpython/commit/4e11c461ed39085b8495a35c9367b46d8a0d306d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 15:15:24 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 29 Jul 2018 19:15:24 +0000 Subject: [issue34182] Lib/test/test_pydoc.py failed when ran as a script In-Reply-To: <1532194373.75.0.56676864532.issue34182@psf.upfronthosting.co.za> Message-ID: <1532891724.61.0.56676864532.issue34182@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8073 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 15:50:38 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 29 Jul 2018 19:50:38 +0000 Subject: [issue34182] Lib/test/test_pydoc.py failed when ran as a script In-Reply-To: <1532194373.75.0.56676864532.issue34182@psf.upfronthosting.co.za> Message-ID: <1532893838.42.0.56676864532.issue34182@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 990de2f4ca734ddaa196e2af64caafb9c77f29e0 by Miss Islington (bot) in branch '3.7': bpo-34182: Fix test_pydoc running as a script. (GH-8389) https://github.com/python/cpython/commit/990de2f4ca734ddaa196e2af64caafb9c77f29e0 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 15:52:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 29 Jul 2018 19:52:59 +0000 Subject: [issue34182] Lib/test/test_pydoc.py failed when ran as a script In-Reply-To: <1532194373.75.0.56676864532.issue34182@psf.upfronthosting.co.za> Message-ID: <1532893979.17.0.56676864532.issue34182@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 Jul 29 15:57:23 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 29 Jul 2018 19:57:23 +0000 Subject: [issue34035] Several AttributeError in zipfile seek() methods In-Reply-To: <1530642274.73.0.56676864532.issue34035@psf.upfronthosting.co.za> Message-ID: <1532894243.89.0.56676864532.issue34035@psf.upfronthosting.co.za> miss-islington added the comment: New changeset ad4f64d58c020016bd438de0e863a0d31d0f0dac by Miss Islington (bot) in branch '3.7': bpo-34035: Fix several AttributeError in zipfile seek() methods. (GH-8527) https://github.com/python/cpython/commit/ad4f64d58c020016bd438de0e863a0d31d0f0dac ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 16:07:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 29 Jul 2018 20:07:37 +0000 Subject: [issue34035] Several AttributeError in zipfile seek() methods In-Reply-To: <1530642274.73.0.56676864532.issue34035@psf.upfronthosting.co.za> Message-ID: <1532894857.84.0.56676864532.issue34035@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your report Evgeny and for your PR Micka?l! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 17:25:52 2018 From: report at bugs.python.org (Michael Fischer) Date: Sun, 29 Jul 2018 21:25:52 +0000 Subject: [issue34273] %f is confusingly associated with fixed point format Message-ID: <1532899552.57.0.56676864532.issue34273@psf.upfronthosting.co.za> New submission from Michael Fischer : In section "7.1.3.1. Format Specification Mini-Language" of the documentation (https://docs.python.org/2/library/string.html) both %f and %F are labelled "Fixed point". This is confusing for someone who a) transitions over from C or variants or b) knows the difference between fixed and floating point numbers. I suggest either changing the "Fixed" to "Floating" or explaining what is meant by "Fixed Point" (because I'm sure there's a reason why someone has named it like that in the first place). ---------- assignee: docs at python components: Documentation messages: 322644 nosy: MikeFoxtrot, docs at python priority: normal severity: normal status: open title: %f is confusingly associated with fixed point format type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 17:39:57 2018 From: report at bugs.python.org (Segev Finer) Date: Sun, 29 Jul 2018 21:39:57 +0000 Subject: [issue34274] Python launcher behavior with /usr/bin/env python shebang Message-ID: <1532900397.79.0.56676864532.issue34274@psf.upfronthosting.co.za> Change by Segev Finer : ---------- components: Windows nosy: Segev Finer, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Python launcher behavior with /usr/bin/env python shebang type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 17:47:19 2018 From: report at bugs.python.org (Segev Finer) Date: Sun, 29 Jul 2018 21:47:19 +0000 Subject: [issue34274] Python launcher behavior with "#!/usr/bin/env python" shebang Message-ID: <1532900839.39.0.56676864532.issue34274@psf.upfronthosting.co.za> New submission from Segev Finer : When using the common "#!/usr/bin/env python" shebang, recent versions of the Python launcher will search the PATH for "python" as specified in the shebang. But Python on Windows installs as python.exe for all versions, both 2 and 3. So in a PC where Python 3 is first on PATH, this shebang will choose Python 3. That's in contrast to any other shebang like "#!python" or "#!/usr/bin/python" which will prefer Python 2. That's rather subtle and confusing... To the best of my knowledge most Linux distros still install Python 2 as python and Python 3 as python3 (I think that's in the Makefile too). But of course there might also be distros that install python3 as python. ---------- title: Python launcher behavior with /usr/bin/env python shebang -> Python launcher behavior with "#!/usr/bin/env python" shebang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 20:51:25 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 30 Jul 2018 00:51:25 +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: <1532911885.51.0.56676864532.issue34120@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On idledev thread "Mac IDLE 3.7.0 freezes when accessing Preferences", Walter Schnyder reported something similar. Combining two posts: "using python.org Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 26 2018, 23:26:24) [Clang 6.0 (clang-600.0.57)] on darwin [64-bit] and came across these [new] bugs on several Macs, all running OS X v 10.13.5. [Has run IDLE before, back to 3.4.] Bug A: 1. From the shell select Preferences in the IDLE menu. 2. Cancel the Preferences to get back to the Shell 3. The shell is frozen. It doesn?t even react to CONTROL-D. The only way I found to resurrect it is to control-click the shell window and select ?Go to file/line? causing an error message to appear. Click OK and the shell comes back to life. Note: This doesn?t only happen when accessing preferences. It also happens when selecting ?About IDLE? in the IDLE menu." After starting with 'python3 -m idlelib' "The same problems occur. There is no error in the terminal window. But I learned something new: after running the steps for bug A, IDLE is frozen (no blinking cursor, not responding to Control+D. However, if I bring another application?s window to the front (by clicking on it) then click back on IDLE?s window, this resurrects IDLE, the cursor blinks and Control+D quits." test_idle passes. When running 'python3 -m idlelib.configdialog' or 'idlelib.help_about', which run a human-viewed test, there is no problem when closing either dialog. Vlad, if I understand your post, you *do* see the problem with 3.5? With the python.org installer and tk 8.5? As far as I know, no one has had a problem with this. Or only with a private compile with tk 8.6? This is important because 3.5 IDLE has not been touched since about 18 months, and if there is only a problem when using tk 8.6, then I have to suspect that this and other new problems are result of tk 8.6 on Mac or tkinter needing a patch to support it. ---------- components: +macOS nosy: +ned.deily, rhettinger, ronaldoussoren, taleinat, walters stage: -> needs patch title: IDLE Caret/Focus Lost -> IDLE: Freeze when closing Settings (& About) dialog on MacOS versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 29 22:16:41 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 30 Jul 2018 02:16:41 +0000 Subject: [issue34275] IDLE: no calltips on MacOS with tk 8.6 Message-ID: <1532917001.14.0.56676864532.issue34275@psf.upfronthosting.co.za> New submission from Terry J. Reedy : In #34055, Raymond said "tool tips no longer display on the newest mac builds". On idledev, Walter S reported the same using 64-bit python.org "Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 26 2018, 23:26:24) [Clang 6.0 (clang-600.0.57)] on darwin" on multiple machines with 10.13.5. He also verified that the htest part of 'python3 -m idlelib.calltip_w' fails (no calltip appears when typing '('. I have doubts that this is a new problem with IDLE. calltip.py was not touched for 3.7.0. calltip_w.py was only touched to change return None to return 'break' where appropriate. This is one of 3 new Mac-specific failures reported after the release of 3.7.0. The others are #34047, scrolling problems, and #34120, freeze on some dialog closings. I have to suspect that the problem is with tkinter (_tkinter) and the new tcl/tk 8.6.8. How to debug (help appreciated with any of these): 1. Run the 3.6.6 32/64 bit binary, compiled against tk 8.5 instead of 8.6, and see if the same problems occur. Any problems that do are not 8.6 specific. 2. Find minimal failing cases with as little IDLE-specific code as possible. 3. Trace execution of the IDLE code with prints or debugger to find the point of failure. For this issue, I would start with adding print calls in the function that creates the tip window. ---------- assignee: terry.reedy components: IDLE, macOS messages: 322647 nosy: ned.deily, rhettinger, ronaldoussoren, taleinat, terry.reedy, walters priority: normal severity: normal stage: needs patch status: open title: IDLE: no calltips on MacOS with tk 8.6 type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 00:12:02 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 30 Jul 2018 04:12:02 +0000 Subject: [issue34272] Reorganize C API tests In-Reply-To: <1532868961.04.0.56676864532.issue34272@psf.upfronthosting.co.za> Message-ID: <1532923922.92.0.56676864532.issue34272@psf.upfronthosting.co.za> Raymond Hettinger added the comment: It seems to me that this will make the individual objects and modules harder to maintain. I expect to find all the tests for an object in a file called test_thatobject.py. This patch violates that expectation and separates things that belong together. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 00:15:06 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 30 Jul 2018 04:15:06 +0000 Subject: [issue34258] Python shell keeps restarting In-Reply-To: <1532775569.15.0.56676864532.issue34258@psf.upfronthosting.co.za> Message-ID: <1532924106.42.0.56676864532.issue34258@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In IDLE, Run Module, F5, is a shortcut, in a sense, for saving the file to filename, switching to a terminal or console window, such as Command Prompt on Windows, and entering 'python -i filename'. The -i means 'switch it interactive mode after running the file'. When you are done, and close the window, you can switch back to the editor. The IDLE Shell more-or-less simulates Python's interactive mode. When you hit F5, a separator line is added, like =================== RESTART: F:\Python\a\tem.py ===================== to indicate that Shell reinitialized itself and is now running your program. This is completely normal and intended. When your program finishes, Shell will display '>>> '. Please try to read the IDLE doc, which is available on the Help menu as 'IDLE Help'. You can ask about using Python and IDLE on python-list. Always mention the Python version and operating system you are using. You program has a bug. In the 'else' section, it tries to print q1 without q1 being defined. If a program has a severe bug that caused the Python executing your code to crash, Shell will restart with a line that does not have a filename, like ======================== RESTART ======================== This is hard to bring about and is also not an IDLE bug. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 00:16:37 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 30 Jul 2018 04:16:37 +0000 Subject: [issue1467929] %-formatting and dicts Message-ID: <1532924197.76.0.56676864532.issue1467929@psf.upfronthosting.co.za> Raymond Hettinger added the comment: [Eric V. Smith] > But the issue is 12 years old and doesn't cause any real problems > as far as I can see, so it's hard to get excited about it. > And as we've seen there are a lot of corner cases. I'd hate to > make things worse. I ooncur with Eric and think this ought to be closed. It is a oddity but has proven itself to be harmless in the wild. At this point in the life cycle of %-formatting it would be prudent to value stability over niggling behavior changes. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 00:23:56 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 30 Jul 2018 04:23:56 +0000 Subject: [issue33089] Add multi-dimensional Euclidean distance function to the math module In-Reply-To: <1521226258.78.0.467229070634.issue33089@psf.upfronthosting.co.za> Message-ID: <1532924636.78.0.56676864532.issue33089@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I really don't want to introduce something slower than O(n) behavior here, particularly because some of my use cases have a large n and because this will be called many times. Tim has already opined the even using a variant of Kahan summation would increase the cost unacceptably. IMO, sorting is even worse and would be a foolish thing to do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 00:39:03 2018 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 30 Jul 2018 04:39:03 +0000 Subject: [issue34276] urllib.parse doesn't round-trip file URI's with multiple leading slashes Message-ID: <1532925543.25.0.56676864532.issue34276@psf.upfronthosting.co.za> New submission from Chris Jerdonek : urllib.parse doesn't seem to round-trip file URI's containing multiple leading slashes. For example, this-- import urllib.parse def round_trip(url): parsed = urllib.parse.urlsplit(url) new_url = urllib.parse.urlunsplit(parsed) print(f'{url} [{parsed}]\n{new_url}') print('ROUNDTRIP: {}\n'.format(url == new_url)) for i in range(4): round_trip('file://{}root/a'.format(i * '/')) results in-- file://root/a [SplitResult(scheme='file', netloc='root', path='/a', query='', fragment='')] file://root/a ROUNDTRIP: True file:///root/a [SplitResult(scheme='file', netloc='', path='/root/a', query='', fragment='')] file:///root/a ROUNDTRIP: True file:////root/a [SplitResult(scheme='file', netloc='', path='//root/a', query='', fragment='')] file://root/a ROUNDTRIP: False file://///root/a [SplitResult(scheme='file', netloc='', path='///root/a', query='', fragment='')] file:///root/a ROUNDTRIP: False URI's of the form file:////// occur, for example, when one wants to git-clone a UNC path on Windows: https://stackoverflow.com/a/2520121/262819 Here is where CPython defines urlunsplit(): https://github.com/python/cpython/blob/4e11c461ed39085b8495a35c9367b46d8a0d306d/Lib/urllib/parse.py#L465-L482 (The '//' special-casing seems to occur in this line here: https://github.com/python/cpython/blob/4e11c461ed39085b8495a35c9367b46d8a0d306d/Lib/urllib/parse.py#L473 ) And here is where the round-tripping is tested: https://github.com/python/cpython/blob/4e11c461ed39085b8495a35c9367b46d8a0d306d/Lib/test/test_urlparse.py#L156 (Three initial leading slashes is tested, but not the problem case of four or more.) ---------- components: Library (Lib) messages: 322652 nosy: chris.jerdonek priority: normal severity: normal status: open title: urllib.parse doesn't round-trip file URI's with multiple leading slashes type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 00:56:23 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Mon, 30 Jul 2018 04:56:23 +0000 Subject: [issue32947] Support OpenSSL 1.1.1 In-Reply-To: <1519559680.67.0.467229070634.issue32947@psf.upfronthosting.co.za> Message-ID: <1532926583.73.0.56676864532.issue32947@psf.upfronthosting.co.za> Change by Chih-Hsuan Yen : ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 01:32:53 2018 From: report at bugs.python.org (Bryce Drennan) Date: Mon, 30 Jul 2018 05:32:53 +0000 Subject: [issue34277] EmailPolicy not followed Message-ID: <1532928773.1.0.56676864532.issue34277@psf.upfronthosting.co.za> New submission from Bryce Drennan : Starting in 3.6.4, the header flattening ignores the EmailyPolicy.utf8 attribute if a header is longer than maxlen. I believe this was introduced in https://github.com/python/cpython/pull/4693. Specifically this part: https://github.com/miss-islington/cpython/blob/8085ac188785ad0301760869a08b83c2945257a4/Lib/email/_header_value_parser.py#L2668-L2673 This causes problems as the dkim-signature header of parsed email messages gets mangled when they are flattened. It should look like this: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1532918961; bh=AwLeVe/FpXHJ9+VNy8QKwz2N5wuNF5ZkyXE3tLVBrFY=; h=Date:From:Reply-To:To:Subject:References:From:Subject; b=rSWZ7vyWIZqflUJS9ysVQvDxeoMxepEqPr/EoVkqpilCP1ryvci6/jCsFe75M2Jr5NJjzg6yJ6Xew8rpq8SMnZeNhTMmCK8jy\r\n WwSamcZ14t0LUZEt30+9Ump0KbPq+WRQK2rM9NnBVhE6pyvANfgsKMqgXlYzAmHk7P8cZ7ztJMSrtOeOr3u5RRNwvYJ+OYHZSFHiQZrPopNDKovVBcAc+6yVBI3YsI1qsgDmoQ/F5NszOLsBit2IkcvWr7z [...] but instead gets output like this: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048;\r\n t=1532918961; bh=AwLeVe/FpXHJ9+VNy8QKwz2N5wuNF5ZkyXE3tLVBrFY=;\r\n h=Date:From:Reply-To:To:Subject:References:From:Subject; =?utf-8?q?b=3DrSWZ?=\r\n =?utf-8?q?7vyWIZqflUJS9ysVQvDxeoMxepEqPr/EoVkqpilCP1ryvci6/jCsFe75M2Jr5NJjz?=\r\n =?utf-8?q?g6yJ6Xew8rpq8SMnZeN [...] Attached is a test that passes in 3.6.3 and fails in 3.6.4. ---------- components: email files: test_header_folding.py messages: 322653 nosy: barry, bryced, r.david.murray priority: normal severity: normal status: open title: EmailPolicy not followed versions: Python 3.6, Python 3.7 Added file: https://bugs.python.org/file47720/test_header_folding.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 01:37:52 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Mon, 30 Jul 2018 05:37:52 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1532911885.51.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: Vlad Tudorache added the comment: I?m sorry for not being clear. This problem appears with Tk 8.6, even in Python 3.5 (compiled by me). I?ve succeeded to reproduce only once the @autorelease pool error (it appeared after several open/close of the preferences or about window). Did anyone else see it? Le lun. 30 juil. 2018 ? 02:51, Terry J. Reedy a ?crit : > > Terry J. Reedy added the comment: > > On idledev thread "Mac IDLE 3.7.0 freezes when accessing Preferences", > Walter Schnyder reported something similar. Combining two posts: > > "using python.org Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 26 2018, 23:26:24) > [Clang 6.0 (clang-600.0.57)] on darwin [64-bit] and came across these [new] > bugs on several Macs, all running OS X v 10.13.5. > [Has run IDLE before, back to 3.4.] > > Bug A: > 1. From the shell select Preferences in the IDLE menu. > 2. Cancel the Preferences to get back to the Shell > 3. The shell is frozen. It doesn?t even react to CONTROL-D. > > The only way I found to resurrect it is to control-click the shell window > and select ?Go to file/line? causing an error message to appear. Click OK > and the shell comes back to life. > > Note: This doesn?t only happen when accessing preferences. It also happens > when selecting ?About IDLE? in the IDLE menu." > > After starting with 'python3 -m idlelib' > > "The same problems occur. There is no error in the terminal window. > But I learned something new: after running the steps for bug A, IDLE is > frozen (no blinking cursor, not responding to Control+D. However, if I > bring another application?s window to the front (by clicking on it) then > click back on IDLE?s window, this resurrects IDLE, the cursor blinks and > Control+D quits." > > test_idle passes. When running 'python3 -m idlelib.configdialog' or > 'idlelib.help_about', which run a human-viewed test, there is no problem > when closing either dialog. > > Vlad, if I understand your post, you *do* see the problem with 3.5? With > the python.org installer and tk 8.5? As far as I know, no one has had a > problem with this. Or only with a private compile with tk 8.6? > > This is important because 3.5 IDLE has not been touched since about 18 > months, and if there is only a problem when using tk 8.6, then I have to > suspect that this and other new problems are result of tk 8.6 on Mac or > tkinter needing a patch to support it. > > ---------- > components: +macOS > nosy: +ned.deily, rhettinger, ronaldoussoren, taleinat, walters > stage: -> needs patch > title: IDLE Caret/Focus Lost -> IDLE: Freeze when closing Settings (& > About) dialog on MacOS > versions: +Python 3.8 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 02:03:06 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 30 Jul 2018 06:03:06 +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: <1532930586.58.0.56676864532.issue34217@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8074 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 02:06:05 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 30 Jul 2018 06:06:05 +0000 Subject: [issue1467929] %-formatting and dicts Message-ID: <1532930765.72.0.56676864532.issue1467929@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 02:15:54 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 30 Jul 2018 06:15:54 +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: <1532931354.36.0.56676864532.issue34217@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 6c89a9a4c7d1804e16038f9ee3a0b2efaa4bdee6 by Miss Islington (bot) in branch '3.7': bpo-34217: Use lowercase header for Windows (GH-8453) https://github.com/python/cpython/commit/6c89a9a4c7d1804e16038f9ee3a0b2efaa4bdee6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 02:22:58 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 30 Jul 2018 06:22:58 +0000 Subject: [issue34276] urllib.parse doesn't round-trip file URI's with multiple leading slashes In-Reply-To: <1532925543.25.0.56676864532.issue34276@psf.upfronthosting.co.za> Message-ID: <1532931778.9.0.56676864532.issue34276@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 02:51:28 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 30 Jul 2018 06:51:28 +0000 Subject: [issue33089] Add multi-dimensional Euclidean distance function to the math module In-Reply-To: <1521226258.78.0.467229070634.issue33089@psf.upfronthosting.co.za> Message-ID: <1532933488.07.0.56676864532.issue33089@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- pull_requests: +8075 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 02:51:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 30 Jul 2018 06:51:35 +0000 Subject: [issue34272] Reorganize C API tests In-Reply-To: <1532868961.04.0.56676864532.issue34272@psf.upfronthosting.co.za> Message-ID: <1532933495.07.0.56676864532.issue34272@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Not all C API tests are related to specific type or module. What about moving just test_capi.py, test_getargs2.py and test_structmembers.py? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 03:30:02 2018 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 30 Jul 2018 07:30:02 +0000 Subject: [issue33083] math.factorial accepts non-integral Decimal instances In-Reply-To: <1521146313.09.0.467229070634.issue33083@psf.upfronthosting.co.za> Message-ID: <1532935802.94.0.56676864532.issue33083@psf.upfronthosting.co.za> Mark Dickinson added the comment: > accepting non-integral floats but not non-integral Decimals and Fractions. I don't think anyone is proposing to accept non-integral floats. non-integral floats are _already_ rejected with a ValueError. Did you mean "integral" instead of "non-integral"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 03:55:48 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 30 Jul 2018 07:55:48 +0000 Subject: [issue33083] math.factorial accepts non-integral Decimal instances In-Reply-To: <1521146313.09.0.467229070634.issue33083@psf.upfronthosting.co.za> Message-ID: <1532937348.42.0.56676864532.issue33083@psf.upfronthosting.co.za> Tal Einat added the comment: >> accepting non-integral floats but not non-integral Decimals and Fractions. > I don't think anyone is proposing to accept non-integral floats. non-integral floats are _already_ rejected with a ValueError. Did you mean "integral" instead of "non-integral"? Indeed, yes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 04:36:11 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 30 Jul 2018 08:36:11 +0000 Subject: [issue27163] IDLE entry for What's New in Python 3.6 In-Reply-To: <1464677885.83.0.244887022976.issue27163@psf.upfronthosting.co.za> Message-ID: <1532939771.57.0.56676864532.issue27163@psf.upfronthosting.co.za> Change by Tal Einat : ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 04:40:25 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 30 Jul 2018 08:40:25 +0000 Subject: [issue33204] IDLE: remove \b from colorizer string prefix In-Reply-To: <1522640249.89.0.467229070634.issue33204@psf.upfronthosting.co.za> Message-ID: <1532940025.08.0.56676864532.issue33204@psf.upfronthosting.co.za> Tal Einat added the comment: Should this be closed as resolved? ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 05:02:57 2018 From: report at bugs.python.org (crzbear) Date: Mon, 30 Jul 2018 09:02:57 +0000 Subject: [issue34278] Documentation: os.waitid and os.WNOHANG Message-ID: <1532941377.17.0.56676864532.issue34278@psf.upfronthosting.co.za> New submission from crzbear : os.waitid states that None is returned if WNOHANG was specified and no children are in a waitable state os.WNOHANG states that the return value in this case would be (0, 0) Python 3.6.5 returns None, so the latter probably needs to be changed ---------- assignee: docs at python components: Documentation messages: 322660 nosy: crzbear, docs at python priority: normal severity: normal status: open title: Documentation: os.waitid and os.WNOHANG versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 05:08:03 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 30 Jul 2018 09:08:03 +0000 Subject: [issue33204] IDLE: remove \b from colorizer string prefix In-Reply-To: <1522640249.89.0.467229070634.issue33204@psf.upfronthosting.co.za> Message-ID: <1532941683.81.0.56676864532.issue33204@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 05:09:52 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 30 Jul 2018 09:09:52 +0000 Subject: [issue33204] IDLE: remove \b from colorizer string prefix In-Reply-To: <1522640249.89.0.467229070634.issue33204@psf.upfronthosting.co.za> Message-ID: <1532941792.96.0.56676864532.issue33204@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 05:15:50 2018 From: report at bugs.python.org (Aleksa Bulatovic) Date: Mon, 30 Jul 2018 09:15:50 +0000 Subject: [issue34258] Python shell keeps restarting In-Reply-To: <1532775569.15.0.56676864532.issue34258@psf.upfronthosting.co.za> Message-ID: <1532942150.07.0.56676864532.issue34258@psf.upfronthosting.co.za> Aleksa Bulatovic added the comment: Well the error looks like this ===== RESTART: F:\Python Shell Learning\Games\How smart are you Test.py ===== i think it's normal but it won't show '>>> '.I will see what i can do,but thanks for some help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 05:40:29 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 30 Jul 2018 09:40:29 +0000 Subject: [issue31844] HTMLParser: undocumented not implemented method In-Reply-To: <1508747243.44.0.213398074469.issue31844@psf.upfronthosting.co.za> Message-ID: <1532943629.95.0.56676864532.issue31844@psf.upfronthosting.co.za> Berker Peksag added the comment: HTMLParser.error() method was deprecated in Python 3.4 (https://github.com/python/cpython/commit/88ebfb129b59dc8a2b855fc93fcf32457128d64d#diff-1a7486df8279dbac7f20abd487947845R157) and removed in Python 3.5 (https://github.com/python/cpython/commit/73a4359eb0eb624c588c5d52083ea4944f9787ea#diff-1a7486df8279dbac7f20abd487947845L171) _markupbase is a private and undocumented module and its only user is HTMLParser (sgmllib was removed from the stdlib in 2008) Since we already have removed HTMLParser.error(), I think we can just remove _markupbase.ParserBase.error() without a deprecation period. ---------- nosy: +berker.peksag stage: -> needs patch versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 05:51:05 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 30 Jul 2018 09:51:05 +0000 Subject: [issue31844] HTMLParser: undocumented not implemented method In-Reply-To: <1508747243.44.0.213398074469.issue31844@psf.upfronthosting.co.za> Message-ID: <1532944265.76.0.56676864532.issue31844@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- keywords: +patch pull_requests: +8076 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 05:54:55 2018 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 30 Jul 2018 09:54:55 +0000 Subject: [issue33083] math.factorial accepts non-integral Decimal instances In-Reply-To: <1521146313.09.0.467229070634.issue33083@psf.upfronthosting.co.za> Message-ID: <1532944495.49.0.56676864532.issue33083@psf.upfronthosting.co.za> Mark Dickinson added the comment: So I'm against _adding_ support for Decimal and Fraction on various grounds: (1) If it's our intention to deprecate acceptance of non-integral types, then it seems odd to deliberately add a new intentional feature (acceptance of integral-valued Decimal objects) that we know we want to deprecate long term. It's only if we don't intend any such deprecation that it would make sense to add those new features. (2) Implementation: adding support for Decimal objects in a math module is going to be messy, adding significant complication to the C code. The math module would have to import Decimal (something it doesn't currently need to do) in order to make the Decimal instance checks. @taleinat: how would you see the implementation working? (3) If we support Fraction, should we also support arbitrary numbers.Rational instances? What's the exact rule for what should and shouldn't be accepted. The line isn't clear. In contrast, if the rule is that only floats and integer-like things are accepted, it's much clearer. I think there's a clear goal here, which is that `math.factorial` should accept only integral types, defined as those implementing `__index__`. This is the same thing that `math.gcd` does. To avoid gratuitous breakage, and because acceptance of floats was a deliberate design decision, we should continue to accept integral floats in the short term, perhaps eventually deprecating. But deliberately supporting integral Decimals and Fractions takes us further from the goal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 06:13:05 2018 From: report at bugs.python.org (Evgeny) Date: Mon, 30 Jul 2018 10:13:05 +0000 Subject: [issue16399] argparse: append action with default list adds to list instead of overriding In-Reply-To: <1351992623.71.0.851432414607.issue16399@psf.upfronthosting.co.za> Message-ID: <1532945585.73.0.56676864532.issue16399@psf.upfronthosting.co.za> Evgeny added the comment: You don't need action='append'. For desired behavior you can pass action='store' with nargs='*'. I think it's a simplest workaround. ---------- nosy: +gun146 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 06:42:48 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 30 Jul 2018 10:42:48 +0000 Subject: [issue34075] asyncio: We should prohibit setting a ProcessPoolExecutor in with set_default_executor In-Reply-To: <1531150174.99.0.56676864532.issue34075@psf.upfronthosting.co.za> Message-ID: <1532947368.94.0.56676864532.issue34075@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 22d25085db2590932b3664ca32ab82c08f2eb2db by Victor Stinner (Elvis Pranskevichus) in branch 'master': bpo-34075: Deprecate non-ThreadPoolExecutor in loop.set_default_executor() (GH-8533) https://github.com/python/cpython/commit/22d25085db2590932b3664ca32ab82c08f2eb2db ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 06:43:39 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 30 Jul 2018 10:43:39 +0000 Subject: [issue34075] asyncio: We should prohibit setting a ProcessPoolExecutor in with set_default_executor In-Reply-To: <1531150174.99.0.56676864532.issue34075@psf.upfronthosting.co.za> Message-ID: <1532947419.51.0.56676864532.issue34075@psf.upfronthosting.co.za> STINNER Victor added the comment: Elvis Pranskevichus: well done, your first PR was already good to be merged ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 06:48:28 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 30 Jul 2018 10:48:28 +0000 Subject: [issue34279] RFC: issue a warning in regrtest when no test have been executed? Message-ID: <1532947707.98.0.56676864532.issue34279@psf.upfronthosting.co.za> New submission from STINNER Victor : Python test runner regrtest has many options to select tests: -u (resources), -m and --matchfile, -x (exclude), etc. Sometimes, I do a mistake and I run 0 test, but I still get a success. Maybe regrtest should be modified to fail with an error when no test is run? At least, it would help to understand my mistake if regrtest could emit a warning in such case. Example: --- $ ./python -W error -m test test_asyncio -m test_set_default_executor_deprecation_warnings Run tests sequentially 0:00:00 load avg: 0.27 [1/1] test_asyncio == Tests result: SUCCESS == 1 test OK. Total duration: 266 ms Tests result: SUCCESS --- Success ok, but is there a typo in the test method? Another example: --- $ ./python -W error -m test test_asyncio -m test_no_such_test -v == CPython 3.8.0a0 (heads/pr/8533:50c0499950, Jul 30 2018, 12:41:53) [GCC 8.1.1 20180712 (Red Hat 8.1.1-5)] == Linux-4.17.6-200.fc28.x86_64-x86_64-with-glibc2.26 little-endian == cwd: /home/vstinner/prog/python/master/build/test_python_5505 == CPU count: 8 == encodings: locale=UTF-8, FS=utf-8 Run tests sequentially 0:00:00 load avg: 0.31 [1/1] test_asyncio ---------------------------------------------------------------------- Ran 0 tests in 0.001s OK == Tests result: SUCCESS == 1 test OK. Total duration: 318 ms Tests result: SUCCESS --- Success but no test have been executed. It's not obvious at all without the verbose mode: --- $ ./python -W error -m test test_asyncio -m test_no_such_test Run tests sequentially 0:00:00 load avg: 0.31 [1/1] test_asyncio == Tests result: SUCCESS == 1 test OK. Total duration: 260 ms Tests result: SUCCESS --- ---------- components: Tests messages: 322667 nosy: pablogsal, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: RFC: issue a warning in regrtest when no test have been executed? versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 07:15:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 30 Jul 2018 11:15:17 +0000 Subject: [issue34263] asyncio: "relative *delay* or absolute *when* should not exceed one day" In-Reply-To: <1532785749.04.0.56676864532.issue34263@psf.upfronthosting.co.za> Message-ID: <1532949317.02.0.56676864532.issue34263@psf.upfronthosting.co.za> STINNER Victor added the comment: For python 3.7, i suggest to fix the bug but don't remove the note from 3.7 doc, dince 3.7.0 and older have the bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 07:15:48 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 30 Jul 2018 11:15:48 +0000 Subject: [issue33083] math.factorial accepts non-integral Decimal instances In-Reply-To: <1521146313.09.0.467229070634.issue33083@psf.upfronthosting.co.za> Message-ID: <1532949348.75.0.56676864532.issue33083@psf.upfronthosting.co.za> Tal Einat added the comment: Understood. Thanks for making the time and effort to clarify! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 07:56:35 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 30 Jul 2018 11:56:35 +0000 Subject: [issue34280] METH_NOARGS: no longer require that second arg is NULL Message-ID: <1532951795.78.0.56676864532.issue34280@psf.upfronthosting.co.za> New submission from Jeroen Demeyer : A C function with signature METH_NOARGS takes two arguments where the first is "self" and the second is guaranteed to be NULL. Given that this second argument really should never be used, I would like to drop the guarantee that the argument is NULL. Concretely, I propose to change: 1. the documentation for METH_NOARGS 2. some functions in Modules/_io/bufferedio.c which actually do use the second argument of a METH_NOARGS function. For the moment, the second argument is still NULL, but one is not supposed to rely on that. The reason for this patch is that this second argument can be re-purposed in PEP 580 (and possibly PEP 573) to pass the function object. ---------- components: Interpreter Core messages: 322670 nosy: jdemeyer priority: normal severity: normal status: open title: METH_NOARGS: no longer require that second arg is NULL type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 07:59:29 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 30 Jul 2018 11:59:29 +0000 Subject: [issue34280] METH_NOARGS: no longer require that second arg is NULL In-Reply-To: <1532951795.78.0.56676864532.issue34280@psf.upfronthosting.co.za> Message-ID: <1532951969.01.0.56676864532.issue34280@psf.upfronthosting.co.za> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +8077 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 08:43:58 2018 From: report at bugs.python.org (=?utf-8?q?Micka=C3=ABl_Schoentgen?=) Date: Mon, 30 Jul 2018 12:43:58 +0000 Subject: [issue31658] xml.sax.parse won't accept path objects In-Reply-To: <1506891071.57.0.213398074469.issue31658@psf.upfronthosting.co.za> Message-ID: <1532954638.89.0.56676864532.issue31658@psf.upfronthosting.co.za> Change by Micka?l Schoentgen : ---------- keywords: +patch pull_requests: +8078 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 08:47:09 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 30 Jul 2018 12:47:09 +0000 Subject: [issue34276] urllib.parse doesn't round-trip file URI's with multiple leading slashes In-Reply-To: <1532925543.25.0.56676864532.issue34276@psf.upfronthosting.co.za> Message-ID: <1532954829.59.0.56676864532.issue34276@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: This is an issue with Python 2 too which I hope can be fixed too. The original logic in the code was committed around 16 years back : https://github.com/python/cpython/commit/bbc0568a5c7d3849a22c78d545823a4b952c0933 and tests are also around 10 years old too. ? cpython git:(2bea771609) ? ./python.exe Python 2.7.15+ (remotes/upstream/2.7:2bea771609, Jul 30 2018, 18:07:51) [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. >>> ? cpython git:(2bea771609) ? ./python.exe bpo34276.py file://root/a [SplitResult(scheme='file', netloc='root', path='/a', query='', fragment='')] file://root/a ROUNDTRIP: True file:///root/a [SplitResult(scheme='file', netloc='', path='/root/a', query='', fragment='')] file:///root/a ROUNDTRIP: True file:////root/a [SplitResult(scheme='file', netloc='', path='//root/a', query='', fragment='')] file://root/a ROUNDTRIP: False file://///root/a [SplitResult(scheme='file', netloc='', path='///root/a', query='', fragment='')] file:///root/a ROUNDTRIP: False Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 09:01:26 2018 From: report at bugs.python.org (Sebastian Rittau) Date: Mon, 30 Jul 2018 13:01:26 +0000 Subject: [issue31844] HTMLParser: undocumented not implemented method In-Reply-To: <1508747243.44.0.213398074469.issue31844@psf.upfronthosting.co.za> Message-ID: <1532955686.4.0.56676864532.issue31844@psf.upfronthosting.co.za> Sebastian Rittau added the comment: Good call. Maybe it's actually time to retire _markupbase and merge ParserBase into HTMLParser. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 09:06:36 2018 From: report at bugs.python.org (Eric Martin) Date: Mon, 30 Jul 2018 13:06:36 +0000 Subject: [issue34281] "Go to Line" broken on OS X Message-ID: <1532955996.83.0.56676864532.issue34281@psf.upfronthosting.co.za> New submission from Eric Martin : After entering a line number, clicking OK brings to the foreground and makes active the first hidden window (in the simplest case where we have just one window for a .py file and the Shell window, the former being in the foreground, clicking OK brings the Shell window to the foreground). ---------- assignee: terry.reedy components: IDLE messages: 322673 nosy: eamartin, terry.reedy priority: normal severity: normal status: open title: "Go to Line" broken on OS X type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 09:07:48 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 30 Jul 2018 13:07:48 +0000 Subject: [issue34276] urllib.parse doesn't round-trip file URI's with multiple leading slashes In-Reply-To: <1532925543.25.0.56676864532.issue34276@psf.upfronthosting.co.za> Message-ID: <1532956068.07.0.56676864532.issue34276@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I just checked back the behavior on Perl's https://github.com/libwww-perl/URI/ . It seems to handle that along with other additional cases. Maybe some of the tests can be adopted from there for better coverage too (https://github.com/libwww-perl/URI/blob/master/t/split.t) $ cat bpo34276.pl use URI::Split qw(uri_split uri_join); sub print_url{ my $uri = shift; print "original uri ", $uri, "\n"; ($scheme, $auth, $path, $query, $frag) = uri_split($uri); $uri = uri_join($scheme, $auth, $path, $query, $frag); print "returned uri ", $uri, "\n"; } print_url("file://root/a"); print_url("file:///root/a"); print_url("file:////root/a"); print_url("file://///root/a"); $ perl bpo34276.pl original uri file://root/a returned uri file://root/a original uri file:///root/a returned uri file:///root/a original uri file:////root/a returned uri file:////root/a original uri file://///root/a returned uri file://///root/a Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 09:10:24 2018 From: report at bugs.python.org (Martin Panter) Date: Mon, 30 Jul 2018 13:10:24 +0000 Subject: [issue34276] urllib.parse doesn't round-trip file URI's with multiple leading slashes In-Reply-To: <1532925543.25.0.56676864532.issue34276@psf.upfronthosting.co.za> Message-ID: <1532956224.82.0.56676864532.issue34276@psf.upfronthosting.co.za> Martin Panter added the comment: This may be a very old regression (from 2002) caused by Issue 591713 and Mercurial rev. 554f975073a0. The original check for the double slash, added in 0d6bd391acd8, ?escapes? a path beginning with a double slash by prefixing it with two more slashes (empty ?netloc?). This should round-trip Chris?s problem URLs. I think the logic in ?urlsplit? should always add the extra double slash for the netloc, regardless of path, at least if a scheme is present and it is registered in ?uses_netloc?. This should fix Chris?s instance of the bug, since ?file:? is registered. There is already a patch in Issue 1722348 which should do this (although it includes other changes as well). The double slash should also be escaped if no scheme is present. (The empty scheme string is already in ?uses_netloc?.) This might satisfy Issue 23505. IMO it would be better to do the escaping by default, for all schemes unknown to ?urllib?, and to blacklist specific schemes like ?mailto:? instead. But that would be out of scope for a bug fix. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 09:15:46 2018 From: report at bugs.python.org (Martin Panter) Date: Mon, 30 Jul 2018 13:15:46 +0000 Subject: [issue23505] Urlparse insufficient validation leads to open redirect In-Reply-To: <1424736713.95.0.74935935546.issue23505@psf.upfronthosting.co.za> Message-ID: <1532956546.76.0.56676864532.issue23505@psf.upfronthosting.co.za> Martin Panter added the comment: Issue 34276 was opened about a similar case for ?file:? URLs. I believe both ?file:? scheme and no-scheme cases are a regression and could be fixed by adding another pair of slashes (an empty ?netloc? part): >>> urlparse("////foo.com") # No change ParseResult(scheme='', netloc='', path='//foo.com', params='', query='', fragment='') >>> urlunparse(_) # Knows to escape slashes with another double-slash '////foo.com' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 09:39:40 2018 From: report at bugs.python.org (Martin Panter) Date: Mon, 30 Jul 2018 13:39:40 +0000 Subject: [issue32084] [Security] http.server can be abused to redirect to (almost) arbitrary URL In-Reply-To: <1511185756.0.0.213398074469.issue32084@psf.upfronthosting.co.za> Message-ID: <1532957980.69.0.56676864532.issue32084@psf.upfronthosting.co.za> Martin Panter added the comment: In Issue 34276 I suggested a fix to ?urlunsplit?. In this case it would send ?Location: ////www.python.org/%2f../", with an extra pair of slashes denoting an empty host name. This should stop a browser from seeing ?www.python.org? as a host name. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 10:25:13 2018 From: report at bugs.python.org (EV) Date: Mon, 30 Jul 2018 14:25:13 +0000 Subject: [issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse) In-Reply-To: <1279836939.11.0.811316280273.issue9334@psf.upfronthosting.co.za> Message-ID: <1532960713.79.0.56676864532.issue9334@psf.upfronthosting.co.za> EV added the comment: I have an issue with the assumption that if all parameters are forced to be prepended by -- instead of only one dash, that you would then convert the -- to a single dash and have issues with single-dashed strings, when all other parameters are dual-dashed. This is especially crazy if the user specifies that prefix_chars="--" when creating the parser! You wouldn't mix up ** with * just because it's a two char string, so why do this for -- in this day and age when parameters can take on very different and complicated structures?! ---------- nosy: +fennec15 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 10:52:32 2018 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 30 Jul 2018 14:52: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: <1532962352.28.0.56676864532.issue34273@psf.upfronthosting.co.za> Mark Dickinson added the comment: FTR, here "fixed point" refers to the output representation (a decimal string) rather than the input (a floating-point binary value). The output of %f gives a *fixed* number of places after the decimal point (6 by default). Contrast with %e, which gives a floating-point output representation. But yes, there are probably less confusing ways to word this. Did you have a particular alternative wording in mind? Here's the behaviour of %f for different scale values: note that the output always has the same number of digits after the point, but the number of significant digits varies. >>> "%f" % math.pi '3.141593' >>> "%f" % (100.0 * math.pi) '314.159265' >>> "%f" % (0.01 * math.pi) '0.031416' And here's %e. Now it's the other way around: the number of significant digits stays the same, but the exponent changes to reflect the magnitude. >>> "%e" % math.pi '3.141593e+00' >>> "%e" % (100 * math.pi) '3.141593e+02' >>> "%e" % (0.01 * math.pi) '3.141593e-02' ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 13:22:15 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 30 Jul 2018 17:22:15 +0000 Subject: [issue34258] Python shell keeps restarting In-Reply-To: <1532775569.15.0.56676864532.issue34258@psf.upfronthosting.co.za> Message-ID: <1532971335.11.0.56676864532.issue34258@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Again, that RESTART line is NOT an error. IDLE's prompt is not displayed until your program is completely done. It initially pauses on the second line 'check = input()', waiting for user input. Start with a one-line file: print('Hello to my game') Run that and you will see the prompt. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 13:36:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 30 Jul 2018 17:36:15 +0000 Subject: [issue34272] Reorganize C API tests In-Reply-To: <1532868961.04.0.56676864532.issue34272@psf.upfronthosting.co.za> Message-ID: <1532972175.4.0.56676864532.issue34272@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +8079 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 13:36:39 2018 From: report at bugs.python.org (orlnub123) Date: Mon, 30 Jul 2018 17:36:39 +0000 Subject: [issue34282] Enum._convert shadows members named _convert Message-ID: <1532972199.25.0.56676864532.issue34282@psf.upfronthosting.co.za> New submission from orlnub123 : If an enum has a member named _convert it gets shadowed by the _convert method as shown below. >>> import enum >>> >>> class Test(enum.Enum): ... _convert = enum.auto() ... >>> Test._convert > I've came up with a couple of solutions: 1. Add _convert to the invalid names list, next to mro 2. Rename _convert to _convert_ as sunder names are reserved 3. Move _convert to the metaclass I think the first solution would be the worst as it would break existing enums that have _convert as a member (although unusable). The problem with the second solution would be breaking external code that uses it although I think that's a moot point as it's meant for internal use. Another shortcoming would be having to update all the stdlib code that uses it. The third solution might be a bit confusing on its own if an existing enum with a _convert member suddenly removed it leaving you with a bound method instead of raising an AttributeError. ---------- components: Library (Lib) messages: 322681 nosy: ethan.furman, orlnub123 priority: normal severity: normal status: open title: Enum._convert shadows members named _convert type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 13:40:33 2018 From: report at bugs.python.org (orlnub123) Date: Mon, 30 Jul 2018 17:40:33 +0000 Subject: [issue34282] Enum._convert shadows members named _convert In-Reply-To: <1532972199.25.0.56676864532.issue34282@psf.upfronthosting.co.za> Message-ID: <1532972433.01.0.56676864532.issue34282@psf.upfronthosting.co.za> Change by orlnub123 : ---------- keywords: +patch pull_requests: +8080 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 13:40:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 30 Jul 2018 17:40:56 +0000 Subject: [issue34272] Reorganize C API tests In-Reply-To: <1532868961.04.0.56676864532.issue34272@psf.upfronthosting.co.za> Message-ID: <1532972456.47.0.56676864532.issue34272@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 8567 moves argument parsing tests from test_capi to test_getargs2. It also makes tests defined in _testcapi more discoverable. Now you can run "./python -m test -v -m test_buildvalue_N test_capi". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 13:49:31 2018 From: report at bugs.python.org (Segev Finer) Date: Mon, 30 Jul 2018 17:49:31 +0000 Subject: [issue34283] Python 2 mishandles console code page after setlocale Message-ID: <1532972971.81.0.56676864532.issue34283@psf.upfronthosting.co.za> New submission from Segev Finer : Found by trying to use pip: https://github.com/pypa/pip/issues/5665. This is likely affected by the console code page. Python version: 2.7.15 64 bit OS: Windows 10.0.17134.165 x64 The console locale is set to cp872. The console font is consolas. Apparently, msvcrt does charset conversion when writing to its file descriptors based on the set locale! and it's even special cased to handle the OEM console code page (You can see this in crt/src/write.c:_write_nolock if you have MSVC 2008). When the "C" locale is set, no conversion is done. Python encodes to the OEM code page, and it passes through to the console unscathed. But once you do setlocale than the CRT expects you to use the ANSI code page, but Python will be encoding to the OEM code page which will result in this error from fwrite. file.encoding in Python 2 is also not settable directly from Python (C API only), it's only used for stdio and set internally on startup: Python/pythonrun.c:349-378. I found this describing this: Why printf can display non-ASCII characters when ?C? locale is used?. #!/usr/bin/env python2 from __future__ import print_function import locale print(u' |\u2588') # Works locale.setlocale(locale.LC_ALL, '') print(u' |\u2588') # IOError: [Errno 42] Illegal byte sequence ---------- components: Windows messages: 322683 nosy: Segev Finer, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Python 2 mishandles console code page after setlocale type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 13:49:57 2018 From: report at bugs.python.org (Segev Finer) Date: Mon, 30 Jul 2018 17:49:57 +0000 Subject: [issue34283] [Windows] Python 2 mishandles console code page after setlocale In-Reply-To: <1532972971.81.0.56676864532.issue34283@psf.upfronthosting.co.za> Message-ID: <1532972997.33.0.56676864532.issue34283@psf.upfronthosting.co.za> Change by Segev Finer : ---------- title: Python 2 mishandles console code page after setlocale -> [Windows] Python 2 mishandles console code page after setlocale _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 13:51:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 30 Jul 2018 17:51:55 +0000 Subject: [issue34279] RFC: issue a warning in regrtest when no test have been executed? In-Reply-To: <1532947707.98.0.56676864532.issue34279@psf.upfronthosting.co.za> Message-ID: <1532973115.56.0.56676864532.issue34279@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Do we need to output OK and SUCCESS many times? I would prefer shorter and totally different from the normal output in case of no tests ran. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 14:23:35 2018 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 30 Jul 2018 18:23:35 +0000 Subject: [issue16965] 2to3 should rewrite execfile() to open in 'rb' mode In-Reply-To: <1358187846.57.0.700535378161.issue16965@psf.upfronthosting.co.za> Message-ID: <1532975015.26.0.56676864532.issue16965@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +8081 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 14:24:15 2018 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 30 Jul 2018 18:24:15 +0000 Subject: [issue16965] 2to3 should rewrite execfile() to open in 'rb' mode In-Reply-To: <1358187846.57.0.700535378161.issue16965@psf.upfronthosting.co.za> Message-ID: <1532975055.85.0.56676864532.issue16965@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz versions: +Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 14:58:54 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 30 Jul 2018 18:58:54 +0000 Subject: [issue33833] ProactorEventLoop raises AssertionError In-Reply-To: <1528724850.44.0.592728768989.issue33833@psf.upfronthosting.co.za> Message-ID: <1532977134.3.0.56676864532.issue33833@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset 9045199c5aaeac9b52537581be127d999b5944ee by Andrew Svetlov (twisteroid ambassador) in branch 'master': bpo-33833: Fix ProactorSocketTransport AssertionError (#7893) https://github.com/python/cpython/commit/9045199c5aaeac9b52537581be127d999b5944ee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 14:59:02 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 30 Jul 2018 18:59:02 +0000 Subject: [issue33833] ProactorEventLoop raises AssertionError In-Reply-To: <1528724850.44.0.592728768989.issue33833@psf.upfronthosting.co.za> Message-ID: <1532977142.61.0.56676864532.issue33833@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8082 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 15:51:21 2018 From: report at bugs.python.org (Brian Haley) Date: Mon, 30 Jul 2018 19:51:21 +0000 Subject: [issue24809] Add getprotobynumber to socket module In-Reply-To: <1438870120.05.0.712162767088.issue24809@psf.upfronthosting.co.za> Message-ID: <1532980281.34.0.56676864532.issue24809@psf.upfronthosting.co.za> Brian Haley added the comment: Any chance this will get accepted? I actually have a use case in Openstack where we might get a protocol number and want to save the name along with it. Right now we're looking at using libc getprotoent() directly which isn't that pretty. Thanks! ---------- nosy: +brianphaley _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 16:04:34 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 30 Jul 2018 20:04:34 +0000 Subject: [issue33833] ProactorEventLoop raises AssertionError In-Reply-To: <1528724850.44.0.592728768989.issue33833@psf.upfronthosting.co.za> Message-ID: <1532981074.5.0.56676864532.issue33833@psf.upfronthosting.co.za> miss-islington added the comment: New changeset d5c75be55504fae1ff510eed66cddbd27bfbdbe2 by Miss Islington (bot) in branch '3.7': bpo-33833: Fix ProactorSocketTransport AssertionError (GH-7893) https://github.com/python/cpython/commit/d5c75be55504fae1ff510eed66cddbd27bfbdbe2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 16:05:01 2018 From: report at bugs.python.org (ppperry) Date: Mon, 30 Jul 2018 20:05:01 +0000 Subject: [issue34284] Nonsensical exception message when calling `__new__` on some sys objects Message-ID: <1532981101.24.0.56676864532.issue34284@psf.upfronthosting.co.za> New submission from ppperry : > type(sys.flags).__new__(type(sys.flags)) Traceback (most recent call last): File "", line 1, in type(sys.flags).__new__(type(sys.flags)) TypeError: tuple.__new__(sys.flags) is not safe, use sys.flags.__new__() Ignoring the confusion caused by both the type and the instance being called "sys.flags", this error doesn't make sense. I am using "sys.flags" (the type).__new__, so why is it complaining? "type(sys.flags)()" produces the standard "non-instantiable type" error. The same behavior also happens for "sys.version_info", but strangely not for any of the other sys constants. ---------- components: Interpreter Core, Library (Lib) messages: 322688 nosy: ppperry priority: normal severity: normal status: open title: Nonsensical exception message when calling `__new__` on some sys objects type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 16:10:53 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 30 Jul 2018 20:10:53 +0000 Subject: [issue34283] [Windows] Python 2 mishandles console code page after setlocale In-Reply-To: <1532972971.81.0.56676864532.issue34283@psf.upfronthosting.co.za> Message-ID: <1532981453.32.0.56676864532.issue34283@psf.upfronthosting.co.za> Steve Dower added the comment: I have no intention of changing how encodings work in 2.7. Use codecs.open if you want to specify text IO encoding. Someone else may be willing to look at it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 16:11:12 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 30 Jul 2018 20:11:12 +0000 Subject: [issue34283] [Windows] Python 2 mishandles console code page after setlocale In-Reply-To: <1532972971.81.0.56676864532.issue34283@psf.upfronthosting.co.za> Message-ID: <1532981472.75.0.56676864532.issue34283@psf.upfronthosting.co.za> Change by Steve Dower : ---------- nosy: -steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 16:14:24 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 30 Jul 2018 20:14:24 +0000 Subject: [issue33833] ProactorEventLoop raises AssertionError In-Reply-To: <1528724850.44.0.592728768989.issue33833@psf.upfronthosting.co.za> Message-ID: <1532981664.37.0.56676864532.issue33833@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 16:25:48 2018 From: report at bugs.python.org (Aleksa Bulatovic) Date: Mon, 30 Jul 2018 20:25:48 +0000 Subject: [issue34258] Python shell keeps restarting In-Reply-To: <1532775569.15.0.56676864532.issue34258@psf.upfronthosting.co.za> Message-ID: <1532982348.61.0.56676864532.issue34258@psf.upfronthosting.co.za> Aleksa Bulatovic added the comment: Thanks Terry J. ReedyTerry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 17:56:36 2018 From: report at bugs.python.org (R. David Murray) Date: Mon, 30 Jul 2018 21:56:36 +0000 Subject: [issue34277] EmailPolicy not followed In-Reply-To: <1532928773.1.0.56676864532.issue34277@psf.upfronthosting.co.za> Message-ID: <1532987796.28.0.56676864532.issue34277@psf.upfronthosting.co.za> R. David Murray added the comment: I don't see you asserting utf8=True in your example, so I don't see what it has to do with the utf8 flag, since that is False by default. Maybe you are running up against the default value of refold_header, which is 'long'? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 18:06:56 2018 From: report at bugs.python.org (Bryce Drennan) Date: Mon, 30 Jul 2018 22:06:56 +0000 Subject: [issue34277] EmailPolicy not followed In-Reply-To: <1532928773.1.0.56676864532.issue34277@psf.upfronthosting.co.za> Message-ID: <1532988416.67.0.56676864532.issue34277@psf.upfronthosting.co.za> Bryce Drennan added the comment: Yes, utf8 is set to false. Despite that, the dkim-signature header, which contains no unicode characters, is getting filled with ?utf-8?q? values. My reading of the documentation of the utf8 flag is that headers should not be encoded like this if its set to False. Its possible I am misunderstanding. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 18:13:58 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 30 Jul 2018 22:13:58 +0000 Subject: [issue33833] ProactorEventLoop raises AssertionError In-Reply-To: <1532981664.39.0.902498594338.issue33833@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Why not fixing Python 3.6? It is not affected? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 18:18:06 2018 From: report at bugs.python.org (Vadim Pushtaev) Date: Mon, 30 Jul 2018 22:18:06 +0000 Subject: [issue34284] Nonsensical exception message when calling `__new__` on some sys objects In-Reply-To: <1532981101.24.0.56676864532.issue34284@psf.upfronthosting.co.za> Message-ID: <1532989086.67.0.56676864532.issue34284@psf.upfronthosting.co.za> Vadim Pushtaev added the comment: I'm trying to do something about this. Let me know if you have some ideas. ---------- nosy: +Vadim Pushtaev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 19:40:12 2018 From: report at bugs.python.org (Vadim Pushtaev) Date: Mon, 30 Jul 2018 23:40:12 +0000 Subject: [issue34284] Nonsensical exception message when calling `__new__` on some sys objects In-Reply-To: <1532981101.24.0.56676864532.issue34284@psf.upfronthosting.co.za> Message-ID: <1532994012.91.0.56676864532.issue34284@psf.upfronthosting.co.za> Vadim Pushtaev added the comment: Here is what I learned: 1) Nothing is wrong with that "tuple.__new__(sys.flags) is not safe" part. `__new__` is deleted from `type(sys.flags)`, so parent's `__new__` is called. `tuple` is indeed a base class for `type(sys.flags)`. 2) Another part where we recommend to use "sys.flags.__new__()" doesn't make much sense, so I choose to delete this advice if there is no `__new__` in a class. 3) This second part also may suggest a wrong class to call `__new__` from: In [1]: from collections import namedtuple In [2]: class A(namedtuple('A', 'z')): ...: pass ...: In [3]: object.__new__(A) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) in () ----> 1 object.__new__(A) TypeError: object.__new__(A) is not safe, use tuple.__new__() This should be A.__new__(), not tuple.__new__(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 19:41:11 2018 From: report at bugs.python.org (Vadim Pushtaev) Date: Mon, 30 Jul 2018 23:41:11 +0000 Subject: [issue34284] Nonsensical exception message when calling `__new__` on some sys objects In-Reply-To: <1532981101.24.0.56676864532.issue34284@psf.upfronthosting.co.za> Message-ID: <1532994071.63.0.56676864532.issue34284@psf.upfronthosting.co.za> Change by Vadim Pushtaev : ---------- keywords: +patch pull_requests: +8083 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 19:41:13 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 30 Jul 2018 23:41:13 +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: <1532994073.75.0.56676864532.issue34275@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Two more pieces of evidence that there is a problem with tkinter/tk8.6 on Mac. On #34120, Vlad T. confirmed the misbehavior on 3.5 compiled for 8.6. #34281 reports another problem with an editor subwindow on 3.7 Mac. There are now 4 issues about some IDLE feature failing specifically on MacOS with tcl/tk 8.6.8. (All but 1 with 3.7.0.) #34047: editor scrollbar slider 'sticks' at bottom #34120: freeze when closing config and about dialogs #34281: (new today) wrong window activates when closing "Go to Line" box #34275: (this issue) calltips do not appear The editor scrollbar was touched last May. The config and about dialogs contents were edited last summer. But the calltip and and goto code is essentially untouched for 2 years. I am changing the title from 'IDLE: no calltips on MacOS with tk 8.6' and adding tkinter as component and Serhiy as Nosy. I have never used a Mac, but I have available a 2012 MacBook Air, which I just upgraded to current High Sierra 10.13.6. I intend to install 3.7, confirm the bugs, and try to find simpler failing examples. But I cannot patch _tkinter, let alone tcl/tk. ---------- assignee: terry.reedy -> components: +Tkinter nosy: +serhiy.storchaka title: IDLE: no calltips on MacOS with tk 8.6 -> Problems with tkinter and tk8.6 on MacOS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 19:45:44 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 30 Jul 2018 23:45:44 +0000 Subject: [issue34281] IDLE: closing "Go to Line" on OS X 3.7 activates wrong window In-Reply-To: <1532955996.83.0.56676864532.issue34281@psf.upfronthosting.co.za> Message-ID: <1532994344.98.0.56676864532.issue34281@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I suspect that this results from a problem with the new tkinter/tcl/tk8.6 delivered with 3.7. See #34275. ---------- dependencies: +Problems with tkinter and tk8.6 on MacOS title: "Go to Line" broken on OS X -> IDLE: closing "Go to Line" on OS X 3.7 activates wrong window _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 19:48:09 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 30 Jul 2018 23:48: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: <1532994489.2.0.56676864532.issue34120@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thanks. This is evidence for my suspicion that this results from a problem with the new tkinter/tcl/tk8.6 delivered with 3.7. See #34275. PS: when replying by email, please delete the quote, which is redundant with the post on the web page. ---------- dependencies: +Problems with tkinter and tk8.6 on MacOS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 19:54:28 2018 From: report at bugs.python.org (ppperry) Date: Mon, 30 Jul 2018 23:54:28 +0000 Subject: [issue34284] Nonsensical exception message when calling `__new__` on some sys objects In-Reply-To: <1532981101.24.0.56676864532.issue34284@psf.upfronthosting.co.za> Message-ID: <1532994868.08.0.56676864532.issue34284@psf.upfronthosting.co.za> ppperry added the comment: Your PR is not an improvement: 1. In this case, this will produce the error "tuple.__new__(sys.flags) is not safe". But I didn't call "tuple.__new__", I called sys.flags.__new__, and type(X).__new__(type(X)) should always be safe 2. The change in error message for namedtuples (A) isn't related and (B) isn't correct. `tuple.__new__(NamedTuple)` works, and produces a namedtuple object, so tuple.__new__ is what the error should point to. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 19:55:37 2018 From: report at bugs.python.org (ppperry) Date: Mon, 30 Jul 2018 23:55:37 +0000 Subject: [issue34284] Nonsensical exception message when calling `__new__` on non-instaniable object In-Reply-To: <1532981101.24.0.56676864532.issue34284@psf.upfronthosting.co.za> Message-ID: <1532994937.58.0.56676864532.issue34284@psf.upfronthosting.co.za> ppperry added the comment: Same thing happens for other objects, like `type(sys._getframe(0)).__new__(type(sys._getframe_))`, and presumably any object that one cannot instantiate by calling ---------- title: Nonsensical exception message when calling `__new__` on some sys objects -> Nonsensical exception message when calling `__new__` on non-instaniable object _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 19:57:43 2018 From: report at bugs.python.org (STINNER Victor) Date: Mon, 30 Jul 2018 23:57:43 +0000 Subject: [issue34285] regrtest: in case of test failure, add "always look on the bright side of life" Message-ID: <1532995063.27.0.56676864532.issue34285@psf.upfronthosting.co.za> New submission from STINNER Victor : Debugging tests failures can be depressing, especially when working on race conditions of Python buildbots. I propose to add an easter egg in regrtest for that: in case of test of failure, write "Tests failed but... always look on the bring side of life". This idea should be credited to Pablo Salgado! Would it be possible to also play the song in background? Or maybe that's too much. Maybe it should be a command line option? --always-look-on-the-bright-side-of-life, enabled by make buildbot? ---------- components: Tests messages: 322701 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: regrtest: in case of test failure, add "always look on the bright side of life" versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 20:01:36 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 31 Jul 2018 00:01: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: <1532995296.98.0.56676864532.issue34047@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Re-reading, I notice this from Tal: "With Python 3.6.5 on OSX, I'm seeing all of the issues ...". 3.6.5 was released 2018 March 28, *before* we revised editor scrolling in May. What tk version? Was the new 8.6 compile even available for that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 20:09:04 2018 From: report at bugs.python.org (Vadim Pushtaev) Date: Tue, 31 Jul 2018 00:09:04 +0000 Subject: [issue34284] Nonsensical exception message when calling `__new__` on some sys objects In-Reply-To: <1532981101.24.0.56676864532.issue34284@psf.upfronthosting.co.za> Message-ID: <1532995744.78.0.56676864532.issue34284@psf.upfronthosting.co.za> Vadim Pushtaev added the comment: > 1. In this case, this will produce the error "tuple.__new__(sys.flags) is not safe". But I didn't call "tuple.__new__", I called sys.flags.__new__, and type(X).__new__(type(X)) should always be safe Should it? There is no sys.flags.__new__, tuple.__new__ is called and it has different __new__. > 2. The change in error message for namedtuples (A) isn't related and (B) isn't correct. `tuple.__new__(NamedTuple)` works, and produces a namedtuple object, so tuple.__new__ is what the error should point to. I believe you are right about (A), it's not related and should be discussed separately. ---------- title: Nonsensical exception message when calling `__new__` on non-instaniable object -> Nonsensical exception message when calling `__new__` on some sys objects _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 20:17:16 2018 From: report at bugs.python.org (ppperry) Date: Tue, 31 Jul 2018 00:17:16 +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: <1532996236.62.0.56676864532.issue34284@psf.upfronthosting.co.za> ppperry added the comment: The error I'm expecting here is "cannot create sys.flags objects". Anything else violates the fact that type(*args) is sugar for: result = type.__new__(type, *args) if isinstance(result, type): result.__init__(*args) ("type" in the above snippet is a variable name, not the actual builtin "type") ---------- title: Nonsensical exception message when calling `__new__` on some sys objects -> Nonsensical exception message when calling `__new__` on non-instaniable objects _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 20:18:41 2018 From: report at bugs.python.org (ppperry) Date: Tue, 31 Jul 2018 00:18: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: <1532996321.05.0.56676864532.issue34284@psf.upfronthosting.co.za> ppperry added the comment: Thus, I think the bug is that "type(sys.flags).__new__" is an alias for "tuple.__new__" and is not in the code for __new__ calls that your PR touches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 20:57:34 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 31 Jul 2018 00:57:34 +0000 Subject: [issue34282] Enum._convert shadows members named _convert In-Reply-To: <1532972199.25.0.56676864532.issue34282@psf.upfronthosting.co.za> Message-ID: <1532998654.34.0.56676864532.issue34282@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- assignee: -> ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 21:02:47 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 31 Jul 2018 01:02:47 +0000 Subject: [issue34280] METH_NOARGS: no longer require that second arg is NULL In-Reply-To: <1532951795.78.0.56676864532.issue34280@psf.upfronthosting.co.za> Message-ID: <1532998967.6.0.56676864532.issue34280@psf.upfronthosting.co.za> Raymond Hettinger added the comment: ISTM it would be better to keep METH_NOARGS as-is and if you need another argument, then use a different calling pattern. The METH_NOARGS flag is very old and widely adopted -- it is unknowable how changing the assumptions will affect deployed code. Also, it just feels weird to go down the proposed path -- for clarity, METH_NOARGS should mean "no args" -- any other meaning is certain to create confusion. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 21:33:58 2018 From: report at bugs.python.org (R. David Murray) Date: Tue, 31 Jul 2018 01:33:58 +0000 Subject: [issue34277] EmailPolicy not followed In-Reply-To: <1532928773.1.0.56676864532.issue34277@psf.upfronthosting.co.za> Message-ID: <1533000838.52.0.56676864532.issue34277@psf.upfronthosting.co.za> R. David Murray added the comment: You are indeed misunderstanding. The docs say: If False, follow RFC 5322, supporting non-ASCII characters in headers by encoding them as ?encoded words?. If True, follow RFC 6532 and use utf-8 encoding for headers. Messages formatted in this way may be passed to SMTP servers that support the SMTPUTF8 extension (RFC 6531). That is, when the flag is False, encoded words may be used, which is what the =?utf-8?q?....?= constructs are. If it is True, those are *not* used, but instead utf8 character encoding is used, which would look on your terminal like the international characters themselves, not encoded stuff. So, what you are seeing is the DKIM header getting re-encoded using encoded words in order to make it fit in the standard line length for email headers (78 characters max). The fact that that wasn't happening before was actually a bug in the folder that was fixed by the changeset you cite. You can get the behavior you want by setting the policy control 'refold_source' to 'none', or changing max_line_length to some value larger than you expect DKIM headers to be (or to None, which means don't fold). If the standard DKIM headers really are not respecting the standard default email header line length, that is a very sad thing. I think perhaps the default value of refold_source was a poor choice, and we should have gone with none. Changing that could be discussed, but since it changes behavior it may be controversial. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 21:48:54 2018 From: report at bugs.python.org (Bryce Drennan) Date: Tue, 31 Jul 2018 01:48:54 +0000 Subject: [issue34277] EmailPolicy not followed In-Reply-To: <1532928773.1.0.56676864532.issue34277@psf.upfronthosting.co.za> Message-ID: <1533001734.01.0.56676864532.issue34277@psf.upfronthosting.co.za> Bryce Drennan added the comment: That makes sense. Apologies for my misreading. Thanks for taking time to explain that. I think there is still something strange here since it's unnecessarily using encoded words when it could just "fold" without them. My tests with gmail show that it accepts a multi-line dkim-signature headers but does not handle the encoded words syntax. While not python's job to maintain compatibility with gmail, I suspect many DKIM implementations don't expect encoded words syntax and thus this change could cause many email handling systems to break. I'll dig in more and open a separate ticket. Thank you again for your time. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 22:29:10 2018 From: report at bugs.python.org (R. David Murray) Date: Tue, 31 Jul 2018 02:29:10 +0000 Subject: [issue34277] EmailPolicy not followed In-Reply-To: <1532928773.1.0.56676864532.issue34277@psf.upfronthosting.co.za> Message-ID: <1533004150.82.0.56676864532.issue34277@psf.upfronthosting.co.za> R. David Murray added the comment: Well, it can't fold them and have them fit in the 78 character limit without adding whitespace that isn't in the original headers (unless there's a more subtle bug :) The email package has the possibility of having special behavior based on the name of the header, so if DKIM headers have special rules, there is the possibility of implementing those special rules. Basically, you can implement a parser that recognizes dkim headers and represents what parts can legally be folded using the resulting parse tree. So it may be possible to fix this without changing the refold_source default. It is also possible to specify that encoded words may not be used in a given header (that's a simple toggle), which may be all that is needed here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 22:34:21 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 31 Jul 2018 02:34:21 +0000 Subject: [issue34281] IDLE: closing "Go to Line" on OS X 3.7 activates wrong window In-Reply-To: <1532955996.83.0.56676864532.issue34281@psf.upfronthosting.co.za> Message-ID: <1533004461.25.0.56676864532.issue34281@psf.upfronthosting.co.za> Terry J. Reedy added the comment: After doing some experiments, I decided that this is the same issue with a different window. ---------- dependencies: -Problems with tkinter and tk8.6 on MacOS resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> IDLE: Freeze when closing Settings (& About) dialog on MacOS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 22:38:29 2018 From: report at bugs.python.org (Bryce Drennan) Date: Tue, 31 Jul 2018 02:38:29 +0000 Subject: [issue34277] EmailPolicy not followed In-Reply-To: <1532928773.1.0.56676864532.issue34277@psf.upfronthosting.co.za> Message-ID: <1533004709.66.0.56676864532.issue34277@psf.upfronthosting.co.za> Bryce Drennan added the comment: As far as I can tell in my manual tests with gmail, extra whitespace is fine. The addition of `=?utf-8?q?` is what trips both gmail and the python dkim library up. I agree that the paths you propose are viable. For now my email projects will be pinned to 3.6.3. If I find time, the new ticket will perhaps focus just on being able to "fold" without the encoded-words syntax. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 22:39:36 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 31 Jul 2018 02:39:36 +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: <1533004776.17.0.56676864532.issue34275@psf.upfronthosting.co.za> Terry J. Reedy added the comment: With 64 bit 3.7.0, I verified multiple problems. Calltips do not display either automatically or manually with ^B or menu selection. I closed #34281 in favor of #34120 and will report there and on #34047. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 23:18:11 2018 From: report at bugs.python.org (Matthias Klose) Date: Tue, 31 Jul 2018 03:18:11 +0000 Subject: [issue34286] lib2to3 tests fail on the 3.7 branch (used to work with 3.7.0) Message-ID: <1533007091.73.0.56676864532.issue34286@psf.upfronthosting.co.za> New submission from Matthias Klose : running the lib2to3 tests from an installed location, I see the following failures on the 3.7 branch: ====================================================================== FAIL: test (lib2to3.tests.test_fixers.Test_reload) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.7/lib2to3/tests/test_fixers.py", line 294, in test self.check(b, a) File "/usr/lib/python3.7/lib2to3/tests/test_fixers.py", line 36, in check tree = self._check(before, after) File "/usr/lib/python3.7/lib2to3/tests/test_fixers.py", line 32, in _check self.assertEqual(after, str(tree)) AssertionError: 'import importlib\nimportlib.reload(a)\n\n' != 'import imp\nimp.reload(a)\n\n' - import importlib ? ------ + import imp - importlib.reload(a) ? ------ + imp.reload(a) ====================================================================== FAIL: test_comment (lib2to3.tests.test_fixers.Test_reload) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.7/lib2to3/tests/test_fixers.py", line 299, in test_comment self.check(b, a) File "/usr/lib/python3.7/lib2to3/tests/test_fixers.py", line 36, in check tree = self._check(before, after) File "/usr/lib/python3.7/lib2to3/tests/test_fixers.py", line 32, in _check self.assertEqual(after, str(tree)) AssertionError: 'import importlib\nimportlib.reload( a ) # comment\n\n' != 'import imp\nimp.reload( a ) # comment\n\n' - import importlib ? ------ + import imp - importlib.reload( a ) # comment ? ------ + imp.reload( a ) # comment ====================================================================== FAIL: test_space (lib2to3.tests.test_fixers.Test_reload) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.7/lib2to3/tests/test_fixers.py", line 309, in test_space self.check(b, a) File "/usr/lib/python3.7/lib2to3/tests/test_fixers.py", line 36, in check tree = self._check(before, after) File "/usr/lib/python3.7/lib2to3/tests/test_fixers.py", line 32, in _check self.assertEqual(after, str(tree)) AssertionError: 'import importlib\nimportlib.reload( a )\n\n' != 'import imp\nimp.reload( a )\n\n' - import importlib ? ------ + import imp - importlib.reload( a ) ? ------ + imp.reload( a ) ---------------------------------------------------------------------- Ran 650 tests in 27.363s FAILED (failures=3) test test_lib2to3 failed 1 test failed again: test_lib2to3 == Tests result: FAILURE then FAILURE == 390 tests OK. 1 test failed: test_lib2to3 ---------- components: Library (Lib) keywords: 3.7regression messages: 322714 nosy: brett.cannon, doko, eric.snow, ncoghlan priority: normal severity: normal status: open title: lib2to3 tests fail on the 3.7 branch (used to work with 3.7.0) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 23:19:28 2018 From: report at bugs.python.org (Kubilay Kocak) Date: Tue, 31 Jul 2018 03:19:28 +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: <1533007168.93.0.56676864532.issue34207@psf.upfronthosting.co.za> Change by Kubilay Kocak : ---------- nosy: +koobs title: test_cmd_line test_utf8_mode test_warnings fail in AMD64 FreeBSD CURRENT buildbots -> test_cmd_line test_utf8_mode test_warnings fail in all FreeBSD 3.x (3.8) buildbots _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 23:19:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 31 Jul 2018 03:19:47 +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: <1533007187.86.0.56676864532.issue34284@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue31506. ---------- nosy: +ncoghlan, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 23:38:53 2018 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 31 Jul 2018 03:38:53 +0000 Subject: [issue34276] urllib.parse doesn't round-trip file URI's with multiple leading slashes In-Reply-To: <1532925543.25.0.56676864532.issue34276@psf.upfronthosting.co.za> Message-ID: <1533008333.36.0.56676864532.issue34276@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks for all the extra info. A couple more comments: 1. I came across this issue when diagnosing the following pip issue ("pip install git+file://" not working for Windows UNC paths): https://github.com/pypa/pip/issues/3783 2. URLs of the form "file:////root" (with four or more leading slashes) are perhaps not valid URI's technically. See Section 3. "Syntax Components" of RFC 3986, where it says, "When authority [i.e. netloc] is not present, the path cannot begin with two slash characters ('//')": https://tools.ietf.org/html/rfc3986#section-3 However, I don't think that means Python shouldn't try to roundtrip it successfully. Also, git-clone is apparently okay with URLs of this form, and does the right thing with them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 30 23:42:28 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 31 Jul 2018 03:42: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: <1533008548.36.0.56676864532.issue34120@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I closed #34281 as a duplicate of this. Eric Martin said "After entering a line number, clicking OK brings to the foreground and makes active the first hidden window (in the simplest case where we have just one window for a .py file and the Shell window, the former being in the foreground, clicking OK brings the Shell window to the foreground)." Normally, one window is active, as indicated by the traffic lights, and one widget has the focus, which for entry widgets is indicated by the cursor. I tested with 3.7.0 with MacOS 10.13.6 and a shell and editor window. IDLE > About IDLE: closing either way turns lights on in original window but text does not get focus (no cursor). Neither TAB nor click return focus, but the window is not frozen either. Selection, deselection, and copy work, cut and paste do not. As far as I know, on Mac, cut and paste as well as copy and selection are handled entirely by tk, and not IDLE. My interpretation is that the window is 'stuck' in an 'illegal' state, partly enabled, partly disabled. Clicking and activating the other window disables the stuck window, so that clicking on it enables it. IDLE > Settings works the same. But... Options > Configure IDLE works as Eric described above. Closing with OK or Cancel or Red light activates the *other* window, in a stuck state. (If there is no other IDLE window, then something else must be clicked to unstick the originally active window.) Edit > Go to line: If one cancels, behavior is normal. If one enters a number and clicks OK, the other window is activated (lights on) without a cursor while the cursor goes where requested in the original, apparently 'inactive' window. And keyboard input goes where the cursor is, in that unlighted window. AFAIK, this is 'impossible'. ---------- nosy: +eamartin, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 00:50:54 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 31 Jul 2018 04:50:54 +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: <1533012654.56.0.56676864532.issue34120@psf.upfronthosting.co.za> Terry J. Reedy added the comment: After more experiments on Windows, the 'stuck' window -- active, no cursor, only copy works -- is a read-only window. I looked at other windows. Modal Edit > Find (Command F) Edit > Replace (Command R) When closed, neither window is activated. This seems wrong (on Windows, the original is), but I don't know what normal is on Linux or Mac. Options > Settings > Keys Tab > Get New Keys for Selection: When this is closed, the text window rather than the settings dialog is activated in read-only state. Must click on Settings dialog. New selections does appear in keys list. Options > Settings > Highlights > Choose Color for: When closed, all blue highlights on tab disappear. Colorchooser is supplied by tk and might be from Apple. File > Save (Copy) As: This OS supplied dialog is an oddball. Only the red light turns gray and cursor remains without blinking. The dialog has no lights and closed it turns the red back on and the cursor blinks. Non-modal Help > IDLE Help Debug > Debugger Debug > Stack Viewer Help > Turtle Demo When closed, last active other window is activated. Conclusion: With the exception of Save and cancelled Goto, closing modal dialogs seems bugged in various ways. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 00:58:36 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 31 Jul 2018 04:58: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: <1533013116.7.0.56676864532.issue34047@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 3.7.0 on 10.13.6: Vertical cursor sticks at both ends. Sticking at the top also is Tal's observation 1 above. I also verified dead zone under slider and always down with 2-finger swipe, and that this is not normal Mac behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 01:24:32 2018 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 31 Jul 2018 05:24:32 +0000 Subject: [issue16965] 2to3 should rewrite execfile() to open in 'rb' mode In-Reply-To: <1358187846.57.0.700535378161.issue16965@psf.upfronthosting.co.za> Message-ID: <1533014672.44.0.56676864532.issue16965@psf.upfronthosting.co.za> Change by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 01:29:54 2018 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 31 Jul 2018 05:29:54 +0000 Subject: [issue34280] METH_NOARGS: no longer require that second arg is NULL In-Reply-To: <1532951795.78.0.56676864532.issue34280@psf.upfronthosting.co.za> Message-ID: <1533014994.51.0.56676864532.issue34280@psf.upfronthosting.co.za> Stefan Behnel added the comment: Agree with Raymond. If the goal is to pass something else, then functions that want to make use of that "something else" have to be modified anyway, in which case also changing the call type wouldn't hurt (assuming the new value still fits into the flag options, but it should). Only drawback is that adding a new calling convention breaks *calling* code that does not go through the C-API for calling functions, or that otherwise makes direct use of the calling convention flags. But that should be very rare and I think it's acceptable to require such code to be adapted. It would very likely be amongst the beneficiaries of the proposed calling changes anyway. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 01:49:26 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 31 Jul 2018 05:49:26 +0000 Subject: [issue27671] FAQ: len() is still function for good reason. In-Reply-To: <1470214886.13.0.870924776007.issue27671@psf.upfronthosting.co.za> Message-ID: <1533016166.26.0.56676864532.issue27671@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset c48e26dcadbff8620bb5881d3bd148fc8894d0ef by INADA Naoki in branch 'master': bpo-27671: Update FAQ about why len is function (GH-8432) https://github.com/python/cpython/commit/c48e26dcadbff8620bb5881d3bd148fc8894d0ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 01:49:41 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 31 Jul 2018 05:49:41 +0000 Subject: [issue27671] FAQ: len() is still function for good reason. In-Reply-To: <1470214886.13.0.870924776007.issue27671@psf.upfronthosting.co.za> Message-ID: <1533016181.01.0.56676864532.issue27671@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8085 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 01:50:33 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 31 Jul 2018 05:50:33 +0000 Subject: [issue27671] FAQ: len() is still function for good reason. In-Reply-To: <1470214886.13.0.870924776007.issue27671@psf.upfronthosting.co.za> Message-ID: <1533016233.13.0.56676864532.issue27671@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8086 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 01:50:33 2018 From: report at bugs.python.org (Martin Panter) Date: Tue, 31 Jul 2018 05:50:33 +0000 Subject: [issue34276] urllib.parse doesn't round-trip file URI's with multiple leading slashes In-Reply-To: <1532925543.25.0.56676864532.issue34276@psf.upfronthosting.co.za> Message-ID: <1533016233.89.0.56676864532.issue34276@psf.upfronthosting.co.za> Martin Panter added the comment: I think your URLs are valid by RFC 3986. "When authority is not present" refers to URLs without the double-slash prefix, like the "urn:example:animal:ferret:nose". The RFC treats empty authority and no authority as different cases. If authority is present, the format for hier-part has to be "//" authority path-abempty Authority may be an empty string: authority = [userinfo "@"] host [":" port] host = IP-literal / IPv4address / reg-name reg-name = *(unreserved / pct-encoded / sub-delims) ; May be empty Path-abempty may begin with two slashes if the first two segments are empty strings: path-abempty = *("/" segment) segment = *pchar ; May be empty ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 01:51:33 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 31 Jul 2018 05:51:33 +0000 Subject: [issue27671] FAQ: len() is still function for good reason. In-Reply-To: <1470214886.13.0.870924776007.issue27671@psf.upfronthosting.co.za> Message-ID: <1533016293.04.0.56676864532.issue27671@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8087 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 01:54:27 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 31 Jul 2018 05:54:27 +0000 Subject: [issue27671] FAQ: len() is still function for good reason. In-Reply-To: <1470214886.13.0.870924776007.issue27671@psf.upfronthosting.co.za> Message-ID: <1533016467.92.0.56676864532.issue27671@psf.upfronthosting.co.za> miss-islington added the comment: New changeset a621f406402e05febb302cf31962e9d2d747d8f6 by Miss Islington (bot) in branch '3.7': bpo-27671: Update FAQ about why len is function (GH-8432) https://github.com/python/cpython/commit/a621f406402e05febb302cf31962e9d2d747d8f6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 01:56:29 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 31 Jul 2018 05:56:29 +0000 Subject: [issue27671] FAQ: len() is still function for good reason. In-Reply-To: <1470214886.13.0.870924776007.issue27671@psf.upfronthosting.co.za> Message-ID: <1533016589.59.0.56676864532.issue27671@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 0b376eb0d63e0c51ed55c620b40edae6ded4ea48 by Miss Islington (bot) in branch '3.6': bpo-27671: Update FAQ about why len is function (GH-8432) https://github.com/python/cpython/commit/0b376eb0d63e0c51ed55c620b40edae6ded4ea48 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 01:58:14 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 31 Jul 2018 05:58:14 +0000 Subject: [issue27671] FAQ: len() is still function for good reason. In-Reply-To: <1470214886.13.0.870924776007.issue27671@psf.upfronthosting.co.za> Message-ID: <1533016694.75.0.56676864532.issue27671@psf.upfronthosting.co.za> miss-islington added the comment: New changeset dc9039da239ee572eaaf56e4a026be1fc4d74e24 by Miss Islington (bot) in branch '2.7': bpo-27671: Update FAQ about why len is function (GH-8432) https://github.com/python/cpython/commit/dc9039da239ee572eaaf56e4a026be1fc4d74e24 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 02:09:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 31 Jul 2018 06:09:39 +0000 Subject: [issue34234] Use _PyAnyInt_Check() and _PyAnyInt_CheckExact() in 2.7 In-Reply-To: <1532604480.11.0.56676864532.issue34234@psf.upfronthosting.co.za> Message-ID: <1533017379.24.0.56676864532.issue34234@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 48c8bf21f97aeb124dbd48bf2bdec1ab4ebc5202 by Serhiy Storchaka in branch '2.7': [2.7] bpo-34234: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact(). (GH-8479) https://github.com/python/cpython/commit/48c8bf21f97aeb124dbd48bf2bdec1ab4ebc5202 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 02:09:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 31 Jul 2018 06:09:54 +0000 Subject: [issue34234] Use _PyAnyInt_Check() and _PyAnyInt_CheckExact() in 2.7 In-Reply-To: <1532604480.11.0.56676864532.issue34234@psf.upfronthosting.co.za> Message-ID: <1533017394.8.0.56676864532.issue34234@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 Tue Jul 31 02:11:21 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 31 Jul 2018 06:11:21 +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: <1533017481.95.0.56676864532.issue34275@psf.upfronthosting.co.za> Ronald Oussoren added the comment: https://core.tcl.tk/tk/tktview/769367b4c9b8e4fc05afaf67dc0aa6e3c1dba682 is an Tcl/Tk issue about issue34275, which is also about Tooltips. I've added a comment to the Tk issue to note that IDLE also has problems (the other ticket is about a 3th-party library). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 02:13:44 2018 From: report at bugs.python.org (Eric Wieser) Date: Tue, 31 Jul 2018 06:13:44 +0000 Subject: [issue1764286] inspect.getsource does not work with decorated functions Message-ID: <1533017624.47.0.56676864532.issue1764286@psf.upfronthosting.co.za> Eric Wieser added the comment: This now leaves `inspect.getsource` inconsistent with `inspect.getsourcefile`: >>> import inspect >>> from contextlib import contextmanager >>> @contextmanager ... def func(): ... yield >>> inspect.getsource(func) '@contextmanager\ndef func():\n yield\n' >>>inspect.getsourcefile(func) 'C:\\Program Files\\Python 3.5\\lib\\contextlib.py' Should `getsourcefile` be changed to match? This is causing numpy/numpy#11639, but it's not clear if this is a bug or by design. ---------- nosy: +Eric.Wieser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 02:18:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 31 Jul 2018 06:18:26 +0000 Subject: [issue1617161] Instance methods compare equal when their self's are equal Message-ID: <1533017906.9.0.56676864532.issue1617161@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset ac20e0f98d6727ba97a9575bfa2a11b2f6247c35 by Serhiy Storchaka in branch 'master': bpo-1617161: Make the hash and equality of methods not depending on the value of self. (GH-7848) https://github.com/python/cpython/commit/ac20e0f98d6727ba97a9575bfa2a11b2f6247c35 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 02:34:33 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 31 Jul 2018 06:34:33 +0000 Subject: [issue32012] Disallow ambiguous syntax f(x for x in [1],) In-Reply-To: <1510525745.4.0.213398074469.issue32012@psf.upfronthosting.co.za> Message-ID: <1533018873.83.0.56676864532.issue32012@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 4b8a7f51da224d1a0ad8159935f78ba4e6e16037 by Serhiy Storchaka in branch 'master': Revert "closes bpo-27494: Fix 2to3 handling of trailing comma after a generator expression (GH-3771)" (#8241) https://github.com/python/cpython/commit/4b8a7f51da224d1a0ad8159935f78ba4e6e16037 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 02:34:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 31 Jul 2018 06:34:34 +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: <1533018874.06.0.902498594338.issue27494@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 4b8a7f51da224d1a0ad8159935f78ba4e6e16037 by Serhiy Storchaka in branch 'master': Revert "closes bpo-27494: Fix 2to3 handling of trailing comma after a generator expression (GH-3771)" (#8241) https://github.com/python/cpython/commit/4b8a7f51da224d1a0ad8159935f78ba4e6e16037 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 02:34:46 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 31 Jul 2018 06:34:46 +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: <1533018886.5.0.56676864532.issue27494@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8088 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 02:34:46 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 31 Jul 2018 06:34:46 +0000 Subject: [issue32012] Disallow ambiguous syntax f(x for x in [1],) In-Reply-To: <1510525745.4.0.213398074469.issue32012@psf.upfronthosting.co.za> Message-ID: <1533018886.64.0.665841612001.issue32012@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8089 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 02:43:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 31 Jul 2018 06:43:10 +0000 Subject: [issue1617161] Instance methods compare equal when their self's are equal Message-ID: <1533019390.18.0.56676864532.issue1617161@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 Tue Jul 31 02:50:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 31 Jul 2018 06:50:19 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1533019819.15.0.56676864532.issue33729@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset f1d36d8efaecd5c84cb35e35119b283f37d83c40 by Serhiy Storchaka in branch 'master': bpo-33729: Fix issues with arguments parsing in hashlib. (GH-8346) https://github.com/python/cpython/commit/f1d36d8efaecd5c84cb35e35119b283f37d83c40 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 02:52:51 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 31 Jul 2018 06:52:51 +0000 Subject: [issue32012] Disallow ambiguous syntax f(x for x in [1],) In-Reply-To: <1510525745.4.0.213398074469.issue32012@psf.upfronthosting.co.za> Message-ID: <1533019971.43.0.56676864532.issue32012@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 9ecbe3321f7bb3726017a053e583ca507d4453fc by Miss Islington (bot) in branch '3.7': Revert "closes bpo-27494: Fix 2to3 handling of trailing comma after a generator expression (GH-3771)" (GH-8241) https://github.com/python/cpython/commit/9ecbe3321f7bb3726017a053e583ca507d4453fc ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 02:52:51 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 31 Jul 2018 06:52:51 +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: <1533019971.58.0.902498594338.issue27494@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 9ecbe3321f7bb3726017a053e583ca507d4453fc by Miss Islington (bot) in branch '3.7': Revert "closes bpo-27494: Fix 2to3 handling of trailing comma after a generator expression (GH-3771)" (GH-8241) https://github.com/python/cpython/commit/9ecbe3321f7bb3726017a053e583ca507d4453fc ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 02:57:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 31 Jul 2018 06:57:46 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1533020266.99.0.56676864532.issue33729@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +8090 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 02:57:59 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 31 Jul 2018 06:57:59 +0000 Subject: [issue34280] METH_NOARGS: no longer require that second arg is NULL In-Reply-To: <1532951795.78.0.56676864532.issue34280@psf.upfronthosting.co.za> Message-ID: <1533020279.89.0.56676864532.issue34280@psf.upfronthosting.co.za> Change by Jeroen Demeyer : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 02:59:28 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 31 Jul 2018 06:59:28 +0000 Subject: [issue34280] METH_NOARGS: no longer require that second arg is NULL In-Reply-To: <1532951795.78.0.56676864532.issue34280@psf.upfronthosting.co.za> Message-ID: <1533020368.72.0.56676864532.issue34280@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: OK, I closed this without applying the change. It means one extra special case in PEP 580, but it's not a big deal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 03:07:43 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 31 Jul 2018 07:07:43 +0000 Subject: [issue34287] bufferedio.c uses unused argument of METH_NOARGS functions Message-ID: <1533020863.81.0.56676864532.issue34287@psf.upfronthosting.co.za> New submission from Jeroen Demeyer : A METH_NOARGS function has a second unused argument which is always NULL (this is guaranteed by the documentation). However, some functions in Modules/_io/bufferedio.c actually that second NULL argument. This is technically not a bug, but it looks more clear to explicitly mark that second argument as unused. ---------- components: Extension Modules messages: 322736 nosy: jdemeyer, rhettinger, scoder priority: normal severity: normal status: open title: bufferedio.c uses unused argument of METH_NOARGS functions versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 03:09:15 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 31 Jul 2018 07:09:15 +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: <1533020955.0.0.56676864532.issue34287@psf.upfronthosting.co.za> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +8091 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 03:11:19 2018 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 31 Jul 2018 07:11:19 +0000 Subject: [issue34276] urllib.parse doesn't round-trip file URI's with multiple leading slashes In-Reply-To: <1532925543.25.0.56676864532.issue34276@psf.upfronthosting.co.za> Message-ID: <1533021079.76.0.56676864532.issue34276@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > The RFC treats empty authority and no authority as different cases. I'm not well-versed on this. But I guess this means urllib.parse doesn't support this distinction. For example: >>> urllib.parse.urlsplit('file:/foo') SplitResult(scheme='file', netloc='', path='/foo', query='', fragment='') >>> urllib.parse.urlsplit('file:///foo') SplitResult(scheme='file', netloc='', path='/foo', query='', fragment='') >>> urllib.parse.urlsplit('file:/foo') == \ urllib.parse.urlsplit('file:///foo') True Both have authority / netloc equal to the empty string, even though in the first example the authority isn't present per your comment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 03:22:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 31 Jul 2018 07:22:46 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1533021766.52.0.56676864532.issue33729@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 47957dab94a4efa2fee61c9a8193f78300950769 by Serhiy Storchaka in branch '3.7': [3.7] bpo-33729: Fix issues with arguments parsing in hashlib. (GH-8346) (GH-8581) https://github.com/python/cpython/commit/47957dab94a4efa2fee61c9a8193f78300950769 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 03:24:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 31 Jul 2018 07:24:57 +0000 Subject: [issue33871] Possible integer overflow in iov_setup() In-Reply-To: <1529086477.01.0.579493977442.issue33871@psf.upfronthosting.co.za> Message-ID: <1533021897.33.0.56676864532.issue33871@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 9d5727326af53ddd91016d98e16ae7cf829caa95 by Serhiy Storchaka in branch 'master': bpo-33871: Fix os.sendfile(), os.writev(), os.readv(), etc. (GH-7931) https://github.com/python/cpython/commit/9d5727326af53ddd91016d98e16ae7cf829caa95 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 03:25:13 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 31 Jul 2018 07:25:13 +0000 Subject: [issue33871] Possible integer overflow in iov_setup() In-Reply-To: <1529086477.01.0.579493977442.issue33871@psf.upfronthosting.co.za> Message-ID: <1533021913.81.0.56676864532.issue33871@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8092 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 03:26:48 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 31 Jul 2018 07:26:48 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1533022008.96.0.56676864532.issue33729@psf.upfronthosting.co.za> Christian Heimes added the comment: Your PR changed way to many aspects of the code in one commit. I also don't like the fact, that you pushed such a big change without waiting for my feedback. For the past two weeks I have been travelling to conferences and had no time to review your PR. There was no need to rush it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 03:28:55 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 31 Jul 2018 07:28:55 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1533022135.05.0.56676864532.issue33729@psf.upfronthosting.co.za> Christian Heimes added the comment: The backport to 3.6 and 3.7 are breaking backwards compatibility and compatibility with PEP 247. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 03:32:32 2018 From: report at bugs.python.org (Roy Belio) Date: Tue, 31 Jul 2018 07:32:32 +0000 Subject: [issue34288] Declare sethostname in socketmodule.c for SOLARIS Message-ID: <1533022352.12.0.56676864532.issue34288@psf.upfronthosting.co.za> New submission from Roy Belio : Following issue 18259 which was solved by extern sethostname I managed to build python 3.7 on solaris only after patching away the ifdef for _AIX. We need to add SOLARIS flag and check for that also in the same line of #ifdef _AIX. This error only appears in 3.7 since a new CFLAG was turned on -Werror=no-implicit-declaration. and during build time it fails on sethostname function, not build _socket. ---------- components: Build messages: 322742 nosy: rbelio priority: normal severity: normal status: open title: Declare sethostname in socketmodule.c for SOLARIS type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 03:37:40 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 31 Jul 2018 07:37:40 +0000 Subject: [issue27671] FAQ: len() is still function for good reason. In-Reply-To: <1470214886.13.0.870924776007.issue27671@psf.upfronthosting.co.za> Message-ID: <1533022660.71.0.56676864532.issue27671@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 Tue Jul 31 03:38:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 31 Jul 2018 07:38:38 +0000 Subject: [issue33871] Possible integer overflow in iov_setup() In-Reply-To: <1529086477.01.0.579493977442.issue33871@psf.upfronthosting.co.za> Message-ID: <1533022718.85.0.56676864532.issue33871@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +8093 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 03:45:57 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 31 Jul 2018 07:45:57 +0000 Subject: [issue33089] Add multi-dimensional Euclidean distance function to the math module In-Reply-To: <1521226258.78.0.467229070634.issue33089@psf.upfronthosting.co.za> Message-ID: <1533023157.66.0.56676864532.issue33089@psf.upfronthosting.co.za> Raymond Hettinger added the comment: New changeset 9c18b1ae527346bc178250ad1ca07bffdacde5dd by Raymond Hettinger in branch 'master': bpo-33089: Add math.dist() for computing the Euclidean distance between two points (GH-8561) https://github.com/python/cpython/commit/9c18b1ae527346bc178250ad1ca07bffdacde5dd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 03:46:27 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 31 Jul 2018 07:46:27 +0000 Subject: [issue33089] Add multi-dimensional Euclidean distance function to the math module In-Reply-To: <1521226258.78.0.467229070634.issue33089@psf.upfronthosting.co.za> Message-ID: <1533023187.8.0.56676864532.issue33089@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 03:48:58 2018 From: report at bugs.python.org (Piotr Dobrogost) Date: Tue, 31 Jul 2018 07:48:58 +0000 Subject: [issue34276] urllib.parse doesn't round-trip file URI's with multiple leading slashes In-Reply-To: <1532925543.25.0.56676864532.issue34276@psf.upfronthosting.co.za> Message-ID: <1533023338.15.0.56676864532.issue34276@psf.upfronthosting.co.za> Change by Piotr Dobrogost : ---------- nosy: +piotr.dobrogost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 04:06:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 31 Jul 2018 08:06:49 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1533024409.91.0.56676864532.issue33729@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry. Do you prefer to revert the whole changes or just some parts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 04:17:57 2018 From: report at bugs.python.org (Vadim Pushtaev) Date: Tue, 31 Jul 2018 08:17:57 +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: <1533025077.11.0.56676864532.issue34284@psf.upfronthosting.co.za> Vadim Pushtaev added the comment: > See also issue31506 Okay, I admit, reporting `tuple.__new__` instead of `sys.flags` is misleading. But what about this? > `tuple.__new__(NamedTuple)` works, and produces a namedtuple object, so tuple.__new__ is what the error should point to. Isn't it the same? Why should we say anything about `tuple` if a user wants A? This looks similar to 31506: >>> from collections import namedtuple >>> class A(namedtuple('x', 'x')): ... pass ... >>> A.__new__(1, 2) Traceback (most recent call last): File "", line 1, in File "", line 1, in __new__ TypeError: tuple.__new__(X): X is not a type object (int) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 04:58:22 2018 From: report at bugs.python.org (Michael Foord) Date: Tue, 31 Jul 2018 08:58:22 +0000 Subject: [issue14266] pyunit script as shorthand for python -m unittest In-Reply-To: <1331586037.12.0.876793471383.issue14266@psf.upfronthosting.co.za> Message-ID: <1533027502.73.0.56676864532.issue14266@psf.upfronthosting.co.za> Change by Michael Foord : ---------- resolution: -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 05:17:48 2018 From: report at bugs.python.org (Berker Peksag) Date: Tue, 31 Jul 2018 09:17:48 +0000 Subject: [issue14266] pyunit script as shorthand for python -m unittest In-Reply-To: <1331586037.12.0.876793471383.issue14266@psf.upfronthosting.co.za> Message-ID: <1533028668.43.0.56676864532.issue14266@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 05:20:13 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 31 Jul 2018 09:20:13 +0000 Subject: [issue33871] Possible integer overflow in iov_setup() In-Reply-To: <1529086477.01.0.579493977442.issue33871@psf.upfronthosting.co.za> Message-ID: <1533028813.02.0.56676864532.issue33871@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 3e4b68875917a4605b45918f9e3232730fed9399 by Miss Islington (bot) in branch '3.7': bpo-33871: Fix os.sendfile(), os.writev(), os.readv(), etc. (GH-7931) https://github.com/python/cpython/commit/3e4b68875917a4605b45918f9e3232730fed9399 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 05:36:09 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 31 Jul 2018 09:36:09 +0000 Subject: [issue29259] Add tp_fastcall to PyTypeObject: support FASTCALL calling convention for all callable objects In-Reply-To: <1484310274.99.0.832491900546.issue29259@psf.upfronthosting.co.za> Message-ID: <1533029769.81.0.56676864532.issue29259@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > For compatibility with extensions built with older Pythons you should define new type flag and read tp_fastcall only if the flag is set. Can you comment on https://github.com/python/cpython/pull/4944 why you think that such compatibility should be guaranteed? According to PEP 384, the layout of PyTypeObject is not part of the stable ABI. ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 05:37:20 2018 From: report at bugs.python.org (Aleksa Bulatovic) Date: Tue, 31 Jul 2018 09:37:20 +0000 Subject: [issue34289] System can't find the path of Python Message-ID: <1533029840.3.0.56676864532.issue34289@psf.upfronthosting.co.za> New submission from Aleksa Bulatovic : Before you say,yes,i have python path but the system can't find it.Is it because of the installation folder (because i didn't install in the default location) or maybe other? ---------- components: Windows messages: 322748 nosy: Cross!Alex21, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: System can't find the path of Python versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 05:59:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 31 Jul 2018 09:59:03 +0000 Subject: [issue33871] Possible integer overflow in iov_setup() In-Reply-To: <1529086477.01.0.579493977442.issue33871@psf.upfronthosting.co.za> Message-ID: <1533031143.35.0.56676864532.issue33871@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset ada5d99306dc8af21c32cefb3d86891e8553dbc6 by Serhiy Storchaka in branch '3.6': [3.6] bpo-33871: Fix os.sendfile(), os.writev(), os.readv(), etc. (GH-7931) (GH-8584) https://github.com/python/cpython/commit/ada5d99306dc8af21c32cefb3d86891e8553dbc6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 05:59:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 31 Jul 2018 09:59:08 +0000 Subject: [issue33083] math.factorial accepts non-integral Decimal instances In-Reply-To: <1521146313.09.0.467229070634.issue33083@psf.upfronthosting.co.za> Message-ID: <1533031148.38.0.56676864532.issue33083@psf.upfronthosting.co.za> STINNER Victor added the comment: I looked at Pablo's PR 6149 and I'm surprised by the size of the code just to convert a Python object to a C long! --- if (PyFloat_Check(arg)) { PyObject *lx; double dx = PyFloat_AS_DOUBLE((PyFloatObject *)arg); if (!(Py_IS_FINITE(dx) && dx == floor(dx))) { PyErr_SetString(PyExc_ValueError, "factorial() only accepts integral values"); return NULL; } lx = PyLong_FromDouble(dx); if (lx == NULL) return NULL; x = PyLong_AsLongAndOverflow(lx, &overflow); Py_DECREF(lx); } else { pyint_form = PyNumber_Index(arg); if (pyint_form == NULL) { return NULL; } x = PyLong_AsLongAndOverflow(pyint_form, &overflow); Py_DECREF(pyint_form); } if (x == -1 && PyErr_Occurred()) { return NULL; } else if (overflow == 1) { PyErr_Format(PyExc_OverflowError, "factorial() argument should not exceed %ld", LONG_MAX); return NULL; } else if (overflow == -1 || x < 0) { PyErr_SetString(PyExc_ValueError, "factorial() not defined for negative values"); return NULL; } --- Do we really need 37 lines of C code? Is it really important to accept integral float? What's wrong with factorial(int(d)) for example? PR 6149 LGTM, but since I was not involved in the discussion, I would prefer if someone else who has been involved would approve the change: Tal already approved it, but I saw some complains, I'm not 100% sure that we reached a full agreement. Note: Pablo is a core developer and so he can merge his PR, I'm only asking to *approve* the change, not to merge it ;-) Thanks in advance. Note2: I'm still mentoring Pablo after he became a core, and I require him to ask me before merging any change. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 06:02:05 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 31 Jul 2018 10:02:05 +0000 Subject: [issue34289] System can't find the path of Python In-Reply-To: <1533029840.3.0.56676864532.issue34289@psf.upfronthosting.co.za> Message-ID: <1533031325.85.0.56676864532.issue34289@psf.upfronthosting.co.za> St?phane Wirtel added the comment: and about $PATH? ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 06:13:39 2018 From: report at bugs.python.org (Aleksa Bulatovic) Date: Tue, 31 Jul 2018 10:13:39 +0000 Subject: [issue34289] System can't find the path of Python In-Reply-To: <1533029840.3.0.56676864532.issue34289@psf.upfronthosting.co.za> Message-ID: <1533032019.17.0.56676864532.issue34289@psf.upfronthosting.co.za> Aleksa Bulatovic added the comment: No,when i type 'cd Python37',the system can't find the path,but i have the path set. (English is not my first language and i started python about 5 or 6 days ago) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 06:21:16 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 31 Jul 2018 10:21:16 +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: <1533032476.97.0.56676864532.issue34269@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I think I have found the bug. When we call setLevel then to clear the cache value of Logger objects `logging.Logger.manager.loggerDict.values()` (https://github.com/python/cpython/blob/9c18b1ae527346bc178250ad1ca07bffdacde5dd/Lib/logging/__init__.py#L1265) is called but since somewhere you have called `logging.Logger.manager.loggerDict.clear()` before changing the level and hence it doesn't iterate through the dict to clear the logger object cache. This is not present in 3.6 since there is no Logger._cache and works fine. Don't do logging.Logger.manager.loggerDict.clear() and you can see logging enabled for error as False because while doing setLevel we clear the cache of Logger objects of logging.Logger.manager.loggerDict.values() ? cpython git:(master) ? cat bpo34269.py import sys import logging logger1 = logging.getLogger('abc') logger2 = logging.getLogger('cde') logger1.setLevel(logging.ERROR) logger2.setLevel(logging.ERROR) print("logging error : ", logger1.isEnabledFor(logging.ERROR)) print("logger dict : ", logging.Logger.manager.loggerDict) print("Not clearing logging dict ") # logging.Logger.manager.loggerDict.clear() print("logger dict : ", logging.Logger.manager.loggerDict) print("logging enabled for error : ", logger1.isEnabledFor(logging.ERROR)) if sys.version_info >= (3,7): # Print cache only for python 3.7 and above # Since we clear logging.Logger.manager.loggerDict.clear() the cache is not reset print("Cache ", logger1._cache) print("Setting to critical") logger1.setLevel(logging.CRITICAL) if sys.version_info >= (3,7): print("Cache after setting to critical ", logger1._cache) print("logging enabled for error : ", logger1.isEnabledFor(logging.ERROR)) ? cpython git:(master) ? ./python.exe bpo34269.py logging error : True logger dict : {'abc': , 'cde': } Not clearing logging dict logger dict : {'abc': , 'cde': } logging enabled for error : True Cache {40: True} Setting to critical Cache after setting to critical {} logging enabled for error : False call logging.Logger.manager.loggerDict.clear() and you can see logging enabled for error as True because while doing setLevel we clear the cache of Logger objects of logging.Logger.manager.loggerDict.values() will be empty. ? cpython git:(master) ? cat bpo34269.py import sys import logging logger1 = logging.getLogger('abc') logger2 = logging.getLogger('cde') logger1.setLevel(logging.ERROR) logger2.setLevel(logging.ERROR) print("logging error : ", logger1.isEnabledFor(logging.ERROR)) print("logger dict : ", logging.Logger.manager.loggerDict) print("clearing logging dict ") logging.Logger.manager.loggerDict.clear() print("logger dict : ", logging.Logger.manager.loggerDict) print("logging enabled for error : ", logger1.isEnabledFor(logging.ERROR)) if sys.version_info >= (3,7): # Since we clear logging.Logger.manager.loggerDict.clear() the cache is not reset print("Cache ", logger1._cache) print("Setting to critical") logger1.setLevel(logging.CRITICAL) if sys.version_info >= (3,7): print("Cache after setting to critical ", logger1._cache) print("logging enabled for error : ", logger1.isEnabledFor(logging.ERROR)) ? cpython git:(master) ? ./python.exe bpo34269.py logging error : True logger dict : {'abc': , 'cde': } clearing logging dict logger dict : {} logging enabled for error : True Cache {40: True} Setting to critical Cache after setting to critical {40: True} # Cache is not cleared due to logging.Logger.manager.loggerDict.clear() logging enabled for error : True # True not False Above script on Python 3.6 there is no Logger._cache and hence there is no cache invalidation to be done though logging.Logger.manager.loggerDict.clear() is called. ? cpython git:(master) ? python3.6 bpo34269.py logging error : True logger dict : {'abc': , 'cde': } clearing logging dict logger dict : {} logging enabled for error : True Setting to critical logging enabled for error : False # False since there is no cache I have attached the test file that reproduces this. I think this is a bug. I don't know how to fix it since we can restrict the user from calling `logging.Logger.manager.loggerDict.clear()` and depend on it for cache invalidation. Either this can be documented but I think there might be old code depending on this. I am adding original reviewers to see if they can add some thoughts on this. Feel free to unassign yourself. I will check for a fix for this in the meantime with the above test case so that it can make it to next Python 3.7 bug fix release. @Thomas.Waldmann for the moment I think from the above disabling the loggerDict.clear() call will make tests pass. Thanks ---------- nosy: +pitrou, vinay.sajip, vstinner Added file: https://bugs.python.org/file47721/bpo34269.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 06:21:47 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 31 Jul 2018 10:21:47 +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: <1533032507.9.0.56676864532.issue34269@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 06:26:27 2018 From: report at bugs.python.org (Dan Snider) Date: Tue, 31 Jul 2018 10:26:27 +0000 Subject: [issue34290] _ctypes PyCField_new doesn't do anything Message-ID: <1533032787.65.0.56676864532.issue34290@psf.upfronthosting.co.za> New submission from Dan Snider : The function is essentially nothing more than a prototype at the moment: static PyObject * PyCField_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { CFieldObject *obj; obj = (CFieldObject *)type->tp_alloc(type, 0); return (PyObject *)obj; } ---------- components: ctypes messages: 322754 nosy: bup priority: normal severity: normal status: open title: _ctypes PyCField_new doesn't do anything type: crash versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 06:51:35 2018 From: report at bugs.python.org (Camille) Date: Tue, 31 Jul 2018 10:51:35 +0000 Subject: [issue34291] UnboundLocalError raised on call to global Message-ID: <1533034295.33.0.56676864532.issue34291@psf.upfronthosting.co.za> New submission from Camille : In the following code : def g(): return 0 def f(): g = g() f() The call to g in f fails due to an UnboundLocalError, while I expected the assignment to hide the global definition of g. Note that if it is done in two subsequent calls, i.e. with : def f(): goo = g() g = 0 The first assignment still fails. ---------- messages: 322755 nosy: camshaka priority: normal severity: normal status: open title: UnboundLocalError raised on call to global type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 06:58:50 2018 From: report at bugs.python.org (Martin Panter) Date: Tue, 31 Jul 2018 10:58:50 +0000 Subject: [issue34276] urllib.parse doesn't round-trip file URI's with multiple leading slashes In-Reply-To: <1532925543.25.0.56676864532.issue34276@psf.upfronthosting.co.za> Message-ID: <1533034730.92.0.56676864532.issue34276@psf.upfronthosting.co.za> Martin Panter added the comment: Yes urllib doesn?t distinguish a missing authority/netloc from an empty string. The same for the ?query and #fragment parts. There is Issue 22852 open about that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 07:32:39 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 31 Jul 2018 11:32:39 +0000 Subject: [issue34289] System can't find the path of Python In-Reply-To: <1533029840.3.0.56676864532.issue34289@psf.upfronthosting.co.za> Message-ID: <1533036759.83.0.56676864532.issue34289@psf.upfronthosting.co.za> St?phane Wirtel added the comment: So in this case, it's not an issue with the Python interpreter, but I am going to close this issue. Please for the help about Python, you can subscribe this mailing list https://mail.python.org/mailman/listinfo/python-list Have a nice day, ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 07:35:52 2018 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 31 Jul 2018 11:35:52 +0000 Subject: [issue34291] UnboundLocalError raised on call to global In-Reply-To: <1533034295.33.0.56676864532.issue34291@psf.upfronthosting.co.za> Message-ID: <1533036952.88.0.56676864532.issue34291@psf.upfronthosting.co.za> Eric V. Smith added the comment: Python thinks that `g` inside `f()` is a local variable. See https://stackoverflow.com/questions/9264763/unboundlocalerror-in-python#9264845 for an explanation. This is working as intended. ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 07:58:58 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 31 Jul 2018 11:58:58 +0000 Subject: [issue34285] regrtest: in case of test failure, add "always look on the bright side of life" In-Reply-To: <1532995063.27.0.56676864532.issue34285@psf.upfronthosting.co.za> Message-ID: <1533038338.55.0.56676864532.issue34285@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I was just searching for the line and came to know it's a Monty Python reference :) There seems to be a similar example here with reference to this : https://docs.python.org/3.8/library/tarfile.html#command-line-interface python -m tarfile -c monty.tar life-of-brian_1979/ Thanks much for your work on the buildbots :) ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 08:07:16 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 31 Jul 2018 12:07:16 +0000 Subject: [issue31506] Improve the error message logic for object_new & object_init In-Reply-To: <1505727849.07.0.595214817996.issue31506@psf.upfronthosting.co.za> Message-ID: <1533038836.48.0.56676864532.issue31506@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 08:18:40 2018 From: report at bugs.python.org (Jakub Stasiak) Date: Tue, 31 Jul 2018 12:18:40 +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: <1533039520.4.0.56676864532.issue27494@psf.upfronthosting.co.za> Jakub Stasiak added the comment: Apologies for only responding now, I've not received any notifications after my original pull request had been merged. I only learned about the change being reverted from https://github.com/python/cpython/pull/8580, so let me leave my two cents here: I don't think the syntax not being valid (formally - since forever, practically - since 3.7) is good enough reason to make (lib)2to3 reject it. 2to3 is supposed to handle old syntax, isn't it? I'd argue that since it is (or was) possible to use this syntax in Python 2.x it should be handled gracefully. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 08:21:42 2018 From: report at bugs.python.org (Jens Troeger) Date: Tue, 31 Jul 2018 12:21:42 +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: <1533039702.83.0.56676864532.issue24218@psf.upfronthosting.co.za> Jens Troeger added the comment: I was about to open an issue when I found this one. 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. With that combination, send_message() falsely assumes plain text addresses (see https://github.com/python/cpython/blob/master/Lib/smtplib.py#L949 where it checks only email addresses, not display names!) and therefore the `international` flag stays False. As a result of that, flattening the email 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?' I think a proper fix would be in line 949, where email addresses and display names should be checked for encoding. The comment to that function should also be adjusted to mention display names? Note also that the attached patch does not test the above scenario, and should probably be extended as well. ---------- nosy: +_savage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 08:38:18 2018 From: report at bugs.python.org (Kevin Walzer) Date: Tue, 31 Jul 2018 12:38:18 +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: <1533040698.9.0.56676864532.issue34047@psf.upfronthosting.co.za> Kevin Walzer added the comment: Not able to reproduce this issue using a recent build of Tk 8.6.8 plus (it's been a little while since I pulled the latest updates from core-8-6-branch, but is recent enough). Similar behavior was reported on Tk a couple of years ago but has been fixed; I closed https://core.tcl.tk/tk/tktview/1875c1f30f2d17230a3d6e8fc7c85d244e80b922 to indicate this. ---------- nosy: +wordtech _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 08:40:49 2018 From: report at bugs.python.org (Kevin Walzer) Date: Tue, 31 Jul 2018 12:40:49 +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: <1533040849.13.0.56676864532.issue34275@psf.upfronthosting.co.za> Kevin Walzer added the comment: Please provide a short working Python script that reproduces the problem. Also, please point me to the internal implementation of tooltips in idlelib. Tooltips work just fine on Tk on the Mac, but there are many different ways to implement them and I suspect Python's implementation can likely be tweaked. It also may be related to event handling. ---------- nosy: +wordtech _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 08:46:05 2018 From: report at bugs.python.org (Kevin Walzer) Date: Tue, 31 Jul 2018 12:46:05 +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: <1533041165.1.0.56676864532.issue34120@psf.upfronthosting.co.za> Kevin Walzer added the comment: I've observed this behavior myself, and wonder if you are hitting some edge case in Tk-Mac event processing (there used to be a lot of issues with this and we thought we had addressed them). I don't want to code-dive into Python's implementation of these dialogs, so can you provide a simple script that demonstrates the issue and I'll take a closer look? Often bugs of this sort can be addressed at the script level with some tweaks. ---------- nosy: +wordtech _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 08:46:52 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 31 Jul 2018 12:46:52 +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: <1533041212.64.0.56676864532.issue34275@psf.upfronthosting.co.za> Ronald Oussoren added the comment: @terry.reed: Kevin Walzer is a maintainer for Tk on macOS. I know too little of IDLE to answer his questions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 08:48:23 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 31 Jul 2018 12:48:23 +0000 Subject: [issue34292] test_compile is hanging im AMD Ubuntu buildbots Message-ID: <1533041303.96.0.56676864532.issue34292@psf.upfronthosting.co.za> New submission from Pablo Galindo Salgado : Test compile is hanging or failing in AMD(64) Ubuntu buildbots. For example: https://buildbot.python.org/all/#/builders/157/builds/77 https://buildbot.python.org/all/#/builders/154/builds/90 Example errors: running: test_tools (3 min 49 sec), test_compile (3 min 47 sec) Traceback (most recent call last): File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/test/__main__.py", line 2, in main() File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/test/libregrtest/main.py", line 584, in main Regrtest().main(tests=tests, **kwargs) File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/test/libregrtest/main.py", line 531, in main self._main(tests, kwargs) File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/test/libregrtest/main.py", line 566, in _main self.run_tests() File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/test/libregrtest/main.py", line 486, in run_tests run_tests_multiprocess(self) File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/test/libregrtest/runtest_mp.py", line 181, in run_tests_multiprocess faulthandler.dump_traceback_later(test_timeout, exit=True) RuntimeError: unable to start watchdog thread command timed out: 1200 seconds without output running [b'make', b'buildbottest', b'TESTOPTS=-j2', b'TESTPYTHONOPTS=', b'TESTTIMEOUT=900'], attempting to kill process killed by signal 9 program finished with exit code -1 elapsedTime=2780.229688 and running: test_multiprocessing_forkserver (3 min 49 sec), test_compile (5 min 16 sec) Makefile:1086: recipe for target 'buildbottest' failed Timeout (0:15:00)! Thread 0x00007ff09bab5700 (most recent call first): File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/selectors.py", line 415 in select File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/subprocess.py", line 1675 in _communicate File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/subprocess.py", line 933 in communicate File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/libregrtest/runtest_mp.py", line 56 in run_test_in_subprocess File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/libregrtest/runtest_mp.py", line 120 in _runtest File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/libregrtest/runtest_mp.py", line 144 in run File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/threading.py", line 917 in _bootstrap_inner File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/threading.py", line 885 in _bootstrap Thread 0x00007ff09c2b6700 (most recent call first): File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/selectors.py", line 415 in select File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/subprocess.py", line 1675 in _communicate File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/subprocess.py", line 933 in communicate File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/libregrtest/runtest_mp.py", line 56 in run_test_in_subprocess File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/libregrtest/runtest_mp.py", line 120 in _runtest File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/libregrtest/runtest_mp.py", line 144 in run File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/threading.py", line 917 in _bootstrap_inner File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/threading.py", line 885 in _bootstrap Thread 0x00007ff0a2ac7080 (most recent call first): File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/libregrtest/runtest_mp.py", line 181 in run_tests_multiprocess File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/libregrtest/main.py", line 486 in run_tests File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/libregrtest/main.py", line 566 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 program finished with exit code 2 elapsedTime=3446.164951 In subsequent runs of the buildbots test_compile emits a warning because it has ben re-ran: https://buildbot.python.org/all/#/builders/154/builds/91 https://buildbot.python.org/all/#/builders/157/builds/80 The issue could be transient, but it seems that this could point at some other issue. ---------- components: Tests messages: 322766 nosy: pablogsal priority: normal severity: normal status: open title: test_compile is hanging im AMD Ubuntu buildbots type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 08:48:40 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 31 Jul 2018 12:48:40 +0000 Subject: [issue34292] test_compile hangs in AMD Ubuntu buildbots In-Reply-To: <1533041303.96.0.56676864532.issue34292@psf.upfronthosting.co.za> Message-ID: <1533041320.72.0.56676864532.issue34292@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- title: test_compile is hanging im AMD Ubuntu buildbots -> test_compile hangs in AMD Ubuntu buildbots _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 08:52:31 2018 From: report at bugs.python.org (Jens Troeger) Date: Tue, 31 Jul 2018 12:52:31 +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: <1533041551.4.0.56676864532.issue24218@psf.upfronthosting.co.za> Jens Troeger added the comment: (continuing the previous message msg322761) ?unless the addresses should be checked separately from the display names, in which case the BytesGenerator?s flatten() function should be fixed. Without reading the RFC, please let me know how to continue from here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 09:00:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 31 Jul 2018 13:00:26 +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: <1533042026.11.0.56676864532.issue27494@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry, I missed that you didn't receive a notification about creating of the reverting PR. I should announce this explicitly. 2to3 handles the old syntax, but a comma after a generator expression was not a valid old syntax. With your patch it accepted this syntax and produced invalid Python program. $ ./python -m lib2to3 -w t9.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored t9.py --- t9.py (original) +++ t9.py (refactored) @@ -1 +1 @@ -print(set(x for x in range(2),)) +print((set(x for x in list(range(2)),))) RefactoringTool: Files that were modified: RefactoringTool: t9.py $ ./python t9.py File "t9.py", line 1 print((set(x for x in list(range(2)),))) ^ SyntaxError: Generator expression must be parenthesized ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 09:01:46 2018 From: report at bugs.python.org (Jens Troeger) Date: Tue, 31 Jul 2018 13:01:46 +0000 Subject: [issue33398] From, To, Cc lines break when calling send_message() In-Reply-To: <1525175516.34.0.682650639539.issue33398@psf.upfronthosting.co.za> Message-ID: <1533042106.49.0.56676864532.issue33398@psf.upfronthosting.co.za> Jens Troeger added the comment: See also this issue comment: https://bugs.python.org/issue24218#msg322761 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 09:10:13 2018 From: report at bugs.python.org (jfbu) Date: Tue, 31 Jul 2018 13:10:13 +0000 Subject: [issue34293] DOC: Makefile inherits a Sphinx 1.5 bug regarding PAPER envvar Message-ID: <1533042613.34.0.56676864532.issue34293@psf.upfronthosting.co.za> New submission from jfbu : There has been a bug at Sphinx since release 1.5 https://github.com/sphinx-doc/sphinx/issues/5234 about wrong handling of PAPER environment variable. The Makefile in Doc/ reproduces the error. As a result the "A4 latex" and "letter latex" sub targets of "dist" mis-behave. A bugfix will be released at Sphinx 1.7.7 or 1.8 but the CPython Doc/Makefile needs an update, because the bugfix can only solve problems for new projects created with sphinx-quickstart (whether or not using the "make-mode" small Makefile, or the "no-make-mode" bigger Makefile which was default up to Sphinx 1.5). I will send PR next. ---------- assignee: docs at python components: Documentation messages: 322770 nosy: docs at python, jfbu priority: normal severity: normal status: open title: DOC: Makefile inherits a Sphinx 1.5 bug regarding PAPER envvar type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 09:11:05 2018 From: report at bugs.python.org (beardypig) Date: Tue, 31 Jul 2018 13:11:05 +0000 Subject: [issue34294] re.finditer and lookahead bug Message-ID: <1533042665.14.0.56676864532.issue34294@psf.upfronthosting.co.za> New submission from beardypig : I am experiencing and issue with the following regex when using finditer. (?=<(?P\w+)/?>(?:(?P.+?))?)", " (I know it's not the best method of dealing with HTML, and this is a simplified version) For example: [m.groupdict() for m in re.finditer(r"(?=<(?P\w+)/?>(?:(?P.+?))?)", "")] In Python 2.7, 3.5, and 3.6 it returns [{'tag': 'test', 'text': ''}, {'tag': 'foo2', 'text': None}] But starting with 3.7 it returns [{'tag': 'test', 'text': ''}, {'tag': 'foo2', 'text': ''}] The "text" group appears to be a copy of the previous "text" group. Some other examples: "Hello" => [{'tag': 'test', 'text': 'Hello'}, {'tag': 'foo', 'text': 'Hello'}] (expected: [{'tag': 'test', 'text': 'Hello'}, {'tag': 'foo', 'text': None}]) "Hello" => [{'tag': 'test', 'text': 'Hello'}, {'tag': 'foo', 'text': 'Hello'}, {'tag': 'foo', 'text': None}] (expected: [{'tag': 'test', 'text': 'Hello'}, {'tag': 'foo', 'text': None}, {'tag': 'foo', 'text': None}]) ---------- components: Regular Expressions messages: 322771 nosy: beardypig, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: re.finditer and lookahead bug type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 09:18:19 2018 From: report at bugs.python.org (R. David Murray) Date: Tue, 31 Jul 2018 13:18:19 +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: <1533043099.41.0.56676864532.issue24218@psf.upfronthosting.co.za> R. David Murray added the comment: Well, posting on a closed issue is generally not the best way :) The current behavior with regards to the SMTPUTF8 flag is correct (it only matters for *addresses*, display names can already be transmitted if they contain non-ascii using non SMTPUTF8 methods). The multiple carriage returns is a bug, and there is an open issue for it, though I'm not finding it at the moment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 09:20:20 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 31 Jul 2018 13:20:20 +0000 Subject: [issue24218] Also support SMTPUTF8 in smtplib's send_message method. In-Reply-To: <1533043099.41.0.56676864532.issue24218@psf.upfronthosting.co.za> Message-ID: <0592CA99-6ED6-431E-9962-3D803FD898A7@wirtel.be> St?phane Wirtel added the comment: Hi David, What is the related issue with the new lines? > On 31 Jul 2018, at 15:18, R. David Murray wrote: > > > R. David Murray added the comment: > > Well, posting on a closed issue is generally not the best way :) > > The current behavior with regards to the SMTPUTF8 flag is correct (it only matters for *addresses*, display names can already be transmitted if they contain non-ascii using non SMTPUTF8 methods). > > The multiple carriage returns is a bug, and there is an open issue for it, though I'm not finding it at the moment. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > Python-bugs-list mailing list > Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/stephane%40wirtel.be > ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 09:20:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 31 Jul 2018 13:20:51 +0000 Subject: [issue34294] re.finditer and lookahead bug In-Reply-To: <1533042665.14.0.56676864532.issue34294@psf.upfronthosting.co.za> Message-ID: <1533043251.75.0.56676864532.issue34294@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 09:32:34 2018 From: report at bugs.python.org (jfbu) Date: Tue, 31 Jul 2018 13:32:34 +0000 Subject: [issue34293] DOC: Makefile inherits a Sphinx 1.5 bug regarding PAPER envvar In-Reply-To: <1533042613.34.0.56676864532.issue34293@psf.upfronthosting.co.za> Message-ID: <1533043954.21.0.56676864532.issue34293@psf.upfronthosting.co.za> Change by jfbu : ---------- keywords: +patch pull_requests: +8094 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 09:40:15 2018 From: report at bugs.python.org (jfbu) Date: Tue, 31 Jul 2018 13:40:15 +0000 Subject: [issue34293] DOC: Makefile inherits a Sphinx 1.5 bug regarding PAPER envvar In-Reply-To: <1533042613.34.0.56676864532.issue34293@psf.upfronthosting.co.za> Message-ID: <1533044415.8.0.56676864532.issue34293@psf.upfronthosting.co.za> jfbu added the comment: https://github.com/python/cpython/pull/8585 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 10:01:31 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 31 Jul 2018 14:01:31 +0000 Subject: [issue1764286] inspect.getsource does not work with decorated functions Message-ID: <1533045691.56.0.56676864532.issue1764286@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Should `getsourcefile` be changed to match? I'd say yes. There's no point in getsourcefile returning the file location of the topmost decorator. Feel free to open a new issue and submit a PR to fix this! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 10:05:56 2018 From: report at bugs.python.org (Eryk Sun) Date: Tue, 31 Jul 2018 14:05:56 +0000 Subject: [issue34274] Python launcher behavior with "#!/usr/bin/env python" shebang In-Reply-To: <1532900839.39.0.56676864532.issue34274@psf.upfronthosting.co.za> Message-ID: <1533045956.97.0.56676864532.issue34274@psf.upfronthosting.co.za> Eryk Sun added the comment: See the discussion in issue 28686 regarding the use of version detection and/or versioned executable names with env shebangs. I think the launcher should at least support searching PATH for pythonX.exe and pythonX.Y.exe, so users can at least manually copy or symlink to python.exe. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 10:06:20 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 31 Jul 2018 14:06:20 +0000 Subject: [issue34263] asyncio: "relative *delay* or absolute *when* should not exceed one day" In-Reply-To: <1532785749.04.0.56676864532.issue34263@psf.upfronthosting.co.za> Message-ID: <1533045980.77.0.56676864532.issue34263@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 944451cd8d3e897138f4b43569de13cd081ee251 by Yury Selivanov (MartinAltmayer) in branch 'master': bpo-34263 Cap timeout submitted to epoll/select etc. to one day. (GH-8532) https://github.com/python/cpython/commit/944451cd8d3e897138f4b43569de13cd081ee251 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 10:06:32 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 31 Jul 2018 14:06:32 +0000 Subject: [issue34263] asyncio: "relative *delay* or absolute *when* should not exceed one day" In-Reply-To: <1532785749.04.0.56676864532.issue34263@psf.upfronthosting.co.za> Message-ID: <1533045992.11.0.56676864532.issue34263@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8095 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 10:07:29 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 31 Jul 2018 14:07:29 +0000 Subject: [issue34263] asyncio: "relative *delay* or absolute *when* should not exceed one day" In-Reply-To: <1532785749.04.0.56676864532.issue34263@psf.upfronthosting.co.za> Message-ID: <1533046049.61.0.56676864532.issue34263@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8096 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 10:10:23 2018 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 31 Jul 2018 14:10:23 +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: <1533046223.0.0.56676864532.issue22852@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I just learned of this issue. Rather than adding has_netloc, etc. attributes, why not use None to distinguish missing values as is preferred above, but add a new boolean keyword argument to urlparse(), etc. to get the new behavior (e.g. "allow_none" to parallel "allow_fragments")? It seems like this would be more elegant, IMO, because it would lead to the API we really want. For example, the ParseResult(), etc. signatures and repr() values would be simpler. Changing the default value of the new keyword arguments would also provide a clean and simple deprecation pathway in the future, if desired. ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 10:13:13 2018 From: report at bugs.python.org (Tim Peters) Date: Tue, 31 Jul 2018 14:13:13 +0000 Subject: [issue34291] UnboundLocalError raised on call to global In-Reply-To: <1533034295.33.0.56676864532.issue34291@psf.upfronthosting.co.za> Message-ID: <1533046393.08.0.56676864532.issue34291@psf.upfronthosting.co.za> Tim Peters added the comment: Yes, the assignment does "hide the global definition of g". But this determination is made at compile time, not at run time: an assignment to `g` _anywhere_ inside `f()` makes _every_ appearance of `g` within `f()` local to `f`. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 10:16:45 2018 From: report at bugs.python.org (Jakub Stasiak) Date: Tue, 31 Jul 2018 14:16:45 +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: <1533046605.23.0.56676864532.issue27494@psf.upfronthosting.co.za> Jakub Stasiak added the comment: I appreciate the example, but I'd claim that's a "missing fixer" issue, not a "parser accepts too much" issue. Considering the syntax wasn't ambiguous (I think) and had been accepted before 3.7 I'll remain not totally convinced here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 10:25:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 31 Jul 2018 14:25:08 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1533047107.99.0.56676864532.issue33729@psf.upfronthosting.co.za> STINNER Victor added the comment: I have no opinion on the change in the master branch, but I agree with Christian that the 3.7 change should be reverted since it breaks the backward compatibility. Serhiy modified int() in Python 3.7 to convert its first parameter to positional only parameter. IMHO it's ok to do such change. Moreover, the change has been documented in What's New in Python 3.7: https://docs.python.org/dev/whatsnew/3.7.html#api-and-feature-removals If you decide to keep the change in the master branch, it should be documented in What's New in Python 3.8, no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 10:27:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 31 Jul 2018 14:27:56 +0000 Subject: [issue24809] Add getprotobynumber to socket module In-Reply-To: <1438870120.05.0.712162767088.issue24809@psf.upfronthosting.co.za> Message-ID: <1533047276.6.0.56676864532.issue24809@psf.upfronthosting.co.za> STINNER Victor added the comment: I concur with Yury that there is not enough users and use cases needing this feature, so it doesn't deserve to pay the maintenance burden in the standard library. Start with a project on PyPI. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 10:28:32 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 31 Jul 2018 14:28:32 +0000 Subject: [issue34279] RFC: issue a warning in regrtest when no test have been executed? In-Reply-To: <1532947707.98.0.56676864532.issue34279@psf.upfronthosting.co.za> Message-ID: <1533047312.38.0.56676864532.issue34279@psf.upfronthosting.co.za> STINNER Victor added the comment: > I would prefer shorter and totally different from the normal output in case of no tests ran. That's basically the whole purpose of the issue, yep ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 11:20:22 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 31 Jul 2018 15:20:22 +0000 Subject: [issue34125] Profiling depends on whether **kwargs is given In-Reply-To: <1531761360.51.0.56676864532.issue34125@psf.upfronthosting.co.za> Message-ID: <1533050422.31.0.56676864532.issue34125@psf.upfronthosting.co.za> STINNER Victor added the comment: I opened a wider discussion: bpo-29502. The discussion didn't go anywhere yet. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 11:24:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 31 Jul 2018 15:24:44 +0000 Subject: [issue34035] Several AttributeError in zipfile seek() methods In-Reply-To: <1530642274.73.0.56676864532.issue34035@psf.upfronthosting.co.za> Message-ID: <1533050684.94.0.56676864532.issue34035@psf.upfronthosting.co.za> STINNER Victor added the comment: Note: the seek() method has been added by bpo-22908 (commit 066df4fd454d6ff9be66e80b2a65995b10af174f), and Python 3.6 is not affected. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 11:29:04 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 31 Jul 2018 15:29:04 +0000 Subject: [issue34263] asyncio: "relative *delay* or absolute *when* should not exceed one day" In-Reply-To: <1532785749.04.0.56676864532.issue34263@psf.upfronthosting.co.za> Message-ID: <1533050944.62.0.56676864532.issue34263@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 6f16ffc1879fc934eba297b3e81bd940e32a7e03 by Yury Selivanov (Miss Islington (bot)) in branch '3.6': [3.6] bpo-34263 Cap timeout submitted to epoll/select etc. to one day. (GH-8532) (GH-8587) https://github.com/python/cpython/commit/6f16ffc1879fc934eba297b3e81bd940e32a7e03 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 11:29:11 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 31 Jul 2018 15:29:11 +0000 Subject: [issue34263] asyncio: "relative *delay* or absolute *when* should not exceed one day" In-Reply-To: <1532785749.04.0.56676864532.issue34263@psf.upfronthosting.co.za> Message-ID: <1533050951.11.0.56676864532.issue34263@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 172a81e42bc30da1bd4027db9cd3b6172469f7fe by Yury Selivanov (Miss Islington (bot)) in branch '3.7': [3.7] bpo-34263 Cap timeout submitted to epoll/select etc. to one day. (GH-8532) (GH-8586) https://github.com/python/cpython/commit/172a81e42bc30da1bd4027db9cd3b6172469f7fe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 11:32:43 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 31 Jul 2018 15:32:43 +0000 Subject: [issue34263] asyncio: "relative *delay* or absolute *when* should not exceed one day" In-Reply-To: <1532785749.04.0.56676864532.issue34263@psf.upfronthosting.co.za> Message-ID: <1533051163.73.0.56676864532.issue34263@psf.upfronthosting.co.za> Yury Selivanov added the comment: Merged. Thank you, hope that you'll keep contributing! :) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 11:36:02 2018 From: report at bugs.python.org (Jens Troeger) Date: Tue, 31 Jul 2018 15:36:02 +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: <1533051362.78.0.56676864532.issue24218@psf.upfronthosting.co.za> Jens Troeger added the comment: > Well, posting on a closed issue is generally not the best way :) Fair enough ;) > The multiple carriage returns is a bug, and there is an open issue for it, though I'm not finding it at the moment. Oh good, yes that should be fixed! My current workaround is setting `international = True` _always_, which prevents the multiple CRs. Not pretty but it works? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 11:42:57 2018 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 31 Jul 2018 15:42:57 +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: <1533051777.34.0.56676864532.issue34269@psf.upfronthosting.co.za> Vinay Sajip added the comment: Well, loggerDict is an internal implementation detail which shouldn't be directly called by the code in borgbackup. Hence I'm not sure you can call it a bug. When messing around with internals of objects, caveats apply. Note that loggerDict isn't mentioned in the documentation: this is deliberate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 11:43:45 2018 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 31 Jul 2018 15:43:45 +0000 Subject: [issue34244] Add support of check logger In-Reply-To: <1532668540.12.0.56676864532.issue34244@psf.upfronthosting.co.za> Message-ID: <1533051825.51.0.56676864532.issue34244@psf.upfronthosting.co.za> Vinay Sajip added the comment: What is your use case? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 11:46:37 2018 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 31 Jul 2018 15:46:37 +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: <1533051997.18.0.56676864532.issue29036@psf.upfronthosting.co.za> Vinay Sajip added the comment: If you use the recommended approach of using logger = logging.getLogger(__name__), then the logger's name (the name field in the LogRecord) will be the full module path. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 11:54:12 2018 From: report at bugs.python.org (Emily Morehouse) Date: Tue, 31 Jul 2018 15:54:12 +0000 Subject: [issue34237] faq/design: PEP 572 adds assignment expressions In-Reply-To: <1532614776.63.0.56676864532.issue34237@psf.upfronthosting.co.za> Message-ID: <1533052452.42.0.56676864532.issue34237@psf.upfronthosting.co.za> Emily Morehouse added the comment: This issue was brought to my attention -- I'm helping build the PEP 572 implementation. I'll make sure the docs get updated (and Jonathan, I didn't actually know that assignment expressions were mentioned in the FAQ, so this was still helpful!) ---------- assignee: docs at python -> emilyemorehouse nosy: +emilyemorehouse _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 11:57:24 2018 From: report at bugs.python.org (Chris Angelico) Date: Tue, 31 Jul 2018 15:57:24 +0000 Subject: [issue34237] faq/design: PEP 572 adds assignment expressions In-Reply-To: <1532614776.63.0.56676864532.issue34237@psf.upfronthosting.co.za> Message-ID: <1533052644.8.0.56676864532.issue34237@psf.upfronthosting.co.za> Chris Angelico added the comment: BTW, sorry for sounding a bit snippy in my comment. Jonathan, in future, rather than dropping someone an email, it'd be more normal to just ping the person on the issue itself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 12:07:56 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 31 Jul 2018 16:07:56 +0000 Subject: [issue32947] Support OpenSSL 1.1.1 In-Reply-To: <1519559680.67.0.467229070634.issue32947@psf.upfronthosting.co.za> Message-ID: <1533053276.82.0.56676864532.issue32947@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Yes test_poplib and test_ftplib on fedora rawhide when run against openssl 1.1.1 pre8. Haven't tried the pr7, but assuming that the tests were fine before here is the list of changes between pre7 and pre8: https://github.com/openssl/openssl/compare/OpenSSL_1_1_1-pre7...OpenSSL_1_1_1-pre8 ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 12:10:05 2018 From: report at bugs.python.org (Wolfgang Maier) Date: Tue, 31 Jul 2018 16:10:05 +0000 Subject: [issue34232] Python3.7.0 exe installers (32 and 64 bit) failing on Windows7 In-Reply-To: <1532600152.06.0.56676864532.issue34232@psf.upfronthosting.co.za> Message-ID: <1533053405.94.0.56676864532.issue34232@psf.upfronthosting.co.za> Wolfgang Maier added the comment: Oh, sorry, I didn't realize there was another file and it seems I did not keep it so I just ran the installer again to reproduce. Attached is the new pair of log files. ---------- Added file: https://bugs.python.org/file47722/Python 3.7.0 (64-bit)_20180731180657_000_core_JustForMe.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 12:10:17 2018 From: report at bugs.python.org (Wolfgang Maier) Date: Tue, 31 Jul 2018 16:10:17 +0000 Subject: [issue34232] Python3.7.0 exe installers (32 and 64 bit) failing on Windows7 In-Reply-To: <1532600152.06.0.56676864532.issue34232@psf.upfronthosting.co.za> Message-ID: <1533053417.76.0.56676864532.issue34232@psf.upfronthosting.co.za> Change by Wolfgang Maier : Added file: https://bugs.python.org/file47723/Python 3.7.0 (64-bit)_20180731180657.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 12:14:47 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 31 Jul 2018 16:14:47 +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: <1533053687.25.0.56676864532.issue34269@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Okay, I did some code search on GitHub for `logging.Logger.manager.loggerDict.clear()` (https://github.com/search?q=logging.Logger.manager.loggerDict.clear%28%29&type=Code) and there was some code in the test_logging where it was used in tearDown and setUp so I thought it's a public function. My bad on not reading the docs. I agree that it's not a bug if it's an undocumented internal implementation related change that one should not rely upon. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 12:15:07 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 31 Jul 2018 16:15:07 +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: <1533053707.64.0.56676864532.issue34269@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 12:17:15 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 31 Jul 2018 16:17:15 +0000 Subject: [issue34294] re.finditer and lookahead bug In-Reply-To: <1533042665.14.0.56676864532.issue34294@psf.upfronthosting.co.za> Message-ID: <1533053835.33.0.56676864532.issue34294@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 12:22:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 31 Jul 2018 16:22:18 +0000 Subject: [issue33729] Hashlib/blake2* missing 'data' keyword argument In-Reply-To: <1527842171.52.0.682650639539.issue33729@psf.upfronthosting.co.za> Message-ID: <1533054138.55.0.56676864532.issue33729@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In case of int() the name of it's first argument was documented, in both the module documentation, and in interactive help. But the documented name of the first blake2b() argument was "data", and it never worked. Since help() was not worked for blake2b, the user had weak chance to know that the actual name is "string". Thus there is much less chance of breaking the user code by making this parameter a positional-only than in case of int(). But I think Christian has other concerns. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 12:42:45 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 31 Jul 2018 16:42:45 +0000 Subject: [issue34294] re.finditer and lookahead bug In-Reply-To: <1533042665.14.0.56676864532.issue34294@psf.upfronthosting.co.za> Message-ID: <1533055365.42.0.56676864532.issue34294@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: ? cpython git:(70d56fb525) ? ./python.exe Python 3.7.0a2+ (tags/v3.7.0a2-341-g70d56fb525:70d56fb525, Jul 31 2018, 21:58:10) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> ? cpython git:(70d56fb525) ? ./python.exe -c 'import re; print([m.groupdict() for m in re.finditer(r"(?=<(?P\w+)/?>(?:(?P.+?))?)", "")])' [{'tag': 'test', 'text': ''}, {'tag': 'foo2', 'text': ''}] ? cpython git:(e69fbb6a56) ? ./python.exe Python 3.7.0a2+ (tags/v3.7.0a2-340-ge69fbb6a56:e69fbb6a56, Jul 31 2018, 22:12:06) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> ? cpython git:(e69fbb6a56) ? ./python.exe -c 'import re; print([m.groupdict() for m in re.finditer(r"(?=<(?P\w+)/?>(?:(?P.+?))?)", "")])' [{'tag': 'test', 'text': ''}, {'tag': 'foo2', 'text': None}] Does this have something to do with 70d56fb52582d9d3f7c00860d6e90570c6259371(bpo-25054, bpo-1647489) ? Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 12:44:39 2018 From: report at bugs.python.org (Seonggi Kim) Date: Tue, 31 Jul 2018 16:44:39 +0000 Subject: [issue34295] Avoid inefficient way to find start point in deque.index Message-ID: <1533055479.21.0.56676864532.issue34295@psf.upfronthosting.co.za> Change by Seonggi Kim : ---------- components: ctypes nosy: hacksg priority: normal severity: normal status: open title: Avoid inefficient way to find start point in deque.index type: enhancement versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 12:45:35 2018 From: report at bugs.python.org (Seonggi Kim) Date: Tue, 31 Jul 2018 16:45:35 +0000 Subject: [issue34295] Avoid inefficient way to find start point in deque.index Message-ID: <1533055535.24.0.56676864532.issue34295@psf.upfronthosting.co.za> Change by Seonggi Kim : ---------- keywords: +patch pull_requests: +8097 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 13:02:56 2018 From: report at bugs.python.org (Seonggi Kim) Date: Tue, 31 Jul 2018 17:02:56 +0000 Subject: [issue34295] Avoid inefficient way to find start point in deque.index Message-ID: <1533056576.55.0.56676864532.issue34295@psf.upfronthosting.co.za> Change by Seonggi Kim : ---------- components: +Extension Modules -ctypes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 13:31:24 2018 From: report at bugs.python.org (Cyker Way) Date: Tue, 31 Jul 2018 17:31:24 +0000 Subject: [issue34296] Speed up python startup by pre-warming the vm Message-ID: <1533058284.7.0.56676864532.issue34296@psf.upfronthosting.co.za> New submission from Cyker Way : I'm currently writing some shell tools with python3. While python can definitely do the job succinctly, there is one problem which made me feel I might have to switch to other languages or even pure bash scripts: python startup time. Shell tools are used very often, interactively. users do feel the lag when they hit enter after their command. i did 2 implementations in both python and pure bash, python takes about 500ms to run while bash is more than 10 times faster. I'm not saying bash is better than python, but for this task bash, or even perl, is a better choice. however, i think there is an easy way to improve python as i believe the lag is mostly due to its slow startup: pre-warm its vm. I can think of 2 scenarios for python to do a better shell job: 1. Run a universal python as a daemon, which reads scripts from a socket, runs it, and returns the result to a socket. Because it's running as a daemon, the startup time is avoided each time user runs a script. 2. Warm a python zygote during system boot. Every time a python script is run, fork from the zygote instead of cold-boot the vm. this is a similar approach to android zygote. I haven't done experiments to see whether there will be obstacles in implementing these scenarios. But I think this should become a priority because it's real and tangible, and other people may face the slow startup problem as well. If there's ongoing work on these, I'd be happy to have a look. But I don't think these scenarios have already been put into released versions of python. ---------- components: Interpreter Core messages: 322800 nosy: cykerway priority: normal severity: normal status: open title: Speed up python startup by pre-warming the vm type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 13:34:58 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 31 Jul 2018 17:34:58 +0000 Subject: [issue34295] Avoid inefficient way to find start point in deque.index Message-ID: <1533058498.24.0.56676864532.issue34295@psf.upfronthosting.co.za> New submission from Raymond Hettinger : Can you run some timings to show the difference. Also, you need to sign a CLA. ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 13:40:34 2018 From: report at bugs.python.org (Francois Godin) Date: Tue, 31 Jul 2018 17:40:34 +0000 Subject: [issue34297] Windows py.exe launcher fail to handle quote correctly Message-ID: <1533058834.14.0.56676864532.issue34297@psf.upfronthosting.co.za> New submission from Francois Godin : Using double quote around the version argument will cause a failure. Ex (failure): "py.exe" "-3" "test.py" => run_child: about to run '3" "...\python.exe" "test.py"' => ...\python.exe: can't open file '3 test.py': [Errno 22] Invalid argument Removing the double quote give (success): "py.exe" -3 "test.py" => run_child: about to run '"...\python.exe" "test.py"' This is mainly problematic when a library or a tool want to be simpler and simply add double quotes around every parameters. This is impossible to do with the python launcher. The issue seems to come from the PC/launcher.c file. It is the following line in the function process (around line 1622): command += wcslen(p); This line is suppose to skip the -3 in the command line so that the rest can be given to python as-is. The problem is that while command come from GetCommandLineW and thus contain quote, p come from __wargv and does not contain the double quote. Thus, the 2 characters "- are skipped instead of -3. ---------- components: Demos and Tools, Distutils, Windows messages: 322802 nosy: copelnug, dstufft, eric.araujo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Windows py.exe launcher fail to handle quote correctly versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 13:41:19 2018 From: report at bugs.python.org (Francois Godin) Date: Tue, 31 Jul 2018 17:41:19 +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: <1533058879.21.0.56676864532.issue34297@psf.upfronthosting.co.za> Change by Francois Godin : ---------- type: -> behavior versions: +Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 13:43:29 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 31 Jul 2018 17:43:29 +0000 Subject: [issue34295] Avoid inefficient way to find start point in deque.index In-Reply-To: <1533058498.24.0.56676864532.issue34295@psf.upfronthosting.co.za> Message-ID: <1533059009.13.0.56676864532.issue34295@psf.upfronthosting.co.za> Raymond Hettinger added the comment: OP closed the PR. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed versions: -Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 13:49:14 2018 From: report at bugs.python.org (Seonggi Kim) Date: Tue, 31 Jul 2018 17:49:14 +0000 Subject: [issue34298] Avoid inefficient way to find start point in deque.index Message-ID: <1533059354.59.0.56676864532.issue34298@psf.upfronthosting.co.za> Change by Seonggi Kim : ---------- components: Extension Modules nosy: hacksg priority: normal severity: normal status: open title: Avoid inefficient way to find start point in deque.index type: enhancement versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 13:50:10 2018 From: report at bugs.python.org (Seonggi Kim) Date: Tue, 31 Jul 2018 17:50:10 +0000 Subject: [issue34298] Avoid inefficient way to find start point in deque.index Message-ID: <1533059410.72.0.56676864532.issue34298@psf.upfronthosting.co.za> Change by Seonggi Kim : ---------- keywords: +patch pull_requests: +8098 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 14:04:21 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 31 Jul 2018 18:04:21 +0000 Subject: [issue34298] Avoid inefficient way to find start point in deque.index Message-ID: <1533060260.99.0.56676864532.issue34298@psf.upfronthosting.co.za> New submission from Raymond Hettinger : Please run some timings to show whether the improvement is significant. Also, please sign a CLA. ---------- components: +Library (Lib) -Extension Modules nosy: +rhettinger versions: -Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 14:07:05 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 31 Jul 2018 18:07:05 +0000 Subject: [issue34203] documentation: recommend Python 3 over 2 in faq In-Reply-To: <1532397328.96.0.56676864532.issue34203@psf.upfronthosting.co.za> Message-ID: <1533060425.88.0.56676864532.issue34203@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 14:08:08 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 31 Jul 2018 18:08:08 +0000 Subject: [issue34007] test_gdb fails in s390x SLES buildbots In-Reply-To: <1530318299.83.0.56676864532.issue34007@psf.upfronthosting.co.za> Message-ID: <1533060488.67.0.56676864532.issue34007@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New failure on s390x SLES 3.7: https://buildbot.python.org/all/#/builders/122/builds/540 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 15:10:02 2018 From: report at bugs.python.org (Thomas Waldmann) Date: Tue, 31 Jul 2018 19:10:02 +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: <1533064202.54.0.56676864532.issue34269@psf.upfronthosting.co.za> Thomas Waldmann added the comment: I agree that we should not dig that deep into logging internals and clear that dict from borg code. But, seems like one has no public api to reinitialize logging to a like-fresh state, right? So maybe THAT is the real problem. Add some .reset() method to do that? BTW, removing that .clear() from our code made our tests work again. I am not sure why that was added in the first place as I could not find regressions after removing it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 15:14:24 2018 From: report at bugs.python.org (Brett Cannon) Date: Tue, 31 Jul 2018 19:14:24 +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: <1533064464.53.0.56676864532.issue34286@psf.upfronthosting.co.za> Brett Cannon added the comment: Could be related to https://bugs.python.org/issue21446 . ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 15:24:47 2018 From: report at bugs.python.org (Phillip M. Feldman) Date: Tue, 31 Jul 2018 19:24:47 +0000 Subject: [issue34299] argparse description formatting Message-ID: <1533065087.6.0.56676864532.issue34299@psf.upfronthosting.co.za> New submission from Phillip M. Feldman : With `argparse`, I'm providing a triple-quoted string via the `description` argument of the constructor. When I invoke the script with the -h or --help argument, all formatting in the triple-quoted string is lost, i.e., all paragraphs are run together into one giant paragraph, and the result is rather hard to read. Phillip M. Feldman ---------- components: Library (Lib) messages: 322808 nosy: Phillip.M.Feldman at gmail.com priority: normal severity: normal status: open title: argparse description formatting type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 15:25:15 2018 From: report at bugs.python.org (tzickel) Date: Tue, 31 Jul 2018 19:25:15 +0000 Subject: [issue34300] gcc 7.3 causes a warning when compiling getpath.c in python 2.7 Message-ID: <1533065115.7.0.56676864532.issue34300@psf.upfronthosting.co.za> New submission from tzickel : When compiling on ubuntu 18.04 the 2.7 branch, I get this warning: gcc -pthread -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -DPYTHONPATH='":plat-linux2:lib-tk:lib-old"' \ -DPREFIX='"/usr/local"' \ -DEXEC_PREFIX='"/usr/local"' \ -DVERSION='"2.7"' \ -DVPATH='""' \ -o Modules/getpath.o ./Modules/getpath.c In file included from /usr/include/string.h:494:0, from Include/Python.h:38, from ./Modules/getpath.c:3: In function 'strncpy', inlined from 'joinpath' at ./Modules/getpath.c:202:5, inlined from 'search_for_prefix' at ./Modules/getpath.c:265:9, inlined from 'calculate_path' at ./Modules/getpath.c:505:8: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: '__builtin_strncpy': specified size between 9223372036854779906 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=] return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); ^~---- I think it's because the compiler can't reason that Py_FatalError aborts the program, and thus not overflow strncpy. Since there are about 3-4 warnings while building, maybe we should add a manual return after Py_FatalError in joinpath ? ---------- components: Build messages: 322809 nosy: tzickel priority: normal severity: normal status: open title: gcc 7.3 causes a warning when compiling getpath.c in python 2.7 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 15:26:45 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 31 Jul 2018 19:26:45 +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: <1533065205.71.0.56676864532.issue29502@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: I always assumed that enabling profiling only from the Python bytecode interpreter was a deliberate choice. ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 15:43:52 2018 From: report at bugs.python.org (Zsolt Cserna) Date: Tue, 31 Jul 2018 19:43:52 +0000 Subject: [issue34299] argparse description formatting In-Reply-To: <1533065087.6.0.56676864532.issue34299@psf.upfronthosting.co.za> Message-ID: <1533066232.3.0.56676864532.issue34299@psf.upfronthosting.co.za> Zsolt Cserna added the comment: You would need to use the RawTextHelpFormatter as format_class for the constructor. In this case, argparse will apply no re-wrapping of the description. import argparse parser = argparse.ArgumentParser(description="""foo bar baz""", formatter_class=argparse.RawTextHelpFormatter) ---------- nosy: +csernazs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 15:50:31 2018 From: report at bugs.python.org (tzickel) Date: Tue, 31 Jul 2018 19:50:31 +0000 Subject: [issue34300] gcc 7.3 causes a warning when compiling getpath.c in python 2.7 In-Reply-To: <1533065115.7.0.56676864532.issue34300@psf.upfronthosting.co.za> Message-ID: <1533066631.56.0.56676864532.issue34300@psf.upfronthosting.co.za> tzickel added the comment: Changing Py_FatalError prototype to add: __attribute__((noreturn)) also stops the warning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 15:58:33 2018 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 31 Jul 2018 19:58:33 +0000 Subject: [issue33083] math.factorial accepts non-integral Decimal instances In-Reply-To: <1521146313.09.0.467229070634.issue33083@psf.upfronthosting.co.za> Message-ID: <1533067113.2.0.56676864532.issue33083@psf.upfronthosting.co.za> Mark Dickinson added the comment: [Victor] > Is it really important to accept integral float? Possibly not, but acceptance of integral floats is deliberate, by-design, tested behaviour, so it at least deserves a deprecation period if we're going to get rid of it. (I'm -0.0 on such a deprecation - it doesn't seem worth the code churn and the possible breakage.) If we want to consider deprecation, please let's open a new issue for that. Then this one can be closed when Pablo's PR is merged. Pablo's changes LGTM; I've added my approval to the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 16:11:00 2018 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 31 Jul 2018 20:11:00 +0000 Subject: [issue33089] Add multi-dimensional Euclidean distance function to the math module In-Reply-To: <1521226258.78.0.467229070634.issue33089@psf.upfronthosting.co.za> Message-ID: <1533067860.8.0.56676864532.issue33089@psf.upfronthosting.co.za> Mark Dickinson added the comment: For the record, let me register my objection here. I'm not convinced by adding math.dist, and am surprised that this was committed. Almost all the discussion in this issue was about adding multi-argument hypot, which seems like an obviously useful building block. dist seems like a specialised function, and I don't think it belongs in the math module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 16:19:59 2018 From: report at bugs.python.org (Zsolt Cserna) Date: Tue, 31 Jul 2018 20:19:59 +0000 Subject: [issue34248] dbm errors should contain file names In-Reply-To: <1532698438.31.0.56676864532.issue34248@psf.upfronthosting.co.za> Message-ID: <1533068399.24.0.56676864532.issue34248@psf.upfronthosting.co.za> Zsolt Cserna added the comment: I've made a patch which works for me. >>> dbm.gnu.open("/tmp/zzzzz") Traceback (most recent call last): File "", line 1, in _gdbm.error: [Errno 2] No such file or directory: '/tmp/zzzzz' >>> Could you please give it a try? ---------- keywords: +patch nosy: +csernazs Added file: https://bugs.python.org/file47724/patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 16:37:55 2018 From: report at bugs.python.org (sds) Date: Tue, 31 Jul 2018 20:37:55 +0000 Subject: [issue34248] dbm errors should contain file names In-Reply-To: <1532698438.31.0.56676864532.issue34248@psf.upfronthosting.co.za> Message-ID: <1533069475.88.0.56676864532.issue34248@psf.upfronthosting.co.za> sds added the comment: thanks for the patch. alas, I do not build python myself, so I cannot try it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 16:39:58 2018 From: report at bugs.python.org (Piotr Dobrogost) Date: Tue, 31 Jul 2018 20:39:58 +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: <1533069598.29.0.56676864532.issue22852@psf.upfronthosting.co.za> Change by Piotr Dobrogost : ---------- nosy: +piotr.dobrogost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 16:47:19 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 31 Jul 2018 20:47:19 +0000 Subject: [issue34113] LLTRACE segv In-Reply-To: <1531601662.45.0.56676864532.issue34113@psf.upfronthosting.co.za> Message-ID: <1533070039.07.0.56676864532.issue34113@psf.upfronthosting.co.za> STINNER Victor added the comment: By the way, see also bpo-25571. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 16:52:32 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 31 Jul 2018 20:52:32 +0000 Subject: [issue33083] math.factorial accepts non-integral Decimal instances In-Reply-To: <1521146313.09.0.467229070634.issue33083@psf.upfronthosting.co.za> Message-ID: <1533070352.13.0.56676864532.issue33083@psf.upfronthosting.co.za> STINNER Victor added the comment: >> Is it really important to accept integral float? > Possibly not, but acceptance of integral floats is deliberate, by-design, tested behaviour, so it at least deserves a deprecation period if we're going to get rid of it. Ok. Let's keep it in that case ;-) I also approved Pablo's PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 16:55:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 31 Jul 2018 20:55:17 +0000 Subject: [issue34113] LLTRACE segv In-Reply-To: <1531601662.45.0.56676864532.issue34113@psf.upfronthosting.co.za> Message-ID: <1533070517.91.0.56676864532.issue34113@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8ed317f1ca42a43df14282bbc3ccc0b5610432f4 by Victor Stinner (costypetrisor) in branch 'master': bpo-34113: Fix a crash when using LLTRACE is on (GH-8517) https://github.com/python/cpython/commit/8ed317f1ca42a43df14282bbc3ccc0b5610432f4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 16:56:26 2018 From: report at bugs.python.org (Zsolt Cserna) Date: Tue, 31 Jul 2018 20:56:26 +0000 Subject: [issue34248] dbm errors should contain file names In-Reply-To: <1532698438.31.0.56676864532.issue34248@psf.upfronthosting.co.za> Message-ID: <1533070586.32.0.56676864532.issue34248@psf.upfronthosting.co.za> Change by Zsolt Cserna : ---------- pull_requests: +8100 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 16:58:45 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 31 Jul 2018 20:58:45 +0000 Subject: [issue34113] LLTRACE segv In-Reply-To: <1531601662.45.0.56676864532.issue34113@psf.upfronthosting.co.za> Message-ID: <1533070725.17.0.56676864532.issue34113@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Constantin Petrisor to fix and thanks Andrew Valencia for the bug report! It was the first time that I see a bug report on LLTRACE on the last 5 years, it seems like almost no one uses it. Likely because you need to compile Python manually (or find a binary compiled in debug mode). So I don't think that it's worth it to backport the fix to 2.7, 3.6 and 3.7 branches. I'm not comfortable to modify ceval.c in stable branches. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 17:00:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 31 Jul 2018 21:00:10 +0000 Subject: [issue29400] Add instruction level tracing via sys.settrace In-Reply-To: <1485886852.16.0.854514177291.issue29400@psf.upfronthosting.co.za> Message-ID: <1533070810.16.0.56676864532.issue29400@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- resolution: -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 17:01:48 2018 From: report at bugs.python.org (Zsolt Cserna) Date: Tue, 31 Jul 2018 21:01:48 +0000 Subject: [issue34248] dbm errors should contain file names In-Reply-To: <1532698438.31.0.56676864532.issue34248@psf.upfronthosting.co.za> Message-ID: <1533070908.12.0.56676864532.issue34248@psf.upfronthosting.co.za> Zsolt Cserna added the comment: Alright, I created a PR for this. We will see if this can be merged to upstream or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 17:28:57 2018 From: report at bugs.python.org (Berker Peksag) Date: Tue, 31 Jul 2018 21:28:57 +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: <1533072537.27.0.56676864532.issue34286@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- assignee: -> berker.peksag stage: -> needs patch type: -> behavior versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 17:54:48 2018 From: report at bugs.python.org (Phillip M. Feldman) Date: Tue, 31 Jul 2018 21:54:48 +0000 Subject: [issue34299] argparse description formatting In-Reply-To: <1533066232.3.0.56676864532.issue34299@psf.upfronthosting.co.za> Message-ID: Phillip M. Feldman added the comment: That works. Thanks! I think that this boils down to a documentation issue. The following says that the default behavior is to line-wrap the help messages. At least to me, this doesn't imply that whitespace is getting eaten. RawDescriptionHelpFormatter and RawTextHelpFormatter give more control over how textual descriptions are displayed. By default, ArgumentParser objects line-wrap the description and epilog texts in command-line help messages: On Tue, Jul 31, 2018 at 12:43 PM, Zsolt Cserna wrote: > > Zsolt Cserna added the comment: > > You would need to use the RawTextHelpFormatter as format_class for the > constructor. In this case, argparse will apply no re-wrapping of the > description. > > import argparse > > parser = argparse.ArgumentParser(description="""foo > bar > baz""", formatter_class=argparse.RawTextHelpFormatter) > > ---------- > nosy: +csernazs > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 18:06:20 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 31 Jul 2018 22:06:20 +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: <1533074780.61.0.56676864532.issue34211@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: For those who are not very aware of Cygwin issues: what is wrong with PyVarObject_HEAD_INIT(&PyType_Type, 0); ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 18:11:08 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 31 Jul 2018 22:11:08 +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: <1533075068.49.0.56676864532.issue34275@psf.upfronthosting.co.za> Terry J. Reedy added the comment: IDLE currently uses tooltips only for calltips describing a function's call signature. Within Lib/idlelib: calltip.py (renamed from calltips.py after the 3.7.0/3.6.6 release) has the logic for when to raise one and its content. calltip_w.py (which I intend to merge into calltip.py) has the code for the calltip itself and its closing. Issue #1529353 and PR7626) proposes a second use of tooltips. I would also like to add helptips to some dialog fields and if possible, some menu entries. tooltip.py has simple generic tooltip code. calltip_w does not import this but says in its docstring 'after tooltip.py'. Since tooltip is not currently used anywhere in IDLE, I have considered removing it. Issue #33839 and PR7683 instead propose to upgrade tooltip and refactor calltip_w to import and use tooltip. I have held off merging the PR because of tooltips not working on Mac. But I need to do so soon to unblock the issue above and possible other enchancements. Both tooltip and calltip_w have run-when-main test functions that work on Windows (and I presume Linux) but fail on 10.13.6 with 3.7.0. The tooltip test is simpler in that it does not involve any truly IDLE-specific code. The calltip_w test does not involve calltip. Both use IDLE's human-verification test driver that provides a root window with test instructions. In the bash terminal, run python3 -m idlelib.tooltip python3 -m idlelib.calltip_w Kevin, I would be very appreciative if you can suggest a tweak that makes tooltips work everywhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 18:18:46 2018 From: report at bugs.python.org (Bryan Hunt) Date: Tue, 31 Jul 2018 22:18:46 +0000 Subject: [issue28695] Add SSL_CTX_set_client_cert_engine In-Reply-To: <1479207688.81.0.066994858547.issue28695@psf.upfronthosting.co.za> Message-ID: <1533075526.55.0.56676864532.issue28695@psf.upfronthosting.co.za> Change by Bryan Hunt : ---------- nosy: +bryguy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 19:09:47 2018 From: report at bugs.python.org (Ionut Turturica) Date: Tue, 31 Jul 2018 23:09:47 +0000 Subject: [issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILE In-Reply-To: <1532867889.16.0.56676864532.issue34271@psf.upfronthosting.co.za> Message-ID: <1533078587.47.0.56676864532.issue34271@psf.upfronthosting.co.za> Change by Ionut Turturica : ---------- nosy: +jonozzz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 19:18:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 31 Jul 2018 23:18:56 +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: <1533079136.28.0.56676864532.issue34170@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +8101 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 19:21:07 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 31 Jul 2018 23:21:07 +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: <1533079267.27.0.56676864532.issue34120@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As with the tooltip modules (see #34275, msg322824), the dialog modules all have run-when-main test functions. Unittests are also run, before the human-verified test. python3 -m idlelib.searchbases fails in that the driver-box is not activated (lighted) when the searchbase box is closed. Replace 'searchbase' with 'search', 'replace', or 'grep' which text subclasses of Searchbase, and an intermediate lighted window with a Text widget and 2nd button appear. (For the grep test, click the window and maybe type something to put focus on the text.) Click the button to get the dialog. Close it. The text window does not get lighted. It does on Windows. (There are other glitches on Windows that do not appear in IDLE itself). Reproducing the 'wrong' text window being activated will require something new with two Toplevel text windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 19:44:41 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 31 Jul 2018 23:44:41 +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: <1533080681.0.0.56676864532.issue34047@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On 10.13.6 with 3.7.0, 'python3 -m idlelib.configdialog' in bash terminal runs configdialog unittests and brings up a human-verified test (htest) driver box with a ttk scrollbar whose slider does not stick. I has a dead zone beneath or above, but I wonder if this has anything to do with the portion of the file already visible. Kevin, tk_scroll(2).py are failed attempts at simplified reproducers. Now that I have a Mac running, I will try again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 19:53:19 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 31 Jul 2018 23:53:19 +0000 Subject: [issue34301] Add _PyInterpreterState_Get() helper function Message-ID: <1533081199.4.0.56676864532.issue34301@psf.upfronthosting.co.za> New submission from STINNER Victor : Add _PyInterpreterState_Get() helper function: IMHO it's more explicit to call _PyInterpreterState_Get() than having to write PyThreadState_GET()->interp or PyThreadState_Get()->interp. ---------- components: Interpreter Core messages: 322827 nosy: eric.snow, vstinner priority: normal severity: normal status: open title: Add _PyInterpreterState_Get() helper function versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 19:58:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Tue, 31 Jul 2018 23:58:20 +0000 Subject: [issue34301] Add _PyInterpreterState_Get() helper function In-Reply-To: <1533081199.4.0.56676864532.issue34301@psf.upfronthosting.co.za> Message-ID: <1533081500.7.0.56676864532.issue34301@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +8102 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 20:08:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Aug 2018 00:08:59 +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: <1533082139.6.0.56676864532.issue34170@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +8103 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 20:13:07 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Aug 2018 00:13:07 +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: <1533082387.67.0.56676864532.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b75d7e243512afcfb2285e6471262478383e09db by Victor Stinner in branch 'master': bpo-34170: Add _PyCoreConfig._frozen parameter (GH-8591) https://github.com/python/cpython/commit/b75d7e243512afcfb2285e6471262478383e09db ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 20:21:38 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Aug 2018 00:21:38 +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: <1533082898.82.0.56676864532.issue34170@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +8104 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 20:27:36 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Aug 2018 00:27:36 +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: <1533083256.96.0.56676864532.issue34170@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +8105 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 20:44:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Aug 2018 00:44:23 +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: <1533084263.86.0.56676864532.issue33499@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +8106 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 20:57:47 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Aug 2018 00:57:47 +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: <1533085067.68.0.56676864532.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a4d20b2e5ece2120f129cb4dda951a6c2461e92d by Victor Stinner in branch 'master': bpo-34170: Py_Main() updates config when setting Py_InspectFlag (GH-8593) https://github.com/python/cpython/commit/a4d20b2e5ece2120f129cb4dda951a6c2461e92d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 21:07:09 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Aug 2018 01:07:09 +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: <1533085629.32.0.56676864532.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 9851227382431a40a138fdff994278d9e7743c74 by Victor Stinner in branch 'master': bpo-34170: Rename _PyCoreConfig.unbuffered_stdip (GH-8594) https://github.com/python/cpython/commit/9851227382431a40a138fdff994278d9e7743c74 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 21:07:20 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Aug 2018 01:07:20 +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: <1533085640.71.0.56676864532.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset ea68d83933e6de6cabfb115ec1b8888301947369 by Victor Stinner in branch 'master': bpo-34170: _PyCoreConfig_Read() defaults to argc=0 (GH-8595) https://github.com/python/cpython/commit/ea68d83933e6de6cabfb115ec1b8888301947369 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 21:43:43 2018 From: report at bugs.python.org (Seonggi Kim) Date: Wed, 01 Aug 2018 01:43:43 +0000 Subject: [issue34298] Avoid inefficient way to find start point in deque.index In-Reply-To: <1533060260.99.0.56676864532.issue34298@psf.upfronthosting.co.za> Message-ID: <1533087823.01.0.56676864532.issue34298@psf.upfronthosting.co.za> Seonggi Kim added the comment: Base commit : Python 3.8.0a0 (heads/master:b75d7e2435, Aug 1 2018, 10:32:28) $ test.py import timeit queue_setup = ''' from collections import deque q = deque() start = 10**5 stop = start + 500 for i in range(0, stop): q.append(i) ''' code = ''' index = q.index(30, 1, stop) assert index == 30 ''' code2 = ''' index = q.index((start >> 1) + 1, start >> 1, stop >> 1) assert index == (start >> 1) + 1 ''' code3 = ''' index = q.index(start + 1, start, stop) assert index == start + 1 ''' repeat = 100000 print(timeit.timeit(setup = queue_setup, stmt = code, number = repeat * 20)) print(timeit.timeit(setup = queue_setup, stmt = code2, number = repeat)) print(timeit.timeit(setup = queue_setup, stmt = code3, number = repeat)) $ ./python_cur.exe test.py 2.154346022 2.899595406 5.265440983 $ ./python_ksg.exe test.py 2.1457827320000002 0.717190736 1.9934196979999999 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 22:19:56 2018 From: report at bugs.python.org (ppperry) Date: Wed, 01 Aug 2018 02:19:56 +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: <1533089996.3.0.56676864532.issue29502@psf.upfronthosting.co.za> ppperry added the comment: issue30990 is related ---------- nosy: +ppperry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 22:31:05 2018 From: report at bugs.python.org (ksg97031) Date: Wed, 01 Aug 2018 02:31:05 +0000 Subject: [issue34302] Avoid inefficient way to find start point in deque.index Message-ID: <1533090665.19.0.56676864532.issue34302@psf.upfronthosting.co.za> New submission from ksg97031 : Source base : heads/master:b75d7e2435, Aug 1 2018, 10:32:28 $ cat test.py import timeit queue_setup = ''' from collections import deque q = deque() start = 10**5 stop = start + 500 for i in range(0, stop): q.append(i) ''' code = ''' index = q.index(30, 1, stop) assert index == 30 ''' code2 = ''' index = q.index((start >> 1) + 1, start >> 1, stop >> 1) assert index == (start >> 1) + 1 ''' code3 = ''' index = q.index(start + 1, start, stop) assert index == start + 1 ''' repeat = 100000 print(timeit.timeit(setup = queue_setup, stmt = code, number = repeat * 20)) print(timeit.timeit(setup = queue_setup, stmt = code2, number = repeat)) print(timeit.timeit(setup = queue_setup, stmt = code3, number = repeat)) $ ./python_cur.exe test.py 2.154346022 2.899595406 5.265440983 $ ./python_ksg.exe test.py 2.1457827320000002 0.717190736 1.9934196979999999 ---------------------- ---------- components: Library (Lib) messages: 322834 nosy: ksg97031, rhettinger priority: normal severity: normal status: open title: Avoid inefficient way to find start point in deque.index type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 22:31:25 2018 From: report at bugs.python.org (Seonggi Kim) Date: Wed, 01 Aug 2018 02:31:25 +0000 Subject: [issue34298] Avoid inefficient way to find start point in deque.index In-Reply-To: <1533060260.99.0.56676864532.issue34298@psf.upfronthosting.co.za> Message-ID: <1533090685.9.0.56676864532.issue34298@psf.upfronthosting.co.za> Seonggi Kim added the comment: Request PR again : https://bugs.python.org/issue34302 ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 22:58:31 2018 From: report at bugs.python.org (Kevin Walzer) Date: Wed, 01 Aug 2018 02:58: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: <1533092311.86.0.56676864532.issue34275@psf.upfronthosting.co.za> Kevin Walzer added the comment: With the attached patch, the calltip now displays in the test in calltips_w.py on macOS. As I suspected, a judicious call to "update" forces the event loop to cycle on macOS. It should be harmless on other platforms, but if it causes some sort of performance slowdown, it can be wrapped in a call to "tk windowingsystem" eq "aqua" (not sure how to implement that in this module) so it only runs on the Mac. I also removed the platform call to "MacWindowStyle" as it is no longer needed on recent versions of the Mac. ---------- keywords: +patch Added file: https://bugs.python.org/file47725/calltip_w.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 31 23:16:48 2018 From: report at bugs.python.org (Kevin Walzer) Date: Wed, 01 Aug 2018 03:16: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: <1533093408.89.0.56676864532.issue34120@psf.upfronthosting.co.za> Kevin Walzer added the comment: Removing the call "self.grab_set" in configdialog.py (line 87 or so) and help_about.py (line 47 or so) appears to fix the problem with the main window freezing when the modal dialog is destroyed on macOS. "Grab" has never worked properly on Tk on the Mac, but it has additional problems in the Cocoa implementation of Tk; it causes all kinds of problems with the event loop and is best avoided altogether. If the call to grab is crucial on other platforms, it can be wrapped in a call to "tk windowingsystem ne aqua" to exclude the Mac. If other modal dialogs present similar behavior on the Mac, look for calls to grab and try omitting that call. I'll leave it to someone else to propose a thorough patch, but this should point you in the right direction. ---------- _______________________________________ Python tracker _______________________________________