From report at bugs.python.org Mon May 1 01:12:47 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 01 May 2017 05:12:47 +0000 Subject: [issue30206] data parameter for binascii.b2a_base64 is not positional-only In-Reply-To: <1493457721.34.0.92478948675.issue30206@psf.upfronthosting.co.za> Message-ID: <1493615567.89.0.0623156470625.issue30206@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 02:16:33 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 01 May 2017 06:16:33 +0000 Subject: [issue30180] PyArg_ParseTupleAndKeywords supports required keyword only arguments In-Reply-To: <1493254262.66.0.357413160828.issue30180@psf.upfronthosting.co.za> Message-ID: <1493619393.37.0.0417624421934.issue30180@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 03:23:05 2017 From: report at bugs.python.org (Ben Finney) Date: Mon, 01 May 2017 07:23:05 +0000 Subject: [issue30181] Correct the parsing of a test case docstring. In-Reply-To: <1493261074.73.0.807341942876.issue30181@psf.upfronthosting.co.za> Message-ID: Ben Finney added the comment: Howdy R. David, Okay, I have put together a series of commits to address this bug. The changes are in my personal fork of the ?cpython? repository, so this is a pull request from ?wip/issue/issue30181_parse-docstring-using-pydoc? in that repository. The following changes since commit 8550803dfba4cf7018ee7415593ceb34c52923e6: Backed out changeset f23fa1f7b68f (2017-02-10 14:19:36 +0100) are available in the git repository at: https://benf_wspdigital at bitbucket.org/benf_wspdigital/cpython.git for you to fetch changes up to c2de731582a9da1147a300a991890ff663891e75: Parse the test case docstring using `pydoc.splitdoc`. (2017-05-01 16:55:52 +1000) ---------------------------------------------------------------- (from the branch description for wip/issue/issue30181_parse-docstring-using-pydoc local branch) Correct the parsing of a test case docstring. ---------------------------------------------------------------- Ben Finney (4): Add test cases for single-line test case docstring. Add test cases for stripping surrounding space for shortDescription. Add test cases for test case docstring with surrounding newlines. Parse the test case docstring using `pydoc.splitdoc`. Lib/unittest/case.py | 34 ++++++++++++------ Lib/unittest/test/test_case.py | 42 ++++++++++++++++++++++ Lib/unittest/test/test_functiontestcase.py | 58 +++++++++++++++++++++++++----- 3 files changed, 115 insertions(+), 19 deletions(-) ---------- title: Incorrect parsing of test case docstring -> Correct the parsing of a test case docstring. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 03:45:27 2017 From: report at bugs.python.org (Louie Lu) Date: Mon, 01 May 2017 07:45:27 +0000 Subject: [issue30181] Correct the parsing of a test case docstring. In-Reply-To: <1493261074.73.0.807341942876.issue30181@psf.upfronthosting.co.za> Message-ID: <1493624727.4.0.957097804217.issue30181@psf.upfronthosting.co.za> Louie Lu added the comment: Ben, the process of submitting PR was migrated to GitHub, you will need to use a GitHub account to do it. You can refer to devguide for how to submit a PR here: http://cpython-devguide.readthedocs.io/pullrequest.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 03:54:20 2017 From: report at bugs.python.org (Ben Finney) Date: Mon, 01 May 2017 07:54:20 +0000 Subject: [issue30181] Correct the parsing of a test case docstring. In-Reply-To: <1493261074.73.0.807341942876.issue30181@psf.upfronthosting.co.za> Message-ID: <1493625260.2.0.948083780201.issue30181@psf.upfronthosting.co.za> Ben Finney added the comment: On 2017-05-01 17:45, Louie Lu wrote: > Ben, the process of submitting PR was migrated to GitHub Thank you. I'll re-base my branch onto the master branch found at the GitHub repository. > you will need to use a GitHub account to do it I don't maintain repositories at GitHub. Does that mean the contribution must be rejected? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 04:42:26 2017 From: report at bugs.python.org (Louie Lu) Date: Mon, 01 May 2017 08:42:26 +0000 Subject: [issue30181] Correct the parsing of a test case docstring. In-Reply-To: <1493261074.73.0.807341942876.issue30181@psf.upfronthosting.co.za> Message-ID: <1493628146.24.0.373759089033.issue30181@psf.upfronthosting.co.za> Louie Lu added the comment: > Thank you. I'll re-base my branch onto the master branch found at the GitHub repository. You may re-clone a GitHub repository instead of rebase bitbucket repo. > I don't maintain repositories at GitHub. Does that mean the contribution must be rejected? No, your contribution will not be rejected by "you don't maintain the repo on GitHub", everyone can send the patch (PR) to python/cpython. you will need to fork python/cpython from GitHub first, this will create a fork in your GitHub account, maybe benf/cpython if your GitHub account is benf, and then clone this repo (benf/cpython), the rest step please see the instruction in devguide ! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 04:42:46 2017 From: report at bugs.python.org (Frank Pae) Date: Mon, 01 May 2017 08:42:46 +0000 Subject: [issue30200] tkinter ListboxSelect In-Reply-To: <1493394127.57.0.90610531486.issue30200@psf.upfronthosting.co.za> Message-ID: <1493628166.09.0.946987812942.issue30200@psf.upfronthosting.co.za> Frank Pae added the comment: Here some detailed information about Tcl / Tk versions: platform Windows-10-10.0.14393 AMD64 python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit (AMD64)] tkinter Tcl/Tk 8.6.6 / 8.6.6 python 3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 16:02:32) [MSC v.1900 64 bit (AMD64)] tkinter Tcl/Tk 8.6.4 / 8.6.4 python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] tkinter Tcl/Tk 8.5.15 / 8.5.15 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 04:44:48 2017 From: report at bugs.python.org (Louie Lu) Date: Mon, 01 May 2017 08:44:48 +0000 Subject: [issue30181] Correct the parsing of a test case docstring. In-Reply-To: <1493261074.73.0.807341942876.issue30181@psf.upfronthosting.co.za> Message-ID: <1493628288.58.0.523516468578.issue30181@psf.upfronthosting.co.za> Louie Lu added the comment: Ben, if you have any problem about how to get on with GitHub, I can help you at #python-dev @ freenode, ping louielu on the chatroom. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 04:51:37 2017 From: report at bugs.python.org (Louie Lu) Date: Mon, 01 May 2017 08:51:37 +0000 Subject: [issue24119] Carry comments with the AST In-Reply-To: <1430666470.75.0.339272692521.issue24119@psf.upfronthosting.co.za> Message-ID: <1493628697.68.0.913143997902.issue24119@psf.upfronthosting.co.za> Louie Lu added the comment: Brett, which implement method will you prefer? If we want to carry comment at builtin_compile_impl, it will need to change the grammar since tokenize just drop the comment when dealing with source code. But if just using regex, will it be more easy with just combine the exists tokenize and ast module? ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 06:04:21 2017 From: report at bugs.python.org (Louie Lu) Date: Mon, 01 May 2017 10:04:21 +0000 Subject: [issue15987] Provide a way to compare AST nodes for equality recursively In-Reply-To: <1348166637.22.0.281544835659.issue15987@psf.upfronthosting.co.za> Message-ID: <1493633061.9.0.708390800703.issue15987@psf.upfronthosting.co.za> Louie Lu added the comment: If we only need a binary True/False result, could we just return a compare of dump(a) == dump(b)? This can also add the include_attributes flags for need. ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 07:52:51 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 01 May 2017 11:52:51 +0000 Subject: [issue26362] Approved API for creating a temporary file path In-Reply-To: <1455502271.6.0.558905453707.issue26362@psf.upfronthosting.co.za> Message-ID: <1493639571.02.0.35669809468.issue26362@psf.upfronthosting.co.za> R. David Murray added the comment: You are depending on a non-portable feature of os.rename there, so I'm not convinced this makes a good use case for the Python stdlib. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 08:27:48 2017 From: report at bugs.python.org (Ben Finney) Date: Mon, 01 May 2017 12:27:48 +0000 Subject: [issue26362] Approved API for creating a temporary file path In-Reply-To: <1493639571.02.0.35669809468.issue26362@psf.upfronthosting.co.za> Message-ID: <20170501122254.gmy32thff4yqn2ad@benfinney.id.au> Ben Finney added the comment: On 01-May-2017, R. David Murray wrote: > You are depending on a non-portable feature of os.rename there What's the non-portable dependency? If you mean the expectation that ?os.rename? will be atomic on success: the documentation promises ?If successful, the renaming will be an atomic operation?, without any non-compatibility caveat . If you mean the ?except OSError? clause: that's not a dependency of this example. It is handling a case that is documented to occur on some platforms. On platforms that don't have that behaviour, the clause is not a dependency of this use case. Neither of those is germane to the use case being demonstrated: the need for a temporary filesystem path as generated by ?tempfile.mktemp?. > so I'm not convinced this makes a good use case for the Python > stdlib. Note that Tim Chase is *not* presenting a use case for ?os.rename?, but rather a use case for ?tempfile.mktemp?. For that purpose it seems a valid use case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 08:34:17 2017 From: report at bugs.python.org (desbma) Date: Mon, 01 May 2017 12:34:17 +0000 Subject: [issue30219] webbrowser.open outputs xdg-open deprecation warning Message-ID: <1493642057.46.0.399695458413.issue30219@psf.upfronthosting.co.za> New submission from desbma: Python 3.6.1 (default, Mar 27 2017, 00:27:06) [GCC 6.3.1 20170306] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import webbrowser >>> webbrowser.open("https://www.google.com") True >>> This tool has been deprecated, use 'gio open' instead. See 'gio help open' for more info. A quick test reveals it is the invocation of xdg-open that outputs the warning: $ xdg-open --version xdg-open 1.1.0 rc3 $ xdg-open https://www.google.com This tool has been deprecated, use 'gio open' instead. See 'gio help open' for more info. It can be quite annoying because in my program the message is outputted in a ncurses UI and it messes the display. Possible changes to fix this: * Silence xdg-open output (pass stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL in Popen call) * Detect and use "gio open" if available ---------- components: Library (Lib) messages: 292659 nosy: desbma priority: normal severity: normal status: open title: webbrowser.open outputs xdg-open deprecation warning versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 08:36:54 2017 From: report at bugs.python.org (desbma) Date: Mon, 01 May 2017 12:36:54 +0000 Subject: [issue30219] webbrowser.open outputs xdg-open deprecation warning In-Reply-To: <1493642057.46.0.399695458413.issue30219@psf.upfronthosting.co.za> Message-ID: <1493642214.42.0.844914940012.issue30219@psf.upfronthosting.co.za> Changes by desbma : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 08:48:15 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 01 May 2017 12:48:15 +0000 Subject: [issue26362] Approved API for creating a temporary file path In-Reply-To: <1455502271.6.0.558905453707.issue26362@psf.upfronthosting.co.za> Message-ID: <1493642895.64.0.160743118868.issue26362@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, and I'm saying his example doesn't work on Windows (on windows, it does not accomplish his goal). So I'm not sure it is a use case appropriate for the standard library. I'm not saying it definitely isn't, I'm just raising a doubt. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 09:16:27 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 01 May 2017 13:16:27 +0000 Subject: [issue24119] Carry comments with the AST In-Reply-To: <1430666470.75.0.339272692521.issue24119@psf.upfronthosting.co.za> Message-ID: <1493644587.59.0.999557226983.issue24119@psf.upfronthosting.co.za> Raymond Hettinger added the comment: After PEP 526, the need for this proposal may have evaporated. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 09:22:17 2017 From: report at bugs.python.org (Eryk Sun) Date: Mon, 01 May 2017 13:22:17 +0000 Subject: [issue26362] Approved API for creating a temporary file path In-Reply-To: <1455502271.6.0.558905453707.issue26362@psf.upfronthosting.co.za> Message-ID: <1493644937.98.0.783337555107.issue26362@psf.upfronthosting.co.za> Eryk Sun added the comment: For Windows, use os.replace instead of os.rename, which will replace the destination file if it exists. However, a request to replace an existing file will be denied access if the file is currently open. Unlinking an open file isn't allowed, even if it's open with delete sharing. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 09:34:12 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 01 May 2017 13:34:12 +0000 Subject: [issue22385] Define a binary output formatting mini-language for *.hex() In-Reply-To: <1410393301.25.0.193851592698.issue22385@psf.upfronthosting.co.za> Message-ID: <1493645652.6.0.624023689206.issue22385@psf.upfronthosting.co.za> Nick Coghlan added the comment: Copying the amended proposal from that python-ideas thread into here: Start with a leading base format character (chosen to be orthogonal to the default format characters): "h": lowercase hex "H": uppercase hex "A": ASCII (using "." for unprintable & extended ASCII) format(b"xyz", "A") -> 'xyz' format(b"xyz", "h") -> '78797a' format(b"xyz", "H") -> '78797A' Followed by a separator and "chunk size": format(b"xyz", "h 1") -> '78 79 7a' format(b"abcdwxyz", "h 4") -> '61626364 7778797a' format(b"xyz", "h,1") -> '78,79,7a' format(b"abcdwxyz", "h,4") -> '61626364,7778797a' format(b"xyz", "h:1") -> '78:79:7a' format(b"abcdwxyz", "h:4") -> '61626364:7778797a' In the "h" and "H" cases, allow requesting a preceding "0x" on the chunks: format(b"xyz", "h#") -> '0x78797a' format(b"xyz", "h# 1") -> '0x78 0x79 0x7a' format(b"abcdwxyz", "h# 4") -> '0x61626364 0x7778797a' In the thread, I suggested the section before the format character would use the standard string formatting rules (alignment, fill character, width, precision), but I now think that would be ambiguous and confusing, and would be better left as a post-processing step on the rendered text. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 10:28:27 2017 From: report at bugs.python.org (Zachary Ware) Date: Mon, 01 May 2017 14:28:27 +0000 Subject: [issue30207] Rename test.test_support to test.support in 2.7 In-Reply-To: <1493463126.66.0.743875413442.issue30207@psf.upfronthosting.co.za> Message-ID: <1493648907.08.0.823835290956.issue30207@psf.upfronthosting.co.za> Zachary Ware added the comment: I like this change, but the install target in Makefile.pre.in needs to be adjusted accordingly: http://buildbot.python.org/all/builders/x86%20Gentoo%20Installed%20with%20X%202.7/builds/120 ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 10:35:40 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 01 May 2017 14:35:40 +0000 Subject: [issue30219] webbrowser.open outputs xdg-open deprecation warning In-Reply-To: <1493642057.46.0.399695458413.issue30219@psf.upfronthosting.co.za> Message-ID: <1493649340.52.0.383084261796.issue30219@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 10:47:38 2017 From: report at bugs.python.org (Louie Lu) Date: Mon, 01 May 2017 14:47:38 +0000 Subject: [issue15987] Provide a way to compare AST nodes for equality recursively In-Reply-To: <1348166637.22.0.281544835659.issue15987@psf.upfronthosting.co.za> Message-ID: <1493650058.94.0.839036350651.issue15987@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +1477 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 10:50:15 2017 From: report at bugs.python.org (Louie Lu) Date: Mon, 01 May 2017 14:50:15 +0000 Subject: [issue15987] Provide a way to compare AST nodes for equality recursively In-Reply-To: <1348166637.22.0.281544835659.issue15987@psf.upfronthosting.co.za> Message-ID: <1493650215.09.0.00342972824863.issue15987@psf.upfronthosting.co.za> Louie Lu added the comment: Provide a recursive way to compare AST nodes, it will compare with fields, but no attributes. The performance compare with ast.dump methods in unittest # Recursive compare ./python -m unittest test.test_ast.ASTCompareTest ...... ---------------------------------------------------------------------- Ran 6 tests in 0.669s OK # ast.dump compare ./python -m unittest test.test_ast.ASTCompareTest ...... ---------------------------------------------------------------------- Ran 6 tests in 2.192s ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 11:38:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 May 2017 15:38:07 +0000 Subject: [issue30219] webbrowser.open outputs xdg-open deprecation warning In-Reply-To: <1493642057.46.0.399695458413.issue30219@psf.upfronthosting.co.za> Message-ID: <1493653087.12.0.940357309281.issue30219@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Seems it outputs the warning only on Gnome. Actually, xdg-open tries to run gvfs-open if it is installed and it is the tool now depreciated. This issue is fixed in mainstream. [1] [1] https://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=0d6eebb27c562e8644ccf616ebdbddf82d0d2dd8 ---------- resolution: -> third party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 11:39:14 2017 From: report at bugs.python.org (Mike) Date: Mon, 01 May 2017 15:39:14 +0000 Subject: [issue30160] BaseHTTPRequestHandler.wfile: supported usage unclear In-Reply-To: <1493131484.95.0.842958745675.issue30160@psf.upfronthosting.co.za> Message-ID: <1493653154.07.0.590715747743.issue30160@psf.upfronthosting.co.za> Mike added the comment: My CLA signature has been verified, but based on the most recent comments, I'm not sure if something needs to change in this patch. Is there anything I can doto help this land? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 12:18:58 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 01 May 2017 16:18:58 +0000 Subject: [issue30190] unittest's assertAlmostEqual improved error message In-Reply-To: <1493323962.23.0.575947649634.issue30190@psf.upfronthosting.co.za> Message-ID: <1493655538.66.0.384617066737.issue30190@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: New changeset 5d7a8d0c13737fd531b722ad76c505ef47aac96a by Giampaolo Rodola in branch 'master': bpo-30190: improved error msg for assertAlmostEqual(delta=...) (#1331) https://github.com/python/cpython/commit/5d7a8d0c13737fd531b722ad76c505ef47aac96a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 12:19:51 2017 From: report at bugs.python.org (Pedro) Date: Mon, 01 May 2017 16:19:51 +0000 Subject: [issue30220] Why are the custom messages for ValueError and TypeError suppressed in argparse? Message-ID: <1493655591.13.0.717623445702.issue30220@psf.upfronthosting.co.za> New submission from Pedro: ArgumentParser._get_value() has two exception handlers: one for ArgumentTypeError, and one for (TypeError, ValueError). But in the latter case, any custom message I include the TypeError or ValueError is ignored and replaced with a generic "invalid value" message. I don't see why the module wouldn't first check for a custom message in a TypeError or ValueError exception, as it does for ArgumentTypeError, and only use the generic message if a custom one is not specified. The current behavior does not let you to give the user a detailed reason for the exception unless you raise ArgumentTypeError, which is considered an implementation detail as mentioned in #20039, and also doesn't feel right for errors that are not related to the argument's type. Code to reproduce: import argparse def nonnegative_not_suppressed(arg): try: x = int(arg) if x >= 0: return x else: raise argparse.ArgumentTypeError('Enter a nonnegative integer') except: raise argparse.ArgumentTypeError('Enter a nonnegative integer') def nonnegative_suppressed(arg): try: x = int(arg) if x >= 0: return x else: raise ValueError('Enter a nonnegative integer') except: raise ValueError('Enter a nonnegative integer') p = argparse.ArgumentParser('parser') p.add_argument('--no-suppress', type=nonnegative_not_suppressed) p.add_argument('--suppress', type=nonnegative_suppressed) p.parse_args(['--no-suppress', '-4']) # Displays "Enter a nonnegative integer" p.parse_args(['--suppress', '-4']) # Displays "invalid nonnegative_suppressed value: '-4'" ---------- components: Extension Modules messages: 292669 nosy: pgacv2 priority: normal severity: normal status: open title: Why are the custom messages for ValueError and TypeError suppressed in argparse? type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 12:20:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 May 2017 16:20:22 +0000 Subject: [issue30207] Rename test.test_support to test.support in 2.7 In-Reply-To: <1493463126.66.0.743875413442.issue30207@psf.upfronthosting.co.za> Message-ID: <1493655622.07.0.456105053962.issue30207@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1478 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 12:20:56 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 May 2017 16:20:56 +0000 Subject: [issue30207] Rename test.test_support to test.support in 2.7 In-Reply-To: <1493463126.66.0.743875413442.issue30207@psf.upfronthosting.co.za> Message-ID: <1493655656.33.0.900673384552.issue30207@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: fixed -> stage: resolved -> patch review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 12:21:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 May 2017 16:21:48 +0000 Subject: [issue30207] Rename test.test_support to test.support in 2.7 In-Reply-To: <1493463126.66.0.743875413442.issue30207@psf.upfronthosting.co.za> Message-ID: <1493655708.17.0.51411511134.issue30207@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for noticing this Zachary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 12:27:11 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 01 May 2017 16:27:11 +0000 Subject: [issue22385] Define a binary output formatting mini-language for *.hex() In-Reply-To: <1410393301.25.0.193851592698.issue22385@psf.upfronthosting.co.za> Message-ID: <1493656031.25.0.635835408601.issue22385@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Based on the ideas thread it isn't obvious that chunk size means "per byte". I suggest either specifying the number of base digits per delimiter. Or using a name other than chunk that indicates it means bytes. If we're going to do this, it should also be done for octal formatting (the 'o' code) for consistency. Also, per the python-ideas thread, via parameters to the .hex() method on bytes/bytearray/memoryview. I'm inclined to leave 'A' printable-ascii formatting out. Or at least consider that it could also work on unicode str. ---------- nosy: +gregory.p.smith versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 12:27:31 2017 From: report at bugs.python.org (Jelmer Vernooij) Date: Mon, 01 May 2017 16:27:31 +0000 Subject: [issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows In-Reply-To: <1295450896.02.0.86964827296.issue10945@psf.upfronthosting.co.za> Message-ID: <1493656051.24.0.595865206732.issue10945@psf.upfronthosting.co.za> Changes by Jelmer Vernooij : ---------- nosy: +Jelmer Vernooij, jelmer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 12:30:08 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 01 May 2017 16:30:08 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1493656208.13.0.451718394344.issue28315@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Jaysinh, are you up for preparing a PR based on you patch? Start with the master branch. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 12:49:09 2017 From: report at bugs.python.org (Pedro) Date: Mon, 01 May 2017 16:49:09 +0000 Subject: [issue30220] Why are the custom messages for ValueError and TypeError suppressed in argparse? In-Reply-To: <1493655591.13.0.717623445702.issue30220@psf.upfronthosting.co.za> Message-ID: <1493657349.04.0.0936500812344.issue30220@psf.upfronthosting.co.za> Pedro added the comment: You can get around the message suppression by raising anything that isn't a ValueError, TypeError, or subclass thereof. It will propagate up past _get_value(). I still don't see the reason for giving special treatment to ValueError and TypeError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 12:53:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 May 2017 16:53:21 +0000 Subject: [issue30221] Deprecate assertNotAlmostEqual Message-ID: <1493657601.18.0.125992832346.issue30221@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The purpose of the assertNotAlmostEqual() method of TestCase is not clear. This method is never used in the CPython testsuite (except tests for it itself), it is never mentioned in the bug tracker (except one general issue about mass renaming methods in TestCase). I have found only one usage of assertNotAlmostEqual() which is not testing its itself on GitHub [1], and in that case it would be better to use assertAlmostEqual() with correct expected result instead. It seems to me that assertNotAlmostEqual() was added just "for symmetry", and there are no real cases for it. Deprecating and following removing it will make the API simpler. [1] https://github.com/BrechtDeVlieger/Altran_courses/blob/d983b30b4dc1eac6905a71209037ed082330f7fe/Python%20fundamentals/Day1/Functions/test_temperature_ori.py ---------- components: Library (Lib) messages: 292674 nosy: ezio.melotti, michael.foord, rbcollins, serhiy.storchaka priority: normal severity: normal status: open title: Deprecate assertNotAlmostEqual type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 12:53:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 May 2017 16:53:47 +0000 Subject: [issue30207] Rename test.test_support to test.support in 2.7 In-Reply-To: <1493463126.66.0.743875413442.issue30207@psf.upfronthosting.co.za> Message-ID: <1493657627.99.0.0767545307574.issue30207@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 6bed8f95d72f622cb916bcebad651ccd3de6fe9d by Serhiy Storchaka in branch '2.7': bpo-30207: Install the Lib/test/support directory. (#1369) https://github.com/python/cpython/commit/6bed8f95d72f622cb916bcebad651ccd3de6fe9d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 13:06:29 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 01 May 2017 17:06:29 +0000 Subject: [issue30145] Create a How to or Tutorial documentation for asyncio In-Reply-To: <1492960602.26.0.461554169011.issue30145@psf.upfronthosting.co.za> Message-ID: <1493658389.88.0.459891698789.issue30145@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Sounds great! Thanks, Yury! Victor, do you think it's worth including a link to http://asyncio.readthedocs.io/en/latest/ somewhere in the docs, if we haven't already? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 13:21:01 2017 From: report at bugs.python.org (ecbftw) Date: Mon, 01 May 2017 17:21:01 +0000 Subject: [issue29606] urllib FTP protocol stream injection In-Reply-To: <1487609342.46.0.653185585548.issue29606@psf.upfronthosting.co.za> Message-ID: <1493659261.68.0.87400102508.issue29606@psf.upfronthosting.co.za> ecbftw added the comment: It was just pointed out by @giampaolo in (https://github.com/python/cpython/pull/1214) that an escaping mechanism does actually exist for FTP, as defined in RFC-2640. The relevant passage is as follows: When a character is encountered as part of a pathname it MUST be padded with a character prior to sending the command. On receipt of a pathname containing a sequence the character MUST be stripped away. This approach is described in the Telnet protocol [RFC854] on pages 11 and 12. For example, to store a pathname fooboo.bar the pathname would become fooboo.bar prior to sending the command STOR fooboo.bar. Upon receipt of the altered pathname the character following the would be stripped away to form the original pathname. It isn't clear how good FTP server support for this is, or if firewalls recognize this escaping as well. In the case of firewalls, one could argue that if they don't account for it, the vulnerability lies in them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 13:25:05 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 01 May 2017 17:25:05 +0000 Subject: [issue30208] Small typos in IDLE doc In-Reply-To: <1493473358.59.0.135881718149.issue30208@psf.upfronthosting.co.za> Message-ID: <1493659505.42.0.433733083562.issue30208@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: One PR per branch is correct. For future reference, preferably the commit hash to be cherry-picked is the one that is merged into CPython's master branch. It can be found at the original PR where it says merged commit into python:master. For PR 1353, it is 9dc2b38. For this issue, it doesn't make much difference since the PR contains only one commit. For PRs that contain multiple commits, it makes more sense to cherry-pick the squashed commit to master :) Thanks :) ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 13:26:52 2017 From: report at bugs.python.org (Michael Foord) Date: Mon, 01 May 2017 17:26:52 +0000 Subject: [issue30221] Deprecate assertNotAlmostEqual In-Reply-To: <1493657601.18.0.125992832346.issue30221@psf.upfronthosting.co.za> Message-ID: <1493659612.8.0.266814298435.issue30221@psf.upfronthosting.co.za> Michael Foord added the comment: I agree it's not *very* useful, but I don't see any benefit in getting rid of it either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 13:28:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 May 2017 17:28:34 +0000 Subject: [issue30207] Rename test.test_support to test.support in 2.7 In-Reply-To: <1493463126.66.0.743875413442.issue30207@psf.upfronthosting.co.za> Message-ID: <1493659714.28.0.0363669236569.issue30207@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 13:39:00 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 May 2017 17:39:00 +0000 Subject: [issue30221] Deprecate assertNotAlmostEqual In-Reply-To: <1493657601.18.0.125992832346.issue30221@psf.upfronthosting.co.za> Message-ID: <1493660340.34.0.488370805278.issue30221@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Agreed with Michael. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 13:49:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 May 2017 17:49:28 +0000 Subject: [issue30221] Deprecate assertNotAlmostEqual In-Reply-To: <1493657601.18.0.125992832346.issue30221@psf.upfronthosting.co.za> Message-ID: <1493660968.68.0.337870939231.issue30221@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This will save time and memory of unittest users for reading the documentation, remembering it and trying to understand in which cases assertNotAlmostEqual() can be used. This will prevent them from using unsuitable method. I found only one case of using assertNotAlmostEqual() in the wild, and it doesn't look a proper use. Do you have any cases in which it is useful? Recently I did have a discussion with Giampaolo about changes to assertAlmostEqual() and assertNotAlmostEqual() [1]. If assertNotAlmostEqual() didn't exist this discussion would even not started. So this would save my and Giampaolo's time. [1] https://github.com/python/cpython/pull/1331 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 13:50:33 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 01 May 2017 17:50:33 +0000 Subject: [issue24119] Carry comments with the AST In-Reply-To: <1430666470.75.0.339272692521.issue24119@psf.upfronthosting.co.za> Message-ID: <1493661033.21.0.637314181964.issue24119@psf.upfronthosting.co.za> Brett Cannon added the comment: There's potentially some usefulness from other tools, but Raymond is right that the main motivation is definitely gone long-term. Dropping this down to "low" priority simply because others have asked for this kind of support before. ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 13:57:59 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 May 2017 17:57:59 +0000 Subject: [issue24119] Carry comments with the AST In-Reply-To: <1430666470.75.0.339272692521.issue24119@psf.upfronthosting.co.za> Message-ID: <1493661479.85.0.524638793042.issue24119@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Where would comment be attached in the following case? a = ('start' # comment 1 'continuation') # comment 2 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 13:58:11 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 01 May 2017 17:58:11 +0000 Subject: [issue30214] make_zip.py lacks command a few line options and has a bug. In-Reply-To: <1493526948.12.0.00156119032978.issue30214@psf.upfronthosting.co.za> Message-ID: <1493661491.79.0.404427845105.issue30214@psf.upfronthosting.co.za> Brett Cannon added the comment: Can you separate out the bug report from the feature request as two separate issues? You can keep one here and rename the title if you want. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 13:58:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 May 2017 17:58:45 +0000 Subject: [issue30145] Create a How to or Tutorial documentation for asyncio In-Reply-To: <1493658389.88.0.459891698789.issue30145@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Le 1 mai 2017 19:06, "Mariatta Wijaya" a ?crit : Mariatta Wijaya added the comment: Sounds great! Thanks, Yury! Victor, do you think it's worth including a link to http://asyncio.readthedocs.io/en/latest/ somewhere in the docs, if we haven't already? Yes! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 14:03:20 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 May 2017 18:03:20 +0000 Subject: [issue30221] Deprecate assertNotAlmostEqual In-Reply-To: <1493657601.18.0.125992832346.issue30221@psf.upfronthosting.co.za> Message-ID: <1493661800.81.0.281519033227.issue30221@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Any peculiarity that applies to assertNotAlmostEqual also applies to assertAlmostEqual, so I'm not sure how removing one but keeping the other would simplify anything. Furthermore, such symmetry between positive and negative asserts is widespread in the unittest API, so this dual API is quite expected and nothing to be surprised about. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 14:11:05 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 01 May 2017 18:11:05 +0000 Subject: [issue30221] Deprecate assertNotAlmostEqual In-Reply-To: <1493657601.18.0.125992832346.issue30221@psf.upfronthosting.co.za> Message-ID: <1493662265.55.0.37839823401.issue30221@psf.upfronthosting.co.za> R. David Murray added the comment: Not only is not something to be surprised about, it would be surprising for it to be absent. So the user cognitive overhead of removing it is quite possibly higher than that of it being there. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 14:13:15 2017 From: report at bugs.python.org (Clay Gerrard) Date: Mon, 01 May 2017 18:13:15 +0000 Subject: [issue21790] Change blocksize in http.client to the value of resource.getpagesize In-Reply-To: <1403019624.98.0.809499942301.issue21790@psf.upfronthosting.co.za> Message-ID: <1493662395.18.0.300511735362.issue21790@psf.upfronthosting.co.za> Clay Gerrard added the comment: I don't think the default is bad/wrong so much as it's an inflexible magic number. I think blocksize should be parameterized as an attribute on the connection - or at least a class attribute or module level constant so we can monkey patch it without having to create a subclass and redefine the *entire* send method (!?). Not having a good string to pull at here is causing a non-trivial amount of pain: https://github.com/sigmavirus24/requests-toolbelt/pull/84/files https://github.com/sigmavirus24/requests-toolbelt/issues/75 https://webcache.googleusercontent.com/search?q=cache:WPSngjyUzg4J:https://technology.jana.com/2015/12/30/dont-use-python-httplib-or-any-library-that-uses-it-to-transfer-large-files-especially-to-china/+&cd=5&hl=en&ct=clnk&gl=us https://bugs.launchpad.net/python-swiftclient/+bug/1671621 ---------- nosy: +Clay Gerrard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 14:18:22 2017 From: report at bugs.python.org (Stefan Krah) Date: Mon, 01 May 2017 18:18:22 +0000 Subject: [issue30221] Deprecate assertNotAlmostEqual In-Reply-To: <1493657601.18.0.125992832346.issue30221@psf.upfronthosting.co.za> Message-ID: <1493662702.0.0.366320608634.issue30221@psf.upfronthosting.co.za> Stefan Krah added the comment: There are 100 results in Google books alone. Are the books wrong (honest question, I did not check)? They will be wrong if we remove it. ;) I agree with Michael that assertNotAlmostEqual() doesn't hurt. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 14:45:38 2017 From: report at bugs.python.org (Tim Chase) Date: Mon, 01 May 2017 18:45:38 +0000 Subject: [issue26362] Approved API for creating a temporary file path In-Reply-To: <1455502271.6.0.558905453707.issue26362@psf.upfronthosting.co.za> Message-ID: <1493664338.42.0.305322811489.issue26362@psf.upfronthosting.co.za> Tim Chase added the comment: I do have a workaround thanks to Gregory Ewing https://mail.python.org/pipermail/python-list/2017-May/721649.html which suffices for my particular use-case (generating a link to a file with a unique filename). As my use-case is predominantly for *nix environments, the lack of Windows' os.rename() atomicity is merely a would-be-nice-for-other-people-if-it-was-available. But I'll update my documentation to reflect the edge-case. Thanks, Eryk. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 14:51:57 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 May 2017 18:51:57 +0000 Subject: [issue30221] Deprecate assertNotAlmostEqual In-Reply-To: <1493657601.18.0.125992832346.issue30221@psf.upfronthosting.co.za> Message-ID: <1493664717.43.0.403910744508.issue30221@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Any peculiarity that applies to assertNotAlmostEqual also applies to assertAlmostEqual, so I'm not sure how removing one but keeping the other would simplify anything. There are use cases for assertAlmostEqual(). You can find examples in the CPython tests and in other open sources. Do you have use cases for assertNotAlmostEqual()? > Furthermore, such symmetry between positive and negative asserts is widespread in the unittest API, so this dual API is quite expected and nothing to be surprised about. This symmetry is not absolute. There are no asserts opposite to assertRaises(), assertWarns(), assertLogs() and assertCountEqual(), assertMultiLineEqual(), assertSequenceEqual(), etc. Some asserts are not symmetric by its nature. assertNotRaises() would be useless. > There are 100 results in Google books alone. Are the books wrong (honest question, I did not check)? Do these books have any use cases for assertNotAlmostEqual() or just enumerate the list of TestCase methods? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 14:52:29 2017 From: report at bugs.python.org (Decorater) Date: Mon, 01 May 2017 18:52:29 +0000 Subject: [issue30214] make_zip.py lacks command a few line options. In-Reply-To: <1493526948.12.0.00156119032978.issue30214@psf.upfronthosting.co.za> Message-ID: <1493664749.1.0.743172372204.issue30214@psf.upfronthosting.co.za> Changes by Decorater : ---------- title: make_zip.py lacks command a few line options and has a bug. -> make_zip.py lacks command a few line options. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 14:52:48 2017 From: report at bugs.python.org (Decorater) Date: Mon, 01 May 2017 18:52:48 +0000 Subject: [issue30214] make_zip.py lacks command a few line options. In-Reply-To: <1493526948.12.0.00156119032978.issue30214@psf.upfronthosting.co.za> Message-ID: <1493664768.15.0.870028336649.issue30214@psf.upfronthosting.co.za> Decorater added the comment: Alright renamed it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 14:55:53 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 01 May 2017 18:55:53 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1493664953.15.0.167388937443.issue30119@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: The relevant discussion of this bug is happening in https://github.com/python/cpython/pull/1214. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 14:59:18 2017 From: report at bugs.python.org (Decorater) Date: Mon, 01 May 2017 18:59:18 +0000 Subject: [issue30222] make_zip.py had a bug when setting up full 64 bit distribution. Message-ID: <1493665158.27.0.48978585861.issue30222@psf.upfronthosting.co.za> New submission from Decorater: Basically running make_zip like this: ".\PCbuild\amd64\python.exe" ".\Tools\msi\make_zip.py" -a x64 -o ".\python36-x86-x64" Cuases make_zip mess up where none of the libs\*.lib, nor any of the assemblies are copied. And is reproducible on me. However doing something like this on the 32 bit version of python does not get this issue. ---------- components: Demos and Tools, Windows messages: 292694 nosy: Decorater, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: make_zip.py had a bug when setting up full 64 bit distribution. versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 15:00:07 2017 From: report at bugs.python.org (Stefan Krah) Date: Mon, 01 May 2017 19:00:07 +0000 Subject: [issue30221] Deprecate assertNotAlmostEqual In-Reply-To: <1493657601.18.0.125992832346.issue30221@psf.upfronthosting.co.za> Message-ID: <1493665207.09.0.388781872209.issue30221@psf.upfronthosting.co.za> Stefan Krah added the comment: > Do these books have any use cases for assertNotAlmostEqual() or just enumerate the list of TestCase methods? I think this should be researched by the proponent of the change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 15:00:24 2017 From: report at bugs.python.org (Decorater) Date: Mon, 01 May 2017 19:00:24 +0000 Subject: [issue30214] make_zip.py lacks command a few line options. In-Reply-To: <1493526948.12.0.00156119032978.issue30214@psf.upfronthosting.co.za> Message-ID: <1493665224.88.0.179769818187.issue30214@psf.upfronthosting.co.za> Decorater added the comment: Alright moved the bug part to http://bugs.python.org/issue30222. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 15:00:37 2017 From: report at bugs.python.org (Stefan Krah) Date: Mon, 01 May 2017 19:00:37 +0000 Subject: [issue30221] Deprecate assertNotAlmostEqual In-Reply-To: <1493657601.18.0.125992832346.issue30221@psf.upfronthosting.co.za> Message-ID: <1493665237.32.0.529579912393.issue30221@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- nosy: -skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 15:00:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 May 2017 19:00:55 +0000 Subject: [issue26362] Approved API for creating a temporary file path In-Reply-To: <1455502271.6.0.558905453707.issue26362@psf.upfronthosting.co.za> Message-ID: <1493665255.41.0.899330762082.issue26362@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > temp_name = tempfile.mktemp(dir=".") > os.link("a", temp_name) There is a race condition between generating file name and using it. tempfile.mktemp() is not much more useful that just a function that generates some names which unlikely matches the names of existing files the directory. In any case you should catch an error and repeat an attempt with different name. How much attempts to do and what additional checks to do is an application specific. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 15:34:05 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 May 2017 19:34:05 +0000 Subject: [issue30221] Deprecate assertNotAlmostEqual In-Reply-To: <1493657601.18.0.125992832346.issue30221@psf.upfronthosting.co.za> Message-ID: <1493667245.42.0.169607207744.issue30221@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Google finds only 16 books for me. I have reviewed them, and all of them just list assertion methods, copying the official documentation or one other. Often the book contains just one mention of assertNotAlmostEqual (not including the contents and the index). No books contain an example for assertNotAlmostEqual. They even don't mention the delta parameter added in 3.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 15:42:07 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 01 May 2017 19:42:07 +0000 Subject: [issue27618] docs for threading.Lock claim it's a class (since 3.3), but it's not (and has never been, apparently) In-Reply-To: <1469480103.96.0.342423272445.issue27618@psf.upfronthosting.co.za> Message-ID: <1493667727.1.0.151965917475.issue27618@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: -> patch review versions: +Python 2.7, Python 3.7 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 16:07:05 2017 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 01 May 2017 20:07:05 +0000 Subject: [issue22385] Define a binary output formatting mini-language for *.hex() In-Reply-To: <1410393301.25.0.193851592698.issue22385@psf.upfronthosting.co.za> Message-ID: <1493669225.38.0.740509081854.issue22385@psf.upfronthosting.co.za> Eric V. Smith added the comment: The Unix "od" command pretty much has all of the possibilities covered. https://linuxconfig.org/od-1-manual-page Although "named characters" might be going a bit far. Float, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 16:40:23 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 01 May 2017 20:40:23 +0000 Subject: [issue30214] make_zip.py lacks command a few line options. In-Reply-To: <1493526948.12.0.00156119032978.issue30214@psf.upfronthosting.co.za> Message-ID: <1493671223.96.0.551664566415.issue30214@psf.upfronthosting.co.za> Steve Dower added the comment: I disagree with this going into the core repo - this script is meant for producing our official packages, and is not a general purpose tool. If someone does make changes, please backport them as far as possible (so that bug fixes are easy to cherry pick) and don't break the core use case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 17:36:19 2017 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 01 May 2017 21:36:19 +0000 Subject: [issue20401] inspect.signature removes initial starred method params (bug) In-Reply-To: <1390788993.17.0.660022728639.issue20401@psf.upfronthosting.co.za> Message-ID: <1493674579.88.0.151177610521.issue20401@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Is there any reason that the second case Terry provide still will failed with ValueError? > class C: > def meth2(**kwds): pass > ip.signature(C().meth2) Yes, the reason is that `C().meth2` is an invalid method that can't be called. Try calling `C().meth2()` and you will get a TypeError. There is no bug here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 17:37:09 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 May 2017 21:37:09 +0000 Subject: [issue30205] socket.getsockname() type mismatch with AF_UNIX on Linux In-Reply-To: <1493456110.97.0.437176774734.issue30205@psf.upfronthosting.co.za> Message-ID: <1493674629.12.0.858819927996.issue30205@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Amusingly, binding to the empty string produces something different: >>> s = socket.socket(socket.AF_UNIX) >>> s.getsockname() b'' >>> s.bind(b'') >>> s.getsockname() b'\x000005d' while binding to the nul byte string produces the expected result: >>> s = socket.socket(socket.AF_UNIX) >>> s.bind(b'\x00') >>> s.getsockname() b'\x00' ---------- components: +Library (Lib) nosy: +pitrou stage: -> needs patch type: -> behavior versions: +Python 3.5, Python 3.6, Python 3.7 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 17:39:43 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 May 2017 21:39:43 +0000 Subject: [issue30205] socket.getsockname() type mismatch with AF_UNIX on Linux In-Reply-To: <1493456110.97.0.437176774734.issue30205@psf.upfronthosting.co.za> Message-ID: <1493674783.2.0.990375914473.issue30205@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- pull_requests: +1479 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 17:47:53 2017 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 May 2017 21:47:53 +0000 Subject: [issue30192] hashlib module breaks with 64-bit kernel and 32-bit user space In-Reply-To: <1493328003.41.0.178410988374.issue30192@psf.upfronthosting.co.za> Message-ID: <1493675273.53.0.398706868004.issue30192@psf.upfronthosting.co.za> Christian Heimes added the comment: The issues seems to be resolved. In the future please add the expert for a topic or maintainer of a module to the nosy list of the ticket. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 17:52:13 2017 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 May 2017 21:52:13 +0000 Subject: [issue30205] socket.getsockname() type mismatch with AF_UNIX on Linux In-Reply-To: <1493456110.97.0.437176774734.issue30205@psf.upfronthosting.co.za> Message-ID: <1493675533.3.0.260012667551.issue30205@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 18:40:15 2017 From: report at bugs.python.org (Robert Collins) Date: Mon, 01 May 2017 22:40:15 +0000 Subject: [issue30221] Deprecate assertNotAlmostEqual In-Reply-To: <1493657601.18.0.125992832346.issue30221@psf.upfronthosting.co.za> Message-ID: <1493678415.47.0.674316551297.issue30221@psf.upfronthosting.co.za> Robert Collins added the comment: We've now spent more time debating the deprecation that we would have saved if it had been deprecated. Deprecations cost user good will. Whilst I very much want to delete all assertions in favour of matchers, which would allow composed symmetry rather than the manual symmetry we have today. Like michael I don't see any benefit in getting rid of it either. I don't believe it will make the API substantially easier to learn: the lack of symmetry increases special cases, so it will IMO make it harder to learn. Unless you've new arguments to make about this, I think the ticket can be closed WONTFIX. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 18:50:14 2017 From: report at bugs.python.org (Ben Finney) Date: Mon, 01 May 2017 22:50:14 +0000 Subject: [issue26362] Approved API for creating a temporary file path In-Reply-To: <1493665255.41.0.899330762082.issue26362@psf.upfronthosting.co.za> Message-ID: <20170501224521.nrmtw36ktabov63f@benfinney.id.au> Ben Finney added the comment: On 01-May-2017, Serhiy Storchaka wrote: > tempfile.mktemp() is not much more useful that just a function that > generates some names which unlikely matches the names of existing > files the directory. Yes. That is already useful enough to be in the standard library, and it is there. It is also maintained and implemented in one place, behind an unpublished API (by using ?next(tempfile._get_candidate_names())?). Don't get distracted by the way ?tempfile.mktemp? creates files; that's irrelevant to this issue. None of the use cases presented here care at all about the file created, and never use that file. They *only* want the name, generated by that standard-library algorithm. The proposal in this issue is to have a public standard library API, which I'm calling ?tempfile.makepath?, to access that existing maintained standard-library functionality. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 19:04:47 2017 From: report at bugs.python.org (Eryk Sun) Date: Mon, 01 May 2017 23:04:47 +0000 Subject: [issue26362] Approved API for creating a temporary file path In-Reply-To: <1455502271.6.0.558905453707.issue26362@psf.upfronthosting.co.za> Message-ID: <1493679887.5.0.656808414435.issue26362@psf.upfronthosting.co.za> Eryk Sun added the comment: > the lack of Windows' os.rename() atomicity rename/replace is two system calls: NtOpenFile to get a handle for the source file and NtSetInformationFile to rename it. The difference is only that replace() sets the ReplaceIfExists field in the FileRenameInformation. The rename operation should be atomic. If the source file is already open without delete/rename sharing, opening it to rename it will fail with sharing violation. After the handle is open, another thread could set the delete disposition on the source file (i.e. flag it to be unlinked), which will cause the rename to fail with access denied. The relative timing of the threads is the difference between getting a FileNotFoundError versus a PermissionError. The other thread could also open a handle to the destination file at this point, which also causes the rename to fail with access denied, but that's no different from what would happen if it were already open. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 20:27:25 2017 From: report at bugs.python.org (Levi Cameron) Date: Tue, 02 May 2017 00:27:25 +0000 Subject: [issue29992] Expose parse_string in JSONDecoder In-Reply-To: <1491380525.56.0.628505740968.issue29992@psf.upfronthosting.co.za> Message-ID: <1493684845.2.0.725154551799.issue29992@psf.upfronthosting.co.za> Levi Cameron added the comment: A less exotic use case than oberstet's: Converting code from python 2 -> 3 and trying to maintain python 2 behaviour of returning all strings as bytes rather than unicode strings. obsertet's solution works but is very much tied to the current implementation. ---------- nosy: +Levi Cameron _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 21:26:19 2017 From: report at bugs.python.org (Martin Panter) Date: Tue, 02 May 2017 01:26:19 +0000 Subject: [issue21790] Change blocksize in http.client to the value of resource.getpagesize In-Reply-To: <1403019624.98.0.809499942301.issue21790@psf.upfronthosting.co.za> Message-ID: <1493688379.59.0.343236025429.issue21790@psf.upfronthosting.co.za> Martin Panter added the comment: For plain-text (non-SSL) HTTP uploads, perhaps using ?socket.sendfile? would help: Issue 13559. Another idea would be to expose and document the low-level socket (or SSL wrapper) and let the user copy data with whatever chunk size they desire. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 21:55:26 2017 From: report at bugs.python.org (paul j3) Date: Tue, 02 May 2017 01:55:26 +0000 Subject: [issue30220] Why are the custom messages for ValueError and TypeError suppressed in argparse? In-Reply-To: <1493655591.13.0.717623445702.issue30220@psf.upfronthosting.co.za> Message-ID: <1493690126.12.0.240849822678.issue30220@psf.upfronthosting.co.za> paul j3 added the comment: In http://bugs.python.org/issue9353 Steven Bethard includes 'ArgumentTypeError' in a list of values that "look like they should be public but aren't in __all__::". I take that `__all__` list to be the ultimate authority on what's public or not, not omissions in the comments or documentation. ArgumentTypeError is used in an illustration in the 'type' section of the documentation, https://docs.python.org/3/library/argparse.html#type It also used in the FileType class, which I see as an example of a custom type callable. In a function like _get_value it is far easier to test for an custom Error class than to test the message of a more generic class. The most common `type` functions are `int` and `float`. Are these custom or generic messages? ValueError: invalid literal for int() with base 10: 'one' ValueError: could not convert string to float: 'one' In these common cases the ValueError is converted into a parser.Error call that identifies the argument name, the type, and the bad value, as well as correct usage. If you issue some other error (e.g. NameError) _get_value won't catch it, and you'll get the full error stack and no 'usage'. You'd have to wrap the 'parse_args' call in your own try/except block. I would think than any anticipated error raised by the type callable will be related to the argument's type. What other errors do you have in mind? I did not mean to say in http://bugs.python.org/issue20039 that you shouldn't use it. The documentation could be better, but it is available. If it works for you, use it. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 22:10:58 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 02 May 2017 02:10:58 +0000 Subject: [issue22385] Define a binary output formatting mini-language for *.hex() In-Reply-To: <1410393301.25.0.193851592698.issue22385@psf.upfronthosting.co.za> Message-ID: <1493691058.82.0.329524453522.issue22385@psf.upfronthosting.co.za> Nick Coghlan added the comment: Minimalist proposal: def hex(self, *, bytes_per_group=None, delimiter=" "): """B.hex() -> string of hex digits B.hex(bytes_per_group=N) -> hex digits in groups separated by *delimeter* Create a string of hexadecimal numbers from a bytes object:: >>> b'\xb9\x01\xef'.hex() 'b901ef' >>> b'\xb9\x01\xef'.hex(bytes_per_group=1) 'b9 01 ef' """ Alternatively, the grouping could be by digit rather than by byte: def hex(self, *, group_digits=None, delimiter=" "): """B.hex() -> string of hex digits B.hex(group_digits=N) -> hex digits in groups separated by *delimeter* Create a string of hexadecimal numbers from a bytes object:: >>> b'\xb9\x01\xef'.hex() 'b901ef' >>> b'\xb9\x01\xef'.hex(group_digits=2) 'b9 01 ef' """ One potential advantage of the `group_digits` approach is that it could be fairly readily adapted to the hex/oct/bin builtins (although if we did that, it would make the lack of a "dec" builtin for decimal formatting a bit weird) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 22:22:59 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 May 2017 02:22:59 +0000 Subject: [issue20401] inspect.signature removes initial starred method params (bug) In-Reply-To: <1390788993.17.0.660022728639.issue20401@psf.upfronthosting.co.za> Message-ID: <1493691779.31.0.0280939583053.issue20401@psf.upfronthosting.co.za> Terry J. Reedy added the comment: OK, we will change this example in test_calltips once calltips uses .signature (#19903). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 1 22:56:54 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 May 2017 02:56:54 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493693814.41.0.902540150172.issue19903@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thanks for the report. As Yuri pointed out in msg292701, and I verified, c.m2() raises "TypeError: meth() takes 0 positional arguments but 1 was given". The purpose of get_argspec is to tell the user how to call the function without getting such a TypeError. But this is not possible, at least in this case. When signature raises "ValueError: invalid method signature", get_argspec should catch ValueError and put, for instance, "Function has an invalid method signature" in the box, instead of a signature that does not work, so users will know that the function cannot be called properly. (Should message be red?) An initial patch could just comment out this test. I would like to see whether everything else passes. Or have you, Louie, already done that? Signature can raise "TypeError if that type of object is not supported". Does .signature return for all the other test cases? I expect it should if only called after current guard. try: ob_call = ob.__call__ except BaseException: return argspec Before committing a patch using .signature, the known possible exception (ValueError) must be caught. This test should then be changed to verify the new behavior. Possible future enhancement. Current nothing happens after code like "1(" or "''(". Should a box pop up saying (in red?) something like "Non-callable object before ("? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 01:06:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 May 2017 05:06:44 +0000 Subject: [issue30221] Deprecate assertNotAlmostEqual In-Reply-To: <1493657601.18.0.125992832346.issue30221@psf.upfronthosting.co.za> Message-ID: <1493701604.29.0.634998738872.issue30221@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If the absent of use cases is not good argument I close this issue. But this looks as a design mistake to me. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 01:16:06 2017 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 02 May 2017 05:16:06 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1493702166.43.0.892419467044.issue28315@psf.upfronthosting.co.za> Jaysinh shukla added the comment: Thanks Mariatta for reminding. Please expect a Github PR from my side in next 2 days. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 01:24:28 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Tue, 02 May 2017 05:24:28 +0000 Subject: [issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches In-Reply-To: <1490830588.09.0.152876220246.issue29943@psf.upfronthosting.co.za> Message-ID: <1493702668.63.0.476924257484.issue29943@psf.upfronthosting.co.za> Nathaniel Smith added the comment: More collateral damage: apparently the workaround that Pandas used for this bug (#undef'ing PySlice_GetIndicesEx) broke PyPy, so now they need a workaround for the workaround: https://github.com/pandas-dev/pandas/pull/16192 Recording this here partly as a nudge since IIUC the breaking change is still in the 3.6 tree, and partly for the benefit of future projects that are also trying to work around this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 02:18:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 May 2017 06:18:27 +0000 Subject: [issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches In-Reply-To: <1490830588.09.0.152876220246.issue29943@psf.upfronthosting.co.za> Message-ID: <1493705907.82.0.0240382272528.issue29943@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Either 3.6.1 or 3.6.0 should be officially declared broken. If declare 3.6.1 broken we must port PR 1049 to 3.6 and release 3.6.1.1 or 3.6.2 as early as possible. Many third-party extensions built with 3.6.1 should be rebuild with a new release for compatibility with 3.6.0. Distributors should update Python to a new release. If declare 3.6.0 broken we shouldn't do anything beside this. Distributors should update Python to 3.6.1, as planned. Ned, what is your decision as RM? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 02:35:21 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 02 May 2017 06:35:21 +0000 Subject: [issue15987] Provide a way to compare AST nodes for equality recursively In-Reply-To: <1348166637.22.0.281544835659.issue15987@psf.upfronthosting.co.za> Message-ID: <1493706921.02.0.962002597464.issue15987@psf.upfronthosting.co.za> Louie Lu added the comment: Update to AST base type richcompare. the unittest finished time was better than python version: Ran 7 tests in 0.278s ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 02:36:49 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Tue, 02 May 2017 06:36:49 +0000 Subject: [issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches In-Reply-To: <1490830588.09.0.152876220246.issue29943@psf.upfronthosting.co.za> Message-ID: <1493707009.3.0.813257731714.issue29943@psf.upfronthosting.co.za> Nathaniel Smith added the comment: I don't find it helpful to think of it as declaring 3.6.0 broken vs declaring 3.6.1 broken. 3.6.0 is definitely good in the sense that if you build a module on it then it will import on both 3.6.0 and 3.6.1, and 3.6.1 is definitely good in the sense that if you're using it then you can import any module that was built on 3.6.0 or 3.6.1. I think 3.6.2 should combine the best aspects of 3.6.0 and 3.6.1, in the sense that modules built on 3.6.2 should be importable on any 3.6.x, and 3.6.2 should be able to import modules built on any 3.6.x. Fortunately this is very easy ? it just means that 3.6.2 should continue to export the PySlice_AdjustIndices symbol (because existing 3.6.1 builds will need it to import on 3.6.2), but should remove the #define of PySlice_GetIndicesEx (so code built against 3.6.2 will not *require* PySlice_AdjustIndices to be present). Removing 3.6.0 and 3.6.1 from circulation is simply not possible; the best 3.6.2 can hope for is to interoperate with them as well as possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 02:47:08 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 02 May 2017 06:47:08 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493707628.36.0.578548668096.issue19903@psf.upfronthosting.co.za> Louie Lu added the comment: Terry, only this case was failed, others in unittest work very well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 02:56:56 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 May 2017 06:56:56 +0000 Subject: [issue30223] Add Lib/test/__main__.py in 2.7 Message-ID: <1493708216.05.0.00341541887295.issue30223@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Following patch adds Lib/test/__main__.py in 2.7. This allows running tests with 'python -m test' as in 3.x. ---------- components: Tests messages: 292720 nosy: ezio.melotti, ncoghlan, serhiy.storchaka priority: normal severity: normal status: open title: Add Lib/test/__main__.py in 2.7 type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 03:00:39 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 02 May 2017 07:00:39 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493708439.89.0.659657030754.issue19903@psf.upfronthosting.co.za> Louie Lu added the comment: ah, there are still some corner case about _first_param.sub(), some of them in signature will be like `(ci)`, not `(self, ci)`, and the regex will replace the first params to `()`, which is not correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 03:00:53 2017 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 02 May 2017 07:00:53 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1493708453.83.0.901073451995.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : ---------- pull_requests: +1480 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 03:01:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 07:01:52 +0000 Subject: [issue30223] Add Lib/test/__main__.py in 2.7 In-Reply-To: <1493708216.05.0.00341541887295.issue30223@psf.upfronthosting.co.za> Message-ID: <1493708512.21.0.0610867635743.issue30223@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh yes, I always wanted this tiny feature! It's painful to have to adapt my command for Python 2 after testing Python 3. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 03:03:09 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 May 2017 07:03:09 +0000 Subject: [issue30223] Add Lib/test/__main__.py in 2.7 In-Reply-To: <1493708216.05.0.00341541887295.issue30223@psf.upfronthosting.co.za> Message-ID: <1493708589.15.0.526723121116.issue30223@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1481 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 03:06:07 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 02 May 2017 07:06:07 +0000 Subject: [issue30223] Add Lib/test/__main__.py in 2.7 In-Reply-To: <1493708216.05.0.00341541887295.issue30223@psf.upfronthosting.co.za> Message-ID: <1493708767.09.0.468998570239.issue30223@psf.upfronthosting.co.za> Xiang Zhang added the comment: +1. Every time when I want to run tests for 2.7, I have to type twice. Once python -m test, error and then python -m test.regrtest. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 03:35:05 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 02 May 2017 07:35:05 +0000 Subject: [issue30224] remove outdated checks in struct Message-ID: <1493710505.85.0.8689936336.issue30224@psf.upfronthosting.co.za> New submission from Xiang Zhang: Reading struct's code I find some checks seem outdated. They seemly exists because there are two kinds of integer in 2.x. I wrote a patch to remove them but maybe they exist for other reasons I don't see. Sorry if I misunderstand them. :-( ---------- components: Library (Lib) messages: 292724 nosy: mark.dickinson, meador.inge, xiang.zhang priority: normal severity: normal stage: patch review status: open title: remove outdated checks in struct type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 03:40:55 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 02 May 2017 07:40:55 +0000 Subject: [issue30224] remove outdated checks in struct In-Reply-To: <1493710505.85.0.8689936336.issue30224@psf.upfronthosting.co.za> Message-ID: <1493710855.43.0.457127273447.issue30224@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1482 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 04:03:22 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 02 May 2017 08:03:22 +0000 Subject: [issue15987] Provide a way to compare AST nodes for equality recursively In-Reply-To: <1348166637.22.0.281544835659.issue15987@psf.upfronthosting.co.za> Message-ID: <1493712202.73.0.153606154893.issue15987@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +1483 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 04:12:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 08:12:52 +0000 Subject: [issue30225] EBADF error on x86 Tiger 3.x buildbot Message-ID: <1493712772.54.0.125879756705.issue30225@psf.upfronthosting.co.za> New submission from STINNER Victor: test_http_body_pipe() of test_urllib2 uses a subprocess, no idea if it's related: cmd = [sys.executable, "-c", r"pass"] for headers in {}, {"Content-Length": 30}: with subprocess.Popen(cmd, stdout=subprocess.PIPE) as proc: req = Request("http://example.com/", proc.stdout, headers) ... See also my issue #29915 "Drop Mac OS X Tiger support in Python 3.7?" :-) http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/597/steps/test/logs/stdio ./python.exe -E -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform /bin/sh: line 1: pybuildbot.identify: command not found ./python.exe ./Tools/scripts/run_tests.py -j 1 -u all -W --slowest --timeout=900 -j2 make: [buildbottest] Error 127 (ignored) == CPython 3.7.0a0 (heads/master:5d7a8d0, May 1 2017, 12:22:06) [GCC 4.0.1 (Apple Computer, Inc. build 5367)] == Darwin-8.11.1-i386-32bit little-endian == hash algorithm: siphash24 32bit == cwd: /Users/db3l/buildarea/3.x.bolen-tiger/build/build/test_python_12700 == encodings: locale=UTF-8, FS=utf-8 Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=1, verbose=0, bytes_warning=2, quiet=0, hash_randomization=1, isolated=0) Using random seed 2778758 Run tests in parallel using 2 child processes 0:00:12 [ 1/405] test_deque passed 0:00:35 [ 2/405] test_trace passed (34 sec) 0:00:56 [ 3/405] test_capi passed -- running: test_socket (44 sec) 0:00:57 [ 4/405] test_pkgimport passed -- running: test_socket (45 sec) 0:01:02 [ 5/405] test_socket passed (49 sec) 0:01:07 [ 6/405] test_imaplib passed 0:01:18 [ 7/405] test_urllib2 passed Fatal Python error: Py_Initialize: can't initialize sys standard streams OSError: [Errno 9] Bad file descriptor Current thread 0xa000d000 (most recent call first): Fatal Python error: Py_Initialize: can't initialize sys standard streams OSError: [Errno 9] Bad file descriptor Current thread 0xa000d000 (most recent call first): 0:01:20 [ 8/405] test_getargs2 passed 0:01:24 [ 9/405] test_calendar passed 0:01:25 [ 10/405] test_unpack_ex passed ---------- components: Tests, macOS messages: 292725 nosy: haypo, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: EBADF error on x86 Tiger 3.x buildbot versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 04:27:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 08:27:46 +0000 Subject: [issue30104] clang 4.0 miscompiles dtoa.c, giving broken float parsing and printing In-Reply-To: <1492634362.26.0.662150141345.issue30104@psf.upfronthosting.co.za> Message-ID: <1493713666.83.0.0457508606588.issue30104@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1484 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 04:38:43 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 02 May 2017 08:38:43 +0000 Subject: [issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches In-Reply-To: <1490830588.09.0.152876220246.issue29943@psf.upfronthosting.co.za> Message-ID: <1493714323.89.0.763673450073.issue29943@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: For what it's worth, in Fedora 26 we already rebased Python to 3.6.1, so this issue now is non existent for our ecosystem, and we are not shipping 3.6.0 in any way now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 04:46:10 2017 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 02 May 2017 08:46:10 +0000 Subject: [issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches In-Reply-To: <1490830588.09.0.152876220246.issue29943@psf.upfronthosting.co.za> Message-ID: <1493714770.65.0.944217208447.issue29943@psf.upfronthosting.co.za> Miro Hron?ok added the comment: > For what it's worth, in Fedora 26 we already rebased Python to 3.6.1, so this issue now is non existent for our ecosystem, and we are not shipping 3.6.0 in any way now. Except of course if 3.6.2 would be fixed in a way that 3.6.1 would be considered broken, and released after Fedora 26 is released. In that case, we would need to deal with the situation in Fedora somehow (e.g. patch it back in or so). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 04:47:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 08:47:40 +0000 Subject: [issue30104] clang 4.0 miscompiles dtoa.c, giving broken float parsing and printing In-Reply-To: <1492634362.26.0.662150141345.issue30104@psf.upfronthosting.co.za> Message-ID: <1493714860.24.0.448752156714.issue30104@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 809101f14f27ddb394cd77c477470761ecf99f41 by Victor Stinner in branch '3.6': bpo-30104: Use -fno-strict-aliasing on clang (#1376) https://github.com/python/cpython/commit/809101f14f27ddb394cd77c477470761ecf99f41 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 04:52:51 2017 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 May 2017 08:52:51 +0000 Subject: [issue30226] Modernize make_ssl_certs Message-ID: <1493715171.18.0.434787469545.issue30226@psf.upfronthosting.co.za> New submission from Christian Heimes: Lib/test/make_ssl_certs.py is used to generate and re-generate certificates and keys for SSL tests. The script and certificates have various smaller issues, e.g. RSA 1024bit certs with SHA-1 signature. Some certificates lack v3 extensions, too. The script fails to regenerate some files, e.g. a copy of pycacert.pem in capath. I'm going to modernize the script. ---------- assignee: christian.heimes components: SSL messages: 292729 nosy: christian.heimes priority: normal severity: normal status: open title: Modernize make_ssl_certs type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 05:02:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 09:02:02 +0000 Subject: [issue30104] clang 4.0 miscompiles dtoa.c, giving broken float parsing and printing In-Reply-To: <1492634362.26.0.662150141345.issue30104@psf.upfronthosting.co.za> Message-ID: <1493715722.9.0.562366310853.issue30104@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1485 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 05:16:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 09:16:24 +0000 Subject: [issue30104] clang 4.0 miscompiles dtoa.c, giving broken float parsing and printing In-Reply-To: <1492634362.26.0.662150141345.issue30104@psf.upfronthosting.co.za> Message-ID: <1493716584.05.0.185306703103.issue30104@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 03a7ab77d2f75323e1f3e8b6a1c164e701d58bfb by Victor Stinner in branch '3.5': bpo-30104: Use -fno-strict-aliasing on clang (#1376) (#1377) https://github.com/python/cpython/commit/03a7ab77d2f75323e1f3e8b6a1c164e701d58bfb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 05:22:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 09:22:19 +0000 Subject: [issue30108] test_site modifies sys.path In-Reply-To: <1492647792.33.0.749226067814.issue30108@psf.upfronthosting.co.za> Message-ID: <1493716939.18.0.016270759239.issue30108@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1486 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 05:22:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 09:22:55 +0000 Subject: [issue30108] test_site modifies sys.path In-Reply-To: <1492647792.33.0.749226067814.issue30108@psf.upfronthosting.co.za> Message-ID: <1493716975.76.0.545488784348.issue30108@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1487 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 05:40:39 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 02 May 2017 09:40:39 +0000 Subject: [issue30212] test_ssl.py is broken in Centos7 In-Reply-To: <1493507734.99.0.744824306698.issue30212@psf.upfronthosting.co.za> Message-ID: <1493718039.24.0.695571142164.issue30212@psf.upfronthosting.co.za> Xiang Zhang added the comment: The failure can't be reproduced by me, 3.5 on CentOS 7.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 05:45:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 09:45:25 +0000 Subject: [issue7283] test_site failure when .local/lib/pythonX.Y/site-packages hasn't been created yet In-Reply-To: <1257640034.65.0.139323856655.issue7283@psf.upfronthosting.co.za> Message-ID: <1493718325.98.0.437675336349.issue7283@psf.upfronthosting.co.za> STINNER Victor added the comment: It seems like the original bug report was fixed, so I close it. @Berker Peksag: Please open a new bug report if you see again the PermissionError error on Windows. I didn't see it recently. > Well, I'm not sure the symlink is actually the problem. Apparently the ".local" directory hadn't been created when the first test run. I'm unable to reproduce this bug anymore. I named ~/.local to ~/.local.xxx: test_site pass (it starts by creating ~/.local/lib/python3.7/site-packages). > I can't reproduce this locally. If remove ~/.local/lib/pythonX.Y and run test_site, it creates the directory and modifies sys.path (this is a bug). I fixed this bug: commit b85c136903c6d2368162f7c4a58f258c9c69ead0, issue #30108. > I just saw a similar failure on AppVeyor: FAIL: test_s_option (test.test_site.HelperFunctionsTests) test_site failed twice. First run: ====================================================================== ERROR: test_underpth_file (test.test_site.StartupImportTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\test\test_site.py", line 577, in test_underpth_file self._cleanup_underpth_exe(exe_file) File "C:\projects\cpython\lib\test\test_site.py", line 512, in _cleanup_underpth_exe test.support.unlink(exe_file) File "C:\projects\cpython\lib\test\support\__init__.py", line 398, in unlink _unlink(filename) File "C:\projects\cpython\lib\test\support\__init__.py", line 348, in _unlink _waitfor(os.unlink, filename) File "C:\projects\cpython\lib\test\support\__init__.py", line 316, in _waitfor func(pathname) PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\python.exe' ====================================================================== ERROR: test_underpth_nosite_file (test.test_site.StartupImportTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\test\test_site.py", line 534, in test_underpth_nosite_file exe_file = self._create_underpth_exe(pth_lines) File "C:\projects\cpython\lib\test\test_site.py", line 495, in _create_underpth_exe shutil.copy(sys.executable, exe_file) File "C:\projects\cpython\lib\shutil.py", line 241, in copy copyfile(src, dst, follow_symlinks=follow_symlinks) File "C:\projects\cpython\lib\shutil.py", line 121, in copyfile with open(dst, 'wb') as fdst: PermissionError: [Errno 13] Permission denied: 'C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\python.exe' Second run: ====================================================================== FAIL: test_s_option (test.test_site.HelperFunctionsTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\test\test_site.py", line 173, in test_s_option self.assertIn(usersite, sys.path) AssertionError: 'C:\\Users\\appveyor\\AppData\\Roaming\\Python\\Python36\\site-packages' not found in ['', 'C:\\projects\\cpython\\PCbuild\\win32\\python36.zip', 'C:\\projects\\cpython\\DLLs', 'C:\\projects\\cpython\\lib', 'C:\\projects\\cpython\\PCbuild\\win32', 'C:\\projects\\cpython', 'C:\\projects\\cpython\\lib\\site-packages'] The first failures are unrelated to this bug report. The first failure (PermissionError: [WinError 32] The process cannot access the file because it is being used by another process) seems like an antivirus holding the file open. Please open a different bug report if you see it again. ---------- nosy: +haypo resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 05:45:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 09:45:45 +0000 Subject: [issue30108] test_site modifies sys.path In-Reply-To: <1492647792.33.0.749226067814.issue30108@psf.upfronthosting.co.za> Message-ID: <1493718345.09.0.903641775176.issue30108@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 33a5d40de997fff5b60157c546a3bf711e083bcc by Victor Stinner in branch '3.6': bpo-30108: Restore sys.path in test_site (#1197) (#1378) https://github.com/python/cpython/commit/33a5d40de997fff5b60157c546a3bf711e083bcc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 05:45:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 09:45:47 +0000 Subject: [issue30108] test_site modifies sys.path In-Reply-To: <1492647792.33.0.749226067814.issue30108@psf.upfronthosting.co.za> Message-ID: <1493718347.6.0.303577078637.issue30108@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 092f4602c329e23b863692249cc630a3eba5b6b5 by Victor Stinner in branch '3.5': bpo-30108: Restore sys.path in test_site (#1197) (#1379) https://github.com/python/cpython/commit/092f4602c329e23b863692249cc630a3eba5b6b5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 05:53:39 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 02 May 2017 09:53:39 +0000 Subject: [issue30223] Add Lib/test/__main__.py in 2.7 In-Reply-To: <1493708216.05.0.00341541887295.issue30223@psf.upfronthosting.co.za> Message-ID: <1493718819.81.0.45603033267.issue30223@psf.upfronthosting.co.za> Nick Coghlan added the comment: +1 from me. We hadn't done this (or the test.support backport) previously due to the "no new features" guideline, but I think simplifying cross-branch maintenance overrides that concerns. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 06:01:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 10:01:45 +0000 Subject: [issue30212] test_ssl.py is broken in Centos7 In-Reply-To: <1493507734.99.0.744824306698.issue30212@psf.upfronthosting.co.za> Message-ID: <1493719305.04.0.880670726194.issue30212@psf.upfronthosting.co.za> STINNER Victor added the comment: @david-cpi: Can you please elaborate? * What is your Centos full version? * How do you get Python 3.5? Tarball from python.org? * What is the error message? "except: pass" is bad practice, you must catch a specific exception type. It seems very strange to have to ignore errors on sendall(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 06:03:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 10:03:58 +0000 Subject: [issue30212] test_ssl.py is broken in Centos7 In-Reply-To: <1493507734.99.0.744824306698.issue30212@psf.upfronthosting.co.za> Message-ID: <1493719438.26.0.884919042102.issue30212@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, I missed the attached test.log file. So, it's CentOS 7.3.1611 and the full error message is: == CPython 3.5.2 (default, Apr 29 2017, 16:07:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] == Linux-3.10.0-514.16.1.el7.x86_64-x86_64-with-centos-7.3.1611-Core little-endian == hash algorithm: siphash24 64bit == /home/vagrant/Downloads/Python-3.5.2/build/test_python_16502 ... [1/1/1] test_ssl test_ssl: testing with 'OpenSSL 1.0.1e-fips 11 Feb 2013' (1, 0, 1, 5, 15) under Linux ('CentOS Linux', '7.3.1611', 'Core') HAS_SNI = True OP_ALL = 0x800003f7 OP_NO_TLSv1_1 = 0x10000000 ... test_read_write_data (test.test_ssl.NetworkedBIOTests) ... Needed 3 calls to complete do_handshake(). Needed 1 calls to complete write(). ERROR ... ====================================================================== ERROR: test_read_write_data (test.test_ssl.NetworkedBIOTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/vagrant/Downloads/Python-3.5.2/Lib/test/test_ssl.py", line 1785, in test_read_write_data buf = self.ssl_io_loop(sock, incoming, outgoing, sslobj.read, 1024) File "/home/vagrant/Downloads/Python-3.5.2/Lib/test/test_ssl.py", line 1724, in ssl_io_loop sock.sendall(buf) BrokenPipeError: [Errno 32] Broken pipe ---------------------------------------------------------------------- Ran 117 tests in 39.538s FAILED (errors=1, skipped=8) /home/vagrant/Downloads/Python-3.5.2/Lib/unittest/case.py:628: ResourceWarning: unclosed outcome.errors.clear() test test_ssl failed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 06:08:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 10:08:07 +0000 Subject: [issue30212] test_ssl.py is broken in Centos7 In-Reply-To: <1493507734.99.0.744824306698.issue30212@psf.upfronthosting.co.za> Message-ID: <1493719687.23.0.437170328955.issue30212@psf.upfronthosting.co.za> STINNER Victor added the comment: David: can you please check if you get the same error with Python 3.6, or even the development version (Git master branch)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 06:15:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 10:15:21 +0000 Subject: [issue30227] test_site must not write outside the build directory: must not write into $HOME/.local/ Message-ID: <1493720121.71.0.343416046113.issue30227@psf.upfronthosting.co.za> New submission from STINNER Victor: test_site creates the $HOME/.local/lib/python3.7/site-packages/ directory, or parent directories if needed. That's wrong. An unit test must not modify its environment, especially the home directory! The unit test must mock $HOME environment variable and mock the home directory. Example of issue of writing into $HOME: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%203.5/builds/75/steps/test/logs/stdio [109/398] test_site test_site skipped -- unable to create user site directory ('/.local/lib/python3.5/site-packages'): [Errno 13] Permission denied: '/.local' On this buildbot, $HOME is set to /. The whole test_site test is skipped just because of that. Recent change on test_site related to this issue: commit b85c136903c6d2368162f7c4a58f258c9c69ead0, bpo-30108. ---------- components: Distutils, Tests messages: 292739 nosy: dstufft, haypo, merwok priority: normal severity: normal status: open title: test_site must not write outside the build directory: must not write into $HOME/.local/ versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 06:17:43 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 10:17:43 +0000 Subject: [issue30132] [Windows] test_distutils leaks a vc140.pdb file In-Reply-To: <1492791460.36.0.72947186821.issue30132@psf.upfronthosting.co.za> Message-ID: <1493720263.96.0.860866597239.issue30132@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1488 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 06:18:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 10:18:05 +0000 Subject: [issue30199] Warning -- asyncore.socket_map was modified by test_ssl In-Reply-To: <1493386700.85.0.622931101422.issue30199@psf.upfronthosting.co.za> Message-ID: <1493720285.74.0.362898193456.issue30199@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1489 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 06:24:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 10:24:45 +0000 Subject: [issue30132] [Windows] test_distutils leaks a vc140.pdb file In-Reply-To: <1492791460.36.0.72947186821.issue30132@psf.upfronthosting.co.za> Message-ID: <1493720685.73.0.765248763172.issue30132@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm unable to run test_distutils on Windows using python_d.exe: I get link error 1101. LINK : fatal error LNK1101: incorrect MSPDB140.DLL version; recheck installation of this product I ran manually the following command, but it didn't help: "%VS140COMNTOOLS%\..\..\VC"\vcvarsall.bat amd64 I also tried to modify manually the PATH environment variable to only include the VC amd64 path, but it didn't work neither. I don't know how to fix the error. I don't understand how the configure the C compiler and it's hard to get good documentation on it :-/ So I wrote https://github.com/python/cpython/pull/1380 another attempt to fix the test_distutils warning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 06:28:20 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 02 May 2017 10:28:20 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493720900.56.0.162511458229.issue19903@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +1490 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 06:31:07 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 02 May 2017 10:31:07 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493721067.32.0.934274864222.issue19903@psf.upfronthosting.co.za> Louie Lu added the comment: @Terry, the PR is created, it is now serving with signature. The two exception (object not callable, invalid method signature) will return the corresponding message. The only thing I didn't figure out it how to change the color, so I didn't test for this feature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 06:45:28 2017 From: report at bugs.python.org (desbma) Date: Tue, 02 May 2017 10:45:28 +0000 Subject: [issue30219] webbrowser.open outputs xdg-open deprecation warning In-Reply-To: <1493642057.46.0.399695458413.issue30219@psf.upfronthosting.co.za> Message-ID: <1493721928.97.0.221200031095.issue30219@psf.upfronthosting.co.za> desbma added the comment: I'm on Arch Linux with Cinnamon, all packages up to date and xdg-utils 1.1.1 (https://www.archlinux.org/packages/extra/any/xdg-utils/). The fix you mention has not been included in a release yet, last release of xdg-utils is from 2015 (https://portland.freedesktop.org/download/). So it likely many other Linux distributions are affected (eg. Ubuntu 16.04 LTS) and will never see a xdg-utils fix, if it is ever released. That is why I think we should consider silencing xdg-open's output at the Popen call line. I can't think of any downside of doing so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 07:09:04 2017 From: report at bugs.python.org (desbma) Date: Tue, 02 May 2017 11:09:04 +0000 Subject: [issue30219] webbrowser.open outputs xdg-open deprecation warning In-Reply-To: <1493642057.46.0.399695458413.issue30219@psf.upfronthosting.co.za> Message-ID: <1493723344.85.0.870158644752.issue30219@psf.upfronthosting.co.za> desbma added the comment: Also most other Popen calls in the webbrowser module already silence the called program's output, so it makes sense to do the same for the BackgroundBrowser class. Here is a small patch for discussion. ---------- keywords: +patch Added file: http://bugs.python.org/file46845/issue30218-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 07:11:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 11:11:25 +0000 Subject: [issue30228] Open a file in text mode requires too many syscalls Message-ID: <1493723485.87.0.646779044512.issue30228@psf.upfronthosting.co.za> New submission from STINNER Victor: Example: with open("x", "w", encoding="utf-8") as fp: fp.write("HERE") fp.close() syscalls: 14249 open("x", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 3 14249 fstat(3, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0 14249 ioctl(3, TCGETS, 0x7fff07d43330) = -1 ENOTTY (Inappropriate ioctl for device) 14249 lseek(3, 0, SEEK_CUR) = 0 14249 lseek(3, 0, SEEK_CUR) = 0 14249 lseek(3, 0, SEEK_CUR) = 0 14249 write(3, "HERE", 4) = 4 14249 close(3) = 0 I only expected 3 syscalls: open, write, close. * fstat() is used by the FileIO constructor to check if the file is a directory or not, and to get the block size * ioctl() comes from open() which checks if the file is a TTY or not, to decide how to configure buffering * the first lseek() is used by the BuffererWriter constructor to initialize the private abs_pos attribute * the second lseek() is used by the TextIOWrapper constructor to check if the underlying file object (buffered writer) is seekable or not * the last lseek() is used to create the cookie object in TextIOWrapper constructor Can we maybe reduce the number of lseek() to a single syscall? For example, BuffererWriter constructor calls FileIO.tell(): can't this method set the seekable attribute depending on lseek() success, as the FileIO.seekable property? ---------- messages: 292744 nosy: haypo, pitrou, serhiy.storchaka priority: normal severity: normal status: open title: Open a file in text mode requires too many syscalls type: performance versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 07:11:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 11:11:52 +0000 Subject: [issue30132] [Windows] test_distutils leaks a vc140.pdb file In-Reply-To: <1492791460.36.0.72947186821.issue30132@psf.upfronthosting.co.za> Message-ID: <1493723512.05.0.0189767123734.issue30132@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 92fd6c9ef54a857815e3dca8ee74b2b4f5cdf154 by Victor Stinner in branch 'master': bpo-30132: distutils BuildExtTestCase use temp_cwd (#1380) https://github.com/python/cpython/commit/92fd6c9ef54a857815e3dca8ee74b2b4f5cdf154 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 07:12:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 11:12:04 +0000 Subject: [issue30199] Warning -- asyncore.socket_map was modified by test_ssl In-Reply-To: <1493386700.85.0.622931101422.issue30199@psf.upfronthosting.co.za> Message-ID: <1493723524.49.0.49329899507.issue30199@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 1dae7450c68bad498e57800387b24cb103c461fa by Victor Stinner in branch 'master': bpo-30199: test_ssl closes all asyncore channels (#1381) https://github.com/python/cpython/commit/1dae7450c68bad498e57800387b24cb103c461fa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 07:28:36 2017 From: report at bugs.python.org (david-cpi) Date: Tue, 02 May 2017 11:28:36 +0000 Subject: [issue30212] test_ssl.py is broken in Centos7 In-Reply-To: <1493507734.99.0.744824306698.issue30212@psf.upfronthosting.co.za> Message-ID: <1493724516.47.0.375183718707.issue30212@psf.upfronthosting.co.za> david-cpi added the comment: Hi Victor, I will try during the day and get back with the logs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 07:31:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 11:31:28 +0000 Subject: [issue30228] Open a file in text mode requires too many syscalls In-Reply-To: <1493723485.87.0.646779044512.issue30228@psf.upfronthosting.co.za> Message-ID: <1493724688.29.0.555858795752.issue30228@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1491 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 07:34:39 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 May 2017 11:34:39 +0000 Subject: [issue30224] remove outdated checks in struct In-Reply-To: <1493710505.85.0.8689936336.issue30224@psf.upfronthosting.co.za> Message-ID: <1493724879.51.0.961416932548.issue30224@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could you please run microbenchmarks for affected code to be sure that changes don't hit performance (if for example PyLong_FromLongLong is significantly slower than PyLong_FromLong)? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 08:06:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 12:06:25 +0000 Subject: [issue30228] Open a file in text mode requires too many syscalls In-Reply-To: <1493723485.87.0.646779044512.issue30228@psf.upfronthosting.co.za> Message-ID: <1493726785.44.0.665297068866.issue30228@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1492 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 08:17:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 12:17:20 +0000 Subject: [issue30228] Open a file in text mode requires too many syscalls In-Reply-To: <1493723485.87.0.646779044512.issue30228@psf.upfronthosting.co.za> Message-ID: <1493727440.48.0.676421747236.issue30228@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- components: +IO _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 08:17:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 12:17:53 +0000 Subject: [issue30229] Closing a BufferedRandom calls lseek() mutliple times Message-ID: <1493727473.11.0.059505577548.issue30229@psf.upfronthosting.co.za> New submission from STINNER Victor: Given the following snippet: with open("x", "w+", encoding="utf-8") as fp: pass Creating the TextIOWrapper object requires many syscall: see the issue #30228. But I also noticed that *closing* such object also requires multiple lseek() syscalls, whereas the snippet doesn't read nor write anything. Attached PR avoids lseek() if read and write buffers are empty. ---------- components: IO messages: 292749 nosy: haypo, pitrou, serhiy.storchaka priority: normal severity: normal status: open title: Closing a BufferedRandom calls lseek() mutliple times type: performance versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 08:23:20 2017 From: report at bugs.python.org (david-cpi) Date: Tue, 02 May 2017 12:23:20 +0000 Subject: [issue30212] test_ssl.py is broken in Centos7 In-Reply-To: <1493507734.99.0.744824306698.issue30212@psf.upfronthosting.co.za> Message-ID: <1493727800.79.0.752475861687.issue30212@psf.upfronthosting.co.za> david-cpi added the comment: Hello Victor, in 3.6.1 the test passes but it's because on sub-test was removed. The one generating the issue is NetworkedBIOTests which is not found in 3.6.1. in 3.5.2: if support.is_resource_enabled('network'): tests.append(NetworkedTests) tests.append(NetworkedBIOTests) in 3.6.1 if support.is_resource_enabled('network'): tests.append(NetworkedTests) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 08:52:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 12:52:20 +0000 Subject: [issue30212] test_ssl.py is broken in Centos7 In-Reply-To: <1493507734.99.0.744824306698.issue30212@psf.upfronthosting.co.za> Message-ID: <1493729540.4.0.097304886348.issue30212@psf.upfronthosting.co.za> STINNER Victor added the comment: > in 3.6.1 the test passes but it's because on sub-test was removed. The unit tests still exist and were enhanced. On Python 3.5, the BIO read-write data test used the external server self-signed.pythontest.net. On Python 3.6, the test now uses a server running locally. See issue #25940 and commit 3840b2ac6728d1940a7efc2ecab2c7d9a100c080. Note: the failing test was renamed to test_bio_read_write_data. -- David: You can try the following command to run the failing test in verbose mode (and only run this test). You can add --forever option to run the test in a loop until it fails. In your output, I see "Needed 3 calls to complete do_handshake(). Needed 1 calls to complete write()." but not "Needed 2 calls to complete read(). Needed 1 calls to complete unwrap().". For Python 3.5: haypo at selma$ ./python -m test -u all test_ssl -v -m test_read_write_data == CPython 3.5.3+ (default, May 2 2017, 11:20:59) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] == Linux-4.10.11-200.fc25.x86_64-x86_64-with-fedora-25-Twenty_Five little-endian == hash algorithm: siphash24 64bit == /home/haypo/prog/python/3.5/build/test_python_20359 Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0) [1/1] test_ssl test_ssl: testing with 'OpenSSL 1.0.2k-fips 26 Jan 2017' (1, 0, 2, 11, 15) under Linux ('Fedora', '25', 'Twenty Five') HAS_SNI = True OP_ALL = 0x800003ff OP_NO_TLSv1_1 = 0x10000000 test_read_write_data (test.test_ssl.NetworkedBIOTests) ... Needed 3 calls to complete do_handshake(). Needed 1 calls to complete write(). Needed 2 calls to complete read(). Needed 1 calls to complete unwrap(). ok ---------------------------------------------------------------------- Ran 1 test in 0.456s OK 1 test OK. For Python 3.6: haypo at selma$ ./python -m test test_ssl -v -m test_bio_read_write_data == CPython 3.6.1+ (default, May 2 2017, 10:23:14) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] == Linux-4.10.11-200.fc25.x86_64-x86_64-with-fedora-25-Twenty_Five little-endian == hash algorithm: siphash24 64bit == cwd: /home/haypo/prog/python/3.6/build/test_python_20383 == encodings: locale=UTF-8, FS=utf-8 Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0) Run tests sequentially 0:00:00 [1/1] test_ssl test_ssl: testing with 'OpenSSL 1.0.2k-fips 26 Jan 2017' (1, 0, 2, 11, 15) under Linux ('Fedora', '25', 'Twenty Five') HAS_SNI = True OP_ALL = 0x800003ff OP_NO_TLSv1_1 = 0x10000000 test_bio_read_write_data (test.test_ssl.SimpleBackgroundTests) ... server: new connection from ('127.0.0.1', 42160) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now None Needed 3 calls to complete do_handshake(). Needed 1 calls to complete write(). Needed 2 calls to complete read(). Needed 2 calls to complete unwrap(). ok ---------------------------------------------------------------------- Ran 1 test in 0.058s OK 1 test OK. Total duration: 413 ms Tests result: SUCCESS ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 09:02:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 13:02:52 +0000 Subject: [issue30229] Closing a BufferedRandom calls lseek() mutliple times In-Reply-To: <1493727473.11.0.059505577548.issue30229@psf.upfronthosting.co.za> Message-ID: <1493730172.99.0.909800814964.issue30229@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1493 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 09:10:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 13:10:41 +0000 Subject: [issue30228] Open a file in text mode requires too many syscalls In-Reply-To: <1493723485.87.0.646779044512.issue30228@psf.upfronthosting.co.za> Message-ID: <1493730641.95.0.556608516279.issue30228@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 999707373630ce090300c3c542066f493b12faa0 by Victor Stinner in branch 'master': bpo-30228: FileIO seek() and tell() set seekable (#1384) https://github.com/python/cpython/commit/999707373630ce090300c3c542066f493b12faa0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 09:26:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 13:26:59 +0000 Subject: [issue29641] ./configure --enable-optimizations && make && make install compiles Python twice In-Reply-To: <1487940405.63.0.836671374296.issue29641@psf.upfronthosting.co.za> Message-ID: <1493731619.19.0.565965165605.issue29641@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, I tested again: in fact, "it works" but "make install" recompiles Python from scratch (1st build with -fprofile-generate, profile task, 2nd build with -fprofile-use) whereas "make" just succeeded to build Python!? ---------- title: make install failure when using ./configure --enable-optimizations -> ./configure --enable-optimizations && make && make install compiles Python twice _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 09:31:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 13:31:50 +0000 Subject: [issue30132] [Windows] test_distutils leaks a vc140.pdb file In-Reply-To: <1492791460.36.0.72947186821.issue30132@psf.upfronthosting.co.za> Message-ID: <1493731910.57.0.669063360245.issue30132@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1494 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 09:34:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 13:34:12 +0000 Subject: [issue29641] ./configure --enable-optimizations && make && make install compiles Python twice In-Reply-To: <1487940405.63.0.836671374296.issue29641@psf.upfronthosting.co.za> Message-ID: <1493732052.22.0.68413409714.issue29641@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, it's just a duplicate of issue #29243. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> --enable-optimizations makes common build commands always need to compile from scratch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 09:40:44 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 02 May 2017 13:40:44 +0000 Subject: [issue30224] remove outdated checks in struct In-Reply-To: <1493710505.85.0.8689936336.issue30224@psf.upfronthosting.co.za> Message-ID: <1493732444.07.0.00832753955468.issue30224@psf.upfronthosting.co.za> Xiang Zhang added the comment: There seems no significant regression in performance. A microbenchmark against nu_longlong: ./python3 -m perf timeit --duplicate=1000 --compare-to /home/angwer/repos/cpython/python -s 'import struct; p = struct.Struct("@L")' 'p.unpack(b"d\x00\x00\x00\x00\x00\x00\x00")' python: ..................... 156 ns +- 10 ns python3: ..................... 157 ns +- 9 ns Median +- std dev: [python] 156 ns +- 10 ns -> [python3] 157 ns +- 9 ns: 1.01x slower Not significant! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 09:50:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 13:50:45 +0000 Subject: [issue30132] [Windows] test_distutils leaks a vc140.pdb file In-Reply-To: <1492791460.36.0.72947186821.issue30132@psf.upfronthosting.co.za> Message-ID: <1493733045.61.0.594487986332.issue30132@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 30768958490c658fba0fe24f1cabbdad44be22ff by Victor Stinner in branch '3.6': bpo-30132: distutils BuildExtTestCase use temp_cwd (#1387) https://github.com/python/cpython/commit/30768958490c658fba0fe24f1cabbdad44be22ff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 09:53:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 13:53:00 +0000 Subject: [issue30132] [Windows] test_distutils leaks a vc140.pdb file In-Reply-To: <1492791460.36.0.72947186821.issue30132@psf.upfronthosting.co.za> Message-ID: <1493733180.42.0.362543259049.issue30132@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1495 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 09:55:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 13:55:46 +0000 Subject: [issue30131] test_logging leaks a "dangling" thread In-Reply-To: <1492791121.95.0.979158654075.issue30131@psf.upfronthosting.co.za> Message-ID: <1493733346.87.0.736438523361.issue30131@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, this bug is now fixed in 3.5, 3.6 and master (3.7). ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 09:56:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 13:56:35 +0000 Subject: [issue30173] x86 Windows7 3.x buildbot has the issue #26624 bug In-Reply-To: <1493218209.79.0.825922715699.issue30173@psf.upfronthosting.co.za> Message-ID: <1493733395.56.0.455145110436.issue30173@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't see the bug again, I confirm that the bug was fixed. Thanks David. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 09:56:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 May 2017 13:56:48 +0000 Subject: [issue30228] Open a file in text mode requires too many syscalls In-Reply-To: <1493723485.87.0.646779044512.issue30228@psf.upfronthosting.co.za> Message-ID: <1493733408.46.0.774043431149.issue30228@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't like PR 1385. abs_pos is a private attribute used only in _io._Buffered.seek() for readable streams when whence is SEEK_SET or SEEK_CUR. There is no guarantee that it contains relevant value for non-readable stream. You could call buffer.seek(0, SEEK_CUR) rather than buffer.tell() for avoiding a system call for readable stream. But this looks as a shamanism too. Or provide a function similar to the RAW_TELL macro but just checking if the current position is 0. If define it in bufferedio.c near _buffered_raw_tell() it is more chance that it is consistent with abs_pos and future changes don't break it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 10:11:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 14:11:03 +0000 Subject: [issue30104] clang 4.0 miscompiles dtoa.c, giving broken float parsing and printing In-Reply-To: <1492634362.26.0.662150141345.issue30104@psf.upfronthosting.co.za> Message-ID: <1493734263.81.0.282517681376.issue30104@psf.upfronthosting.co.za> STINNER Victor added the comment: dtoa.c is now compiled with -fno-string-aliasing (for any clang version, not only clang 4.0) on Python 3.5, 3.6 and 3.7. It was decided to not touch dtoa.c to not diverge from upstream. Thanks Dimitry Andric and Mark Dickinson for your reviews and support in this cryptic issue! Note 1: We consider that Clang 4.0 is wrong, whereas GCC respects the C99 standard for aliasing on unions. But I don't think that it matters much who is wrong or not :-) Note 2: Python 2.7 already used -fno-strict-aliasing on all .c files because of its design of PyObject structures, fixed in Python 3. ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 10:11:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 14:11:13 +0000 Subject: [issue30124] Fix C aliasing issue in Python/dtoa.c to use strict aliasing on Clang 4.0 In-Reply-To: <1492766935.79.0.662322517567.issue30124@psf.upfronthosting.co.za> Message-ID: <1493734273.31.0.60700103255.issue30124@psf.upfronthosting.co.za> STINNER Victor added the comment: dtoa.c is now compiled with -fno-string-aliasing (for any clang version, not only clang 4.0) on Python 3.5, 3.6 and 3.7. It was decided to not touch dtoa.c to not diverge from upstream. Thanks Dimitry Andric and Mark Dickinson for your reviews and support in this cryptic issue! Note 1: We consider that Clang 4.0 is wrong, whereas GCC respects the C99 standard for aliasing on unions. But I don't think that it matters much who is wrong or not :-) Note 2: Python 2.7 already used -fno-strict-aliasing on all .c files because of its design of PyObject structures, fixed in Python 3. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 10:18:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 May 2017 14:18:06 +0000 Subject: [issue30224] remove outdated checks in struct In-Reply-To: <1493710505.85.0.8689936336.issue30224@psf.upfronthosting.co.za> Message-ID: <1493734686.52.0.717279871127.issue30224@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I see a tiny 3% regression. $ ./python -m timeit -s 'import struct; u = struct.Struct("100000Q").unpack; b = b"abcd\0\0\0\0"*100000' 'u(b)' Unpatched: 50 loops, best of 5: 9.34 msec per loop Patched: 50 loops, best of 5: 9.66 msec per loop $ ./python -m timeit -s 'import struct; u = struct.Struct("<100000Q").unpack; b = b"abcd\0\0\0\0"*100000' 'u(b)' Unpatched: 50 loops, best of 5: 9.37 msec per loop Patched: 50 loops, best of 5: 9.71 msec per loop $ ./python -m timeit -s 'import struct; u = struct.Struct(">100000Q").unpack; b = b"\0\0\0\0dcba"*100000' 'u(b)' Unpatched: 20 loops, best of 5: 11.6 msec per loop Patched: 20 loops, best of 5: 12 msec per loop ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 10:26:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 14:26:07 +0000 Subject: [issue30132] [Windows] test_distutils leaks a vc140.pdb file In-Reply-To: <1492791460.36.0.72947186821.issue30132@psf.upfronthosting.co.za> Message-ID: <1493735167.0.0.620899910937.issue30132@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3ceeb84b5a90e327ef55190105e82c926b0b8aab by Victor Stinner in branch '3.5': bpo-30132: distutils BuildExtTestCase use temp_cwd (#1387) (#1388) https://github.com/python/cpython/commit/3ceeb84b5a90e327ef55190105e82c926b0b8aab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 10:30:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 14:30:08 +0000 Subject: [issue30199] Warning -- asyncore.socket_map was modified by test_ssl In-Reply-To: <1493386700.85.0.622931101422.issue30199@psf.upfronthosting.co.za> Message-ID: <1493735408.86.0.641038518164.issue30199@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1496 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 10:30:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 14:30:27 +0000 Subject: [issue30199] Warning -- asyncore.socket_map was modified by test_ssl In-Reply-To: <1493386700.85.0.622931101422.issue30199@psf.upfronthosting.co.za> Message-ID: <1493735427.39.0.447672408914.issue30199@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1497 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 10:30:45 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 02 May 2017 14:30:45 +0000 Subject: [issue30230] Move quick test in PyObject_IsSubClass outside if PyType_CheckExact guard Message-ID: <1493735445.03.0.987403403044.issue30230@psf.upfronthosting.co.za> New submission from Jim Fasarakis-Hilliard: Currently the first lines in PyObject_IsSubClass are: /* We know what type's __subclasscheck__ does. */ if (PyType_CheckExact(cls)) { /* Quick test for an exact match */ if (derived == cls) return 1; return recursive_issubclass(derived, cls); } The if (derived == cls) runs only if PyType_CheckExact is True which doesn't hold for any classes with a custom metaclass. As a result, a check of the form issubclass(Sequence, Sequence) will take a slow path that invokes __subclasscheck__. I'm not sure if this was placed inside there due to some wild edge-case, though. PyObject_IsInstance uses the same trick and does so outside the if (PyType_CheckExact(cls)) check. I'll gladly submit a PR if this indeed needs fixing and not by design. ---------- components: Interpreter Core messages: 292764 nosy: Jim Fasarakis-Hilliard priority: normal severity: normal status: open title: Move quick test in PyObject_IsSubClass outside if PyType_CheckExact guard type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 10:35:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 May 2017 14:35:12 +0000 Subject: [issue30230] Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard In-Reply-To: <1493735445.03.0.987403403044.issue30230@psf.upfronthosting.co.za> Message-ID: <1493735712.03.0.293791806241.issue30230@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: Move quick test in PyObject_IsSubClass outside if PyType_CheckExact guard -> Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard type: behavior -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 10:35:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 14:35:25 +0000 Subject: [issue30125] test_SEH() of test_ctypes logs "Windows fatal exception: access violation" In-Reply-To: <1492777398.7.0.77484107928.issue30125@psf.upfronthosting.co.za> Message-ID: <1493735725.35.0.480511598955.issue30125@psf.upfronthosting.co.za> STINNER Victor added the comment: faulthandler.disable() has been fixed on Windows in Python 3.6 and master (3.7). The test_ctypes warning has been made quiet in Python 3.6 and master (3.7) as well. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 10:38:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 14:38:20 +0000 Subject: [issue30126] CheckTraceCallbackContent of test_sqlite3 fails on OS X Tiger In-Reply-To: <1492777594.65.0.679686114743.issue30126@psf.upfronthosting.co.za> Message-ID: <1493735900.53.0.654742427314.issue30126@psf.upfronthosting.co.za> STINNER Victor added the comment: David: "Ok, this should be resolved." Oh, thank you! I confirm that test_sqlite3 pass again! ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 10:40:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 14:40:04 +0000 Subject: [issue30169] test_multiprocessing_spawn crashed on AMD64 Windows8.1 Non-Debug 3.x buildbot In-Reply-To: <1493211266.82.0.263574668344.issue30169@psf.upfronthosting.co.za> Message-ID: <1493736004.47.0.463167978462.issue30169@psf.upfronthosting.co.za> STINNER Victor added the comment: Sadly, the random issue didn't reoccur in the following 13 builds. So I close the issue. I will reopen it if I see the crash again. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 10:44:44 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 14:44:44 +0000 Subject: [issue30231] test_imaplib needs a TLS server accepting self-signed certificates Message-ID: <1493736284.13.0.622029485806.issue30231@psf.upfronthosting.co.za> New submission from STINNER Victor: The public cyrus.andrew.cmu.edu IMAP server (port 993) doesn't accept TLS connection using our self-signed x509 certificate. The following two tests of test_imaplib were skipped by the issue #30175: * test_logincapa_with_client_certfile() of RemoteIMAP_SSLTest * test_logincapa_with_client_ssl_context() of RemoteIMAP_SSLTest We should either remove these tests or spawn an IMAP server which accepts such certificate on pythontest.net. @Benjamin: Is there someone available to build such IMAP server on pythontest.net? Or do you suggest to just remove the 2 unit tests? ---------- components: Tests messages: 292768 nosy: benjamin.peterson, dstufft, gregory.p.smith, haypo, pitrou priority: normal severity: normal status: open title: test_imaplib needs a TLS server accepting self-signed certificates versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 10:47:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 14:47:28 +0000 Subject: [issue30175] Random test_imaplib.test_logincapa_with_client_certfile failure on x86 Gentoo Installed with X 3.x In-Reply-To: <1493221828.31.0.979573561746.issue30175@psf.upfronthosting.co.za> Message-ID: <1493736448.08.0.0618014911953.issue30175@psf.upfronthosting.co.za> STINNER Victor added the comment: Buildbots are now fixed, I close the issue. I created the issue #30231 to propose to run an IMAP server on pythontest.net, or to remove the two unit tests which are currently skipped. Thanks for your help Antoine Pitrou! ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 10:48:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 14:48:39 +0000 Subject: [issue30199] Warning -- asyncore.socket_map was modified by test_ssl In-Reply-To: <1493386700.85.0.622931101422.issue30199@psf.upfronthosting.co.za> Message-ID: <1493736519.01.0.234978108378.issue30199@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 89a54c73746417bae003a9985668fa665040d5d9 by Victor Stinner in branch '3.5': bpo-30199: test_ssl closes all asyncore channels (#1381) (#1389) https://github.com/python/cpython/commit/89a54c73746417bae003a9985668fa665040d5d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 10:49:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 14:49:12 +0000 Subject: [issue30199] Warning -- asyncore.socket_map was modified by test_ssl In-Reply-To: <1493386700.85.0.622931101422.issue30199@psf.upfronthosting.co.za> Message-ID: <1493736552.89.0.063549349451.issue30199@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3c422b92653df05c7034136b77f76376aa5aec4f by Victor Stinner in branch '3.6': bpo-30199: test_ssl closes all asyncore channels (#1381) (#1390) https://github.com/python/cpython/commit/3c422b92653df05c7034136b77f76376aa5aec4f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 10:55:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 14:55:52 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1493736952.98.0.0757171559537.issue27593@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 2c7085fd7b00cba8b5ab258c62453b6a12418b73 by Victor Stinner in branch '2.7': bpo-27593: Get SCM build info from git instead of hg (#1327) https://github.com/python/cpython/commit/2c7085fd7b00cba8b5ab258c62453b6a12418b73 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 10:56:31 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 02 May 2017 14:56:31 +0000 Subject: [issue30224] remove outdated checks in struct In-Reply-To: <1493710505.85.0.8689936336.issue30224@psf.upfronthosting.co.za> Message-ID: <1493736991.98.0.214312377084.issue30224@psf.upfronthosting.co.za> Xiang Zhang added the comment: The test on my box is reverse and stable, python3 is unpatched and python is patched. Anyway, it can't be called significant. ./python3 -m perf timeit --compare-to /home/angwer/repos/cpython/python -s 'import struct; u = struct.Struct("100000Q").unpack; b=b"abcd\x00\x00\x00\x00"*100000' 'u(b)' python: ..................... 2.96 ms +- 0.05 ms python3: ..................... 3.13 ms +- 0.03 ms Median +- std dev: [python] 2.96 ms +- 0.05 ms -> [python3] 3.13 ms +- 0.03 ms: 1.06x slower ./python3 -m perf timeit --compare-to /home/angwer/repos/cpython/python -s 'import struct; u = struct.Struct("<100000Q").unpack; b=b"abcd\x00\x00\x00\x00"*100000' 'u(b)' python: ..................... 2.96 ms +- 0.05 ms python3: ..................... 3.13 ms +- 0.14 ms Median +- std dev: [python] 2.96 ms +- 0.05 ms -> [python3] 3.13 ms +- 0.14 ms: 1.06x slower ./python3 -m perf timeit --compare-to /home/angwer/repos/cpython/python -s 'import struct; u = struct.Struct(">100000Q").unpack; b=b"\x00\x00\x00\x00dcba"*100000' 'u(b)' python: ..................... 3.51 ms +- 0.09 ms python3: ..................... 3.67 ms +- 0.06 ms Median +- std dev: [python] 3.51 ms +- 0.09 ms -> [python3] 3.67 ms +- 0.06 ms: 1.05x slower ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 11:04:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 15:04:23 +0000 Subject: [issue30232] configure: support Git worktree Message-ID: <1493737463.82.0.0521929731539.issue30232@psf.upfronthosting.co.za> New submission from STINNER Victor: configure.ac tests if .git/HEAD file exists to decide if it should get the git version / tag / branch. I use git worktree to get 2.7, 3.5, 3.6 and master in their own directory. When using git worktree, ".git" is a text file with a content like: haypo at selma$ cat ~/prog/python/2.7/.git gitdir: /home/haypo/prog/python/master/.git/worktrees/2.7 Git supports such file, but configure.ac doesn't to Git in that case. Attached PR fixes configure.ac to support Git worktree. ---------- components: Build messages: 292774 nosy: brett.cannon, haypo, ncoghlan priority: normal severity: normal status: open title: configure: support Git worktree versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 11:05:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 15:05:50 +0000 Subject: [issue30232] configure: support Git worktree In-Reply-To: <1493737463.82.0.0521929731539.issue30232@psf.upfronthosting.co.za> Message-ID: <1493737550.03.0.148483876825.issue30232@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1498 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 11:06:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 15:06:30 +0000 Subject: [issue30232] configure: support Git worktree In-Reply-To: <1493737463.82.0.0521929731539.issue30232@psf.upfronthosting.co.za> Message-ID: <1493737590.89.0.760373496778.issue30232@psf.upfronthosting.co.za> STINNER Victor added the comment: See the bpo-29798 which added support for Git worktree in `make patchcheck`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 11:20:04 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 May 2017 15:20:04 +0000 Subject: [issue30205] socket.getsockname() type mismatch with AF_UNIX on Linux In-Reply-To: <1493456110.97.0.437176774734.issue30205@psf.upfronthosting.co.za> Message-ID: <1493738404.19.0.632480950991.issue30205@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 495b5021e73e3c4b6404417ecf4fa83aa10297f0 by Antoine Pitrou in branch 'master': bpo-30205: Fix getsockname() for unbound AF_UNIX sockets on Linux (#1370) https://github.com/python/cpython/commit/495b5021e73e3c4b6404417ecf4fa83aa10297f0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 11:21:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 May 2017 15:21:16 +0000 Subject: [issue30224] remove outdated checks in struct In-Reply-To: <1493710505.85.0.8689936336.issue30224@psf.upfronthosting.co.za> Message-ID: <1493738476.9.0.492742452157.issue30224@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Your patch LGTM. Current code in _struct.c is ugly. I just wonder if it is worth to optimize PyLong_FromLongLong and PyLong_FromUnsignedLongLong if they are slower than PyLong_FromLong and PyLong_FromUnsignedLong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 11:21:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 15:21:53 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1493738513.8.0.0996508683651.issue27593@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1499 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 11:22:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 15:22:30 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1493738550.2.0.433099465828.issue27593@psf.upfronthosting.co.za> STINNER Victor added the comment: With https://github.com/python/cpython/pull/1392 Python 2.7 should up to date with Python master, and this issue should be fixed. Or did I miss something? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 11:26:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 May 2017 15:26:28 +0000 Subject: [issue30223] Add Lib/test/__main__.py in 2.7 In-Reply-To: <1493708216.05.0.00341541887295.issue30223@psf.upfronthosting.co.za> Message-ID: <1493738788.55.0.407615011547.issue30223@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 43566aee12a177a7aef5d732abf768251e6b8a12 by Serhiy Storchaka in branch '2.7': [2.7] bpo-30223: Add Lib/test/__main__.py. (#1373) https://github.com/python/cpython/commit/43566aee12a177a7aef5d732abf768251e6b8a12 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 11:26:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 15:26:45 +0000 Subject: [issue30132] [Windows] test_distutils leaks a vc140.pdb file In-Reply-To: <1492791460.36.0.72947186821.issue30132@psf.upfronthosting.co.za> Message-ID: <1493738805.59.0.00345209646635.issue30132@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, this issue is now fixed in 3.5, 3.6 and master (3.7). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 11:38:11 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 02 May 2017 15:38:11 +0000 Subject: [issue30205] socket.getsockname() type mismatch with AF_UNIX on Linux In-Reply-To: <1493456110.97.0.437176774734.issue30205@psf.upfronthosting.co.za> Message-ID: <1493739491.54.0.00666599554729.issue30205@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 11:46:42 2017 From: report at bugs.python.org (Bob Ippolito) Date: Tue, 02 May 2017 15:46:42 +0000 Subject: [issue29992] Expose parse_string in JSONDecoder In-Reply-To: <1491380525.56.0.628505740968.issue29992@psf.upfronthosting.co.za> Message-ID: <1493740002.02.0.534109635299.issue29992@psf.upfronthosting.co.za> Bob Ippolito added the comment: That's not a very convincing argument. Python 2 only returns byte strings if the input is a byte string and the contents of the string are all ASCII. Facilitating that sort of behavior in 3 would probably cause more issues than it solves. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 12:21:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 16:21:24 +0000 Subject: [issue30233] [3.5] Warning -- locale was modified by test_idle Message-ID: <1493742084.38.0.422431531448.issue30233@psf.upfronthosting.co.za> New submission from STINNER Victor: Importing idlelib.IOBinding modifies the LC_CTYPE locale. For example, this module is imported by idlelib.EditorWindow which is imported by idlelib.idle_test.test_formatparagraph. As a consequence, running test_idle changes locales and the following warning is logged: [3.5] Warning -- locale was modified by test_idle http://buildbot.python.org/all/builders/AMD64%20Windows10%203.5/builds/224/steps/test/logs/warnings%20%281%29 I didn't check yet why I only see this warning on 3.5 buildbots. ---------- assignee: terry.reedy components: IDLE, Tests, Windows messages: 292783 nosy: haypo, paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware priority: normal severity: normal status: open title: [3.5] Warning -- locale was modified by test_idle versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 12:30:17 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 02 May 2017 16:30:17 +0000 Subject: [issue30234] Remove duplicate checks in test_isinstance Message-ID: <1493742617.78.0.160398205628.issue30234@psf.upfronthosting.co.za> New submission from Jim Fasarakis-Hilliard: The test file duplicates some isinstance and issubclass checks due to the distinction of classes in Python 2. Proposed PR removes duplicate asserts. ---------- components: Tests messages: 292784 nosy: Jim Fasarakis-Hilliard priority: normal severity: normal status: open title: Remove duplicate checks in test_isinstance versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 12:32:11 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 02 May 2017 16:32:11 +0000 Subject: [issue30234] Remove duplicate checks in test_isinstance In-Reply-To: <1493742617.78.0.160398205628.issue30234@psf.upfronthosting.co.za> Message-ID: <1493742731.42.0.737223167914.issue30234@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- pull_requests: +1500 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 12:32:17 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 02 May 2017 16:32:17 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1493742737.69.0.562397169846.issue27593@psf.upfronthosting.co.za> Brett Cannon added the comment: I think that covers it! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 13:00:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 May 2017 17:00:51 +0000 Subject: [issue30223] Add Lib/test/__main__.py in 2.7 In-Reply-To: <1493708216.05.0.00341541887295.issue30223@psf.upfronthosting.co.za> Message-ID: <1493744451.82.0.134098464332.issue30223@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: These new features affect only core developers and other contributors fixing bugs in 2.7. I don't think the "no new features" guideline is applicable here. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 13:05:52 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 May 2017 17:05:52 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493744752.31.0.545429790604.issue19903@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I will try to do that when I can. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 13:12:39 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 02 May 2017 17:12:39 +0000 Subject: [issue30235] Validate shutil supports path-like objects, update docs accordingly Message-ID: <1493745159.76.0.694023923588.issue30235@psf.upfronthosting.co.za> New submission from Brett Cannon: If you look at the docs for shutil (https://docs.python.org/3/library/shutil.html), you will notice all over it says things like "path names given as strings". The question is whether that statement is true in the face of path-like objects? If it is true then the corresponding function in shutil should be updated to accept path-like objects. If it's false then the docs for the function should be updated. This is a meta-issue to track working on the overall module (IOW separate PRs to fix things piecemeal is fine). Looks like the following functions need checking/updating: - copyfile - copymode - copystat - copy - copy2 - copytree - rmtree - move - disk_usage - chown - make_archive [ unpack_archive is covered by https://github.com/python/cpython/pull/1367] ---------- components: Library (Lib) messages: 292788 nosy: brett.cannon priority: normal severity: normal stage: test needed status: open title: Validate shutil supports path-like objects, update docs accordingly type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 13:14:06 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 02 May 2017 17:14:06 +0000 Subject: [issue30235] Validate shutil supports path-like objects, update docs accordingly In-Reply-To: <1493745159.76.0.694023923588.issue30235@psf.upfronthosting.co.za> Message-ID: <1493745246.34.0.834585199791.issue30235@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 13:14:09 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 02 May 2017 17:14:09 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1493745249.55.0.230186635723.issue28556@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset f06e0218ef6007667f5d61184b85a81a0466d3ae by Mariatta (Ivan Levkivskyi) in branch 'master': bpo-28556: Routine updates to typing (#1366) https://github.com/python/cpython/commit/f06e0218ef6007667f5d61184b85a81a0466d3ae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 13:14:36 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Tue, 02 May 2017 17:14:36 +0000 Subject: [issue30235] Validate shutil supports path-like objects, update docs accordingly In-Reply-To: <1493745159.76.0.694023923588.issue30235@psf.upfronthosting.co.za> Message-ID: <1493745276.18.0.362916683181.issue30235@psf.upfronthosting.co.za> Changes by Jelle Zijlstra : ---------- pull_requests: +1501 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 13:19:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 May 2017 17:19:43 +0000 Subject: [issue30236] Add options --match and --failfast for test.regrtest in 2.7 Message-ID: <1493745583.13.0.200085000126.issue30236@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Proposed patch adds options -m/--match and -G/--failfast for test.regrtest in 2.7. They are two the most wanted by me features absent in 2.7. I use them when add new test in long running test file. Often this needs running the test multiple times, incrementally changing the test or code until the test cover all cases and successful. Waiting running other tests in the same file is just waste of time. Other cases -- fast running tests related to some feature in different files. For example -m '*ickl*' allows to run all pickle-related tests. The code is backported from 3.3. This is the last version using getopt and the most compatible with 2.7. There was several major rewriting of regrtest in following versions. ---------- components: Tests messages: 292790 nosy: ezio.melotti, haypo, ncoghlan, serhiy.storchaka, xiang.zhang priority: normal severity: normal stage: patch review status: open title: Add options --match and --failfast for test.regrtest in 2.7 type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 13:26:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 May 2017 17:26:47 +0000 Subject: [issue30236] Add options --match and --failfast for test.regrtest in 2.7 In-Reply-To: <1493745583.13.0.200085000126.issue30236@psf.upfronthosting.co.za> Message-ID: <1493746007.3.0.520491051097.issue30236@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1502 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 13:46:07 2017 From: report at bugs.python.org (Eryk Sun) Date: Tue, 02 May 2017 17:46:07 +0000 Subject: [issue30237] Access violation due to CancelSynchronousIo of console read Message-ID: <1493747167.63.0.66545140377.issue30237@psf.upfronthosting.co.za> New submission from Eryk Sun: When ReadConsole is canceled by CancelSynchronousIo [1], for some reason the call still succeeds. It's probably related to the hack that maps STATUS_ALERTED to ERROR_OPERATION_ABORTED when a console read is interrupted by Ctrl+C. The problem is that, when canceled, ReadConsole doesn't update the value of lpNumberOfCharsRead. Thus in read_console_w in Modules/_io/winconsoleio.c, the value of `n` is a random number that gets added to `readlen`, which is subsequently used to index into `buf`. The problem is the same for `n_read` in _PyOS_WindowsConsoleReadline. For example, in 3.6: import sys, ctypes, threading kernel32 = ctypes.WinDLL('kernel32') hMain = kernel32.OpenThread(1, 0, kernel32.GetCurrentThreadId()) t = threading.Timer(30, kernel32.CancelSynchronousIo, (hMain,)) t.start() sys.stdin.readline() Breakpoint 0 hit KERNELBASE!ReadConsoleW: 00007ffc`fb558200 4053 push rbx 0:000> pt KERNELBASE!GetImmersiveColorTypeFromName+0x49d2: 00007ffc`fb5d2672 c3 ret 0:000> r rax rax=0000000000000001 0:000> ?? @$teb->LastErrorValue == 995 bool true 0:000> gu python36!read_console_w+0x8b: 00000000`6e43a483 85c0 test eax,eax 0:000> ?? n unsigned long 0xefdc39e8 0:000> g (1154.11fc): Access violation - code c0000005 (first chance) First chance exceptions are reported before any exception handling. This exception may be expected and handled. python36!read_console_w+0x11f: 00000000`6e43a517 66833a0a cmp word ptr [rdx],0Ah ds:000001e8`cfb72c7e=???? If the value of `n` is initialized to (DWORD)-1, then checking for a failed or canceled call could be implemented as follows: if (!res || (n == (DWORD)-1 && GetLastError() == ERROR_OPERATION_ABORTED)) { err = GetLastError(); break; } [1]: https://msdn.microsoft.com/en-us/library/ms684958 ---------- components: IO, Windows keywords: easy (C) messages: 292791 nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: test needed status: open title: Access violation due to CancelSynchronousIo of console read type: crash versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 13:48:52 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 May 2017 17:48:52 +0000 Subject: [issue30233] [3.5] Warning -- locale was modified by test_idle In-Reply-To: <1493742084.38.0.422431531448.issue30233@psf.upfronthosting.co.za> Message-ID: <1493747332.9.0.708432482278.issue30233@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The warning, which became a failure in 3.6, was averted for 3.6 by #27372. I intentionally did not patch 3.5 and merge forward because the warning was neither unique nor a failure, while adding the merge would have been a considerable bother. Also, I anticipated that the 3.5.3 release after 3.6.0 would be the last 3.5 bugfix release as per normal policy, so that this would be a moot point by now. (And I have no idea why normal policy was not followed.) I think this issue should be closed as any of "duplicate", "out of date", or "won't fix". ---------- assignee: terry.reedy -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 13:54:11 2017 From: report at bugs.python.org (Eryk Sun) Date: Tue, 02 May 2017 17:54: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: <1493747651.89.0.256423747424.issue30237@psf.upfronthosting.co.za> Eryk Sun added the comment: Oops, I pasted the MSDN link for ReadConsole instead of CancelSynchronousIo [1]. [1]: https://msdn.microsoft.com/en-us/library/aa363794 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 14:00:36 2017 From: report at bugs.python.org (Zachary Ware) Date: Tue, 02 May 2017 18:00:36 +0000 Subject: [issue30223] Add Lib/test/__main__.py in 2.7 In-Reply-To: <1493708216.05.0.00341541887295.issue30223@psf.upfronthosting.co.za> Message-ID: <1493748036.11.0.315670997638.issue30223@psf.upfronthosting.co.za> Zachary Ware added the comment: Once again, I agree with the change, but I have an unhappy buildbot :) http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%20with%20X%202.7/builds/124 This time it is due to python 2.4 not supporting the absolute_import __future__ feature. By this point, I think we could get away with just removing the python 2.4 pickle compat tests. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 14:19:30 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 May 2017 18:19:30 +0000 Subject: [issue30223] Add Lib/test/__main__.py in 2.7 In-Reply-To: <1493708216.05.0.00341541887295.issue30223@psf.upfronthosting.co.za> Message-ID: <1493749170.15.0.367130656255.issue30223@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1503 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 14:24:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 May 2017 18:24:21 +0000 Subject: [issue30223] Add Lib/test/__main__.py in 2.7 In-Reply-To: <1493708216.05.0.00341541887295.issue30223@psf.upfronthosting.co.za> Message-ID: <1493749461.82.0.776988329795.issue30223@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oh, it is so easy to break test_xpickle. But I think this test is very important. It is pity that test_xpickle is removed in 3.x. I hope PR 1395 will fix test_xpickle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 14:35:29 2017 From: report at bugs.python.org (Zachary Ware) Date: Tue, 02 May 2017 18:35:29 +0000 Subject: [issue30223] Add Lib/test/__main__.py in 2.7 In-Reply-To: <1493708216.05.0.00341541887295.issue30223@psf.upfronthosting.co.za> Message-ID: <1493750129.29.0.600571540468.issue30223@psf.upfronthosting.co.za> Zachary Ware added the comment: 2.4 is rather far out of date, but PR1395 is simple enough. I would support re-adding test_xpickle in 3.x, and can ensure that every major version is available on that buildbot to exercise it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 14:56:54 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 May 2017 18:56:54 +0000 Subject: [issue30223] Add Lib/test/__main__.py in 2.7 In-Reply-To: <1493708216.05.0.00341541887295.issue30223@psf.upfronthosting.co.za> Message-ID: <1493751414.51.0.350634999686.issue30223@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 8e158b2316385497c7b6b818d8b45855d7f87f0b by Serhiy Storchaka in branch '2.7': [2.7] bpo-30223: Fix test_xpickle for Python 2.4. (#1395) https://github.com/python/cpython/commit/8e158b2316385497c7b6b818d8b45855d7f87f0b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 14:59:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 May 2017 18:59:07 +0000 Subject: [issue30223] Add Lib/test/__main__.py in 2.7 In-Reply-To: <1493708216.05.0.00341541887295.issue30223@psf.upfronthosting.co.za> Message-ID: <1493751547.23.0.351561069126.issue30223@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Zachary! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 15:31:56 2017 From: report at bugs.python.org (Daniel Lenski) Date: Tue, 02 May 2017 19:31:56 +0000 Subject: [issue30238] 2to3 doesn't detect or fix Exception indexing Message-ID: <1493753516.03.0.383972145792.issue30238@psf.upfronthosting.co.za> New submission from Daniel Lenski: Python 2.7 allows indexing an Exception object to access its args list. >>> e=Exception('foo','bar','baz') >>> assert e[0] is e.args[0] This doesn't work in 3.5: >>> e=Exception('foo','bar','baz') >>> e.args[0] 'foo' >>> e[0] TypeError: 'Exception' object is not subscriptable This conversion (e[x] -> e.args[x]) seems like it ought to be fairly straightforward to support in 2to3. ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 292799 nosy: dlenski priority: normal severity: normal status: open title: 2to3 doesn't detect or fix Exception indexing type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 15:42:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 19:42:51 +0000 Subject: [issue30232] configure: support Git worktree In-Reply-To: <1493737463.82.0.0521929731539.issue30232@psf.upfronthosting.co.za> Message-ID: <1493754171.44.0.535436251002.issue30232@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 5facdbb29169c2799c42f887cef4cd9d087b0167 by Victor Stinner in branch 'master': bpo-30232: Support Git worktree in configure.ac (#1391) https://github.com/python/cpython/commit/5facdbb29169c2799c42f887cef4cd9d087b0167 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 15:47:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 19:47:39 +0000 Subject: [issue30232] configure: support Git worktree In-Reply-To: <1493737463.82.0.0521929731539.issue30232@psf.upfronthosting.co.za> Message-ID: <1493754459.23.0.818572086289.issue30232@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1504 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 15:50:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 19:50:11 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1493754611.18.0.971695295781.issue27593@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset fd6c8bb89e834898c26620c9ab9afc6aaecb6b28 by Victor Stinner in branch '2.7': bpo-27593: Revise git SCM build info. (#744) (#746) (#1392) https://github.com/python/cpython/commit/fd6c8bb89e834898c26620c9ab9afc6aaecb6b28 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 16:36:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 20:36:00 +0000 Subject: [issue30232] configure: support Git worktree In-Reply-To: <1493737463.82.0.0521929731539.issue30232@psf.upfronthosting.co.za> Message-ID: <1493757360.51.0.218922175966.issue30232@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 9ed34a89532763cf89f5e11fffb91ef7dee29fed by Victor Stinner in branch 'master': bpo-30232: Regenerate configure (#1396) https://github.com/python/cpython/commit/9ed34a89532763cf89f5e11fffb91ef7dee29fed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 16:37:25 2017 From: report at bugs.python.org (Thomas Wouters) Date: Tue, 02 May 2017 20:37:25 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1493757445.0.0.697329492408.issue29094@psf.upfronthosting.co.za> Thomas Wouters added the comment: For the record, this new behaviour is wrong. It's not immediately obvious from the ZIP spec, but offsets have to be from the start of the file, not the archive, or ZIP64 can't work. And yes, that means you can't blindly concatenate ZIP files to other files, you have to rewrite them. The way to create an 'embedded' ZIP archive like requested in issue #26293 is to write it to a separate file (or file-like object). Making "a" have this magical and wrong-for-almost-anyone meaning is... confusing, to say the least. The change certainly doesn't belong in a bugfix release, but I guess it's too late for that now. It's also not documented; the docs mention this: If mode is 'a' and file refers to an existing ZIP file, then additional files are added to it. If file does not refer to a ZIP file, then a new ZIP archive is appended to the file. This is meant for adding a ZIP archive to another file (such as python.exe). which is ambiguous at best and certainly suggests the resulting file would be usable as-is, which is not the case if you use mode "a" (but *is* the case if you use mode "w", since 342bc734f523). ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 16:38:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 20:38:18 +0000 Subject: [issue27372] Test_idle should stop changing locale In-Reply-To: <1466629469.32.0.618350098053.issue27372@psf.upfronthosting.co.za> Message-ID: <1493757498.78.0.394264739267.issue27372@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1505 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 16:43:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 20:43:29 +0000 Subject: [issue30233] [3.5] Warning -- locale was modified by test_idle In-Reply-To: <1493742084.38.0.422431531448.issue30233@psf.upfronthosting.co.za> Message-ID: <1493757809.37.0.135561808716.issue30233@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1506 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 16:45:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 20:45:50 +0000 Subject: [issue30233] [3.5] Warning -- locale was modified by test_idle In-Reply-To: <1493742084.38.0.422431531448.issue30233@psf.upfronthosting.co.za> Message-ID: <1493757950.56.0.233500131083.issue30233@psf.upfronthosting.co.za> STINNER Victor added the comment: > I intentionally did not patch 3.5 and merge forward because the warning was neither unique nor a failure, I modified buildbots to log warnings in all branches. I'm now fixing all warnings to be able to identify quickly real bugs. The warning is reproduced by all 3.5 Windows buildbots. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 16:50:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 20:50:53 +0000 Subject: [issue30232] configure: support Git worktree In-Reply-To: <1493737463.82.0.0521929731539.issue30232@psf.upfronthosting.co.za> Message-ID: <1493758253.57.0.389910417305.issue30232@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1507 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 16:52:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 20:52:09 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1493758329.31.0.873092581659.issue27593@psf.upfronthosting.co.za> STINNER Victor added the comment: > I think that covers it! Cool, good job ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 17:19:32 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 21:19:32 +0000 Subject: [issue30205] socket.getsockname() type mismatch with AF_UNIX on Linux In-Reply-To: <1493456110.97.0.437176774734.issue30205@psf.upfronthosting.co.za> Message-ID: <1493759972.38.0.579626678328.issue30205@psf.upfronthosting.co.za> STINNER Victor added the comment: Test fails on x86 Tiger 3.x: http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/600/steps/test/logs/stdio ====================================================================== FAIL: testUnbound (test.test_socket.TestUnixDomain) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_socket.py", line 4687, in testUnbound self.assertEqual(self.sock.getsockname(), '') AssertionError: None != '' ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 17:20:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 21:20:26 +0000 Subject: [issue30205] socket.getsockname() type mismatch with AF_UNIX on Linux In-Reply-To: <1493456110.97.0.437176774734.issue30205@psf.upfronthosting.co.za> Message-ID: <1493760026.98.0.521562984563.issue30205@psf.upfronthosting.co.za> STINNER Victor added the comment: Maybe restrict the unit test to Linux since the change was specific to Linux? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 17:23:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 21:23:28 +0000 Subject: [issue30223] Add Lib/test/__main__.py in 2.7 In-Reply-To: <1493708216.05.0.00341541887295.issue30223@psf.upfronthosting.co.za> Message-ID: <1493760208.01.0.672400229441.issue30223@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum, it seems like test_regrtest is more and more important. Yet another regression: http://buildbot.python.org/all/builders/x86%20Gentoo%20Installed%20with%20X%202.7/builds/126/steps/test/logs/stdio Traceback (most recent call last): File "/buildbot/buildarea/2.7.ware-gentoo-x86.installed/build/target/lib/python2.7/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/buildbot/buildarea/2.7.ware-gentoo-x86.installed/build/target/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/buildbot/buildarea/2.7.ware-gentoo-x86.installed/build/target/lib/python2.7/test/regrtest.py", line 1684, in main_in_temp_cwd() File "/buildbot/buildarea/2.7.ware-gentoo-x86.installed/build/target/lib/python2.7/test/regrtest.py", line 1664, in main_in_temp_cwd TESTCWD = os.path.join(TEMPDIR, TESTCWD) UnboundLocalError: local variable 'TEMPDIR' referenced before assignment ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 17:27:12 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 May 2017 21:27:12 +0000 Subject: [issue30205] socket.getsockname() type mismatch with AF_UNIX on Linux In-Reply-To: <1493456110.97.0.437176774734.issue30205@psf.upfronthosting.co.za> Message-ID: <1493760432.23.0.434683492068.issue30205@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Oh, yuck. > Maybe restrict the unit test to Linux since the change was specific to Linux? That sounds reasonable. I didn't know getsockname() could return None... ---------- nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 17:29:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 21:29:36 +0000 Subject: [issue30223] Add Lib/test/__main__.py in 2.7 In-Reply-To: <1493708216.05.0.00341541887295.issue30223@psf.upfronthosting.co.za> Message-ID: <1493760576.76.0.498024494185.issue30223@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1508 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 17:32:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 21:32:09 +0000 Subject: [issue30205] socket.getsockname() type mismatch with AF_UNIX on Linux In-Reply-To: <1493456110.97.0.437176774734.issue30205@psf.upfronthosting.co.za> Message-ID: <1493760729.73.0.60186296922.issue30205@psf.upfronthosting.co.za> STINNER Victor added the comment: > I didn't know getsockname() could return None... Me neither. Maybe it's a bug? makesockaddr() returns None if addrlen equals 0: if (addrlen == 0) { /* No address -- may be recvfrom() from known socket */ Py_RETURN_NONE; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 17:33:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 21:33:13 +0000 Subject: [issue30223] Add Lib/test/__main__.py in 2.7 In-Reply-To: <1493708216.05.0.00341541887295.issue30223@psf.upfronthosting.co.za> Message-ID: <1493760793.11.0.733917426531.issue30223@psf.upfronthosting.co.za> STINNER Victor added the comment: > Hum, it seems like test_regrtest is more and more important. To be fair, I don't think that this particular bug would be catched by the CI since the bug is only triggered on a buildbot which installs Python and runs tests on the installed test suite. It should be fixed by https://github.com/python/cpython/pull/1399 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 17:36:31 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 02 May 2017 21:36:31 +0000 Subject: [issue30208] Small typos in IDLE doc In-Reply-To: <1493659505.42.0.433733083562.issue30208@psf.upfronthosting.co.za> Message-ID: Cheryl Sabella added the comment: Thank you for that information, Mariatta. I had to read your description twice to find the 9dc2b38 commit hash. Once someone learns this, then they will remember it, but you may want to highlight it on the cherry-pick readme. That was very well written and easy to follow, but I don't remember it specifying the commit hash to use. Cherry-pick is an awesome tool. Can't wait to use it again! :-) On Mon, May 1, 2017 at 1:25 PM, Mariatta Wijaya wrote: > > Mariatta Wijaya added the comment: > > One PR per branch is correct. > > For future reference, preferably the commit hash to be cherry-picked is > the one that is merged into CPython's master branch. It can be found at the > original PR where it says merged commit into > python:master. For PR 1353, it is 9dc2b38. > > For this issue, it doesn't make much difference since the PR contains only > one commit. For PRs that contain multiple commits, it makes more sense to > cherry-pick the squashed commit to master :) > > Thanks :) > > ---------- > nosy: +Mariatta > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 17:38:14 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 May 2017 21:38:14 +0000 Subject: [issue30233] [3.5] Warning -- locale was modified by test_idle In-Reply-To: <1493742084.38.0.422431531448.issue30233@psf.upfronthosting.co.za> Message-ID: <1493761094.62.0.01471621155.issue30233@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: -> haypo resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 17:41:51 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 May 2017 21:41:51 +0000 Subject: [issue30233] [3.5] Warning -- locale was modified by test_idle In-Reply-To: <1493742084.38.0.422431531448.issue30233@psf.upfronthosting.co.za> Message-ID: <1493761311.7.0.314292647462.issue30233@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I see. That changes the situation a bit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 17:43:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 21:43:27 +0000 Subject: [issue30223] Add Lib/test/__main__.py in 2.7 In-Reply-To: <1493708216.05.0.00341541887295.issue30223@psf.upfronthosting.co.za> Message-ID: <1493761407.83.0.162805609126.issue30223@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8105dd7f75b6aa5f812522d452cd378372752a10 by Victor Stinner in branch '2.7': bpo-30223: Add global in regrtest main_in_temp_cwd (#1399) https://github.com/python/cpython/commit/8105dd7f75b6aa5f812522d452cd378372752a10 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 17:46:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 21:46:08 +0000 Subject: [issue30232] configure: support Git worktree In-Reply-To: <1493737463.82.0.0521929731539.issue30232@psf.upfronthosting.co.za> Message-ID: <1493761568.59.0.971235246025.issue30232@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 4dae0d111dd7bb34ec730eea2327a3219acff211 by Victor Stinner in branch '3.6': [3.6] bpo-30232: Support Git worktree in configure.ac (#1398) https://github.com/python/cpython/commit/4dae0d111dd7bb34ec730eea2327a3219acff211 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 17:52:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 21:52:58 +0000 Subject: [issue30232] configure: support Git worktree In-Reply-To: <1493737463.82.0.0521929731539.issue30232@psf.upfronthosting.co.za> Message-ID: <1493761978.75.0.47207422593.issue30232@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1509 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 17:54:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 21:54:23 +0000 Subject: [issue30232] configure: support Git worktree In-Reply-To: <1493737463.82.0.0521929731539.issue30232@psf.upfronthosting.co.za> Message-ID: <1493762063.2.0.798256351784.issue30232@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1510 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 18:04:08 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 May 2017 22:04:08 +0000 Subject: [issue30205] socket.getsockname() type mismatch with AF_UNIX on Linux In-Reply-To: <1493456110.97.0.437176774734.issue30205@psf.upfronthosting.co.za> Message-ID: <1493762648.94.0.645602836703.issue30205@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- pull_requests: +1511 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 18:05:32 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 May 2017 22:05:32 +0000 Subject: [issue30205] socket.getsockname() type mismatch with AF_UNIX on Linux In-Reply-To: <1493456110.97.0.437176774734.issue30205@psf.upfronthosting.co.za> Message-ID: <1493762732.42.0.688038856867.issue30205@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- pull_requests: +1512 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 18:05:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 22:05:47 +0000 Subject: [issue30232] configure: support Git worktree In-Reply-To: <1493737463.82.0.0521929731539.issue30232@psf.upfronthosting.co.za> Message-ID: <1493762747.47.0.404829922157.issue30232@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset df5692549a68741d3d02eeee28f9fef74f349712 by Victor Stinner in branch '2.7': bpo-30232: Support Git worktree in configure.ac (#1402) https://github.com/python/cpython/commit/df5692549a68741d3d02eeee28f9fef74f349712 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 18:06:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 22:06:19 +0000 Subject: [issue30232] configure: support Git worktree In-Reply-To: <1493737463.82.0.0521929731539.issue30232@psf.upfronthosting.co.za> Message-ID: <1493762779.53.0.299384739266.issue30232@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 360fb81367bb409bb7a1d261d88fcf82cee528f0 by Victor Stinner in branch '3.5': [3.5] bpo-30232: Support Git worktree in configure.ac (#1398) (#1401) https://github.com/python/cpython/commit/360fb81367bb409bb7a1d261d88fcf82cee528f0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 18:14:31 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 May 2017 22:14:31 +0000 Subject: [issue30205] socket.getsockname() type mismatch with AF_UNIX on Linux In-Reply-To: <1493456110.97.0.437176774734.issue30205@psf.upfronthosting.co.za> Message-ID: <1493763271.51.0.201312723165.issue30205@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 0c2ff0898db2db9cd9c643dfadbff11761bacf5f by Antoine Pitrou in branch '3.6': Backport bpo-30205 to 3.6 (#1403) https://github.com/python/cpython/commit/0c2ff0898db2db9cd9c643dfadbff11761bacf5f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 18:22:30 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 May 2017 22:22:30 +0000 Subject: [issue30205] socket.getsockname() type mismatch with AF_UNIX on Linux In-Reply-To: <1493456110.97.0.437176774734.issue30205@psf.upfronthosting.co.za> Message-ID: <1493763750.08.0.691150055383.issue30205@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 0d9d61828bbd6cbc289489bf1d439fa91eca3743 by Antoine Pitrou in branch '3.5': Backport bpo-30205 to 3.5 (#1404) https://github.com/python/cpython/commit/0d9d61828bbd6cbc289489bf1d439fa91eca3743 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 18:23:04 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 May 2017 22:23:04 +0000 Subject: [issue30205] socket.getsockname() type mismatch with AF_UNIX on Linux In-Reply-To: <1493456110.97.0.437176774734.issue30205@psf.upfronthosting.co.za> Message-ID: <1493763784.27.0.142175209513.issue30205@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 18:28:47 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 02 May 2017 22:28:47 +0000 Subject: [issue30234] Remove duplicate checks in test_isinstance In-Reply-To: <1493742617.78.0.160398205628.issue30234@psf.upfronthosting.co.za> Message-ID: <1493764127.65.0.195471438189.issue30234@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 18:45:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 22:45:38 +0000 Subject: [issue30107] python.core file created when running tests on AMD64 FreeBSD CURRENT Non-Debug 3.x buildbot In-Reply-To: <1492644177.56.0.807251797434.issue30107@psf.upfronthosting.co.za> Message-ID: <1493765138.4.0.72205956306.issue30107@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, I forgot that issue. I'm now happy to be able to close it ;-) The bug was fixed! ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 18:46:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 22:46:23 +0000 Subject: [issue30106] test_asyncore: test_handle_write() fails in tearDown() In-Reply-To: <1492642462.27.0.792408985482.issue30106@psf.upfronthosting.co.za> Message-ID: <1493765183.98.0.249013258059.issue30106@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 19:04:26 2017 From: report at bugs.python.org (Devin Jeanpierre) Date: Tue, 02 May 2017 23:04:26 +0000 Subject: [issue29505] Submit the re, json, & csv modules to oss-fuzz testing In-Reply-To: <1486587261.97.0.342323514088.issue29505@psf.upfronthosting.co.za> Message-ID: <1493766266.72.0.476551328763.issue29505@psf.upfronthosting.co.za> Devin Jeanpierre added the comment: Aha, I found an existing issue! For adding to oss-fuzz, is there a contact email we can use that is connected to a google account? I am tempted to just put gregory.p.smith on there if not. :) I can volunteer to fuzz some interesting subset of the stdlib. The list I've come up with (by counting uses in my code) is: the XML parser (which seems to be written in C) struct (unpack) the various builtins that parse strings (like int()) hashlib binascii datetime's parsing json I'd also suggest the ast module, since people do use ast.literal_eval on untrusted strings, but I probably won't do that one myself. I wrote a fuzz test for json via upstream simplejson, but the bug on github is getting stale: https://github.com/simplejson/simplejson/issues/163 Should I add it to CPython instead? > We should investigate creating fuzz targets for the Python re module (_sre.c) at a minimum. If we prioritize based on security risk, I'd argue that this is lower priority than things like json's speedup extension module, because people should generally not pass untrusted strings to the re module: it's very easy to DOS a service with regexes unless you're using RE2 or similar -- which is fuzzed. In contrast, json is supposed to accept untrusted input and people do that very often. (OTOH, I would be willing to bet that fuzzing re will yield more bugs than fuzzing json.) ---------- nosy: +Devin Jeanpierre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 19:37:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 23:37:37 +0000 Subject: [issue23404] 'make touch' does not work with git clones of the source repository In-Reply-To: <1423262765.96.0.527396909.issue23404@psf.upfronthosting.co.za> Message-ID: <1493768257.43.0.217678009373.issue23404@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1513 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 19:44:14 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 23:44:14 +0000 Subject: [issue23404] 'make touch' does not work with git clones of the source repository In-Reply-To: <1423262765.96.0.527396909.issue23404@psf.upfronthosting.co.za> Message-ID: <1493768654.09.0.934427250887.issue23404@psf.upfronthosting.co.za> STINNER Victor added the comment: I rewrote Python (UNIX/BSD) build system to not rebuild generated files based on file modification time: the action is now explicit. This change should not only fix buildbots, but also ease cross-compilation, and more generally make Python build less painful! No more funny error when the system only provides Python 2.6 and so "make touch" doesn't work, whereas "make touch" was the obvious workaround to avoid trying to regenerated files. The change: https://github.com/python/cpython/pull/1405 My change adds a global "rebuild-all", but this command is made of multiple subcommands: - rebuild-ast: Include/Python-ast.h and Python/Python-ast.c - rebuild-grammar: Include/graminit.h and Python/graminit.c - rebuild-importlib: Python/importlib_external.h and Python/importlib.h - rebuild-opcode: Include/opcode.h - rebuild-opcode-targets: Python/opcode_targets.h - rebuild-typeslots: Objects/typeslots.inc rebuild-all is not needed if you only want to update AST for example: just run "make rebuild-ast && make". -- As you may expect, the change is quite big for a very sensitive part of Python: the build system. Do we want to backport such major change? Another solution for stable branches to to remove the rebuild of generated files from configure and Makefile... Just hope that we will not need it anymore? Not sure if it's a good idea. I expect fixes in importlib, so "rebuild-importlib" will be needed at least. Even if I don't trust my own work(!), I would suggest to review carefully my change, test it on all buildbots, play with it, and then backport it to 2.7, 3.5 and 3.6. Note: Windows is not affected by this bug, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 19:44:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 23:44:57 +0000 Subject: [issue29967] "AMD64 FreeBSD 9.x 3.x" tries to rebuild Include/opcode.h, timestamp issue In-Reply-To: <1491215383.28.0.794511557475.issue29967@psf.upfronthosting.co.za> Message-ID: <1493768697.9.0.192686577046.issue29967@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> 'make touch' does not work with git clones of the source repository _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 19:45:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 May 2017 23:45:21 +0000 Subject: [issue23404] 'make touch' does not work with git clones of the source repository In-Reply-To: <1423262765.96.0.527396909.issue23404@psf.upfronthosting.co.za> Message-ID: <1493768721.78.0.794103091532.issue23404@psf.upfronthosting.co.za> STINNER Victor added the comment: The issue #23404 has been marked as a duplicate of this bug: "AMD64 FreeBSD 9.x 3.x" tries to rebuild Include/opcode.h, timestamp issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 20:07:32 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 00:07:32 +0000 Subject: [issue30239] test_asyncore: test_handle_expt() fails on macOS Sierra Message-ID: <1493770051.35.0.665308404943.issue30239@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86-64%20Sierra%203.5/builds/39/steps/test/logs/stdio ====================================================================== FAIL: test_handle_expt (test.test_asyncore.TestAPI_UseIPv4Poll) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/3.5.billenstein-sierra/build/Lib/test/test_asyncore.py", line 671, in test_handle_expt self.loop_waiting_for_flag(client) File "/Users/buildbot/buildarea/3.5.billenstein-sierra/build/Lib/test/test_asyncore.py", line 511, in loop_waiting_for_flag self.fail("flag not set") AssertionError: flag not set ====================================================================== FAIL: test_handle_expt (test.test_asyncore.TestAPI_UseIPv6Poll) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/3.5.billenstein-sierra/build/Lib/test/test_asyncore.py", line 671, in test_handle_expt self.loop_waiting_for_flag(client) File "/Users/buildbot/buildarea/3.5.billenstein-sierra/build/Lib/test/test_asyncore.py", line 511, in loop_waiting_for_flag self.fail("flag not set") AssertionError: flag not set ---------- components: Tests, macOS messages: 292824 nosy: haypo, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: test_asyncore: test_handle_expt() fails on macOS Sierra versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 20:10:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 00:10:28 +0000 Subject: [issue30239] test_asyncore: test_handle_expt() fails on macOS Sierra In-Reply-To: <1493770051.35.0.665308404943.issue30239@psf.upfronthosting.co.za> Message-ID: <1493770228.01.0.278099627845.issue30239@psf.upfronthosting.co.za> STINNER Victor added the comment: See also issue #30201: [3.5] RecvmsgIntoSCMRightsStreamTest fails with "OSError: [Errno 12] Cannot allocate memory" on macOS El Capitan. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 20:34:06 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 03 May 2017 00:34:06 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1493771646.43.0.99567224744.issue29094@psf.upfronthosting.co.za> Gregory P. Smith added the comment: re-opening since, though released, this behavior change broke existing code. ---------- nosy: +gregory.p.smith resolution: fixed -> stage: resolved -> commit review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 20:34:59 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 03 May 2017 00:34:59 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1493771699.51.0.608495500998.issue29094@psf.upfronthosting.co.za> Gregory P. Smith added the comment: release managers need to decide. ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 20:39:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 00:39:29 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1493771969.65.0.617139088011.issue29094@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 20:40:00 2017 From: report at bugs.python.org (Larry Hastings) Date: Wed, 03 May 2017 00:40:00 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1493772000.56.0.390748087819.issue29094@psf.upfronthosting.co.za> Larry Hastings added the comment: What's to decide? If the new behavior is also broken, we should fix it. I'd like a fix in the next 3.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 20:57:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 00:57:00 +0000 Subject: [issue23404] 'make touch' does not work with git clones of the source repository In-Reply-To: <1423262765.96.0.527396909.issue23404@psf.upfronthosting.co.za> Message-ID: <1493773020.49.0.783378940127.issue23404@psf.upfronthosting.co.za> STINNER Victor added the comment: https://github.com/python/cpython/pull/1405#pullrequestreview-35923931 Zachary Ware: "LGTM, but I haven't fully parsed how the old mess worked. We should also have CI (either Travis or buildbot) confirming that make rebuild-all doesn't leave any checked-in files modified." Yeah, such CI would be useful. -- If we go in this direction, maybe we can go further and also run autoconf && autoheader? While fixing bpo-30232, I had to do a second commit (9ed34a89532763cf89f5e11fffb91ef7dee29fed) because my first one (5facdbb29169c2799c42f887cef4cd9d087b0167) only modified configure.ac. Well, it might be a bot on pull requests, but an extra check wouldn't hurt anyway ;-) A problem with autoconf is that the result depends on the exact autoconf version :-/ For example, autoconf 2.69 of my Fedora 25 wants to remove runstatedir from configure. I don't know what is runstatedir, so I had to revert these autoconf changes on configure before pushing... haypo at selma$ touch configure.ac && autoconf && git diff diff --git a/configure b/configure index a20cf97..a6b13e8 100755 --- a/configure +++ b/configure @@ -783,7 +783,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir (...) A solution would be to use a fixed autoconf version and ensure that configure is always generated with the same autoconf version. Maybe Gentoo is a good OS for such CI such Gentoo provides multiple versions of autotools, whereas other Linux distro usually only provide one version of all autotools tools. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 21:31:44 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 01:31:44 +0000 Subject: [issue30199] Warning -- asyncore.socket_map was modified by test_ssl In-Reply-To: <1493386700.85.0.622931101422.issue30199@psf.upfronthosting.co.za> Message-ID: <1493775104.7.0.940314362338.issue30199@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1514 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 21:47:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 01:47:36 +0000 Subject: [issue30199] Warning -- asyncore.socket_map was modified by test_ssl In-Reply-To: <1493386700.85.0.622931101422.issue30199@psf.upfronthosting.co.za> Message-ID: <1493776056.81.0.633581445873.issue30199@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d1c862ffa73b222746035155817d2516c4f5b71e by Victor Stinner in branch '2.7': bpo-30199: test_ssl closes all asyncore channels (#1381) (#1408) https://github.com/python/cpython/commit/d1c862ffa73b222746035155817d2516c4f5b71e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 21:56:07 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 03 May 2017 01:56:07 +0000 Subject: [issue30233] [3.5] Warning -- locale was modified by test_idle In-Reply-To: <1493742084.38.0.422431531448.issue30233@psf.upfronthosting.co.za> Message-ID: <1493776567.26.0.726158341096.issue30233@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Victor, I forgot to ask. Did you properly test IDLE before committing the patch? This means building python 3.5, starting IDLE, and exercising the modules affected. test_idle is nowhere nearly a substitute for such hand-testing. This is a big part of the 'bother' I referred to. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 22:29:16 2017 From: report at bugs.python.org (Tiago Antao) Date: Wed, 03 May 2017 02:29:16 +0000 Subject: [issue28326] multiprocessing.Process depends on sys.stdout being open In-Reply-To: <1475322334.82.0.360171618996.issue28326@psf.upfronthosting.co.za> Message-ID: <1493778556.5.0.62762723587.issue28326@psf.upfronthosting.co.za> Changes by Tiago Antao : ---------- pull_requests: +1515 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 22:30:29 2017 From: report at bugs.python.org (Tiago Antao) Date: Wed, 03 May 2017 02:30:29 +0000 Subject: [issue28326] multiprocessing.Process depends on sys.stdout being open In-Reply-To: <1475322334.82.0.360171618996.issue28326@psf.upfronthosting.co.za> Message-ID: <1493778629.33.0.830503705361.issue28326@psf.upfronthosting.co.za> Changes by Tiago Antao : ---------- versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 22:49:51 2017 From: report at bugs.python.org (TaoQingyun) Date: Wed, 03 May 2017 02:49:51 +0000 Subject: [issue30240] Add daemon keyword argument to Thread constructor Message-ID: <1493779791.43.0.580672547649.issue30240@psf.upfronthosting.co.za> New submission from TaoQingyun: create a daemon thread like this, ``` t = Thread(target=f) t.daemon = True t.start() ``` I wonder the following code is better ``` Thread(target=f, daemon=True).start() ``` ---------- components: Library (Lib) messages: 292832 nosy: qingyunha priority: normal severity: normal status: open title: Add daemon keyword argument to Thread constructor type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 22:54:59 2017 From: report at bugs.python.org (TaoQingyun) Date: Wed, 03 May 2017 02:54:59 +0000 Subject: [issue30240] Add daemon keyword argument to Thread constructor In-Reply-To: <1493779791.43.0.580672547649.issue30240@psf.upfronthosting.co.za> Message-ID: <1493780099.55.0.739788610093.issue30240@psf.upfronthosting.co.za> Changes by TaoQingyun <845767657 at qq.com>: ---------- versions: +Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 22:59:17 2017 From: report at bugs.python.org (Zachary Ware) Date: Wed, 03 May 2017 02:59:17 +0000 Subject: [issue30240] Add daemon keyword argument to Thread constructor In-Reply-To: <1493779791.43.0.580672547649.issue30240@psf.upfronthosting.co.za> Message-ID: <1493780357.32.0.56555809126.issue30240@psf.upfronthosting.co.za> Zachary Ware added the comment: It's already there: https://docs.python.org/3/library/threading.html#threading.Thread ---------- nosy: +zach.ware resolution: -> out of date stage: -> resolved status: open -> closed versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 23:08:49 2017 From: report at bugs.python.org (svelankar) Date: Wed, 03 May 2017 03:08:49 +0000 Subject: [issue29447] Add os.PathLike support to the tempfile module In-Reply-To: <1486273182.96.0.640027026479.issue29447@psf.upfronthosting.co.za> Message-ID: <1493780929.76.0.765457193933.issue29447@psf.upfronthosting.co.za> Changes by svelankar : ---------- pull_requests: +1519 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 23:09:27 2017 From: report at bugs.python.org (svelankar) Date: Wed, 03 May 2017 03:09:27 +0000 Subject: [issue29447] Add os.PathLike support to the tempfile module In-Reply-To: <1486273182.96.0.640027026479.issue29447@psf.upfronthosting.co.za> Message-ID: <1493780967.33.0.771279957435.issue29447@psf.upfronthosting.co.za> Changes by svelankar : ---------- nosy: +svelankar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 23:16:24 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 03 May 2017 03:16:24 +0000 Subject: [issue30103] uu package uses old encoding In-Reply-To: <1492626140.89.0.479583121087.issue30103@psf.upfronthosting.co.za> Message-ID: <1493781384.0.0.474530568908.issue30103@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 13f1f423fac39f8f14a3ce919dd236975517d5c6 by Xiang Zhang in branch 'master': bpo-30103: Allow Uuencode in Python using backtick as zero instead of space (#1326) https://github.com/python/cpython/commit/13f1f423fac39f8f14a3ce919dd236975517d5c6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 2 23:18:36 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 03 May 2017 03:18:36 +0000 Subject: [issue30103] uu package uses old encoding In-Reply-To: <1492626140.89.0.479583121087.issue30103@psf.upfronthosting.co.za> Message-ID: <1493781516.53.0.95537333187.issue30103@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 00:12:21 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Wed, 03 May 2017 04:12:21 +0000 Subject: [issue30241] Add contextlib.AbstractAsyncContextManager Message-ID: <1493784741.35.0.949796244558.issue30241@psf.upfronthosting.co.za> New submission from Jelle Zijlstra: It would be useful to have an abstract base class for asynchronous context managers, similar to the existing contextlib.AbstractContextManager. We can then also add this class to typing and use it as a PEP 544 Protocol. I have code ready for contextlib.AbstractAsyncContextManager and will submit the PR shortly. I'll also add support in typing and typeshed if the CPython change is accepted. ---------- components: Library (Lib) messages: 292835 nosy: Jelle Zijlstra, levkivskyi, ncoghlan, yselivanov priority: normal severity: normal status: open title: Add contextlib.AbstractAsyncContextManager type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 00:17:28 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Wed, 03 May 2017 04:17:28 +0000 Subject: [issue30241] Add contextlib.AbstractAsyncContextManager In-Reply-To: <1493784741.35.0.949796244558.issue30241@psf.upfronthosting.co.za> Message-ID: <1493785048.31.0.500499201672.issue30241@psf.upfronthosting.co.za> Changes by Jelle Zijlstra : ---------- pull_requests: +1520 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 00:19:10 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 03 May 2017 04:19:10 +0000 Subject: [issue30110] test_asyncio reports reference leak In-Reply-To: <1492671260.02.0.938274219318.issue30110@psf.upfronthosting.co.za> Message-ID: <1493785150.89.0.786550899792.issue30110@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1521 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 00:26:28 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 03 May 2017 04:26:28 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1493785588.42.0.34422102839.issue28556@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +1522 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 00:26:39 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 03 May 2017 04:26:39 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1493785599.59.0.977521275373.issue28556@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +1523 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 00:28:43 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 03 May 2017 04:28:43 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1493785723.71.0.0893435857198.issue28556@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 00:30:53 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 03 May 2017 04:30:53 +0000 Subject: [issue30242] resolve undefined behaviour in struct Message-ID: <1493785853.95.0.0519827037008.issue30242@psf.upfronthosting.co.za> New submission from Xiang Zhang: In struct there are several places using code like: p[--i] = (char)x; to extract the least significant byte from a long. Although this behaviour seems to apply to common implementations but it does not conform to C standard. ---------- components: Library (Lib) messages: 292836 nosy: mark.dickinson, meador.inge, serhiy.storchaka, xiang.zhang priority: normal severity: normal stage: patch review status: open title: resolve undefined behaviour in struct type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 00:33:31 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 03 May 2017 04:33:31 +0000 Subject: [issue30242] resolve undefined behaviour in struct In-Reply-To: <1493785853.95.0.0519827037008.issue30242@psf.upfronthosting.co.za> Message-ID: <1493786011.81.0.88373861283.issue30242@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1524 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 00:59:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 04:59:45 +0000 Subject: [issue29447] Add os.PathLike support to the tempfile module In-Reply-To: <1486273182.96.0.640027026479.issue29447@psf.upfronthosting.co.za> Message-ID: <1493787585.34.0.604647094277.issue29447@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: TemporaryDirectory and _TemporaryFileWrapper are *not* paths, as well as ordinal files are not paths. Adding __fspath__() to them looks wrong to me. I think this isn't what Brett meant. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 01:02:39 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 03 May 2017 05:02:39 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1493787759.8.0.574044761005.issue29094@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Anything breaking 2.7 should be reverted. I take it, the change from #26293 should be as well as this one? Yhg1s, the commit message for #26293 included the sentence "Offsets in ZIP file now are relative to the start of the archive in conforming to the specification." Can someone point to the line in the spec that covers this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 01:06:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 05:06:43 +0000 Subject: [issue30242] resolve undefined behaviour in struct In-Reply-To: <1493785853.95.0.0519827037008.issue30242@psf.upfronthosting.co.za> Message-ID: <1493788003.19.0.788773883165.issue30242@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think it is better to change the type of p to unsigned char. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 01:10:08 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 03 May 2017 05:10:08 +0000 Subject: [issue30231] test_imaplib needs a TLS server accepting self-signed certificates In-Reply-To: <1493736284.13.0.622029485806.issue30231@psf.upfronthosting.co.za> Message-ID: <1493788208.01.0.601020190136.issue30231@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I can't say I'm very interested in running a imap server. It would be best if these tests could be replaced by something local. Failing that, I suppose we'll have to remove them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 01:19:22 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 03 May 2017 05:19:22 +0000 Subject: [issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX In-Reply-To: <1447861816.88.0.632584646231.issue25658@psf.upfronthosting.co.za> Message-ID: <1493788762.29.0.698249486915.issue25658@psf.upfronthosting.co.za> Nick Coghlan added the comment: Noting a design consideration that I only picked up in the latest PR review: when exposed as part of a non-opaque struct, the type used for TSS keys becomes part of Python's ABI, which means the API design in the PEP is going to have to handle making the struct fully opaque when Py_LIMITED_API is defined. My proposal for handling that: - update all of the API functions to accept Py_tss_t by pointer rather than by value - update the Py_tss_t definition to be an opaque struct when Py_LIMITED_API is defined - add PyThread_tss_alloc and PyThread_tss_free functions for dynamic allocation of key storage (since static allocation won't be possible in the Py_LIMITED_API case) My main rationale for going to that level of effort is that the current thread local storage API is available when Py_LIMITED_API is defined, so its replacement should be available as well. However, exposing NATIVE_TSS_KEY_T as part of the stable ABI would prevent us from switching from `int` to a platform specific implementation for platforms that start out using the generic emulation. If issue #29881 ever became a public API, it would then be useful for managing the lifecycle of dynamically allocated TSS keys in extension modules that restrict themselves to the stable ABI. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 01:22:53 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 05:22:53 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1493788973.87.0.513265985791.issue29094@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT There is no explicit line, but offsets always are named relative: "relative offset of local header", "offset of start of central directory with respect to the starting disk number". This looks not pretty clear, but open source utilities (unzip, p7zip) support ZIP archives started not from the start of the file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 01:44:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 05:44:50 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1493790290.33.0.22701368653.issue29094@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: -911 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 01:52:50 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 03 May 2017 05:52:50 +0000 Subject: [issue30242] resolve undefined behaviour in struct In-Reply-To: <1493785853.95.0.0519827037008.issue30242@psf.upfronthosting.co.za> Message-ID: <1493790770.27.0.963903790072.issue30242@psf.upfronthosting.co.za> Xiang Zhang added the comment: > I think it is better to change the type of p to unsigned char. Good advice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 02:20:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 06:20:41 +0000 Subject: [issue30242] resolve undefined behaviour in struct In-Reply-To: <1493785853.95.0.0519827037008.issue30242@psf.upfronthosting.co.za> Message-ID: <1493792441.43.0.907184623813.issue30242@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I meant changing the type of the first argument of np_ubyte() etc. np_ubyte(unsigned char *p, PyObject *v, const formatdef *f) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 02:25:14 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 03 May 2017 06:25:14 +0000 Subject: [issue30242] resolve undefined behaviour in struct In-Reply-To: <1493785853.95.0.0519827037008.issue30242@psf.upfronthosting.co.za> Message-ID: <1493792714.47.0.0531254751062.issue30242@psf.upfronthosting.co.za> Xiang Zhang added the comment: Hmm, do we need to? Currently all pack routines accept a char *p. Converting it to unsigned char * inside could also solve the problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 02:41:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 06:41:50 +0000 Subject: [issue30243] Core dump when use uninitialized _json objects Message-ID: <1493793710.25.0.994343860918.issue30243@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: It is possible to get a core dump by using uninitialized _json objects. $ ./python -c "import _json; _json.make_scanner.__new__(_json.make_scanner)('', 0)" Segmentation fault (core dumped) $ ./python -c "import _json; _json.make_encoder.__new__(_json.make_encoder)([0], 0)" Segmentation fault (core dumped) The cause is that make_scanner and make_encoder classes implement __new__ and __init__. The __new__ methods create uninitialized object, with NULLs pointers, the __init__ methods initialize them. Possible solutions are: 1) set fields to Py_None rather than NULL in __new__; 2) check every pointer for NULL before using; 3) just remove __init__ methods and make initialization in __new__ methods. Since the scanner and the encoder are not inheritable classes, the latter solution look the most preferable to me. ---------- components: Extension Modules messages: 292846 nosy: bob.ippolito, ezio.melotti, rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: Core dump when use uninitialized _json objects type: crash versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 03:03:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 07:03:28 +0000 Subject: [issue30242] resolve undefined behaviour in struct In-Reply-To: <1493785853.95.0.0519827037008.issue30242@psf.upfronthosting.co.za> Message-ID: <1493795008.11.0.935304109191.issue30242@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Your patch LGTM as a minimal patch for backporting to maintained releases (maybe Mark have other comments). But I think it would be better to make all pointers to raw memory of type unsigned char*. Not just packing, but unpacking too. Using even memcpy between long* and char* is undefined behavior, the source and target should either have the same type, or one of them be unsigned char*. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 03:11:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 07:11:20 +0000 Subject: [issue30231] test_imaplib needs a TLS server accepting self-signed certificates In-Reply-To: <1493736284.13.0.622029485806.issue30231@psf.upfronthosting.co.za> Message-ID: <1493795480.16.0.820229255146.issue30231@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1525 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 03:13:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 07:13:11 +0000 Subject: [issue30231] test_imaplib needs a TLS server accepting self-signed certificates In-Reply-To: <1493736284.13.0.622029485806.issue30231@psf.upfronthosting.co.za> Message-ID: <1493795591.45.0.872256719938.issue30231@psf.upfronthosting.co.za> STINNER Victor added the comment: > It would be best if these tests could be replaced by something local. Is there someone interested to write such local IMAP server to test test_imaplib using a client x509 certificate? > Failing that, I suppose we'll have to remove them. That's not my favorite option, but I wrote a patch for that: https://github.com/python/cpython/pull/1419 ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 03:18:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 07:18:07 +0000 Subject: [issue30244] Emit a ResourceWarning in concurrent.futures executor destructors Message-ID: <1493795887.73.0.860969778348.issue30244@psf.upfronthosting.co.za> New submission from STINNER Victor: Follow-up of issues: * issue #30110: test_asyncio reports reference leak, forgot to shutdown concurrent.futures.ProcessPoolExecutor() * issue #30171: Emit ResourceWarning in multiprocessing Queue destructor I propose to emit a ResourceWarning warning in concurrent.futures executor destructor if it wasn't cleaned up properly, if shutdown() wasn't called. ---------- components: Library (Lib) messages: 292849 nosy: haypo, xiang.zhang priority: normal severity: normal status: open title: Emit a ResourceWarning in concurrent.futures executor destructors type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 03:18:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 07:18:27 +0000 Subject: [issue30171] Emit ResourceWarning in multiprocessing Queue destructor In-Reply-To: <1493214770.49.0.943228970697.issue30171@psf.upfronthosting.co.za> Message-ID: <1493795907.5.0.116845432826.issue30171@psf.upfronthosting.co.za> STINNER Victor added the comment: See also issue #30244: Emit a ResourceWarning in concurrent.futures executor destructors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 03:19:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 07:19:53 +0000 Subject: [issue30110] test_asyncio reports reference leak In-Reply-To: <1492671260.02.0.938274219318.issue30110@psf.upfronthosting.co.za> Message-ID: <1493795993.01.0.410938847863.issue30110@psf.upfronthosting.co.za> STINNER Victor added the comment: IMHO not calling shutdown() is a bug and Python should help developers to detect it. I proposed the issue #30244 to emit a ResourceWarning in concurrent.futures executor destructors. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 03:20:40 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 03 May 2017 07:20:40 +0000 Subject: [issue30245] possible overflow when organize struct.pack_into error message Message-ID: <1493796040.21.0.423115670823.issue30245@psf.upfronthosting.co.za> New submission from Xiang Zhang: In #29649, struct.pack_into's error message was improved. But the message could be confusing encountering a large offset due to overflow: >>> struct.pack_into('I', bytearray(10), sys.maxsize, 1) Traceback (most recent call last): File "", line 1, in struct.error: pack_into requires a buffer of at least -9223372036854775805 bytes for packing 4 bytes at offset 9223372036854775807 (actual buffer size is 10) BTW, really long the error message. ---------- messages: 292852 nosy: andrewnester, louielu, serhiy.storchaka, xiang.zhang priority: normal severity: normal stage: needs patch status: open title: possible overflow when organize struct.pack_into error message type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 03:23:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 07:23:16 +0000 Subject: [issue30233] [3.5] Warning -- locale was modified by test_idle In-Reply-To: <1493742084.38.0.422431531448.issue30233@psf.upfronthosting.co.za> Message-ID: <1493796196.2.0.351440065942.issue30233@psf.upfronthosting.co.za> STINNER Victor added the comment: > Victor, I forgot to ask. Did you properly test IDLE before committing the patch? This means building python 3.5, starting IDLE, and exercising the modules affected. test_idle is nowhere nearly a substitute for such hand-testing. This is a big part of the 'bother' I referred to. No, I only ran test_idle. I didn't know that it's not enough. I ran "./python -m idlelib" and played with the UI: no obvious bug occurred. I don't know what I am supposed to test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 03:37:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 07:37:07 +0000 Subject: [issue30243] Core dump when use uninitialized _json objects In-Reply-To: <1493793710.25.0.994343860918.issue30243@psf.upfronthosting.co.za> Message-ID: <1493797027.81.0.045759020572.issue30243@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1526 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 03:37:18 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 03 May 2017 07:37:18 +0000 Subject: [issue30246] fix several error messages in struct Message-ID: <1493797038.59.0.865593067467.issue30246@psf.upfronthosting.co.za> New submission from Xiang Zhang: There are several error messages only mention bytes. But they may also accept string or other bytes-like objects. ---------- components: Library (Lib) messages: 292854 nosy: xiang.zhang priority: normal severity: normal stage: patch review status: open title: fix several error messages in struct type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 03:38:47 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 03 May 2017 07:38:47 +0000 Subject: [issue30246] fix several error messages in struct In-Reply-To: <1493797038.59.0.865593067467.issue30246@psf.upfronthosting.co.za> Message-ID: <1493797127.69.0.525038004741.issue30246@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1527 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 03:42:14 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 03 May 2017 07:42:14 +0000 Subject: [issue23404] 'make touch' does not work with git clones of the source repository In-Reply-To: <1423262765.96.0.527396909.issue23404@psf.upfronthosting.co.za> Message-ID: <1493797334.88.0.602980413267.issue23404@psf.upfronthosting.co.za> Nick Coghlan added the comment: Could we use "regen-*" as the pattern for the file regeneration targets? I'd expect "make rebuild-all" to be akin to "make clean && make", since in the context of a C project, "build" maps to "generate the output binaries" for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 03:42:38 2017 From: report at bugs.python.org (Louie Lu) Date: Wed, 03 May 2017 07:42:38 +0000 Subject: [issue30247] Make importlib.machinery class handle os.PathLike path Message-ID: <1493797358.8.0.753635690258.issue30247@psf.upfronthosting.co.za> New submission from Louie Lu: Several importlib.machinery class has 'path' attribute, make it possible to handle os.PathLike. ---------- messages: 292856 nosy: louielu priority: normal severity: normal status: open title: Make importlib.machinery class handle os.PathLike path versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 03:43:10 2017 From: report at bugs.python.org (Louie Lu) Date: Wed, 03 May 2017 07:43:10 +0000 Subject: [issue30247] Make importlib.machinery class handle os.PathLike path In-Reply-To: <1493797358.8.0.753635690258.issue30247@psf.upfronthosting.co.za> Message-ID: <1493797390.73.0.311518558104.issue30247@psf.upfronthosting.co.za> Louie Lu added the comment: Relate to #29448 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 03:45:10 2017 From: report at bugs.python.org (Louie Lu) Date: Wed, 03 May 2017 07:45:10 +0000 Subject: [issue30247] Make importlib.machinery class handle os.PathLike path In-Reply-To: <1493797358.8.0.753635690258.issue30247@psf.upfronthosting.co.za> Message-ID: <1493797510.71.0.303024901846.issue30247@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- components: +Library (Lib) nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 03:45:32 2017 From: report at bugs.python.org (Louie Lu) Date: Wed, 03 May 2017 07:45:32 +0000 Subject: [issue30247] Make importlib.machinery class handle os.PathLike path In-Reply-To: <1493797358.8.0.753635690258.issue30247@psf.upfronthosting.co.za> Message-ID: <1493797532.63.0.941886471711.issue30247@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +1528 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 04:01:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 08:01:22 +0000 Subject: [issue23404] 'make touch' does not work with git clones of the source repository In-Reply-To: <1423262765.96.0.527396909.issue23404@psf.upfronthosting.co.za> Message-ID: <1493798482.61.0.641930067775.issue23404@psf.upfronthosting.co.za> STINNER Victor added the comment: Nick Coghlan: "Could we use "regen-*" as the pattern for the file regeneration targets?" Sure, done. I checked the CPython documentation, build scripts, etc. I confirm that "rebuild" usually means "recompile Python from scratch", it's even an explicit action in the Windows build system. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 04:01:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 08:01:44 +0000 Subject: [issue30246] fix several error messages in struct In-Reply-To: <1493797038.59.0.865593067467.issue30246@psf.upfronthosting.co.za> Message-ID: <1493798504.28.0.365442040919.issue30246@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: "unpack requires a bytes-like object of length %zd" is not correct too. array.array('i', [1, 2, 3]) has length 3, but Struct('3b').unpack doesn't accept it. The more correct error message is "unpack requires an object containing %zd bytes" (or "a buffer"). The similar issue was discussed some time ago, but I don't remember what module was discussed and who participated in that discussion. ---------- nosy: +berker.peksag, mark.dickinson, martin.panter, meador.inge, r.david.murray, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 04:01:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 08:01:48 +0000 Subject: [issue23404] 'make touch' does not work with git clones of the source repository In-Reply-To: <1423262765.96.0.527396909.issue23404@psf.upfronthosting.co.za> Message-ID: <1493798508.47.0.0915770249441.issue23404@psf.upfronthosting.co.za> STINNER Victor added the comment: > If we go in this direction, maybe we can go further and also run autoconf && autoheader? Oh, I just noticed that there is already a "make autoconf" target, I didn't know. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 04:03:12 2017 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 03 May 2017 08:03:12 +0000 Subject: [issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches In-Reply-To: <1490830588.09.0.152876220246.issue29943@psf.upfronthosting.co.za> Message-ID: <1493798592.77.0.109023112332.issue29943@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 04:38:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 08:38:15 +0000 Subject: [issue30248] Using boolean arguments in the _json module Message-ID: <1493800695.72.0.112994453765.issue30248@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Currently PyObject_IsTrue() is called every time when bool attributes (_json.Scanner.strict, _json.Encoder.sort_keys, _json.Encoder.skipkeys) are used in C acceleration of the json module. PyObject_IsTrue() is fast when the argument is a bool, but in any case this isn't efficient and is cumbersome. It is better to convert Python bool to C boolean value only once when create an object, as already is done for _json.Encoder.allow_nan and for most other boolean values in extension modules. Proposed patch simplifies and optimizes the code by making arguments strict, sort_keys and skipkeys be converted only once at argument parsing time. The patch changes behavior in the case when the boolean value of the argument is not constant. But this is very bad practice, we may ignore this obscure case (as ignore the case when the boolean value of the container doesn't consistent with its content, see issue27613). ---------- components: Extension Modules messages: 292861 nosy: bob.ippolito, ezio.melotti, rhettinger, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Using boolean arguments in the _json module type: performance versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 04:43:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 08:43:04 +0000 Subject: [issue30248] Using boolean arguments in the _json module In-Reply-To: <1493800695.72.0.112994453765.issue30248@psf.upfronthosting.co.za> Message-ID: <1493800984.7.0.696810968916.issue30248@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1529 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 04:43:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 08:43:52 +0000 Subject: [issue30248] Using boolean arguments in the _json module In-Reply-To: <1493800695.72.0.112994453765.issue30248@psf.upfronthosting.co.za> Message-ID: <1493801032.34.0.576400337651.issue30248@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Core dump when use uninitialized _json objects _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 04:55:20 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 03 May 2017 08:55:20 +0000 Subject: [issue30249] improve struct.unpack_from's error message like struct.pack_into Message-ID: <1493801720.08.0.647129145601.issue30249@psf.upfronthosting.co.za> New submission from Xiang Zhang: In #29649, the error message of struct.pack_into was improved. Since pack_into was changed, I think it's also worth improving unpack_from. ---------- components: Library (Lib) messages: 292862 nosy: xiang.zhang priority: normal severity: normal stage: needs patch status: open title: improve struct.unpack_from's error message like struct.pack_into type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 04:55:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 08:55:42 +0000 Subject: [issue30239] test_asyncore: test_handle_expt() fails on macOS Sierra In-Reply-To: <1493770051.35.0.665308404943.issue30239@psf.upfronthosting.co.za> Message-ID: <1493801742.07.0.553567048474.issue30239@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue seems similar to issue #28087. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 05:15:17 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 03 May 2017 09:15:17 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493802917.68.0.423035151464.issue19903@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Later today I should be able to pull the PR to my machine to review and test, and recheck coverage change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 05:20:04 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 03 May 2017 09:20:04 +0000 Subject: [issue30233] [3.5] Warning -- locale was modified by test_idle In-Reply-To: <1493742084.38.0.422431531448.issue30233@psf.upfronthosting.co.za> Message-ID: <1493803204.83.0.478543204143.issue30233@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If you can load any existing file into the editor, edit a bit, or maybe cut it down to a print statement, save under a new name, and run it, that should be enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 05:21:26 2017 From: report at bugs.python.org (Albert Zeyer) Date: Wed, 03 May 2017 09:21:26 +0000 Subject: [issue30250] StreamIO truncate behavior of current position Message-ID: <1493803286.93.0.729183089652.issue30250@psf.upfronthosting.co.za> New submission from Albert Zeyer: The doc says that StringIO.truncate should not change the current position. Consider this code: try: import StringIO except ImportError: import io as StringIO buf = StringIO.StringIO() assert_equal(buf.getvalue(), "") print("buf: %r" % buf.getvalue()) buf.write("hello") print("buf: %r" % buf.getvalue()) assert_equal(buf.getvalue(), "hello") buf.truncate(0) print("buf: %r" % buf.getvalue()) assert_equal(buf.getvalue(), "") buf.write("hello") print("buf: %r" % buf.getvalue()) assert_equal(buf.getvalue(), "\x00\x00\x00\x00\x00hello") buf.truncate(0) print("buf: %r" % buf.getvalue()) assert_equal(buf.getvalue(), "") On Python 3.6, I get the output: buf: '' buf: 'hello' buf: '' buf: '\x00\x00\x00\x00\x00hello' On Python 2.7, I get the output: buf: '' buf: 'hello' buf: '' buf: 'hello' Thus it seems that Python 2.7 StringIO.truncate does actually resets the position for this case or there is some other bug in Python 2.7. At least from the doc, it seems that the Python 3.6 behavior is the expected behavior. ---------- components: IO messages: 292866 nosy: Albert.Zeyer priority: normal severity: normal status: open title: StreamIO truncate behavior of current position versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 05:23:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 09:23:17 +0000 Subject: [issue30233] [3.5] Warning -- locale was modified by test_idle In-Reply-To: <1493742084.38.0.422431531448.issue30233@psf.upfronthosting.co.za> Message-ID: <1493803397.91.0.353181433279.issue30233@psf.upfronthosting.co.za> STINNER Victor added the comment: > If you can load any existing file into the editor, edit a bit, or maybe cut it down to a print statement, save under a new name, and run it, that should be enough. I created a latin1 file with a "# coding: latin1" cookie header. I was able to open it in IDLE, run it, edit it, and then reload it. IDLE respected the Latin1 encoding, whereas my locale encoding is UTF-8. Seems good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 05:31:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 09:31:12 +0000 Subject: [issue28087] macOS 12 poll syscall returns prematurely In-Reply-To: <1473637008.93.0.918549766701.issue28087@psf.upfronthosting.co.za> Message-ID: <1493803872.1.0.641112406518.issue28087@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1530 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 05:36:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 09:36:30 +0000 Subject: [issue30239] test_asyncore: test_handle_expt() fails on macOS Sierra In-Reply-To: <1493770051.35.0.665308404943.issue30239@psf.upfronthosting.co.za> Message-ID: <1493804190.22.0.41068597813.issue30239@psf.upfronthosting.co.za> STINNER Victor added the comment: > This issue seems similar to issue #28087. Aaaah, it's not just similar, it's exactly the same bug: it's just that the 3.5 branch wasn't fixed yet. I proposed a backport: https://github.com/python/cpython/pull/1424 ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> macOS 12 poll syscall returns prematurely _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 05:41:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 09:41:40 +0000 Subject: [issue28087] macOS 12 poll syscall returns prematurely In-Reply-To: <1473637008.93.0.918549766701.issue28087@psf.upfronthosting.co.za> Message-ID: <1493804500.12.0.938208835628.issue28087@psf.upfronthosting.co.za> STINNER Victor added the comment: Instead of skipping the test, it would be safer to not provide select.poll() if it's known to be broken. Curl added a check in configure: https://github.com/curl/curl/commit/9297ca49f5f3caca938a679b9c1feeb719e61ddb The problem is that I understood that Python provides a single binary for all supported macOS versions. So if we go for a check, it should be done as runtime, as the current select_have_broken_poll() test written for macOS. On macOS without the bug, curl check takes 0.5 second which is not ideal :-/ Would it be possible to design a test which doesn't block? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 05:43:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 09:43:00 +0000 Subject: [issue28087] macOS 12 poll syscall returns prematurely In-Reply-To: <1473637008.93.0.918549766701.issue28087@psf.upfronthosting.co.za> Message-ID: <1493804580.6.0.360479446333.issue28087@psf.upfronthosting.co.za> STINNER Victor added the comment: > Would it be possible to design a test which doesn't block? If there is no obvious way to detect poll() functionnaly, a workaround is to get the Darwin version from uname() and blacklist macOS versions known to have the bug (disable select.poll() on these versions). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 05:54:27 2017 From: report at bugs.python.org (Robert) Date: Wed, 03 May 2017 09:54:27 +0000 Subject: [issue22385] Define a binary output formatting mini-language for *.hex() In-Reply-To: <1410393301.25.0.193851592698.issue22385@psf.upfronthosting.co.za> Message-ID: <1493805267.43.0.316011621192.issue22385@psf.upfronthosting.co.za> Robert added the comment: regarding the proposal for mini format languages for bytes (msg292663): Wouldn't it be more consistent if the format specifiers are identical to the one of int's (see https://docs.python.org/3/library/string.html#format-specification-mini-language). I.e. "X" / "x" for hex, "o" for octal, "d" for decimal, "b" for binary, "c" for character (=default). Only 'A' need to be added for printing only ascii characters. Furthermore I cannot see in how far the format spec in http://bugs.python.org/issue22385#msg292663 ("h#,1") is more intuitive than in http://bugs.python.org/issue22385#msg226733 ("#,.4x"), which looks like the existing minilang. Why does Python need a new format mini lang, if the existing one provides most of the requirements. As developer it is already hard to memorize the details of the existing minilang. Ideally I do not need to learn a similar but different one for bytes... ---------- nosy: +mrh1997 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 05:55:08 2017 From: report at bugs.python.org (Stephen Kelly) Date: Wed, 03 May 2017 09:55:08 +0000 Subject: [issue30251] Windows Visual Studio solution does not have an install target Message-ID: <1493805308.24.0.584899845977.issue30251@psf.upfronthosting.co.za> New submission from Stephen Kelly: The Windows Visual Studio solution does not have an install target. As far as I understand, the configure system used on Unix does have an install target. That means that on Windows, binaries resulting from the build to not end up in the same layout as result from using the official installer. Third party modules expect the same layout. For example, Sip/PyQt requires it https://www.riverbankcomputing.com/pipermail/pyqt/2017-April/039109.html . There are probably other modules similarly affected. I don't know what else an install target should do, but I note its absence. ---------- components: Build messages: 292872 nosy: steveire priority: normal severity: normal status: open title: Windows Visual Studio solution does not have an install target versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 05:58:58 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 03 May 2017 09:58:58 +0000 Subject: [issue30233] [3.5] Warning -- locale was modified by test_idle In-Reply-To: <1493742084.38.0.422431531448.issue30233@psf.upfronthosting.co.za> Message-ID: <1493805538.52.0.115187546765.issue30233@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thanks, I feel better now. This might end up being the only IDLE patch for 3.5. A test issue for git CI with respect to tkinter and IDLE has been that Travis on Linux does not run 'gui' tests, so it is semi-useless for tk and IDLE. I notice on PR 1397 that Appveyor a) ran this time, b)runs on Windows, and c) appears to run gui tests (test_tk and test_ttk_guionly were *not* skipped). This is quite helpful. And, of course, you will notice if one of the stable Windows buildbots running gui tests is not green. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 05:59:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 09:59:03 +0000 Subject: [issue28087] macOS 12 poll syscall returns prematurely In-Reply-To: <1473637008.93.0.918549766701.issue28087@psf.upfronthosting.co.za> Message-ID: <1493805543.29.0.770435429343.issue28087@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1531 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 06:01:31 2017 From: report at bugs.python.org (Stephen Kelly) Date: Wed, 03 May 2017 10:01:31 +0000 Subject: [issue30252] Configuration system does not work for Windows/Visual Studio Message-ID: <1493805691.1.0.682843236937.issue30252@psf.upfronthosting.co.za> New submission from Stephen Kelly: As far as I know, there is a configuration system for python based on the configure script. Python can be configured with --without-threads to disable threading support. There is no equivalent system for Windows/Visual Studio. This makes it harder to build python with configurations. ---------- components: Build messages: 292874 nosy: steveire priority: normal severity: normal status: open title: Configuration system does not work for Windows/Visual Studio versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 06:04:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 10:04:16 +0000 Subject: [issue28087] macOS 12 poll syscall returns prematurely In-Reply-To: <1473637008.93.0.918549766701.issue28087@psf.upfronthosting.co.za> Message-ID: <1493805856.0.0.769353200602.issue28087@psf.upfronthosting.co.za> STINNER Victor added the comment: https://github.com/python/cpython/pull/1426 implements the blacklist option. I chose the conservative approach: hope that poll() will be fixed in 16.6.x. The problem of this approach is that test_asyncore and test_eintr will fail again if Apple doesn't fix poll(). Since I would like to backport this fix in 2.7, 3.5 and 3.6 and not have to modify the code at each broken macOS release, maybe we can use the pessimistic solution: blacklist Darwin >= 16.x, and only start again to whitelist once Apple releases a fixed macOS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 06:05:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 10:05:00 +0000 Subject: [issue28087] macOS 12 poll syscall returns prematurely In-Reply-To: <1473637008.93.0.918549766701.issue28087@psf.upfronthosting.co.za> Message-ID: <1493805900.01.0.702896513185.issue28087@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 23b312b087582cec5cc8c528d267eb42061601ac by Victor Stinner in branch '3.5': [3.6] bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS (#463) (#1424) https://github.com/python/cpython/commit/23b312b087582cec5cc8c528d267eb42061601ac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 06:07:33 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 10:07:33 +0000 Subject: [issue30232] configure: support Git worktree In-Reply-To: <1493737463.82.0.0521929731539.issue30232@psf.upfronthosting.co.za> Message-ID: <1493806053.63.0.303700411764.issue30232@psf.upfronthosting.co.za> STINNER Victor added the comment: I applied the enhanced (called bugfix by Brett ;-)) to 2.7, 3.5, 3.6 and master (3.7). I close the issue. Example: haypo at selma$ cat .git gitdir: /home/haypo/prog/python/master/.git/worktrees/2.7 haypo at selma$ ./python Python 2.7.13+ (heads/test_ssl_27:dda4d78, May 3 2017, 03:25:45) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys._git ('CPython', 'heads/test_ssl_27', 'dda4d78') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 06:07:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 10:07:42 +0000 Subject: [issue30232] configure: support Git worktree In-Reply-To: <1493737463.82.0.0521929731539.issue30232@psf.upfronthosting.co.za> Message-ID: <1493806062.24.0.826992949573.issue30232@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 06:08:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 10:08:54 +0000 Subject: [issue30225] EBADF error on x86 Tiger 3.x buildbot In-Reply-To: <1493712772.54.0.125879756705.issue30225@psf.upfronthosting.co.za> Message-ID: <1493806134.7.0.699542415018.issue30225@psf.upfronthosting.co.za> STINNER Victor added the comment: @David Bolen: Would you mind to take a look? I don't have access to your x86 Tiger 3.x buildbot. ---------- nosy: +db3l _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 06:10:00 2017 From: report at bugs.python.org (Stephen Kelly) Date: Wed, 03 May 2017 10:10:00 +0000 Subject: [issue30253] Python does not build without WITH_THREADS defined on Windows/Visual Studio Message-ID: <1493806200.91.0.0331403501702.issue30253@psf.upfronthosting.co.za> New submission from Stephen Kelly: As there is no configuration system for python on Windows (issue30252) I tried to change pyconfig.h to comment out some lines: // #define NT_THREADS // #define WITH_THREAD After building, I had to additionally patch * threadmodule.c and thread.c to exclude all content (I don't know if there is a way to exclude the file entirely with the Python build system - there should be something like that as part of a configure system). * Wrap uses of PyThread_get_thread_ident() in ifdefs in timemodule.c. This is surprising because I would expect it to not compile on any platform without the ifdefs. ---------- components: Build messages: 292879 nosy: steveire priority: normal severity: normal status: open title: Python does not build without WITH_THREADS defined on Windows/Visual Studio versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 06:16:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 10:16:42 +0000 Subject: [issue24725] test_socket testFDPassEmpty fails on OS X 10.11+ with "Cannot allocate memory" In-Reply-To: <1437896131.77.0.341264720465.issue24725@psf.upfronthosting.co.za> Message-ID: <1493806602.8.0.251604404319.issue24725@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1532 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 06:17:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 10:17:00 +0000 Subject: [issue30201] [3.5] RecvmsgIntoSCMRightsStreamTest fails with "OSError: [Errno 12] Cannot allocate memory" on macOS El Capitan In-Reply-To: <1493396449.34.0.335378086459.issue30201@psf.upfronthosting.co.za> Message-ID: <1493806620.66.0.285357506976.issue30201@psf.upfronthosting.co.za> STINNER Victor added the comment: Duplicate of issue #24725, I proposed a backport to 3.5: https://github.com/python/cpython/pull/1427 ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_socket testFDPassEmpty fails on OS X 10.11+ with "Cannot allocate memory" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 06:32:43 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 10:32:43 +0000 Subject: [issue30228] Open a file in text mode requires too many syscalls In-Reply-To: <1493723485.87.0.646779044512.issue30228@psf.upfronthosting.co.za> Message-ID: <1493807563.46.0.124017099518.issue30228@psf.upfronthosting.co.za> STINNER Victor added the comment: > You could call buffer.seek(0, SEEK_CUR) rather than buffer.tell() for avoiding a system call for readable stream. But this looks as a shamanism too. Note: Buffered.seek(0, SEEK_CUR) only has a fast-path for readable file: it cannot be used to optimize open(filename, "w") (BufferedWriter.seek() isn't optimized). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 06:33:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 10:33:51 +0000 Subject: [issue30228] Open a file in text mode requires too many syscalls In-Reply-To: <1493723485.87.0.646779044512.issue30228@psf.upfronthosting.co.za> Message-ID: <1493807631.94.0.764491943946.issue30228@psf.upfronthosting.co.za> STINNER Victor added the comment: > Or provide a function similar to the RAW_TELL macro but just checking if the current position is 0. I will try to implement such function and use it in textio.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 06:34:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 10:34:25 +0000 Subject: [issue30199] Warning -- asyncore.socket_map was modified by test_ssl In-Reply-To: <1493386700.85.0.622931101422.issue30199@psf.upfronthosting.co.za> Message-ID: <1493807665.68.0.464324473582.issue30199@psf.upfronthosting.co.za> STINNER Victor added the comment: Fix applied to 2.7, 3.5, 3.6 and master (3.7). ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 06:35:44 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 10:35:44 +0000 Subject: [issue29925] test_uuid fails on OS X Tiger In-Reply-To: <1490648746.25.0.479483160976.issue29925@psf.upfronthosting.co.za> Message-ID: <1493807744.08.0.69939748127.issue29925@psf.upfronthosting.co.za> STINNER Victor added the comment: test_uuid pass on x86 Tiger 3.6 and x86 Tiger 3.x, I close the issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 06:37:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 10:37:42 +0000 Subject: [issue29915] Drop Mac OS X Tiger support in Python 3.7? In-Reply-To: <1490606944.79.0.982783891513.issue29915@psf.upfronthosting.co.za> Message-ID: <1493807862.45.0.259255548153.issue29915@psf.upfronthosting.co.za> STINNER Victor added the comment: All tests pass again on 2.7, 3.5, 3.6 and master branches, so I have no more reason to drop Tiger support :-) I close the issue. I may reopen it later if I find a better reason to drop Tiger support ;-) ---------- resolution: -> postponed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 06:44:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 10:44:11 +0000 Subject: [issue30254] [2.7] regrtest announces 401 tests, but there are 304 tests? Message-ID: <1493808251.58.0.466858427103.issue30254@psf.upfronthosting.co.za> New submission from STINNER Victor: First case: --- ... [301/401] test_with [302/401] test_import [303/401] test_xmlrpc 277 tests OK. 2 tests altered the execution environment: test_distutils test_sax 24 tests skipped: test_al test_bsddb185 test_cl test_commands test_curses test_dbm test_dl test_fork1 test_grp test_ioctl test_kqueue test_macos test_openpty test_ossaudiodev test_pipes test_poll test_posix test_pwd test_readline test_scriptpackages test_spwd test_threadsignals test_wait3 test_wait4 1 skip unexpected on win32: test_readline --- http://buildbot.python.org/all/builders/AMD64%20Windows10%202.7/builds/133/steps/test/logs/stdio Why does regrtest count 404 tests, whereas the total is 304 tests (277+2+24+1)? Second case: --- ... [212/401] test_extcall [213/401] test_frozen [214/401] test_hotshot 190 tests OK. 2 tests altered the execution environment: test_distutils test_sax 22 tests skipped: test_al test_applesingle test_bsddb185 test_crypt test_curses test_dbm test_dl test_fcntl test_fork1 test_gdb test_gl test_mhlib test_nis test_openpty test_ossaudiodev test_pipes test_poll test_pwd test_resource test_scriptpackages test_threadsignals test_wait4 1 skip unexpected on win32: test_gdb --- http://buildbot.python.org/all/builders/AMD64%20Windows8%202.7/builds/128/steps/test/logs/stdio Here I only count 215 tests (190+2+22+1)... why not 304 or 401? where are the remaining tests? On Linux, it seems fine: --- ... [399/401] test_sets [400/401] test_bufio [401/401] test_xpickle 371 tests OK. 30 tests skipped: test_aepack test_al test_applesingle test_bsddb test_bsddb185 test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_gdb test_gl test_imgfile test_kqueue test_macos test_macostools test_msilib test_py3kwarn test_scriptpackages test_startfile test_sunaudiodev test_tk test_tools test_ttk_guionly test_winreg test_winsound test_zipfile64 9 skips unexpected on linux2: test_bsddb test_bsddb3 test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_gdb test_tools --- http://buildbot.python.org/all/builders/x86%20Gentoo%20Installed%20with%20X%202.7/builds/129/steps/test/logs/stdio I also expects regrtest to ends with "[401/401]" on Windows. ---------- components: Tests, Windows keywords: buildbot messages: 292886 nosy: haypo, paul.moore, serhiy.storchaka, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: [2.7] regrtest announces 401 tests, but there are 304 tests? versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 06:45:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 10:45:04 +0000 Subject: [issue30254] [2.7] regrtest announces 401 tests, but there are 304 tests? In-Reply-To: <1493808251.58.0.466858427103.issue30254@psf.upfronthosting.co.za> Message-ID: <1493808304.39.0.123980338156.issue30254@psf.upfronthosting.co.za> STINNER Victor added the comment: Another example, worse: --- ... [123/401] test_source_encoding [124/401] test_locale [125/401] test_unary 116 tests OK. 9 tests skipped: test_applesingle test_bsddb185 test_ioctl test_kqueue test_linuxaudiodev test_msilib test_startfile test_sunaudiodev test_tk 1 skip unexpected on linux2: test_ioctl --- http://buildbot.python.org/all/builders/PPC64LE%20Fedora%202.7/builds/127/steps/test/logs/stdio Only 116 tests here??? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 07:06:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 11:06:38 +0000 Subject: [issue30255] test_xml_etree: python: Objects/sliceobject.c:176: _PySlice_AdjustIndices: Assertion `step >= -PY_SSIZE_T_MAX' failed. Message-ID: <1493809598.71.0.198656807245.issue30255@psf.upfronthosting.co.za> New submission from STINNER Victor: ./python -m test -v test_xml_etree ... test_getslice_negative_steps (test.test_xml_etree.ElementSlicingTest) ... python: Objects/sliceobject.c:176: _PySlice_AdjustIndices: Assertion `step >= -PY_SSIZE_T_MAX' failed. ... Traceback (most recent call first): File "/home/haypo/prog/python/2.7/Lib/xml/etree/ElementTree.py", line 266, in __getitem__ return self._children[index] File "/home/haypo/prog/python/2.7/Lib/test/test_xml_etree.py", line 2305, in test_getslice_negative_steps self.assertEqual(self._elem_tags(e[3::-sys.maxsize-1]), ['a3']) See issues: bpo-30074, bpo-27867. ---------- components: Interpreter Core messages: 292888 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: test_xml_etree: python: Objects/sliceobject.c:176: _PySlice_AdjustIndices: Assertion `step >= -PY_SSIZE_T_MAX' failed. type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 07:53:34 2017 From: report at bugs.python.org (Jeff DuMonthier) Date: Wed, 03 May 2017 11:53:34 +0000 Subject: [issue30256] Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception Message-ID: <1493812414.86.0.361870744934.issue30256@psf.upfronthosting.co.za> New submission from Jeff DuMonthier: In multiprocessing, attempting to add a Queue proxy to a dict or Namespace proxy (all returned by the same SyncManager) raises an exception indicating a keyword argument 'manager_owned=True' has been passed to the function AutoProxy() but is not an argument of that function. In lib/python3.6/multiprocessing/managers.py, in function RebuildProxy(), line 873: "kwds['manager_owned'] = True" adds this argument to a keyword argument dictionary. This function calls AutoProxy which has an argument list defined on lines 909-910 as: def AutoProxy(token, serializer, manager=None, authkey=None, exposed=None, incref=True): This raises an exception because there is no manager_owned argument defined. I added "manager_owned=False" as a keyword argument to AutoProxy which seems to have fixed the problem. There is no exception and I am able to pass Queue proxies through dict and Namespace proxies to other processes and use them. I don't know the purpose of that argument though or if the AutoProxy function should actually use it for something. My fix allows but ignores it. ---------- components: Library (Lib) messages: 292889 nosy: jjdmon priority: normal severity: normal status: open title: Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 08:04:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 12:04:41 +0000 Subject: [issue30257] _bsddb: else misleadingly indented Message-ID: <1493813081.42.0.70374068517.issue30257@psf.upfronthosting.co.za> New submission from STINNER Victor: building '_bsddb' extension gcc -pthread -fPIC -fno-strict-aliasing -O0 -g -O0 -Wall -Wstrict-prototypes -I/usr/include -I. -IInclude -I./Include -I/usr/local/include -I/home/haypo/prog/python/2.7/Include -I/home/haypo/prog/python/2.7 -c /home/haypo/prog/python/2.7/Modules/_bsddb.c -o build/temp.linux-x86_64-2.7-pydebug/home/haypo/prog/python/2.7/Modules/_bsddb.o /home/haypo/prog/python/2.7/Modules/_bsddb.c: Dans la fonction ??newDBObject??: /home/haypo/prog/python/2.7/Modules/_bsddb.c:936:5: attention : this ??else?? clause does not guard... [-Wmisleading-indentation] else ^~~~ /home/haypo/prog/python/2.7/Modules/_bsddb.c:938:9: note?: ...this statement, but the latter is misleadingly indented as if it is guarded by the ??else?? self->moduleFlags.cursorSetReturnsNone = DEFAULT_CURSOR_SET_RETURNS_NONE; ^~~~ gcc -pthread -shared build/temp.linux-x86_64-2.7-pydebug/home/haypo/prog/python/2.7/Modules/_bsddb.o -L/usr/lib64 -L/usr/local/lib -Wl,-R/usr/lib64 -ldb-5.3 -o build/lib.linux-x86_64-2.7-pydebug/_bsddb.so I agree that the indentation is surprising and looks like a bug. if (self->myenvobj) self->moduleFlags = self->myenvobj->moduleFlags; else self->moduleFlags.getReturnsNone = DEFAULT_GET_RETURNS_NONE; self->moduleFlags.cursorSetReturnsNone = DEFAULT_CURSOR_SET_RETURNS_NONE; Attached PR only don't set cursorSetReturnsNone to DEFAULT_CURSOR_SET_RETURNS_NONE anymore if self->myenvobj is set. ---------- components: Extension Modules messages: 292890 nosy: haypo priority: normal severity: normal status: open title: _bsddb: else misleadingly indented versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 08:07:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 12:07:13 +0000 Subject: [issue30257] _bsddb: else misleadingly indented In-Reply-To: <1493813081.42.0.70374068517.issue30257@psf.upfronthosting.co.za> Message-ID: <1493813233.59.0.542180480953.issue30257@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1533 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 08:08:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 12:08:49 +0000 Subject: [issue30255] test_xml_etree: python: Objects/sliceobject.c:176: _PySlice_AdjustIndices: Assertion `step >= -PY_SSIZE_T_MAX' failed. In-Reply-To: <1493809598.71.0.198656807245.issue30255@psf.upfronthosting.co.za> Message-ID: <1493813329.0.0.998392124373.issue30255@psf.upfronthosting.co.za> STINNER Victor added the comment: The second line in the else block was added... 14 years ago (!) by this commit: commit 455d46f0d921337405ebd3a098c210f3614ae77c Author: Gregory P. Smith Date: Wed Jul 9 04:45:59 2003 +0000 bsddb 4.1.6: * Extended DB & DBEnv set_get_returns_none functionality to take a "level" instead of a boolean flag. The boolean 0 and 1 values still have the same effect. A value of 2 extends the "return None instead of raising an exception" behaviour to the DBCursor set methods. This will become the default behaviour in pybsddb 4.2. * Fixed a typo in DBCursor.join_item method that made it crash instead of returning a value. Obviously nobody uses it. Wrote a test case for join and join_item. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 08:09:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 12:09:09 +0000 Subject: [issue30257] _bsddb: else misleadingly indented In-Reply-To: <1493813081.42.0.70374068517.issue30257@psf.upfronthosting.co.za> Message-ID: <1493813349.55.0.778481158627.issue30257@psf.upfronthosting.co.za> STINNER Victor added the comment: The second line in the else block was added... 14 years ago (!) by this commit: commit 455d46f0d921337405ebd3a098c210f3614ae77c Author: Gregory P. Smith Date: Wed Jul 9 04:45:59 2003 +0000 bsddb 4.1.6: * Extended DB & DBEnv set_get_returns_none functionality to take a "level" instead of a boolean flag. The boolean 0 and 1 values still have the same effect. A value of 2 extends the "return None instead of raising an exception" behaviour to the DBCursor set methods. This will become the default behaviour in pybsddb 4.2. * Fixed a typo in DBCursor.join_item method that made it crash instead of returning a value. Obviously nobody uses it. Wrote a test case for join and join_item. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 08:10:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 12:10:21 +0000 Subject: [issue30255] test_xml_etree: python: Objects/sliceobject.c:176: _PySlice_AdjustIndices: Assertion `step >= -PY_SSIZE_T_MAX' failed. In-Reply-To: <1493809598.71.0.198656807245.issue30255@psf.upfronthosting.co.za> Message-ID: <1493813421.65.0.555988380293.issue30255@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- Removed message: http://bugs.python.org/msg292891 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 08:10:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 12:10:55 +0000 Subject: [issue30257] _bsddb: else misleadingly indented In-Reply-To: <1493813081.42.0.70374068517.issue30257@psf.upfronthosting.co.za> Message-ID: <1493813455.25.0.569479118194.issue30257@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 08:11:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 12:11:37 +0000 Subject: [issue24725] test_socket testFDPassEmpty fails on OS X 10.11+ with "Cannot allocate memory" In-Reply-To: <1437896131.77.0.341264720465.issue24725@psf.upfronthosting.co.za> Message-ID: <1493813497.65.0.380343346007.issue24725@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 5e9c1101924bacf3ead03124b5c1e48551638360 by Victor Stinner in branch '3.5': bpo-24725: Skip the test_socket.testFDPassEmpty on OS X (#1427) https://github.com/python/cpython/commit/5e9c1101924bacf3ead03124b5c1e48551638360 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 08:25:32 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 12:25:32 +0000 Subject: [issue30255] test_xml_etree: python: Objects/sliceobject.c:176: _PySlice_AdjustIndices: Assertion `step >= -PY_SSIZE_T_MAX' failed. In-Reply-To: <1493809598.71.0.198656807245.issue30255@psf.upfronthosting.co.za> Message-ID: <1493814332.04.0.94943069909.issue30255@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1534 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 08:26:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 12:26:51 +0000 Subject: [issue30255] test_xml_etree: python: Objects/sliceobject.c:176: _PySlice_AdjustIndices: Assertion `step >= -PY_SSIZE_T_MAX' failed. In-Reply-To: <1493809598.71.0.198656807245.issue30255@psf.upfronthosting.co.za> Message-ID: <1493814411.02.0.254045390328.issue30255@psf.upfronthosting.co.za> STINNER Victor added the comment: Attached PR fixes test_xml_etree. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 08:28:32 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 12:28:32 +0000 Subject: [issue30254] [2.7] regrtest announces 401 tests, but there are 304 tests? In-Reply-To: <1493808251.58.0.466858427103.issue30254@psf.upfronthosting.co.za> Message-ID: <1493814512.77.0.217996372492.issue30254@psf.upfronthosting.co.za> STINNER Victor added the comment: Maybe be related to issue #30255 (test_xml_etree crash related to slices). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 08:45:17 2017 From: report at bugs.python.org (Thomas Wouters) Date: Wed, 03 May 2017 12:45:17 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1493815517.4.0.378393806225.issue29094@psf.upfronthosting.co.za> Thomas Wouters added the comment: The spec isn't very explicit about it, yes, but it does say this: 4.4.16 relative offset of local header: (4 bytes) This is the offset from the start of the first disk on which this file appears, to where the local header should be found. "the start of the first disk" could be construed to mean "the start of the ZIP archive embedded in this file". However, if you consider the information that's available, the only way to make ZIP archives work in the face of ZIP64 and other extensions that add information between the end-of-central-directory record and the end of the central directory, it's obvious that you can't correctly handle ZIP archives that start at an arbitrary point in a file. ZIP archives have both a 4-byte magic number at the start, and a central directory at the end. The end-of-central-directory record is the very last thing in the file, and it records both the offset of the start of the central directory and the size of the central directory. In absense of any ZIP extensions that add records between the end-of-central-directory record and the end of the central directory, you can use those to correct all offsets in the ZIP archive. But as soon as you add (for example) ZIP64 records, this no longer works: ZIP64 has an end-of-zip64-central-directory locator, and variable-sized end-of-zip64-central-directory record. The locator is fixed size right before the end-of-central-directory record and records the offset (from the start of the file) to the end-of-zip64-central-directory record, but *not* the size of that record or any other information you can use to determine the offset of the start of the archive in the file. Only by assuming the central directory record comes right before the end-of-central-directory record, or assuming fixed sizes for the ZIP64 record, can you deal with ZIP archives with offsets not from the start of the file. This assumption is not only *not* guaranteed by the ZIP spec, it's explicitly invalidated by ZIP64's variable sized records, and possibly other extensions (like encryption, compression and digital signatures, although I don't remember if those actually affect this). It's true that many ZIP tools try to deal with these kinds of archives, although they *do* realise it's wrong and they usually *do* warn about it. They still can't deal with it if it uses variable-sized ZIP64 features (other than trawling through the file looking for the 4-byte magic numbers). Here's an example of code that breaks because of this: https://github.com/Yhg1s/zipfile-hacks. I tried to convince zipfile to create Zip64 files with extra fields (the variable-sized parts) but unfortunately the *cough* "design" of the zipfile module doesn't allow that -- feel free to ignore the force_zip64 parts of the script. (I'm using two python installations I had laying around here; I could've used 2.7.12 vs 2.7.13 instead, and the results would be the same.) # Python 2.7.12 -- so old behaviour % python create_small_zip64.py -v --mode w --preamble '#!/usr/bin/python' py2-preamble-w.zip create_small_zip64.py % python create_small_zip64.py -v --mode a --preamble '#!/usr/bin/python' py2-preamble-a.zip create_small_zip64.py # Python 3.6.0+ -- after this change, so new behaviour % ~/python/installs/py36-opt/bin/python3 create_small_zip64.py -v --mode w --preamble '#!/usr/bin/python' py3-preamble-w.zip create_small_zip64.py % ~/python/installs/py36-opt/bin/python3 create_small_zip64.py -v --mode a --preamble '#!/usr/bin/python' py3-preamble-a.zip create_small_zip64.py The old zipfiles are fine: % zip -T py2-preamble-w.zip test of py2-preamble-w.zip OK % zip -T py2-preamble-a.zip test of py2-preamble-a.zip OK The new one using 'w' is also fine (as expected): % zip -T py3-preamble-w.zip test of py3-preamble-w.zip OK The new one using 'a' is broken: % zip -T py3-preamble-a.zip warning [py3-preamble-a.zip]: 17 extra bytes at beginning or within zipfile (attempting to process anyway) test of py3-preamble-a.zip FAILED zip error: Zip file invalid, could not spawn unzip, or wrong unzip (original files unmodified) The 'unzip' tool does work, but it also prints a warning: % unzip -l py3-preamble-a.zip Archive: py3-preamble-a.zip warning [py3-preamble-a.zip]: 17 extra bytes at beginning or within zipfile (attempting to process anyway) Length Date Time Name --------- ---------- ----- ---- 4016 2017-05-03 14:23 create_small_zip64.py --------- ------- 4016 1 file Whether other tools try to compensate for the error depends greatly on the tool; there's quite a few that don't. For the record, we had two different bits of code that created zipfiles with preambles using mode='a', created by (at least) two different people. I don't think it's unreasonable to assume that if you have a file with existing data you don't want the ZipFile to overwrite, it should be using mode 'a' :P ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 08:46:52 2017 From: report at bugs.python.org (Martin Panter) Date: Wed, 03 May 2017 12:46:52 +0000 Subject: =?utf-8?q?=5Bissue28149=5D_Incorrect_indentation_under_=E2=80=9Celse?= =?utf-8?b?4oCdIGluIF9ic2RkYi5j?= In-Reply-To: <1473856607.19.0.0525868004133.issue28149@psf.upfronthosting.co.za> Message-ID: <1493815612.56.0.279124543769.issue28149@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- resolution: -> duplicate stage: test needed -> resolved status: open -> closed superseder: -> _bsddb: else misleadingly indented _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 08:50:33 2017 From: report at bugs.python.org (Thomas Wouters) Date: Wed, 03 May 2017 12:50:33 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1493815833.44.0.691402993198.issue29094@psf.upfronthosting.co.za> Thomas Wouters added the comment: ... and yes, the changes to issue 26293 should be reverted; the changes attached to this issue merely revert part of issue 26293's changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 08:51:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 12:51:04 +0000 Subject: [issue30255] test_xml_etree: python: Objects/sliceobject.c:176: _PySlice_AdjustIndices: Assertion `step >= -PY_SSIZE_T_MAX' failed. In-Reply-To: <1493809598.71.0.198656807245.issue30255@psf.upfronthosting.co.za> Message-ID: <1493815864.55.0.131371769113.issue30255@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Victor for noticing and fixing this crash! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 09:08:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 13:08:03 +0000 Subject: [issue30247] Make importlib.machinery class handle os.PathLike path In-Reply-To: <1493797358.8.0.753635690258.issue30247@psf.upfronthosting.co.za> Message-ID: <1493816883.16.0.825963385983.issue30247@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm not sure it's a good idea. FileLoader, FileFinder, and other classes usually are a part of import machinery, they can have other restrictions on path type than general filesystem related functions. This change has a non-zero cost, it complicates the code and makes it slower. Do you have a use case for using these classes with a path different from None or str? ---------- nosy: +eric.snow, ncoghlan, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 09:19:04 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 03 May 2017 13:19:04 +0000 Subject: [issue22385] Define a binary output formatting mini-language for *.hex() In-Reply-To: <1410393301.25.0.193851592698.issue22385@psf.upfronthosting.co.za> Message-ID: <1493817544.58.0.983199507986.issue22385@psf.upfronthosting.co.za> Nick Coghlan added the comment: Re-using an existing minilanguage to mean something completely different wouldn't be a good idea. Whether or not we should add any bytes specific features for this at all is also still an open question, as one of the points raised in the latest python-ideas thread is that this may be better handled as a general purpose string splitting method that breaks the string up into fixed size units, which can then be rejoined with an arbitrary delimeter. For example: >>> digit_groups = b'\xb9\x01\xef'.hex().splitgroups(2) >>> ' '.join(digit_groups) 'b9 01 ef' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 09:31:41 2017 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 May 2017 13:31:41 +0000 Subject: [issue18699] What is Future.running() for in PEP 3148 / concurrent.futures.Future? In-Reply-To: <1376092118.24.0.585945689562.issue18699@psf.upfronthosting.co.za> Message-ID: <1493818301.55.0.996146824261.issue18699@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +1535 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 10:00:14 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 14:00:14 +0000 Subject: [issue30255] test_xml_etree: python: Objects/sliceobject.c:176: _PySlice_AdjustIndices: Assertion `step >= -PY_SSIZE_T_MAX' failed. In-Reply-To: <1493809598.71.0.198656807245.issue30255@psf.upfronthosting.co.za> Message-ID: <1493820014.57.0.256170840521.issue30255@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset f6a3133972378205baaa6a854d46170d04a2db67 by Victor Stinner in branch '2.7': bpo-30255: Clip step in _PySlice_Unpack() (#1429) https://github.com/python/cpython/commit/f6a3133972378205baaa6a854d46170d04a2db67 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 10:03:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 14:03:41 +0000 Subject: [issue30255] test_xml_etree: python: Objects/sliceobject.c:176: _PySlice_AdjustIndices: Assertion `step >= -PY_SSIZE_T_MAX' failed. In-Reply-To: <1493809598.71.0.198656807245.issue30255@psf.upfronthosting.co.za> Message-ID: <1493820221.19.0.416861785233.issue30255@psf.upfronthosting.co.za> STINNER Victor added the comment: I pushed the change to try to fix buildbots, but I'm not sure that it's complete. The change announces "... clip the step to [-PY_SSIZE_T_MAX, PY_SSIZE_T_MAX] ...", but there is no explicit to clip the maximum to PY_SSIZE_T_MAX. Maybe there is a bug on this side too! The code should be reviewed one more time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 10:05:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 14:05:20 +0000 Subject: [issue30255] test_xml_etree: python: Objects/sliceobject.c:176: _PySlice_AdjustIndices: Assertion `step >= -PY_SSIZE_T_MAX' failed. In-Reply-To: <1493809598.71.0.198656807245.issue30255@psf.upfronthosting.co.za> Message-ID: <1493820320.01.0.120322466007.issue30255@psf.upfronthosting.co.za> STINNER Victor added the comment: > Thank you Victor for noticing and fixing this crash! Something is *very* strange: we have +20 buildbots, but I didn't see this assertion failure on any buildbot. Instead, I noticed that regrtest runs less tests than announced: see issue #30254. It's very strange because I expect either a crash: regrtest stops with no more output, or a report of the crash. But no, regrtest displays the summary as everything was fine... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 10:25:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 14:25:28 +0000 Subject: [issue30258] [2.7] regrtest: handle child process crash Message-ID: <1493821528.82.0.0272255783657.issue30258@psf.upfronthosting.co.za> New submission from STINNER Victor: In the master branch, regrtest in multiprocess mode handles well crash of child processes. In 2.7, regrtest handles them badly: see issue #30254. Attached PR backports the CHILD_ERROR status from regrtest master and adds code to handle crash (or any non-zero exit code) of the child process (a worker running an unit test). ---------- components: Tests messages: 292904 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: [2.7] regrtest: handle child process crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 10:29:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 14:29:27 +0000 Subject: [issue30258] [2.7] regrtest: handle child process crash In-Reply-To: <1493821528.82.0.0272255783657.issue30258@psf.upfronthosting.co.za> Message-ID: <1493821767.58.0.199451002184.issue30258@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1536 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 10:31:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 14:31:42 +0000 Subject: [issue30254] [2.7] regrtest announces 401 tests, but there are 304 tests? In-Reply-To: <1493808251.58.0.466858427103.issue30254@psf.upfronthosting.co.za> Message-ID: <1493821902.88.0.724609336922.issue30254@psf.upfronthosting.co.za> STINNER Victor added the comment: It has been long time since I didn't work on Python 2.7, so I forgot that regrtest of Python 2.7 lacks *many* features of Python master. I created the issue #30258 to add code to handle crash of a test child process. > Maybe be related to issue #30255 (test_xml_etree crash related to slices). regrtest stopped at the first crash of a child process and swallow child stdout/stderr. This crash explains this issue. Since issue #30255 is fixed, I close this issue to now focus on the issue #30258 (fix regrtest to detect crashes). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 10:31:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 14:31:53 +0000 Subject: [issue30254] [2.7] regrtest announces 401 tests, but there are 304 tests? In-Reply-To: <1493808251.58.0.466858427103.issue30254@psf.upfronthosting.co.za> Message-ID: <1493821913.72.0.188064173426.issue30254@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 10:32:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 14:32:26 +0000 Subject: [issue22385] Define a binary output formatting mini-language for *.hex() In-Reply-To: <1410393301.25.0.193851592698.issue22385@psf.upfronthosting.co.za> Message-ID: <1493821946.16.0.122698557969.issue22385@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 11:07:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 15:07:55 +0000 Subject: [issue30258] [2.7] regrtest: handle child process crash In-Reply-To: <1493821528.82.0.0272255783657.issue30258@psf.upfronthosting.co.za> Message-ID: <1493824075.88.0.365250435779.issue30258@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Victor, you are just incredible! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 11:12:04 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 03 May 2017 15:12:04 +0000 Subject: [issue29243] --enable-optimizations makes common build commands always need to compile from scratch In-Reply-To: <1484151314.82.0.308427338149.issue29243@psf.upfronthosting.co.za> Message-ID: <1493824324.11.0.0727826684138.issue29243@psf.upfronthosting.co.za> Changes by Charalampos Stratakis : ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 11:12:37 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 03 May 2017 15:12:37 +0000 Subject: [issue29712] --enable-optimizations does not work with --enable-shared In-Reply-To: <1488555923.14.0.550158164587.issue29712@psf.upfronthosting.co.za> Message-ID: <1493824357.09.0.433934553921.issue29712@psf.upfronthosting.co.za> Changes by Charalampos Stratakis : ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 11:16:29 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 03 May 2017 15:16:29 +0000 Subject: [issue30257] _bsddb: else misleadingly indented In-Reply-To: <1493813081.42.0.70374068517.issue30257@psf.upfronthosting.co.za> Message-ID: <1493824589.77.0.967511278645.issue30257@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: +jcea -gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 11:28:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 15:28:31 +0000 Subject: [issue30258] [2.7] regrtest: handle child process crash In-Reply-To: <1493821528.82.0.0272255783657.issue30258@psf.upfronthosting.co.za> Message-ID: <1493825311.05.0.291773812288.issue30258@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset c991eb280e60ed25c68a5332bd8633959e9f7113 by Victor Stinner in branch '2.7': bpo-30258: regrtest handles child process crash (#1431) https://github.com/python/cpython/commit/c991eb280e60ed25c68a5332bd8633959e9f7113 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 11:46:35 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 15:46:35 +0000 Subject: [issue30257] _bsddb: else misleadingly indented In-Reply-To: <1493813081.42.0.70374068517.issue30257@psf.upfronthosting.co.za> Message-ID: <1493826395.28.0.597981749344.issue30257@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It looks to me that the valid combinations of getReturnsNone and cursorSetReturnsNone flags are 00, 10 and 11. But this suspicious code allows to get 01. It looks as a bug to me. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:04:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 16:04:22 +0000 Subject: [issue30257] _bsddb: else misleadingly indented In-Reply-To: <1493813081.42.0.70374068517.issue30257@psf.upfronthosting.co.za> Message-ID: <1493827462.13.0.764919909599.issue30257@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 2c27731901003cbcc64056fe9db725abe8484616 by Victor Stinner in branch '2.7': bpo-30257: _bsddb: Fix newDBObject() (#1428) https://github.com/python/cpython/commit/2c27731901003cbcc64056fe9db725abe8484616 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:05:14 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 03 May 2017 16:05:14 +0000 Subject: [issue29311] Argument Clinic: convert dict methods In-Reply-To: <1484758450.31.0.717694851278.issue29311@psf.upfronthosting.co.za> Message-ID: <1493827514.39.0.488324871804.issue29311@psf.upfronthosting.co.za> Raymond Hettinger added the comment: IMO, you've made the docstrings for pure Python versions of collections.OrderedDict worse. The previous docstrings were clearer. Please note, there is a high bar for altering docstrings that have worked well (been deployed with success) for over 15 years (they were modeled on the dict object docstrings). You're undoing some of the work originally done by Guido van Rossum and Tim Peters. Argument clinic was accepted on the premise that it would add useful information, not that it would entail a wholesale rewrite of every docstring. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:05:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 16:05:48 +0000 Subject: [issue30258] [2.7] regrtest: handle child process crash In-Reply-To: <1493821528.82.0.0272255783657.issue30258@psf.upfronthosting.co.za> Message-ID: <1493827548.53.0.400926690778.issue30258@psf.upfronthosting.co.za> STINNER Victor added the comment: Ooops, there is a bug in my pushed changed, spotted by Serhiy: > # Strip last refcount output line if it exists, since it # comes from the shutdown of the interpreter in the subcommand. stderr = debug_output_pat.sub("", stderr) + + if retcode != 0: + result = (CHILD_ERROR, "Exit code %s" % retcode) + output.put((test, stdout.rstrip(), stderr.rstrip(), + result)) + Missed return? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:08:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 16:08:26 +0000 Subject: [issue26293] Embedded zipfile fields dependent on absolute position In-Reply-To: <1454662355.53.0.48718125489.issue26293@psf.upfronthosting.co.za> Message-ID: <1493827706.06.0.317136031763.issue26293@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: -1050 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:10:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 16:10:55 +0000 Subject: [issue26293] Embedded zipfile fields dependent on absolute position In-Reply-To: <1454662355.53.0.48718125489.issue26293@psf.upfronthosting.co.za> Message-ID: <1493827855.35.0.423801582368.issue26293@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Unfortunately we should revert this change. It breaks other cases. See issue29094. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:21:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 16:21:50 +0000 Subject: [issue23404] 'make touch' does not work with git clones of the source repository In-Reply-To: <1423262765.96.0.527396909.issue23404@psf.upfronthosting.co.za> Message-ID: <1493828510.72.0.719943326335.issue23404@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a5c62a8e9f0de6c4133825a5710984a3cd5e102b by Victor Stinner in branch 'master': bpo-23404: make touch becomes make regen-all (#1405) https://github.com/python/cpython/commit/a5c62a8e9f0de6c4133825a5710984a3cd5e102b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:24:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 16:24:48 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1493828688.39.0.438580534575.issue29094@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for raising this again and for your research Thomas. I now see that my understanding of the specification was wrong. I'll revert changes to zipfile. There is one question. If the zip file was concatenated to other file (and looks incorrect from the view of other tools), and we opened it in append mode and added new entries, should the central directory count offsets from the start of the file or from the start of embedded archive? In the first case offsets of first entries (which was in the original concatenated archive) in the central directory will be different from offsets in local headers. In the second case the zip file will look incorrect from the view of other tools (but it already looked incorrect before appending). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:26:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 16:26:48 +0000 Subject: [issue30259] Test somehow that generated files are up to date: run make regen-all Message-ID: <1493828808.63.0.88408078015.issue30259@psf.upfronthosting.co.za> New submission from STINNER Victor: bpo-23404 replaced "make touch" with "make regen-all". Generated files are no more regenerated based on file modification time anymore, the action is now explicit. Zachary Ware proposed to add a buildbot to check that generated files are up to date: run "make regen-all" and test that no file was modified. ---------- components: Tests messages: 292915 nosy: haypo, zach.ware priority: normal severity: normal status: open title: Test somehow that generated files are up to date: run make regen-all versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:27:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 16:27:19 +0000 Subject: [issue23404] 'make touch' does not work with git clones of the source repository In-Reply-To: <1423262765.96.0.527396909.issue23404@psf.upfronthosting.co.za> Message-ID: <1493828839.67.0.771850452137.issue23404@psf.upfronthosting.co.za> STINNER Victor added the comment: I just created the issue #30259: Test somehow that generated files are up to date: run make regen-all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:28:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 16:28:28 +0000 Subject: [issue30259] Test somehow that generated files are up to date: run make regen-all In-Reply-To: <1493828808.63.0.88408078015.issue30259@psf.upfronthosting.co.za> Message-ID: <1493828908.75.0.0221951267219.issue30259@psf.upfronthosting.co.za> STINNER Victor added the comment: I also asked if something similar should be done for autoconf? http://bugs.python.org/issue23404#msg292829 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:31:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 16:31:05 +0000 Subject: [issue30257] _bsddb: else misleadingly indented In-Reply-To: <1493813081.42.0.70374068517.issue30257@psf.upfronthosting.co.za> Message-ID: <1493829065.39.0.997863779175.issue30257@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't understand well the consequence of the change, so I didn't document it in Misc/NEWS :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:34:14 2017 From: report at bugs.python.org (Brett Cannon) Date: Wed, 03 May 2017 16:34:14 +0000 Subject: [issue29447] Add os.PathLike support to the tempfile module's 'dir' arguments In-Reply-To: <1486273182.96.0.640027026479.issue29447@psf.upfronthosting.co.za> Message-ID: <1493829254.27.0.619785499437.issue29447@psf.upfronthosting.co.za> Brett Cannon added the comment: Without looking at the PR there are two ways to interpret my unfortunately vague comment. One is to say that the objects returned by tempfile code should support os.PathLike; that's what Serhiy is objecting to as those are objects representing concrete things on the file system instead of a general concept of a path (i.e. open() returns a concrete file while pathlib returns a path). You could potentially argue that TemporaryDirectory can implement os.PathLike since it does represent a path on the file system, but I see where Serhiy is coming from about how this can be viewed as inappropriate. The other way to interpret what I said was to make sure things like the 'dir' argument accepted path-like objects. What I probably meant back in February was the first interpretation, but after hearing Serhiy's argument, I agree that the second interpretation is best. (My apologies to svelankar if they implemented the first idea.) ---------- title: Add os.PathLike support to the tempfile module -> Add os.PathLike support to the tempfile module's 'dir' arguments _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:35:56 2017 From: report at bugs.python.org (Brett Cannon) Date: Wed, 03 May 2017 16:35:56 +0000 Subject: [issue29447] Add/check os.PathLike support for the tempfile module's 'dir' arguments In-Reply-To: <1486273182.96.0.640027026479.issue29447@psf.upfronthosting.co.za> Message-ID: <1493829356.71.0.812511318745.issue29447@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- title: Add os.PathLike support to the tempfile module's 'dir' arguments -> Add/check os.PathLike support for the tempfile module's 'dir' arguments _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:37:52 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 03 May 2017 16:37:52 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1493829472.86.0.625993525726.issue28556@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 4b15e45895ca56ac5f7837cacb8cd3ccc26d1f66 by Mariatta in branch '3.5': [3.5] bpo-28556: Routine updates to typing (GH-1366) (#1417) https://github.com/python/cpython/commit/4b15e45895ca56ac5f7837cacb8cd3ccc26d1f66 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:38:03 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 03 May 2017 16:38:03 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1493829483.33.0.237103982206.issue28556@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset e612c28513b406779d187e5f816445c7d40d292b by Mariatta in branch '3.6': [3.6] bpo-28556: Routine updates to typing (GH-1366) (#1416) https://github.com/python/cpython/commit/e612c28513b406779d187e5f816445c7d40d292b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:41:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 16:41:25 +0000 Subject: [issue29311] Argument Clinic: convert dict methods In-Reply-To: <1484758450.31.0.717694851278.issue29311@psf.upfronthosting.co.za> Message-ID: <1493829685.4.0.105343192474.issue29311@psf.upfronthosting.co.za> STINNER Victor added the comment: > IMO, you've made the docstrings for pure Python versions of collections.OrderedDict worse. The previous docstrings were clearer. Can you please elaborate? Please reopen the issue or open a new one if you consider that it's worth it (this issue is currently closed). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:42:46 2017 From: report at bugs.python.org (Brett Cannon) Date: Wed, 03 May 2017 16:42:46 +0000 Subject: [issue29448] Implement os.Pathlike for importlib.machinery In-Reply-To: <1486273284.58.0.20381224055.issue29448@psf.upfronthosting.co.za> Message-ID: <1493829766.26.0.771875661108.issue29448@psf.upfronthosting.co.za> Brett Cannon added the comment: Since the objects I thought of for this aren't purely representing paths I'm going to close this to keep os.PathLike for things that are specifically representing paths. ---------- resolution: -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:44:03 2017 From: report at bugs.python.org (asterite) Date: Wed, 03 May 2017 16:44:03 +0000 Subject: [issue30260] sock_dealloc() may call __repr__ when socket class is already collected by GC Message-ID: <1493829842.08.0.612214340964.issue30260@psf.upfronthosting.co.za> New submission from asterite: I faced a crash during iterpreter shutdown (Py_Finalize), in final garbage collection phase. The reason, as far as I could understand, was the following: In Python 3, when an unclosed socket is destroyed, it issues a ResourceWarning, which contains a string representation of socket object (obtained by __repr__). If socket class object and unclosed socket object (instance) are in a reference cycle, GC may collect socket class object before it collects an instance when dealing with that cycle. Then, when instance is collected, sock_dealloc() will be called, which will call PyErr_WarnFormat with %R format specifier, which triggers a call to __repr__: static void sock_dealloc(PySocketSockObject *s) { if (s->sock_fd != INVALID_SOCKET) { // ... if (PyErr_WarnFormat(PyExc_ResourceWarning, 1, "unclosed %R", s)) //... } At this moment, socket class object was already deallocated, so was __repr__, resides in it. Particularly, in my tests, when __repr__ attempted to access a global variable (getattr), it tried to take it's name from co_names tuple in it's code object. This tuple was deallocated, and co_names pointed to tuple free list. Trying to use a tuple from free list as a dict key resulted in a crash (more detailed stack trace will be provided in attachment): # gdb python3.5 test.py GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1 ... Starting program: /usr/local/bin/python3.5 test.py [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". test Program received signal SIGSEGV, Segmentation fault. 0x000000000048998c in PyObject_Hash (v=0x0) at Objects/object.c:761 761 PyTypeObject *tp = Py_TYPE(v); (gdb) bt #0 0x000000000048998c in PyObject_Hash (v=0x0) at Objects/object.c:761 #1 0x0000000000498d96 in tuplehash (v=0x7ffff7f39948) at Objects/tupleobject.c:351 #2 0x00000000004899b2 in PyObject_Hash (v=0x7ffff7f39948) at Objects/object.c:763 ... tuplehash and PyObject_Hash here also ... #34 0x00000000004899b2 in PyObject_Hash (v=0x7ffff6801708) at Objects/object.c:763 #35 0x0000000000498d96 in tuplehash (v=0x7ffff6812ca8) at Objects/tupleobject.c:351 #36 0x00000000004899b2 in PyObject_Hash (v=0x7ffff6812ca8) at Objects/object.c:763 #37 0x000000000047a056 in PyDict_GetItemWithError (op=0x7ffff7e83608, key=0x7ffff6812ca8) at Objects/dictobject.c:1143 #38 0x000000000047a1e8 in _PyDict_LoadGlobal (globals=0x7ffff7e83608, builtins=0x7ffff6ea8a88, key=0x7ffff6812ca8) at Objects/dictobject.c:1192 #39 0x0000000000509117 in PyEval_EvalFrameEx (f=0xa196d8, throwflag=0) at Python/ceval.c:2408 #40 0x0000000000511d0b in _PyEval_EvalCodeWithName (_co=0x7ffff7e85270, globals=0x7ffff7e83608, locals=0x0, args=0x7ffff7f07c68, argcount=1, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:4071 #41 0x0000000000511e00 in PyEval_EvalCodeEx (_co=0x7ffff7e85270, globals=0x7ffff7e83608, locals=0x0, args=0x7ffff7f07c68, argcount=1, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:4092 #42 0x00000000005db41c in function_call (func=0x7ffff683ec80, arg=0x7ffff7f07c50, kw=0x0) at Objects/funcobject.c:627 #43 0x000000000043ae8f in PyObject_Call (func=0x7ffff683ec80, arg=0x7ffff7f07c50, kw=0x0) at Objects/abstract.c:2166 #44 0x00000000005cb13c in method_call (func=0x7ffff683ec80, arg=0x7ffff7f07c50, kw=0x0) at Objects/classobject.c:330 #45 0x000000000043ae8f in PyObject_Call (func=0x7ffff7eaca48, arg=0x7ffff7fa8048, kw=0x0) at Objects/abstract.c:2166 #46 0x00000000005138a9 in PyEval_CallObjectWithKeywords (func=0x7ffff7eaca48, arg=0x7ffff7fa8048, kw=0x0) at Python/ceval.c:4633 #47 0x00000000004abf3e in slot_tp_repr (self=0x7ffff684e8d0) at Objects/typeobject.c:5992 #48 0x0000000000488ef9 in PyObject_Repr (v=0x7ffff684e8d0) at Objects/object.c:482 #49 0x00000000004c03fb in unicode_fromformat_arg (writer=0x7fffffffdeb0, f=0x7ffff6ed9850 "R", vargs=0x7fffffffdef0) at Objects/unicodeobject.c:2645 #50 0x00000000004c0754 in PyUnicode_FromFormatV (format=0x7ffff6ed9846 "unclosed %R", vargs=0x7fffffffdf60) at Objects/unicodeobject.c:2710 #51 0x00000000004f90e7 in PyErr_WarnFormat (category=0x8a1a20 <_PyExc_ResourceWarning>, stack_level=1, format=0x7ffff6ed9846 "unclosed %R") at Python/_warnings.c:895 #52 0x00007ffff6ed438a in sock_dealloc (s=0x7ffff684e8d0) at /root/test/test35/cpython/Modules/socketmodule.c:4177 #53 0x000000000049d02c in subtype_dealloc (self=0x7ffff684e8d0) at Objects/typeobject.c:1209 #54 0x00000000004781c5 in free_keys_object (keys=0xa3fd90) at Objects/dictobject.c:351 #55 0x000000000047a908 in PyDict_Clear (op=0x7ffff7f55448) at Objects/dictobject.c:1388 #56 0x000000000047df02 in dict_tp_clear (op=0x7ffff7f55448) at Objects/dictobject.c:2595 #57 0x00000000005679de in delete_garbage (collectable=0x7fffffffe2f0, old=0x8ce440 ) at Modules/gcmodule.c:866 #58 0x0000000000567e30 in collect (generation=2, n_collected=0x0, n_uncollectable=0x0, nofail=1) at Modules/gcmodule.c:1014 #59 0x0000000000568e84 in _PyGC_CollectNoFail () at Modules/gcmodule.c:1605 #60 0x0000000000532023 in PyImport_Cleanup () at Python/import.c:481 #61 0x0000000000542083 in Py_Finalize () at Python/pylifecycle.c:576 #62 0x0000000000420fdf in Py_Main (argc=2, argv=0x92d010) at Modules/main.c:798 #63 0x000000000041bc4f in main (argc=2, argv=0x7fffffffe748) at ./Programs/python.c:65 (gdb) So this is something like a use-after-free. I think the root cause is that finalizer that can call some python code is called at deallocation phase, interleaving with object's deletion. As well as with objects with __del__ method, GC can't know the order in which objects should be deleted if they are in a reference cycle. This problem does not exist in 3.6 because there is a separate finalizing method sock_finalize there where a ResourceWarning is issued, and such finalizers are called for the whole reference cycle before any object in it is deallocated (at least this is how I understood, correct me if I'm wrong). So, this change with finalizers probably should be backported to previous versions of Python 3. I also could not reproduce this in 3.3, but I didn't have time to research that closely yet. ---------- components: Interpreter Core, Library (Lib) files: trace-verbose.txt messages: 292924 nosy: asterite priority: normal severity: normal status: open title: sock_dealloc() may call __repr__ when socket class is already collected by GC type: crash versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file46846/trace-verbose.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:46:29 2017 From: report at bugs.python.org (asterite) Date: Wed, 03 May 2017 16:46:29 +0000 Subject: [issue30260] sock_dealloc() may call __repr__ when socket class is already collected by GC In-Reply-To: <1493829842.08.0.612214340964.issue30260@psf.upfronthosting.co.za> Message-ID: <1493829989.5.0.788591222859.issue30260@psf.upfronthosting.co.za> Changes by asterite : Added file: http://bugs.python.org/file46847/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:46:47 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 03 May 2017 16:46:47 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1493830007.22.0.427996433624.issue28315@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 8856940cf2e82cb17db2b684cd5732fe658605ca by Mariatta (UltimateCoder) in branch 'master': bpo-28315: Improve code examples in docs (GH-1372) https://github.com/python/cpython/commit/8856940cf2e82cb17db2b684cd5732fe658605ca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:47:13 2017 From: report at bugs.python.org (asterite) Date: Wed, 03 May 2017 16:47:13 +0000 Subject: [issue30260] sock_dealloc() may call __repr__ when socket class is already collected by GC In-Reply-To: <1493829842.08.0.612214340964.issue30260@psf.upfronthosting.co.za> Message-ID: <1493830033.21.0.67745908639.issue30260@psf.upfronthosting.co.za> Changes by asterite : Added file: http://bugs.python.org/file46848/test2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:47:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 16:47:34 +0000 Subject: [issue30260] sock_dealloc() may call __repr__ when socket class is already collected by GC In-Reply-To: <1493829842.08.0.612214340964.issue30260@psf.upfronthosting.co.za> Message-ID: <1493830054.16.0.604087215129.issue30260@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:47:55 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 03 May 2017 16:47:55 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1493830075.42.0.863269660534.issue28315@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: resolved -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:50:19 2017 From: report at bugs.python.org (Brett Cannon) Date: Wed, 03 May 2017 16:50:19 +0000 Subject: [issue30247] Make importlib.machinery class handle os.PathLike path In-Reply-To: <1493797358.8.0.753635690258.issue30247@psf.upfronthosting.co.za> Message-ID: <1493830219.51.0.00925181487557.issue30247@psf.upfronthosting.co.za> Brett Cannon added the comment: The classes mentioned actually require that the path exist on the file system so there's no extra restrictions. As for cost, it's pretty cheap as a call to _os.fspath() is written in C and does an immediate type-check for str or bytes for the common-case (https://github.com/python/cpython/blob/master/Modules/posixmodule.c#L12099). These classes are also instantiated once typically and then cached so the cost is only paid once per object. As for use-cases, I've seen people directly instantiate these classes in user code and so supporting paths in a universal way like the rest of the stdlib would be good for consistency. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 12:58:17 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 May 2017 16:58:17 +0000 Subject: [issue29712] --enable-optimizations does not work with --enable-shared In-Reply-To: <1488555923.14.0.550158164587.issue29712@psf.upfronthosting.co.za> Message-ID: <1493830697.35.0.876780915951.issue29712@psf.upfronthosting.co.za> Antoine Pitrou added the comment: For the record, --enable-shared generally produces slower builds than by default. The slowdown depends on the platform, but it's noticeable on x86-64 and much more on ARM. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 13:00:40 2017 From: report at bugs.python.org (asterite) Date: Wed, 03 May 2017 17:00:40 +0000 Subject: [issue30260] sock_dealloc() may call __repr__ when socket class is already collected by GC In-Reply-To: <1493829842.08.0.612214340964.issue30260@psf.upfronthosting.co.za> Message-ID: <1493830840.0.0.849715039325.issue30260@psf.upfronthosting.co.za> asterite added the comment: I made up a small program to reproduce an issue, it consists of two files, test.py and test2.py, the second one is imported as a module by the first one, so they should be but in the same dir. # ls test.py test2.py # python3.5 test.py test Segmentation fault The files contain a rather weird combination of references to objects put in other objects or to modules of standard lib. This is what I got after reducing the code to reproduce the problem. All those references are probably needed to make a cycle and to postpone it's deallocation until the interpreter shutdown. Regarding where in the real world such a code exists: it was spread by a combination of modules, namely tornado (https://github.com/tornadoweb/tornado), pyzmq (https://github.com/zeromq/pyzmq) and circus (https://github.com/circus-tent/circus), I found the problem when running one of the tests of circus: ~/circus# python3.5 -m nose -v circus.tests.test_reloadconfig:TestConfig.test_reload_ignorearbiterwatchers test_reload_ignorearbiterwatchers (circus.tests.test_reloadconfig.TestConfig) ... ok ---------------------------------------------------------------------- Ran 1 test in 0.037s OK Segmentation fault Also, sometimes that test fails like this: # python3.5 -m nose -v circus.tests.test_reloadconfig:TestConfig.test_reload_ignorearbiterwatchers test_reload_ignorearbiterwatchers (circus.tests.test_reloadconfig.TestConfig) ... ok ---------------------------------------------------------------------- Ran 1 test in 0.021s OK Fatal Python error: GC object already tracked Current thread 0x00007f20aa7b6700 (most recent call first): Aborted ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 13:25:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 17:25:07 +0000 Subject: [issue29448] Implement os.Pathlike for importlib.machinery In-Reply-To: <1486273284.58.0.20381224055.issue29448@psf.upfronthosting.co.za> Message-ID: <1493832307.07.0.0274997877617.issue29448@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 13:32:39 2017 From: report at bugs.python.org (Kostis Anagnostopoulos) Date: Wed, 03 May 2017 17:32:39 +0000 Subject: [issue29757] The loop in utility `socket.create_connection()` swallows previous errors In-Reply-To: <1488984317.87.0.296010902983.issue29757@psf.upfronthosting.co.za> Message-ID: <1493832759.98.0.598746400628.issue29757@psf.upfronthosting.co.za> Kostis Anagnostopoulos added the comment: Just to remind that as it stands now(b39d4b1c6) it contains no API changes at all, so it should be considered for merge into 3.6.x line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 13:55:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 17:55:48 +0000 Subject: [issue30229] Closing a BufferedRandom calls lseek() mutliple times In-Reply-To: <1493727473.11.0.059505577548.issue30229@psf.upfronthosting.co.za> Message-ID: <1493834148.22.0.109959891879.issue30229@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: READAHEAD uses read_end, RAW_OFFSET uses raw_pos. Are you sure that if READAHEAD(self) is zero RAW_OFFSET(self) is zero too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 14:44:08 2017 From: report at bugs.python.org (saumitra paul) Date: Wed, 03 May 2017 18:44:08 +0000 Subject: [issue30261] saumitra paul choudhury has shared a document on Google Docs with you Message-ID: New submission from saumitra paul: saumitra paul choudhury has invited you to view the following document: Open in Docs ---------- messages: 292931 nosy: saumitra1978 priority: normal severity: normal status: open title: saumitra paul choudhury has shared a document on Google Docs with you _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 14:48:40 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 03 May 2017 18:48:40 +0000 Subject: [issue30248] Using boolean arguments in the _json module In-Reply-To: <1493800695.72.0.112994453765.issue30248@psf.upfronthosting.co.za> Message-ID: <1493837320.14.0.938728939854.issue30248@psf.upfronthosting.co.za> Josh Rosenberg added the comment: So, incredibly minor note: This will prevent a ridiculous use case of passing in a mutable object as the argument (say, a list), and mutating it between truthy and falsy values (appending or clearing) to toggle behaviors in an existing Encoder. Note: As stated, this is a ridiculous use case, and I don't think we should be handcuffed by compatibility with an insane behavior that no one has likely ever used. The docs never guarantee that those values are examined live, so it's an implementation detail, and not a useful one at that. I just want to mention it so there is a small note in MISC/News or the like to document that slight tweak in observed behavior. Otherwise, change looks good to me. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 14:49:10 2017 From: report at bugs.python.org (Zachary Ware) Date: Wed, 03 May 2017 18:49:10 +0000 Subject: [issue30261] Spam In-Reply-To: Message-ID: <1493837350.59.0.505923128898.issue30261@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: -saumitra1978 resolution: -> not a bug stage: -> resolved status: open -> closed title: saumitra paul choudhury has shared a document on Google Docs with you -> Spam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 14:49:20 2017 From: report at bugs.python.org (Zachary Ware) Date: Wed, 03 May 2017 18:49:20 +0000 Subject: [issue30261] Spam Message-ID: <1493837360.42.0.384403078595.issue30261@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- Removed message: http://bugs.python.org/msg292931 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 15:02:47 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 03 May 2017 19:02:47 +0000 Subject: [issue30250] StreamIO truncate behavior of current position In-Reply-To: <1493803286.93.0.729183089652.issue30250@psf.upfronthosting.co.za> Message-ID: <1493838167.79.0.89767182856.issue30250@psf.upfronthosting.co.za> Josh Rosenberg added the comment: For the record, the StringIO module is Python 2 only (replaced by io.StringIO and io.BytesIO for Py3, which are also available on 2.6 and higher if you need consistency), and only documents truncate by reference to the generic docs for the built-in file object. Admittedly, the built-in file object docs say the position shouldn't change on truncate, but given: 1. StringIO is deprecated and no longer maintained 2. Code using it may rely on this incorrect behavior I can't see fixing this beyond possibly mentioning the quirk in the 2.x StringIO docs. Since io.StringIO is correct, there is nothing to fix in 3.x. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 15:15:41 2017 From: report at bugs.python.org (Oz Tiram) Date: Wed, 03 May 2017 19:15:41 +0000 Subject: [issue30095] HTMLCalendar allow custom classes In-Reply-To: <1492544277.59.0.956887104329.issue30095@psf.upfronthosting.co.za> Message-ID: <1493838941.52.0.100051040924.issue30095@psf.upfronthosting.co.za> Changes by Oz Tiram : ---------- pull_requests: +1537 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 15:17:37 2017 From: report at bugs.python.org (Oz Tiram) Date: Wed, 03 May 2017 19:17:37 +0000 Subject: [issue30095] HTMLCalendar allow custom classes In-Reply-To: <1492544277.59.0.956887104329.issue30095@psf.upfronthosting.co.za> Message-ID: <1493839057.52.0.188431185921.issue30095@psf.upfronthosting.co.za> Oz Tiram added the comment: @Walter, I implemented your suggestions plus the obvious tasks of adding tests and documentation. Would be happy to hear your feedback. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 15:25:36 2017 From: report at bugs.python.org (David Bolen) Date: Wed, 03 May 2017 19:25:36 +0000 Subject: [issue30225] EBADF error on x86 Tiger 3.x buildbot In-Reply-To: <1493712772.54.0.125879756705.issue30225@psf.upfronthosting.co.za> Message-ID: <1493839536.02.0.271181030627.issue30225@psf.upfronthosting.co.za> David Bolen added the comment: Hmm, I wonder if this is another race condition similar to issue 8458? I think that was thought to be related to the subprocess exiting quickly, in which case the question might be why that might happen more so than the actual descriptor error. BTW, Victor, in case it would help, your account (vstinner, ssh key haypo at marge) still exists on this buildbot from past testing in 2011. The only thing I'd need to re-enable is the port forwarding on my firewall. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 15:52:10 2017 From: report at bugs.python.org (Aviv Palivoda) Date: Wed, 03 May 2017 19:52:10 +0000 Subject: [issue30262] Don't expose sqlite3 Cache and Statement Message-ID: <1493841130.42.0.625787216583.issue30262@psf.upfronthosting.co.za> New submission from Aviv Palivoda: Both the Cache and Statement objects are internally used and should not be exposed to the user from the sqlite3 module. They are not mentioned in the documentation as well. ---------- components: Extension Modules messages: 292936 nosy: berker.peksag, ghaering, palaviv priority: normal severity: normal status: open title: Don't expose sqlite3 Cache and Statement type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 15:55:47 2017 From: report at bugs.python.org (Aviv Palivoda) Date: Wed, 03 May 2017 19:55:47 +0000 Subject: [issue30262] Don't expose sqlite3 Cache and Statement In-Reply-To: <1493841130.42.0.625787216583.issue30262@psf.upfronthosting.co.za> Message-ID: <1493841347.13.0.453266264075.issue30262@psf.upfronthosting.co.za> Changes by Aviv Palivoda : ---------- pull_requests: +1538 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 16:23:28 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 03 May 2017 20:23:28 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1493843008.17.0.428556165007.issue28315@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Mariatta, please continue with this and assign to yourself. I now have IDLE PRs to review and apply. ---------- assignee: terry.reedy -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 16:30:08 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 03 May 2017 20:30:08 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1493843408.26.0.556699844874.issue28315@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: For sure :) Thanks Terry. ---------- assignee: -> Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 16:57:32 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 03 May 2017 20:57:32 +0000 Subject: [issue30095] HTMLCalendar allow custom classes In-Reply-To: <1492544277.59.0.956887104329.issue30095@psf.upfronthosting.co.za> Message-ID: <1493845052.32.0.32543003162.issue30095@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: -> patch review versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 17:03:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 21:03:27 +0000 Subject: [issue30184] Add tests for invalid use of PyArg_ParseTupleAndKeywords In-Reply-To: <1493275106.78.0.678380665144.issue30184@psf.upfronthosting.co.za> Message-ID: <1493845407.15.0.288704640976.issue30184@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 5f161fd86dd5bb936a1a2a13391b13b7e59ec201 by Serhiy Storchaka in branch 'master': bpo-30184: Add tests for invalid use of PyArg_ParseTupleAndKeywords. (#1316) https://github.com/python/cpython/commit/5f161fd86dd5bb936a1a2a13391b13b7e59ec201 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 17:19:52 2017 From: report at bugs.python.org (David Bolen) Date: Wed, 03 May 2017 21:19:52 +0000 Subject: [issue30225] EBADF error on x86 Tiger 3.x buildbot In-Reply-To: <1493712772.54.0.125879756705.issue30225@psf.upfronthosting.co.za> Message-ID: <1493846392.0.0.270604930575.issue30225@psf.upfronthosting.co.za> David Bolen added the comment: In running the test under a local build, the issue is very repeatable, but I believe it's actually due to slow process startup rather than a quick exit. That is, adding a brief sleep after process creation and just before the Request() call seems to fix the problem. I'm guessing the buildbot is sluggish enough that it just takes a bit longer for the process to start and be ready to be used. Whether or not that's purely a machine or test problem, or whether it means that perhaps subprocess.Popen() is returning sooner than it should with a process that isn't ready yet is unclear. (Or even if subprocess can tell) With the machine fairly idle, it looks like the minimum workable delay is about 200ms - probably something a bit longer would be safer under load, if looking for a quick workaround. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 17:20:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 21:20:34 +0000 Subject: [issue30184] Add tests for invalid use of PyArg_ParseTupleAndKeywords In-Reply-To: <1493275106.78.0.678380665144.issue30184@psf.upfronthosting.co.za> Message-ID: <1493846434.21.0.366522823246.issue30184@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1539 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 17:23:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 21:23:52 +0000 Subject: [issue30236] Add options --match and --failfast for test.regrtest in 2.7 In-Reply-To: <1493745583.13.0.200085000126.issue30236@psf.upfronthosting.co.za> Message-ID: <1493846632.93.0.782054884655.issue30236@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 74f0db885fa84e3a1c73b3ae1edc723d48f7bad2 by Serhiy Storchaka in branch '2.7': [2.7] bpo-30236: Backported regrtest options -m and -G. (#1394) https://github.com/python/cpython/commit/74f0db885fa84e3a1c73b3ae1edc723d48f7bad2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 17:24:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 21:24:25 +0000 Subject: [issue30236] Add options --match and --failfast for test.regrtest in 2.7 In-Reply-To: <1493745583.13.0.200085000126.issue30236@psf.upfronthosting.co.za> Message-ID: <1493846665.59.0.980748119698.issue30236@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 17:35:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 May 2017 21:35:45 +0000 Subject: [issue30184] Add tests for invalid use of PyArg_ParseTupleAndKeywords In-Reply-To: <1493275106.78.0.678380665144.issue30184@psf.upfronthosting.co.za> Message-ID: <1493847345.74.0.459174914339.issue30184@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1540 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 17:42:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 21:42:10 +0000 Subject: [issue30225] EBADF error on x86 Tiger 3.x buildbot In-Reply-To: <1493846392.0.0.270604930575.issue30225@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: initstdio() is supposed to handle EBADF: see issue #24891. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 18:17:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 22:17:59 +0000 Subject: [issue30225] EBADF error on x86 Tiger 3.x buildbot In-Reply-To: <1493712772.54.0.125879756705.issue30225@psf.upfronthosting.co.za> Message-ID: <1493849879.87.0.624352917626.issue30225@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1541 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 18:45:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 22:45:58 +0000 Subject: [issue30225] EBADF error on x86 Tiger 3.x buildbot In-Reply-To: <1493712772.54.0.125879756705.issue30225@psf.upfronthosting.co.za> Message-ID: <1493851558.54.0.87822855424.issue30225@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 1c4670ea0cc3d208121af11b9b973e6bb268e570 by Victor Stinner in branch 'master': bpo-30225: Fix is_valid_fd() on macOS Tiger (#1443) https://github.com/python/cpython/commit/1c4670ea0cc3d208121af11b9b973e6bb268e570 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 19:09:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 23:09:31 +0000 Subject: [issue30263] regrtest: log the system load? Message-ID: <1493852971.75.0.704908002937.issue30263@psf.upfronthosting.co.za> New submission from STINNER Victor: It's more and more common to get test failures only on a small group of buildbots, or even a single buildbot. In many cases, it's a race condition which depends on the system load. The system load depends on how many tests are running in parallel, if the buildbot slave allows multiple builds in parallel, etc. Sometimes, the failing test pass when it's run sequentially at the end of regrtest, sometimes it fails again. I propose to add the system load after the timestamp to ease debug. Example of output on a patched regrtest when tests are run sequentially: 0:19:37 load: 1.28 [304/405/1] test_sunau 0:19:37 load: 1.28 [305/405/1] test_ctypes ... 0:20:02 load: 1.86 [309/405/1] test__osx_support -- test_socketserver skipped (resource denied) ... 0:20:09 load: 1.79 [314/405/1] test_int_literal 0:20:09 load: 1.79 [315/405/1] test_queue 0:20:13 load: 1.73 [316/405/1] test_fork1 0:20:20 load: 1.67 [317/405/1] test_atexit ... 0:22:09 load: 1.16 [346/405/1] test_sys_setprofile 0:22:09 load: 1.16 [347/405/1] test_selectors 0:22:24 load: 0.98 [348/405/1] test_bufio 0:22:25 load: 0.98 [349/405/1] test_string_literals ---------- components: Tests messages: 292944 nosy: haypo priority: normal severity: normal status: open title: regrtest: log the system load? type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 19:10:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 23:10:39 +0000 Subject: [issue30263] regrtest: log the system load? In-Reply-To: <1493852971.75.0.704908002937.issue30263@psf.upfronthosting.co.za> Message-ID: <1493853039.35.0.602473373836.issue30263@psf.upfronthosting.co.za> STINNER Victor added the comment: Example of test only failing on one specific buildbot: issue #30225. test_http_body_pipe() of test_urllib2 only fails on macOS Tiger under high system load. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 19:50:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 23:50:04 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax Message-ID: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> New submission from STINNER Victor: Running test_sax of Python 2.7 on Windows emits the following warning: Warning -- files was modified by test_sax The problem is that os.unlink(TESTFN) ignores all OSError: os.unlink(TESTFN) fails because there is still an open file object somewhere. The bug is in the test_parse_bytes() of test_sax, on check_parse(TESTFN) which raises an exception as expected. xml.sax.parse() should close the parser on exception. On master, test_sax explicitly expects a ResourceWarning, WTF? with support.check_warnings(('unclosed file', ResourceWarning)): # XXX Failed parser leaks an opened file. with self.assertRaises(SAXException): self.check_parse(TESTFN) # Collect leaked file. gc.collect() See also issue #15388. ---------- components: Tests, XML messages: 292946 nosy: haypo priority: normal severity: normal status: open title: [Windows] test_sax: Warning -- files was modified by test_sax versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 19:55:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 23:55:53 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493855753.93.0.186487669594.issue30264@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1542 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 19:57:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 23:57:02 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493855822.48.0.834004009181.issue30264@psf.upfronthosting.co.za> STINNER Victor added the comment: https://github.com/python/cpython/pull/1444 is written for the master branch. IMHO the bug must be fixed in all supported branches. The question is if all parser provide a close() method? ---------- versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 19:59:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 May 2017 23:59:10 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493855950.86.0.47904730895.issue30264@psf.upfronthosting.co.za> STINNER Victor added the comment: > The question is if all parser provide a close() method? It seems like xml.sax supports pluggable parsers, at least using the PY_SAX_PARSER environment variable. So it would be safer to add a cheap "if hasattr(parser, 'close'):" test; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 20:03:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 00:03:16 +0000 Subject: [issue30265] test.support.unlink() should fail or emit a warning on WindowsError: [Error 32] The process cannot access the file ... Message-ID: <1493856195.4.0.0572132111963.issue30265@psf.upfronthosting.co.za> New submission from STINNER Victor: While working on issue #30264, I noticed that test.support.unlink() ignores *all* OSError exceptions. I suggest to add handle WindowsError: [Error 32] differently. Example of such error, issue #15388: WindowsError: [Error 32] The process cannot access the file because it is being used by another process: I suggest to either raise an exception (passthrough the original OSError), or emit/log a warning. ---------- components: Tests, Windows messages: 292949 nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: test.support.unlink() should fail or emit a warning on WindowsError: [Error 32] The process cannot access the file ... type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 20:03:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 00:03:42 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493856222.72.0.391663295064.issue30264@psf.upfronthosting.co.za> STINNER Victor added the comment: > The problem is that os.unlink(TESTFN) ignores all OSError: os.unlink(TESTFN) fails because there is still an open file object somewhere. I created the issue #30265: test.support.unlink() should fail or emit a warning on WindowsError: [Error 32] The process cannot access the file .... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 21:08:19 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 04 May 2017 01:08:19 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1493860099.2.0.652616954297.issue28315@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +1543 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 21:08:30 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 04 May 2017 01:08:30 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1493860110.71.0.0229699524838.issue28315@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +1544 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 21:41:14 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 04 May 2017 01:41:14 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1493862074.52.0.830754268545.issue28315@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 5274faf5e360f74690ffb735e919cdba5fdbdf1c by Mariatta in branch '3.5': [3.5] bpo-28315: Improve code examples in docs (GH-1372) (#1446) https://github.com/python/cpython/commit/5274faf5e360f74690ffb735e919cdba5fdbdf1c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 21:41:22 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 04 May 2017 01:41:22 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1493862082.91.0.934694269032.issue28315@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset af71364c3f0e9cd6cb9d83194315af0ee3c783d2 by Mariatta in branch '3.6': [3.6] bpo-28315: Improve code examples in docs (GH-1372) (#1445) https://github.com/python/cpython/commit/af71364c3f0e9cd6cb9d83194315af0ee3c783d2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 21:47:49 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 04 May 2017 01:47:49 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1493862469.63.0.898699005265.issue28315@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +1545 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 21:54:30 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 04 May 2017 01:54:30 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1493862870.33.0.235976798514.issue28315@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset e1b02ff58883c68d3a5e549aa33c6dd94f915bd6 by Mariatta in branch '2.7': [2.7] bpo-28315: Improve code examples in docs (GH-1372) (#1447) https://github.com/python/cpython/commit/e1b02ff58883c68d3a5e549aa33c6dd94f915bd6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 21:56:16 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 04 May 2017 01:56:16 +0000 Subject: [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1493862976.52.0.388734175745.issue28315@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: We can finally close this. Thanks everyone :) ---------- stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 23:37:32 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Thu, 04 May 2017 03:37:32 +0000 Subject: [issue30266] AbstractContextManager should support __method__ = None Message-ID: <1493869052.62.0.588224367521.issue30266@psf.upfronthosting.co.za> New submission from Jelle Zijlstra: Like other ABCs, contextlib.AbstractContextManager should support the pattern where setting a method to None disables structural subtyping, which was introduced across the standard library in issue 25958. Ivan Levkivskyi suggested making AbstractContextManager support this pattern in CR comments in https://github.com/python/cpython/pull/1412/files#r114482765. Should this change be applied to 3.6 as well as master? I'm leaning towards yes, because the resolution to issue 25958 (https://hg.python.org/cpython/rev/72b9f195569c) added a general statement in the documentation that "Setting a special method to ``None`` indicates that the corresponding operation is not available". Thus, the fact that contextlib.AbstractContextManager doesn't obey this rule is a bug. I'll send a PR shortly. ---------- components: Library (Lib) messages: 292955 nosy: Jelle Zijlstra, levkivskyi, ncoghlan, yselivanov priority: normal severity: normal status: open title: AbstractContextManager should support __method__ = None versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 23:42:12 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Thu, 04 May 2017 03:42:12 +0000 Subject: [issue30266] AbstractContextManager should support __method__ = None In-Reply-To: <1493869052.62.0.588224367521.issue30266@psf.upfronthosting.co.za> Message-ID: <1493869332.19.0.640255700336.issue30266@psf.upfronthosting.co.za> Changes by Jelle Zijlstra : ---------- pull_requests: +1546 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 23:50:30 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 May 2017 03:50:30 +0000 Subject: [issue30184] Add tests for invalid use of PyArg_ParseTupleAndKeywords In-Reply-To: <1493275106.78.0.678380665144.issue30184@psf.upfronthosting.co.za> Message-ID: <1493869830.43.0.447190268206.issue30184@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 1bebd8a21948652a5f941c550dec06ea84d1d979 by Serhiy Storchaka in branch '3.6': [3.6] bpo-30184: Add tests for invalid use of PyArg_ParseTupleAndKeywords. (GH-1316). (#1441) https://github.com/python/cpython/commit/1bebd8a21948652a5f941c550dec06ea84d1d979 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 3 23:50:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 May 2017 03:50:45 +0000 Subject: [issue30184] Add tests for invalid use of PyArg_ParseTupleAndKeywords In-Reply-To: <1493275106.78.0.678380665144.issue30184@psf.upfronthosting.co.za> Message-ID: <1493869845.72.0.0886464117468.issue30184@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 943861f09ab6bffcd1d97efcd0dd6c87c7f26800 by Serhiy Storchaka in branch '3.5': [3.5] bpo-30184: Add tests for invalid use of PyArg_ParseTupleAndKeywords. (GH-1316). (#1442) https://github.com/python/cpython/commit/943861f09ab6bffcd1d97efcd0dd6c87c7f26800 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 00:04:11 2017 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 04 May 2017 04:04:11 +0000 Subject: [issue23816] struct.unpack returns null pascal strings - [first] bug report In-Reply-To: <1427750823.57.0.914162685824.issue23816@psf.upfronthosting.co.za> Message-ID: <1493870651.85.0.512950259573.issue23816@psf.upfronthosting.co.za> Xiang Zhang added the comment: Hmm, code->size is determined by repeat count at initilization stage so I don't understand why it should be updated in s_unpack_internal to 255. And the repro script works well for me. ---------- nosy: +xiang.zhang resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 00:08:06 2017 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 04 May 2017 04:08:06 +0000 Subject: [issue23816] struct.unpack returns null pascal strings - [first] bug report In-Reply-To: <1427750823.57.0.914162685824.issue23816@psf.upfronthosting.co.za> Message-ID: <1493870886.18.0.96044639185.issue23816@psf.upfronthosting.co.za> Xiang Zhang added the comment: Note in the doc: Note that for unpack(), the 'p' format character consumes count bytes I think this means you still need to specify the repeat count for unpacking 'p'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 00:28:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 May 2017 04:28:03 +0000 Subject: [issue30184] Add tests for invalid use of PyArg_ParseTupleAndKeywords In-Reply-To: <1493275106.78.0.678380665144.issue30184@psf.upfronthosting.co.za> Message-ID: <1493872083.23.0.153700615529.issue30184@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 00:29:52 2017 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 04 May 2017 04:29:52 +0000 Subject: [issue23816] struct.unpack returns null pascal strings - [first] bug report In-Reply-To: <1427750823.57.0.914162685824.issue23816@psf.upfronthosting.co.za> Message-ID: <1493872191.99.0.470058536859.issue23816@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- Removed message: http://bugs.python.org/msg292958 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 00:29:57 2017 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 04 May 2017 04:29:57 +0000 Subject: [issue23816] struct.unpack returns null pascal strings - [first] bug report In-Reply-To: <1427750823.57.0.914162685824.issue23816@psf.upfronthosting.co.za> Message-ID: <1493872197.48.0.884392972231.issue23816@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- Removed message: http://bugs.python.org/msg292959 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 00:39:15 2017 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 04 May 2017 04:39:15 +0000 Subject: [issue23816] struct.unpack returns null pascal strings - [first] bug report In-Reply-To: <1427750823.57.0.914162685824.issue23816@psf.upfronthosting.co.za> Message-ID: <1493872755.31.0.377468748241.issue23816@psf.upfronthosting.co.za> Xiang Zhang added the comment: My previous two messages are not clear enough so I delete them. Sorry for the noise. :-( When unpacking a pascal string, you cannot simply specify a p format character otherwise struct calculate a wrong size of the format. That's why unpack fails. When count conflicts with the length byte, the smaller one is chosen. I think this is consistent with packing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 01:17:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 May 2017 05:17:50 +0000 Subject: [issue30166] Import command-line parsing modules only when needed In-Reply-To: <1493195659.65.0.461959154112.issue30166@psf.upfronthosting.co.za> Message-ID: <1493875070.35.0.754450470255.issue30166@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 7e4db2f253c555568d56177c2fd083bcf8f88d34 by Serhiy Storchaka in branch 'master': bpo-30166: Import command-line parsing modules only when needed. (#1293) https://github.com/python/cpython/commit/7e4db2f253c555568d56177c2fd083bcf8f88d34 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 01:38:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 May 2017 05:38:49 +0000 Subject: [issue30152] Reduce the number of imports for argparse In-Reply-To: <1493019230.17.0.769999123229.issue30152@psf.upfronthosting.co.za> Message-ID: <1493876329.97.0.759251891667.issue30152@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Implemented Wolfgang Maier's idea. The copy module is now imported in argparse only when the default value for 'append' or 'append_const' is not a list (uncommon case). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 01:43:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 May 2017 05:43:00 +0000 Subject: [issue29956] math.exp documentation is misleading In-Reply-To: <1490990917.06.0.404933995002.issue29956@psf.upfronthosting.co.za> Message-ID: <1493876580.39.0.472335104045.issue29956@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could anybody please make a review of PR 1073? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 01:49:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 May 2017 05:49:10 +0000 Subject: [issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']` In-Reply-To: <1491736314.56.0.10945117979.issue30024@psf.upfronthosting.co.za> Message-ID: <1493876950.75.0.909342511165.issue30024@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 01:49:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 May 2017 05:49:43 +0000 Subject: [issue30080] Add the --duplicate option for timeit In-Reply-To: <1492323164.81.0.971695586502.issue30080@psf.upfronthosting.co.za> Message-ID: <1493876983.4.0.354076436469.issue30080@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 01:51:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 May 2017 05:51:55 +0000 Subject: [issue30215] Make re.compile() locale agnostic In-Reply-To: <1493529699.82.0.722013579131.issue30215@psf.upfronthosting.co.za> Message-ID: <1493877115.03.0.752569192921.issue30215@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 01:53:31 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 May 2017 05:53:31 +0000 Subject: [issue30166] Import command-line parsing modules only when needed In-Reply-To: <1493195659.65.0.461959154112.issue30166@psf.upfronthosting.co.za> Message-ID: <1493877211.24.0.589016951279.issue30166@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 01:59:39 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 May 2017 05:59:39 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493877579.77.0.150232153234.issue19903@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I pulled your pr, did some minor edits, committed, and tried to push back following this line from the devguide Bootcamp page. git push git at github.com:/cpython : -------------- F:\dev\cpython>git commit -m "Fix and stop repeating invalid signature message" [pr_1382 bb46c06645] Fix and stop repeating invalid signature message 2 files changed, 6 insertions(+), 5 deletions(-) F:\dev\cpython>git push git at github.com:lulouie/cpython pr_1382:pr_1382 The authenticity of host 'github.com (192.30.253.112)' can't be established. RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8. Are you sure you want to continue connecting (yes/no)? y Please type 'yes' or 'no': yes Warning: Permanently added 'github.com,192.30.253.112' (RSA) to the list of known hosts. Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ------------- Did I do something wrong or do you need to allow me to push? https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/ ############################################################ There current PR is incomplete. The main reason to switch to signature() is to get the signature of C-coded functions that have been converted to use Argument Clinic. But... >>> import re >>> import inspect as i >>> str(i.signature(i.signature)) '(obj, *, follow_wrapped=True)' >>> str(i.signature(re.sub)) '(pattern, repl, string, count=0, flags=0)' >>> p = re.compile('') >>> str(i.signature(p.sub)) '(repl, string, count=0)' >>> p.sub( After "i.signature(" and "re.sub(" (both 'function's), the popup has the signature. After p.sub (a 'builtin_function_or_method'), there is only the beginning of the doc string, as before. Signature is not called because of the current guard. It must be removed. Returning _invalid_signature (defined in my patch) on ValueError should only be done when the message is 'invalid method signature'. (Can there be an invalid function signature that compiles? In not, removing 'method' (in my patch) is a mistake). signature(int) raises "no signature found for builtin type ". In such cases, argspec should be left as '', to be augmented by the docstring as now. Tests need to include some builtins that have been converted. Serhiy, can you suggest a suitable module with converted functions and class methods? Any of the builtins? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 02:16:19 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 May 2017 06:16:19 +0000 Subject: [issue30166] Import command-line parsing modules only when needed In-Reply-To: <1493195659.65.0.461959154112.issue30166@psf.upfronthosting.co.za> Message-ID: <1493878579.77.0.909579919105.issue30166@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I want to backport the idlelib.pyshell change. I have been told that even a partial backport, even if done by hand, is a backport and the result a cherry-pick. ---------- assignee: serhiy.storchaka -> terry.reedy nosy: +terry.reedy stage: resolved -> backport needed status: closed -> open versions: +Python 3.6 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 02:21:13 2017 From: report at bugs.python.org (Louie Lu) Date: Thu, 04 May 2017 06:21:13 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493878873.69.0.845317402647.issue19903@psf.upfronthosting.co.za> Louie Lu added the comment: > Did I do something wrong or do you need to allow me to push? Yes, I've added you to the collaborators on my fork (lulouie/cpython). But in fact, new GitHub workflow will need to do something different, not just edit-and-commit. You will need to go to PR 1382 (https://github.com/python/cpython/pull/1382) and start a new review. Click "file changes", when your cursor hovers on the source code line, it will pop out a blue plus icon on the line number, then click it to add a new comment on it, after that, click "start review" and do the rest comment. After comment finish (maybe multiple lines), the top nav bar has a green button "Review changes" with total comment count, click it and add the summary comment for this review, and choose this is a comment, approve, or requests changes. In this case, you will choose requests changes for it. Also, Python member's requests changes will block the merge process, until all requests changes were approval. In summary, in GitHub workflow, code review will be like a request, and the main committer stays for who create this PR, not reviewers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 02:52:05 2017 From: report at bugs.python.org (Marc Schlaich) Date: Thu, 04 May 2017 06:52:05 +0000 Subject: [issue26434] multiprocessing cannot spawn grandchild from a Windows service In-Reply-To: <1456394207.49.0.123218861266.issue26434@psf.upfronthosting.co.za> Message-ID: <1493880725.8.0.902703423731.issue26434@psf.upfronthosting.co.za> Marc Schlaich added the comment: I opened a PR on GitHub, please review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 03:40:43 2017 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 04 May 2017 07:40:43 +0000 Subject: [issue23816] struct.unpack returns null pascal strings - [first] bug report In-Reply-To: <1427750823.57.0.914162685824.issue23816@psf.upfronthosting.co.za> Message-ID: <1493883643.33.0.893661837652.issue23816@psf.upfronthosting.co.za> Mark Dickinson added the comment: Specifically, I believe what's happening here is that "8s4spp" is interpreted as "8s4s1p1p", so it decodes a single byte (which can only encode an empty string) for each of the "1p" cases. I wonder whether the struct module should raise an exception if the length byte read from the encoded data exceeds the count given in the format. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 04:00:22 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 May 2017 08:00:22 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493884822.06.0.820910947086.issue19903@psf.upfronthosting.co.za> Terry J. Reedy added the comment: A review is not required to commit. The PR itself says "Add more commits by pushing to the bpo-19903 branch on lulouie/cpython." As far as I know, unresolved requests do not block for cpython. The Merge button appears to still be 'alive' after my red review. I have done reviews on other issues, both + and -, with comments on individual lines. I like it best when there is only a single commit at the time of review. Otherwise, I don't see any way to comment on the total change after multiple unsquashed commits. I also don't like commenting on an obsolete line or searching through multiple commits to find the last that touched a line. I accepted your invitation over 1/2 hour ago and got confirmation from github. But pushing with this revised command git push git at github.com:lulouie/cpython pr_1382:bpo-19903 still fails, with the same message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 05:23:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 May 2017 09:23:25 +0000 Subject: [issue30215] Make re.compile() locale agnostic In-Reply-To: <1493529699.82.0.722013579131.issue30215@psf.upfronthosting.co.za> Message-ID: <1493889805.57.0.608179292819.issue30215@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This change can be considered as a bug fix, but I hesitate to apply it to maintained releases because the effect on the performance of case-sensitive locale-depending bytes matching is hardly predicable. Some matches become 5 times faster, others become 1.5 times slower, depending on the cases of the pattern and the matched bytestring. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 05:25:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 May 2017 09:25:12 +0000 Subject: [issue29956] math.exp documentation is misleading In-Reply-To: <1490990917.06.0.404933995002.issue29956@psf.upfronthosting.co.za> Message-ID: <1493889912.08.0.479705560029.issue29956@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset dbaf746b6de0ee431c809d3175ab40ccc18898a8 by Serhiy Storchaka in branch 'master': bpo-29956: Improve the math.exp() related documentation. (#1073) https://github.com/python/cpython/commit/dbaf746b6de0ee431c809d3175ab40ccc18898a8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 06:22:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 10:22:10 +0000 Subject: [issue30225] EBADF error on x86 Tiger 3.x buildbot In-Reply-To: <1493712772.54.0.125879756705.issue30225@psf.upfronthosting.co.za> Message-ID: <1493893330.45.0.273635952136.issue30225@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1547 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 06:23:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 10:23:09 +0000 Subject: [issue30225] EBADF error on x86 Tiger 3.x buildbot In-Reply-To: <1493712772.54.0.125879756705.issue30225@psf.upfronthosting.co.za> Message-ID: <1493893389.28.0.641333805887.issue30225@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1548 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 07:14:35 2017 From: report at bugs.python.org (Cristian Barbarosie) Date: Thu, 04 May 2017 11:14:35 +0000 Subject: [issue30004] in regex-howto, improve example on grouping In-Reply-To: <1491453642.54.0.802330198745.issue30004@psf.upfronthosting.co.za> Message-ID: <1493896475.8.0.666605427025.issue30004@psf.upfronthosting.co.za> Cristian Barbarosie added the comment: This topic seems stuck. Is there anything else I should do ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 07:14:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 11:14:42 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493896482.9.0.99620691195.issue30264@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1549 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 07:18:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 11:18:17 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493896697.68.0.986317022158.issue30264@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote a different change which doesn't use the parser anymore, since it seems like xml.sax allows to plug third-party parsers. My new PR 1451 closes directly the file or urllib object, instead of touching the parser (which can have more visible side effect). @Serhiy: On my first PR 1444, you wrote: "Add a Misc/NEWS entry. This change changes behavior. It can change visible exception." Do you consider that a NEWS entry is needed for my new PR 1451? I plan to backport the change to 2.7, 3.5 and 3.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 07:21:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 11:21:13 +0000 Subject: [issue30225] EBADF error on x86 Tiger 3.x buildbot In-Reply-To: <1493712772.54.0.125879756705.issue30225@psf.upfronthosting.co.za> Message-ID: <1493896873.08.0.261015756355.issue30225@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 31906b42fd71c6baaf80429005c720b40dfe8fae by Victor Stinner in branch '3.6': bpo-30225: Fix is_valid_fd() on macOS Tiger (#1443) (#1449) https://github.com/python/cpython/commit/31906b42fd71c6baaf80429005c720b40dfe8fae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 07:21:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 11:21:18 +0000 Subject: [issue30225] EBADF error on x86 Tiger 3.x buildbot In-Reply-To: <1493712772.54.0.125879756705.issue30225@psf.upfronthosting.co.za> Message-ID: <1493896878.04.0.976902313706.issue30225@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8a1c71053139f20348ea487c0c464694ed3c88c5 by Victor Stinner in branch '3.5': bpo-30225: Fix is_valid_fd() on macOS Tiger (#1443) (#1450) https://github.com/python/cpython/commit/8a1c71053139f20348ea487c0c464694ed3c88c5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 08:22:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 12:22:56 +0000 Subject: [issue30263] regrtest: log the system load? In-Reply-To: <1493852971.75.0.704908002937.issue30263@psf.upfronthosting.co.za> Message-ID: <1493900576.07.0.857208980915.issue30263@psf.upfronthosting.co.za> STINNER Victor added the comment: Logging the system load may also help to understand why, on the ARM buildbot, some builds fail with a timeout after 49 minutes, whereas an usual build take 13 min. Example of build killed with "command timed out: 1200 seconds without output": http://buildbot.python.org/all/builders/ARMv7%20Ubuntu%203.5/builds/235/steps/test/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 08:33:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 12:33:24 +0000 Subject: [issue30263] regrtest: log the system load? In-Reply-To: <1493852971.75.0.704908002937.issue30263@psf.upfronthosting.co.za> Message-ID: <1493901204.91.0.858254508822.issue30263@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1550 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 09:00:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 13:00:17 +0000 Subject: [issue30263] regrtest: log the system load? In-Reply-To: <1493852971.75.0.704908002937.issue30263@psf.upfronthosting.co.za> Message-ID: <1493902817.79.0.333492973496.issue30263@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum, "load: 1.73" is confusing. I replaced it with "load avg: 1.73" to be more explicit, even if it's a little bit longer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 09:21:14 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 13:21:14 +0000 Subject: [issue30263] regrtest: log the system load? In-Reply-To: <1493852971.75.0.704908002937.issue30263@psf.upfronthosting.co.za> Message-ID: <1493904074.45.0.36988795766.issue30263@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3d0056842c5e06b4102f990b59ab3b607f932dd8 by Victor Stinner in branch 'master': bpo-30263: regrtest: log system load (#1452) https://github.com/python/cpython/commit/3d0056842c5e06b4102f990b59ab3b607f932dd8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 09:21:40 2017 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 May 2017 13:21:40 +0000 Subject: [issue8450] httplib: false BadStatusLine() raised In-Reply-To: <1271630731.08.0.327097174192.issue8450@psf.upfronthosting.co.za> Message-ID: <1493904100.13.0.393025051301.issue8450@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +1551 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 09:39:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 13:39:16 +0000 Subject: [issue30263] regrtest: log the system load? In-Reply-To: <1493852971.75.0.704908002937.issue30263@psf.upfronthosting.co.za> Message-ID: <1493905156.95.0.557454399187.issue30263@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh... I see many unexpected load average! On the small ARMv7 Ubuntu 3.x (1 CPU), -j8 is used: the load average starts with 2.58 but goes up to 11.13 around "0:04:20 load avg: 11.13 [216/405] ". Load average of 11 on such device seems too high and can explain test failures. PPC64 Fedora 3.x (64 CPU) starts at 8.48 and goes up to "0:01:33 load avg: 11.33", but it has much more CPUs, so it's ok. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 09:55:25 2017 From: report at bugs.python.org (Jeremy Kloth) Date: Thu, 04 May 2017 13:55:25 +0000 Subject: [issue30265] test.support.unlink() should fail or emit a warning on WindowsError: [Error 32] The process cannot access the file ... In-Reply-To: <1493856195.4.0.0572132111963.issue30265@psf.upfronthosting.co.za> Message-ID: <1493906125.79.0.933589676175.issue30265@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Looking at test.support, the only errors that I can see being ignored by unlink() is FileNotFoundError and NotADirectoryError (line 399). The only bare OSError except clause is on line 359, but for an lstat() call. ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 09:55:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 13:55:51 +0000 Subject: [issue30263] regrtest: log the system load? In-Reply-To: <1493852971.75.0.704908002937.issue30263@psf.upfronthosting.co.za> Message-ID: <1493906151.07.0.692007324209.issue30263@psf.upfronthosting.co.za> STINNER Victor added the comment: On Windows, there is a "System > Processor Queue Length" metric which is close to the UNIX system load, but I'm unable to see how to get this value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 09:58:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 13:58:10 +0000 Subject: [issue30265] [2.7] test.support.unlink() should fail or emit a warning on WindowsError: [Error 32] The process cannot access the file ... In-Reply-To: <1493856195.4.0.0572132111963.issue30265@psf.upfronthosting.co.za> Message-ID: <1493906290.13.0.548604868967.issue30265@psf.upfronthosting.co.za> STINNER Victor added the comment: > Looking at test.support, the only errors that I can see being ignored by unlink() is FileNotFoundError and NotADirectoryError (line 399) Oh wait, I was looking at Python 2.7 code: def unlink(filename): try: _unlink(filename) except OSError: pass So this issuse seems to be specific to Python 2.7. ---------- title: test.support.unlink() should fail or emit a warning on WindowsError: [Error 32] The process cannot access the file ... -> [2.7] test.support.unlink() should fail or emit a warning on WindowsError: [Error 32] The process cannot access the file ... versions: +Python 2.7 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 10:44:55 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 May 2017 14:44:55 +0000 Subject: [issue30185] forkserver process should silence KeyboardInterrupt In-Reply-To: <1493290307.72.0.662985232827.issue30185@psf.upfronthosting.co.za> Message-ID: <1493909095.11.0.0126265672896.issue30185@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 6dd4d734ed207ba16b017e38f8909de7ef187e29 by Antoine Pitrou in branch 'master': bpo-30185: avoid KeyboardInterrupt tracebacks in forkserver (#1319) https://github.com/python/cpython/commit/6dd4d734ed207ba16b017e38f8909de7ef187e29 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 10:52:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 14:52:07 +0000 Subject: [issue30225] EBADF error on x86 Tiger 3.x buildbot In-Reply-To: <1493712772.54.0.125879756705.issue30225@psf.upfronthosting.co.za> Message-ID: <1493909527.06.0.781431585272.issue30225@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, the race condition causing EBADF is now handled correctly in 3.5, 3.6 and master (3.7). ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 10:57:09 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 May 2017 14:57:09 +0000 Subject: [issue30185] forkserver process should silence KeyboardInterrupt In-Reply-To: <1493290307.72.0.662985232827.issue30185@psf.upfronthosting.co.za> Message-ID: <1493909829.15.0.275422663909.issue30185@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- pull_requests: +1552 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 10:57:19 2017 From: report at bugs.python.org (Louie Lu) Date: Thu, 04 May 2017 14:57:19 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493909839.64.0.162539081292.issue19903@psf.upfronthosting.co.za> Louie Lu added the comment: Thing just getting weird. If we remove the guard, some of the builtin function will get not-so-good signature result: >>> i.signature(range.__init__) >>> i.signature(list.append) >>> i.signature([].append) You can check my latest commit, The most big change is about __method__, it will make some different behavior: str(i.signature(list.__new__)) -> (*args, **kwargs) str(i.signature(p.sub)) -> (repl, string, count=0) both of them are BuiltinFunctionType, and the first one in old version will be guard, so the get_argspec result will be docstring, we can't different them in non-guard version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 11:01:22 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 May 2017 15:01:22 +0000 Subject: [issue30185] forkserver process should silence KeyboardInterrupt In-Reply-To: <1493290307.72.0.662985232827.issue30185@psf.upfronthosting.co.za> Message-ID: <1493910082.21.0.69723426295.issue30185@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- pull_requests: +1553 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 11:02:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 15:02:04 +0000 Subject: [issue30265] [2.7] test.support.unlink() should fail or emit a warning on WindowsError: [Error 32] The process cannot access the file ... In-Reply-To: <1493856195.4.0.0572132111963.issue30265@psf.upfronthosting.co.za> Message-ID: <1493910124.9.0.423024616114.issue30265@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1554 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 11:12:39 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 May 2017 15:12:39 +0000 Subject: [issue30185] forkserver process should silence KeyboardInterrupt In-Reply-To: <1493290307.72.0.662985232827.issue30185@psf.upfronthosting.co.za> Message-ID: <1493910759.07.0.0773733578071.issue30185@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset a7e48b544becc01dbf9059ed01f38997c6d0156c by Antoine Pitrou in branch '3.6': [3.6] bpo-30185: avoid KeyboardInterrupt tracebacks in forkserver (GH-1319) (#1454) https://github.com/python/cpython/commit/a7e48b544becc01dbf9059ed01f38997c6d0156c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 11:15:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 15:15:57 +0000 Subject: [issue15934] flaky test in test_ftplib In-Reply-To: <1347466895.7.0.169569796798.issue15934@psf.upfronthosting.co.za> Message-ID: <1493910957.42.0.540583651815.issue15934@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see this failure recently on any buildbot. ---------- nosy: +haypo resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 11:16:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 15:16:28 +0000 Subject: [issue19133] Transient test failure: test_with_statement (test_ftplib) In-Reply-To: <1380533250.94.0.739399137718.issue19133@psf.upfronthosting.co.za> Message-ID: <1493910988.2.0.934347795392.issue19133@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see this failure recently on any buildbot. ---------- nosy: +haypo resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 11:16:51 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 May 2017 15:16:51 +0000 Subject: [issue30185] forkserver process should silence KeyboardInterrupt In-Reply-To: <1493290307.72.0.662985232827.issue30185@psf.upfronthosting.co.za> Message-ID: <1493911011.36.0.577022235754.issue30185@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 7299088ccf5f72b8494063814b58a180b4250aa7 by Antoine Pitrou in branch '3.5': [3.5] bpo-30185: avoid KeyboardInterrupt tracebacks in forkserver (GH-1319) (#1455) https://github.com/python/cpython/commit/7299088ccf5f72b8494063814b58a180b4250aa7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 11:17:11 2017 From: report at bugs.python.org (Louie Lu) Date: Thu, 04 May 2017 15:17:11 +0000 Subject: [issue30263] regrtest: log the system load? In-Reply-To: <1493852971.75.0.704908002937.issue30263@psf.upfronthosting.co.za> Message-ID: <1493911031.12.0.247266790712.issue30263@psf.upfronthosting.co.za> Louie Lu added the comment: why will a 1 CPU environment using -j8? isn't that too much for it? ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 11:17:43 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 May 2017 15:17:43 +0000 Subject: [issue30185] forkserver process should silence KeyboardInterrupt In-Reply-To: <1493290307.72.0.662985232827.issue30185@psf.upfronthosting.co.za> Message-ID: <1493911063.01.0.176315602004.issue30185@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 11:17:43 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 15:17:43 +0000 Subject: [issue22610] test_ftplib fails with sem_init: Too many open files In-Reply-To: <1413029908.66.0.757580851096.issue22610@psf.upfronthosting.co.za> Message-ID: <1493911063.87.0.0876154473333.issue22610@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see this error recently on any buildbot. While the patch seems safe, I prefer to not apply it to prevent any kind of regression. ---------- nosy: +haypo resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 11:21:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 15:21:03 +0000 Subject: [issue30263] regrtest: log the system load? In-Reply-To: <1493852971.75.0.704908002937.issue30263@psf.upfronthosting.co.za> Message-ID: <1493911263.53.0.700646963842.issue30263@psf.upfronthosting.co.za> STINNER Victor added the comment: > why will a 1 CPU environment using -j8? Many tests of the Python test suite spend a significant time on just sleeping and waiting for I/O. Using -jN with N > 1 runs tests much faster. > isn't that too much for it? That's a good question :-) At least, we now have one more tool to take a decision. Maybe the buildbot slave allows also more than one build in parallel? (ex: test 3.5 and 3.6 branches) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 11:40:24 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Thu, 04 May 2017 15:40:24 +0000 Subject: [issue12857] Expose called function on frame object In-Reply-To: <1314683667.85.0.876885324202.issue12857@psf.upfronthosting.co.za> Message-ID: <1493912424.24.0.771305717696.issue12857@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 12:02:33 2017 From: report at bugs.python.org (ProgVal) Date: Thu, 04 May 2017 16:02:33 +0000 Subject: [issue30267] Deprecate os.path.commonprefix Message-ID: <1493913753.36.0.555235038331.issue30267@psf.upfronthosting.co.za> New submission from ProgVal: The function os.path.commonprefix computes the longest prefix of strings (any iterable, actually), regardless of their meaning as paths. I do not see any reason to use this function for paths, and keeping it in the os.path module makes it prone to be confused with os.path.commonpath (which was introduced in Python 3.5). I believe making this function raise a DeprecationWarning would help avoid having this kind of bugs. ---------- components: Library (Lib) messages: 292993 nosy: Valentin.Lorentz priority: normal severity: normal status: open title: Deprecate os.path.commonprefix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 12:04:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 16:04:26 +0000 Subject: [issue30108] test_site modifies sys.path In-Reply-To: <1492647792.33.0.749226067814.issue30108@psf.upfronthosting.co.za> Message-ID: <1493913866.51.0.561979263624.issue30108@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1555 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 12:07:06 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 16:07:06 +0000 Subject: [issue30267] Deprecate os.path.commonprefix In-Reply-To: <1493913753.36.0.555235038331.issue30267@psf.upfronthosting.co.za> Message-ID: <1493914026.48.0.387333647705.issue30267@psf.upfronthosting.co.za> STINNER Victor added the comment: Ned Batchelder wrote an article about this function in 2010 :-) https://nedbatchelder.com/blog/201003/whats_the_point_of_ospathcommonprefix.html """ The docs helpfully include the warning: Note that this may return invalid paths because it works a character at a time. But it should say: This function is in the wrong place, and has nothing to do with paths, don't use it if you are interested in file paths! """ ---------- nosy: +haypo, nedbat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 12:08:06 2017 From: report at bugs.python.org (ProgVal) Date: Thu, 04 May 2017 16:08:06 +0000 Subject: [issue30268] Make mimetypes.guess_type accept path-like objects Message-ID: <1493914086.8.0.9964529869.issue30268@psf.upfronthosting.co.za> New submission from ProgVal: The documentation for mimetypes.guess_type says that it ?guesses the type of a file based on its filename or URL?. However, this function only accepts a string object, and not a bytes object: >>> import os >>> import mimetypes >>> mimetypes.guess_type(os.listdir(os.fsencode('./'))[0]) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.7/mimetypes.py", line 291, in guess_type return _db.guess_type(url, strict) File "/usr/lib/python3.7/mimetypes.py", line 116, in guess_type scheme, url = urllib.parse.splittype(url) File "/usr/lib/python3.7/urllib/parse.py", line 924, in splittype match = _typeprog.match(url) TypeError: cannot use a string pattern on a bytes-like object ---------- components: Library (Lib) messages: 292995 nosy: Valentin.Lorentz priority: normal severity: normal status: open title: Make mimetypes.guess_type accept path-like objects _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 12:09:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 16:09:18 +0000 Subject: [issue30185] forkserver process should silence KeyboardInterrupt In-Reply-To: <1493911063.08.0.0877748883168.issue30185@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Python 2.7 isn't affected by this bug? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 12:12:16 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 May 2017 16:12:16 +0000 Subject: [issue30185] forkserver process should silence KeyboardInterrupt In-Reply-To: <1493290307.72.0.662985232827.issue30185@psf.upfronthosting.co.za> Message-ID: <1493914336.01.0.259544619003.issue30185@psf.upfronthosting.co.za> Antoine Pitrou added the comment: There is no forkserver in 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 12:19:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 16:19:48 +0000 Subject: [issue30185] forkserver process should silence KeyboardInterrupt In-Reply-To: <1493290307.72.0.662985232827.issue30185@psf.upfronthosting.co.za> Message-ID: <1493914788.02.0.235575648534.issue30185@psf.upfronthosting.co.za> STINNER Victor added the comment: > There is no forkserver in 2.7. Oh right, it's specific to forkserver, ok ;-) Thank you for the fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 12:21:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 16:21:55 +0000 Subject: [issue30108] test_site modifies sys.path In-Reply-To: <1492647792.33.0.749226067814.issue30108@psf.upfronthosting.co.za> Message-ID: <1493914915.37.0.113275978265.issue30108@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 78064387e5815633168a80dcdc1bd9aec4eff46a by Victor Stinner in branch '2.7': bpo-30108: Restore sys.path in test_site (#1197) (#1459) https://github.com/python/cpython/commit/78064387e5815633168a80dcdc1bd9aec4eff46a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 12:43:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 16:43:47 +0000 Subject: [issue30108] test_site modifies sys.path In-Reply-To: <1492647792.33.0.749226067814.issue30108@psf.upfronthosting.co.za> Message-ID: <1493916227.85.0.552487621694.issue30108@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1556 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 12:52:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 16:52:28 +0000 Subject: [issue30108] test_site modifies sys.path In-Reply-To: <1492647792.33.0.749226067814.issue30108@psf.upfronthosting.co.za> Message-ID: <1493916748.72.0.890670118699.issue30108@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset e81e355a8e43956802211115e3f99859a1a29ecb by Victor Stinner in branch '2.7': bpo-30108: Fix test_site setUpModule() (#1460) https://github.com/python/cpython/commit/e81e355a8e43956802211115e3f99859a1a29ecb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 13:03:16 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 May 2017 17:03:16 +0000 Subject: [issue30171] Emit ResourceWarning in multiprocessing Queue destructor In-Reply-To: <1493214770.49.0.943228970697.issue30171@psf.upfronthosting.co.za> Message-ID: <1493917396.36.0.335165536592.issue30171@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The thread seems to be stopped when the Queue object is finalized: # Send sentinel to the thread queue object when garbage collected self._close = Finalize( self, Queue._finalize_close, [self._buffer, self._notempty], exitpriority=10 ) I don't think the other resources (pipe, lock, semaphore) need explicit cleaning. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 13:12:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 17:12:56 +0000 Subject: [issue23404] 'make touch' does not work with git clones of the source repository In-Reply-To: <1423262765.96.0.527396909.issue23404@psf.upfronthosting.co.za> Message-ID: <1493917976.35.0.641886577109.issue23404@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1557 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 13:14:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 17:14:24 +0000 Subject: [issue23404] 'make touch' does not work with git clones of the source repository In-Reply-To: <1423262765.96.0.527396909.issue23404@psf.upfronthosting.co.za> Message-ID: <1493918064.93.0.511457551047.issue23404@psf.upfronthosting.co.za> STINNER Victor added the comment: I started a thread on python-dev to ask if it's ok to backport the change to 2.7, 3.5 and 3.6. I started to backport the change to 3.6: https://github.com/python/cpython/pull/1461 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 13:19:01 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 17:19:01 +0000 Subject: [issue30269] [2.7] test_release_task_refs() of test_multiprocessing.py is unstable Message-ID: <1493918341.49.0.687778990456.issue30269@psf.upfronthosting.co.za> New submission from STINNER Victor: [2.7] test_release_task_refs() of test_multiprocessing.py fails randomly. Example: http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%202.7/builds/136/steps/test/logs/stdio [116/401/1] test_multiprocessing [77069 refs] test test_multiprocessing failed -- Traceback (most recent call last): File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_multiprocessing.py", line 1293, in test_release_task_refs self.assertEqual(set(wr() for wr in refs), {None}) AssertionError: Items in the first set but not the second: Items in the second set but not the first: None (...) Re-running test 'test_multiprocessing' in verbose mode (...) Ran 167 tests in 20.640s OK (skipped=12) ---------- components: Tests messages: 293003 nosy: haypo priority: normal severity: normal status: open title: [2.7] test_release_task_refs() of test_multiprocessing.py is unstable versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 14:47:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 May 2017 18:47:41 +0000 Subject: [issue30267] Deprecate os.path.commonprefix In-Reply-To: <1493913753.36.0.555235038331.issue30267@psf.upfronthosting.co.za> Message-ID: <1493923661.65.0.322423910811.issue30267@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: We shouldn't deprecate a function until add an alternative. There is a working alternative for paths, but commonprefix() is used in the wild for non-paths (for example in unittest.util). The problem is that there is no right place for this function. The string module is wrong place because commonprefix() supports not only strings. Perhaps the new seqtools module would be a right place. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 14:49:54 2017 From: report at bugs.python.org (Aviv Palivoda) Date: Thu, 04 May 2017 18:49:54 +0000 Subject: [issue30270] Remove sqlite3.Cache display method Message-ID: <1493923794.77.0.260659079397.issue30270@psf.upfronthosting.co.za> New submission from Aviv Palivoda: The display method is there for debugging and should not be in the released code. ---------- components: Extension Modules messages: 293005 nosy: berker.peksag, ghaering, palaviv priority: normal severity: normal status: open title: Remove sqlite3.Cache display method type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 14:51:37 2017 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 May 2017 18:51:37 +0000 Subject: [issue18669] curses.chgat() moves cursor, documentation says it shouldn't In-Reply-To: <1375800170.73.0.20062232661.issue18669@psf.upfronthosting.co.za> Message-ID: <1493923897.56.0.136188290032.issue18669@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +1558 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 14:51:55 2017 From: report at bugs.python.org (Aviv Palivoda) Date: Thu, 04 May 2017 18:51:55 +0000 Subject: [issue30270] Remove sqlite3.Cache display method In-Reply-To: <1493923794.77.0.260659079397.issue30270@psf.upfronthosting.co.za> Message-ID: <1493923915.07.0.669686953234.issue30270@psf.upfronthosting.co.za> Changes by Aviv Palivoda : ---------- pull_requests: +1559 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 14:52:07 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 04 May 2017 18:52:07 +0000 Subject: [issue18699] What is Future.running() for in PEP 3148 / concurrent.futures.Future? In-Reply-To: <1376092118.24.0.585945689562.issue18699@psf.upfronthosting.co.za> Message-ID: <1493923927.97.0.89591285585.issue18699@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: -1535 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 15:03:50 2017 From: report at bugs.python.org (Aviv Palivoda) Date: Thu, 04 May 2017 19:03:50 +0000 Subject: [issue30271] Make sqlite3 statement cache optional Message-ID: <1493924630.07.0.362744800273.issue30271@psf.upfronthosting.co.za> New submission from Aviv Palivoda: Currently the minimum size of the statement cache is 10. I suggest that it will be any value above 1 or no cache at all if the size is set to 0. ---------- components: Extension Modules messages: 293006 nosy: berker.peksag, ghaering, palaviv priority: normal severity: normal status: open title: Make sqlite3 statement cache optional type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 15:05:43 2017 From: report at bugs.python.org (Aviv Palivoda) Date: Thu, 04 May 2017 19:05:43 +0000 Subject: [issue30271] Make sqlite3 statement cache optional In-Reply-To: <1493924630.07.0.362744800273.issue30271@psf.upfronthosting.co.za> Message-ID: <1493924743.23.0.699190655085.issue30271@psf.upfronthosting.co.za> Changes by Aviv Palivoda : ---------- pull_requests: +1560 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 15:13:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 May 2017 19:13:36 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493925216.78.0.425594906341.issue30264@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What if the third-party parser don't use prepare_input_source()? It can use more efficient way if pass just a file name. Wouldn't be better to move your code into the parser's method parse()? If a file is opened inside the parse() method and is not exposed outside, that method should close it. ---------- components: +Library (Lib) -Tests nosy: +eli.bendersky, scoder, serhiy.storchaka stage: -> patch review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 15:44:35 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 May 2017 19:44:35 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493927075.15.0.0437482593521.issue19903@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Let's back up. The high-level specification for get_argspec is something like 'Return information that will help programmers write a correct call." The proposed implementation strategy is to combine signature info from signature (replacing getfullargspec) and the initial part of the callable docstring. This goal and strategy mimic help(callable). So we can use its output as a guide, but improve on it when we can and think we should. This issue could be framed as 'catch up with help(callable)' which already switched to signature. The test examples constitute a low-level specification by example. As such, they should be discussed here before changing the code. Let's consider the ones you listed, using 'help(callable)' as a guide. >>> help(range.__init__) Help on wrapper_descriptor: __init__(self, /, *args, **kwargs) Initialize self. See help(type(self)) for accurate signature. Not very helpful, but if one types 'range.__init__(', one currently sees the last line and should see the last two lines in the future. However, the calltip for 'range(' should not be the above. When type(__init__).__name__ == 'wrapper_descripter, the "fob = ob.__init__" replacement should not happen, at least not until we see a case where a wrapper_descripter has the real signature. (Whether is it still needed for python-coded classes is a separate issue.) I don't know if all built-in inits >>> help(list.append) Help on method_descriptor: append(self, object, /) Append object to the end of the list. >>> help([].append) Help on built-in function append: append(object, /) method of builtins.list instance Append object to the end of the list. The signature output is fine with me. I want future calltips to include it, along with the docstring line. The only issue is the ', /'. If people can survive it presence in help output, ditto for calltips. But whenever a signature string contains '/', we could add, between signature and docstring lines, the following. "('/' marks preceding arguments as positional-only.)" If we do this, the string should be a global '_positional = ...' so it can be used as-is for tests. I am inclined to try this. I want to leave the '/' in the signature because there have been multiple issues and forum questions about why the equivalent of [].append(object='a') does not work. Now, some built-in parameters are positional-only, some keyword-only, and some both. The hint should make this clear. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 15:49:18 2017 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 04 May 2017 19:49:18 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493927358.44.0.482292826219.issue19903@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- nosy: -yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 15:54:49 2017 From: report at bugs.python.org (Oliver Smith) Date: Thu, 04 May 2017 19:54:49 +0000 Subject: [issue30272] distutils.version.LooseVersion's compare raises exception in corner-case Message-ID: <1493927689.09.0.0396614156141.issue30272@psf.upfronthosting.co.za> New submission from Oliver Smith: This should return True and not raise an exception: >>> from distutils.version import LooseVersion >>> LooseVersion("22.7-r1") < LooseVersion("22.7.3-r1") Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.6/distutils/version.py", line 52, in __lt__ c = self._cmp(other) File "/usr/lib/python3.6/distutils/version.py", line 337, in _cmp if self.version < other.version: TypeError: '<' not supported between instances of 'str' and 'int' >>> Tested with Python 3.6.1. ---------- messages: 293009 nosy: ollieparanoid2 priority: normal severity: normal status: open title: distutils.version.LooseVersion's compare raises exception in corner-case versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 15:55:25 2017 From: report at bugs.python.org (Oliver Smith) Date: Thu, 04 May 2017 19:55:25 +0000 Subject: [issue30272] distutils.version.LooseVersion's compare raises exception in corner-case In-Reply-To: <1493927689.09.0.0396614156141.issue30272@psf.upfronthosting.co.za> Message-ID: <1493927725.67.0.416215254453.issue30272@psf.upfronthosting.co.za> Changes by Oliver Smith : ---------- components: +Distutils nosy: +dstufft, merwok type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 16:04:17 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 May 2017 20:04:17 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493928257.2.0.262319363253.issue19903@psf.upfronthosting.co.za> Terry J. Reedy added the comment: >>> help(list.__new__) Help on built-in function __new__: __new__(*args, **kwargs) method of builtins.type instance Create and return a new object. See help(type) for accurate signature. 'list.__new__(' currently pops up just the docstring. I think adding (*args, **kwargs) on top of it does not hurt and maybe is a slight improvement, as it explains the second line a bit. In any case, explicitly calling __new__ and __init__ is extremely rare, especially for beginners. For rexep.sub, adding (repl, string, count=0) on top of "Return the string obtained by replacing the leftmost non-overlapping occurrences o..." is a pure win. Wrapping the too-long docstring line is a separate matter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 16:25:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 May 2017 20:25:08 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493929508.98.0.586833947229.issue19903@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: list.__new__ is inherited from object. Look at list.__init__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 16:29:54 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 May 2017 20:29:54 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493929794.83.0.386225097777.issue19903@psf.upfronthosting.co.za> Terry J. Reedy added the comment: help(object.__init__) and help(list.__init__) have exactly the same output. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 16:50:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 May 2017 20:50:49 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493931049.49.0.276397235755.issue19903@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ah, yes, __new__ and __init__ differ from ordinal methods. They don't have docstrings generated by Argument Clinic. But list itself as a callable have correct signature. >>> inspect.signature(list) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 16:51:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 20:51:05 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None Message-ID: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> New submission from STINNER Victor: Bug reported by Antoine Pitrou on the python-committers mailing list. According to Brett Canon, the first failure was: https://travis-ci.org/python/cpython/jobs/228409786 And the regression is related to my commit a5c62a8e9f0de6c4133825a5710984a3cd5e102b: bpo-23404. Collecting coverage Downloading coverage-4.3.4.tar.gz (361kB) ? Complete output from command python setup.py egg_info: running egg_info creating pip-egg-info/coverage.egg-info writing pip-egg-info/coverage.egg-info/PKG-INFO writing dependency_links to pip-egg-info/coverage.egg-info/dependency_links.txt writing entry points to pip-egg-info/coverage.egg-info/entry_points.txt writing top-level names to pip-egg-info/coverage.egg-info/top_level.txt writing manifest file 'pip-egg-info/coverage.egg-info/SOURCES.txt' warning: manifest_maker: standard file '-c' not found Traceback (most recent call last): File "", line 1, in File "/tmp/pip-build-ewtgqc2r/coverage/setup.py", line 204, in main() File "/tmp/pip-build-ewtgqc2r/coverage/setup.py", line 194, in main setup(**setup_args) File "/home/travis/build/python/cpython/Lib/distutils/core.py", line 148, in setup dist.run_commands() File "/home/travis/build/python/cpython/Lib/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/home/travis/build/python/cpython/Lib/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/home/travis/build/python/cpython/venv/lib/python3.7/site-packages/setuptools/command/egg_info.py", line 279, in run self.find_sources() File "/home/travis/build/python/cpython/venv/lib/python3.7/site-packages/setuptools/command/egg_info.py", line 306, in find_sources mm.run() File "/home/travis/build/python/cpython/venv/lib/python3.7/site-packages/setuptools/command/egg_info.py", line 533, in run self.add_defaults() File "/home/travis/build/python/cpython/venv/lib/python3.7/site-packages/setuptools/command/egg_info.py", line 562, in add_defaults sdist.add_defaults(self) File "/home/travis/build/python/cpython/Lib/distutils/command/sdist.py", line 228, in add_defaults self._add_defaults_ext() File "/home/travis/build/python/cpython/Lib/distutils/command/sdist.py", line 311, in _add_defaults_ext build_ext = self.get_finalized_command('build_ext') File "/home/travis/build/python/cpython/Lib/distutils/cmd.py", line 299, in get_finalized_command cmd_obj.ensure_finalized() File "/home/travis/build/python/cpython/Lib/distutils/cmd.py", line 107, in ensure_finalized self.finalize_options() File "/home/travis/build/python/cpython/Lib/distutils/command/build_ext.py", line 150, in finalize_options py_include = sysconfig.get_python_inc() File "/home/travis/build/python/cpython/Lib/distutils/sysconfig.py", line 100, in get_python_inc incdir = os.path.join(_sys_home, get_config_var('AST_H_DIR')) File "/home/travis/build/python/cpython/Lib/posixpath.py", line 92, in join genericpath._check_arg_types('join', a, *p) File "/home/travis/build/python/cpython/Lib/genericpath.py", line 149, in _check_arg_types (funcname, s.__class__.__name__)) from None TypeError: join() argument must be str or bytes, not 'NoneType' ---------------------------------------- ?Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ewtgqc2r/coverage/? ---------- components: Build, Tests messages: 293014 nosy: haypo, pitrou priority: normal severity: normal status: open title: The coverage job is broken: distutils build_ext fails on None versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 16:55:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 20:55:16 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1493931316.65.0.541336730489.issue30273@psf.upfronthosting.co.za> STINNER Victor added the comment: To reproduce the bug, build the master branch of Python and then run: ./python -m venv venv ./venv/bin/python -m pip install -U coverage Or just: $ ./venv/bin/python -c 'from distutils import sysconfig; print(sysconfig.get_python_inc())' Traceback (most recent call last): File "", line 1, in File "/home/haypo/prog/python/master/Lib/distutils/sysconfig.py", line 100, in get_python_inc incdir = os.path.join(_sys_home, get_config_var('AST_H_DIR')) File "/home/haypo/prog/python/master/Lib/posixpath.py", line 92, in join genericpath._check_arg_types('join', a, *p) File "/home/haypo/prog/python/master/Lib/genericpath.py", line 149, in _check_arg_types (funcname, s.__class__.__name__)) from None TypeError: join() argument must be str or bytes, not 'NoneType' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 17:07:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 21:07:53 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1493932073.94.0.460881586073.issue30273@psf.upfronthosting.co.za> STINNER Victor added the comment: > get_config_var('AST_H_DIR') Oh, I see. My commit a5c62a8e9f0de6c4133825a5710984a3cd5e102b removed multiple variables from Makefile.pre.in to simplify it, but I didn't notice that some of them (only AST_H_DIR?) were used outside Makefile.pre.in. I completely forgot the evil sysconfig (evil in term of backward compatibility...). I removed the following variables from Makefile.pre.in: * @GENERATED_COMMENT@ * ASDLGEN * ASDLGEN_FILES * AST_ASDL * AST_C * AST_C_DIR * AST_H * AST_H_DIR * GRAMMAR_C * GRAMMAR_H * GRAMMAR_INPUT * OPCODETARGETGEN * OPCODETARGETGEN_FILES * OPCODETARGETS_H * OPCODE_H * OPCODE_H_DIR * OPCODE_H_GEN * OPCODE_H_SCRIPT * PYTHON_FOR_GEN (renamed to PYTHON_FOR_REGEN) I didn't see the point of the AST_H_DIR variable since its value was hardcoded to "Include" and it was only used to regenerate generated files related to AST. I don't understand why sysconfig chose this specific variable to get the "Include" subdirectory!? I'm writing a fix to replace AST_H_DIR variable with "Include". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 17:09:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 21:09:00 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1493932140.07.0.193130132171.issue30273@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1561 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 17:09:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 21:09:00 +0000 Subject: [issue23404] 'make touch' does not work with git clones of the source repository In-Reply-To: <1423262765.96.0.527396909.issue23404@psf.upfronthosting.co.za> Message-ID: <1493932140.14.0.729347264571.issue23404@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1562 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 17:29:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 21:29:11 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1493933351.29.0.541102973406.issue30273@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b109a1d3360fc4bb87b9887264e3634632d392ca by Victor Stinner in branch 'master': bpo-30273: Update sysconfig (#1464) https://github.com/python/cpython/commit/b109a1d3360fc4bb87b9887264e3634632d392ca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 17:29:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 21:29:11 +0000 Subject: [issue23404] 'make touch' does not work with git clones of the source repository In-Reply-To: <1423262765.96.0.527396909.issue23404@psf.upfronthosting.co.za> Message-ID: <1493933351.37.0.93420265646.issue23404@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b109a1d3360fc4bb87b9887264e3634632d392ca by Victor Stinner in branch 'master': bpo-30273: Update sysconfig (#1464) https://github.com/python/cpython/commit/b109a1d3360fc4bb87b9887264e3634632d392ca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 17:34:42 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 May 2017 21:34:42 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493933682.73.0.311140833728.issue19903@psf.upfronthosting.co.za> Terry J. Reedy added the comment: (I presume'ordinal' meant 'ordinary'.) I don't know where signature finds the info on built-in type objects Methods like .append have .__text_signature__. List does not, and list.__call__.__text_signature is the generic '($self, /, *args, **kwargs)'. That signature finds it somewhere is a reason for the switch. There is no longer a signature in the first lines of the docstring. So currently, 'list(' only displays "Built-in mutable sequence." Louie, I verified that for python-coded classes, signature itself gets the info from the __init__ method, so we don't need 'fob = ob.__init__' for python classes either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 17:41:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 May 2017 21:41:45 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493934105.43.0.982816225267.issue19903@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: >>> list.__text_signature__ '(iterable=(), /)' But IDLE shouldn't use __text_signature__ directly, it should use the inspect module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 18:08:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 22:08:19 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493935699.2.0.478529273284.issue30264@psf.upfronthosting.co.za> STINNER Victor added the comment: > What if the third-party parser don't use prepare_input_source()? It can use more efficient way if pass just a file name. About "third-party parsers": I have no idea of what are these parsers. It seems like Jython uses provides a parser. But I'm not interested to test Jython, sorry! > Wouldn't be better to move your code into the parser's method parse()? If a file is opened inside the parse() method and is not exposed outside, that method should close it. I wrote a first patch putting the try/except into expatparser code, but then I found a second parser with a parse() method: IncrementalParser. In fact, the expat parser inherits from IncrementalParser. So I only modified IncrementalParser, and IncrementalParser calls the abstract method close(). So any parser implemented on top of IncrementalParser should get the fix for free. My 3rd attempt (patch IncrementalParser.parse()) changes less code and IMHO is less error-prone. Now, *in practice*, only the expat parser is used in CPython, and according to unit tests, my fix closes the file, so the bug is fixed! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 18:11:04 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 May 2017 22:11:04 +0000 Subject: [issue30085] Discourage operator.__dunder__ functions In-Reply-To: <1492396029.61.0.720198059802.issue30085@psf.upfronthosting.co.za> Message-ID: <1493935864.62.0.15677864296.issue30085@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> commit review type: -> enhancement versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 18:24:49 2017 From: report at bugs.python.org (Brett Cannon) Date: Thu, 04 May 2017 22:24:49 +0000 Subject: [issue30274] Make importlib.abc.ExtensionFileLoader.__init__() documentation match code Message-ID: <1493936689.45.0.0881901800669.issue30274@psf.upfronthosting.co.za> New submission from Brett Cannon: https://docs.python.org/3/library/importlib.html#importlib.machinery.ExtensionFileLoader says "fullname, path" for __init__(), but https://github.com/python/cpython/blob/647c3d381e67490e82cdbbe6c96e46d5e1628ce2/Lib/importlib/_bootstrap_external.py#L909 says "name, path". While I would much rather change the parameter name to match the rest of the module, I don't think I'm comfortable with the backwards-compatibility breakage over just a single parameter name (although chances are no one will notice in either direction as everyone probably passes by position). ---------- assignee: docs at python components: Documentation messages: 293022 nosy: brett.cannon, docs at python priority: normal severity: normal stage: needs patch status: open title: Make importlib.abc.ExtensionFileLoader.__init__() documentation match code _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 18:29:36 2017 From: report at bugs.python.org (Brett Cannon) Date: Thu, 04 May 2017 22:29:36 +0000 Subject: [issue30270] Remove sqlite3.Cache display method In-Reply-To: <1493923794.77.0.260659079397.issue30270@psf.upfronthosting.co.za> Message-ID: <1493936976.62.0.819388109461.issue30270@psf.upfronthosting.co.za> Brett Cannon added the comment: How long has the method been there? And does it hurt anything for it to be exposed? Removing it at this point may break code if it predates Python 3.7. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 18:34:41 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 May 2017 22:34:41 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493937281.21.0.599584594453.issue19903@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Interesting dir(list.append) and the IDLE completion box show __text_signature__. dir(list) and the box do not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 18:42:56 2017 From: report at bugs.python.org (Thomas Wouters) Date: Thu, 04 May 2017 22:42:56 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1493937776.55.0.667017225806.issue29094@psf.upfronthosting.co.za> Thomas Wouters added the comment: Well, what should the zipfile module do when you open a broken zipfile for appending in the first place? :) There are many ways in which it could be broken. I don't think a zipfile with incorrect offsets should be treated any differently. (I don't know *how* the zipfile module should treat broken zipfiles, and I don't know how it treats them now -- but I think the most important thing is consistency and documenting the choice :P) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 18:46:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 22:46:58 +0000 Subject: [issue23404] 'make touch' does not work with git clones of the source repository In-Reply-To: <1423262765.96.0.527396909.issue23404@psf.upfronthosting.co.za> Message-ID: <1493938018.93.0.289839931398.issue23404@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 9d02f562961efd12d3c8317a10916db7f77330cc by Victor Stinner in branch '3.6': [3.6] bpo-23404: make touch becomes make regen-all (#1405) (#1461) https://github.com/python/cpython/commit/9d02f562961efd12d3c8317a10916db7f77330cc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 18:46:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 22:46:59 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1493938019.18.0.291543999361.issue30273@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 9d02f562961efd12d3c8317a10916db7f77330cc by Victor Stinner in branch '3.6': [3.6] bpo-23404: make touch becomes make regen-all (#1405) (#1461) https://github.com/python/cpython/commit/9d02f562961efd12d3c8317a10916db7f77330cc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 18:55:12 2017 From: report at bugs.python.org (Jeremy Kloth) Date: Thu, 04 May 2017 22:55:12 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1493938512.26.0.885632340054.issue30273@psf.upfronthosting.co.za> Jeremy Kloth added the comment: The change to sysconfig *may* be a regression wrt bpo-15366. I'm not in the position to be able to check this possibility, ATM, but it is possible that other things have also changed since this was commited 5 years ago. ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 19:56:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 23:56:57 +0000 Subject: [issue23404] 'make touch' does not work with git clones of the source repository In-Reply-To: <1423262765.96.0.527396909.issue23404@psf.upfronthosting.co.za> Message-ID: <1493942217.01.0.162637543755.issue23404@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1563 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 19:56:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 May 2017 23:56:57 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1493942217.76.0.241347397503.issue30273@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1564 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 20:15:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 00:15:39 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1493943339.09.0.656529771489.issue30273@psf.upfronthosting.co.za> STINNER Victor added the comment: > The change to sysconfig *may* be a regression wrt bpo-15366. Hum, I'm still able to create a venv and install coverage in the venv after my commit b109a1d3360fc4bb87b9887264e3634632d392ca, whereas this commit basically reverts the bpo-15366 fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 20:20:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 00:20:02 +0000 Subject: [issue23404] 'make touch' does not work with git clones of the source repository In-Reply-To: <1423262765.96.0.527396909.issue23404@psf.upfronthosting.co.za> Message-ID: <1493943602.19.0.0919748000461.issue23404@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset ab6b962ef241be97536573d7490ce1cfc74fde18 by Victor Stinner in branch '3.5': bpo-23404: make touch becomes make regen-all (#1405) (#1461) (#1465) https://github.com/python/cpython/commit/ab6b962ef241be97536573d7490ce1cfc74fde18 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 20:20:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 00:20:03 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1493943603.46.0.972822764903.issue30273@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset ab6b962ef241be97536573d7490ce1cfc74fde18 by Victor Stinner in branch '3.5': bpo-23404: make touch becomes make regen-all (#1405) (#1461) (#1465) https://github.com/python/cpython/commit/ab6b962ef241be97536573d7490ce1cfc74fde18 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 20:20:06 2017 From: report at bugs.python.org (Jeff Zhang) Date: Fri, 05 May 2017 00:20:06 +0000 Subject: [issue30275] pickle doesn't work in compile/exec Message-ID: <1493943605.77.0.767455241721.issue30275@psf.upfronthosting.co.za> New submission from Jeff Zhang: I want to use pickle in compile/exec, but it doesn't work for me. It only works when I use the global namespace. But I don't want to use global namespace, is there any way for that ? Thanks >>> a = compile("def f():\n\t'hello'\nimport pickle\npickle.dumps(f)", "", "exec") >>> exec(a) # works >>> exec(a, {}) # fails Traceback (most recent call last): File "", line 1, in File "", line 4, in _pickle.PicklingError: Can't pickle : it's not the same object as __main__.f >>> exec(a, {'__name__': '__main__'}) # fails too Traceback (most recent call last): File "", line 1, in File "", line 4, in _pickle.PicklingError: Can't pickle : it's not the same object as __main__.f ---------- components: Library (Lib) messages: 293032 nosy: Jeff Zhang priority: normal severity: normal status: open title: pickle doesn't work in compile/exec type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 20:51:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 00:51:17 +0000 Subject: [issue23404] 'make touch' does not work with git clones of the source repository In-Reply-To: <1423262765.96.0.527396909.issue23404@psf.upfronthosting.co.za> Message-ID: <1493945477.77.0.0622282329233.issue23404@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1565 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 21:14:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 01:14:25 +0000 Subject: [issue23404] 'make touch' does not work with git clones of the source repository In-Reply-To: <1423262765.96.0.527396909.issue23404@psf.upfronthosting.co.za> Message-ID: <1493946865.33.0.734406684622.issue23404@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8a19eb24c97ef43e9fc7d45af180334ac8093545 by Victor Stinner in branch '2.7': bpo-23404: make touch becomes make regen-all (#1466) https://github.com/python/cpython/commit/8a19eb24c97ef43e9fc7d45af180334ac8093545 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 21:21:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 01:21:50 +0000 Subject: [issue23404] 'make touch' does not work with git clones of the source repository In-Reply-To: <1423262765.96.0.527396909.issue23404@psf.upfronthosting.co.za> Message-ID: <1493947310.34.0.553860745086.issue23404@psf.upfronthosting.co.za> STINNER Victor added the comment: I modified Python 2.7, 3.5, 3.6 and master (3.7). I prefer to keep the issue open at least one week in a regression is found, like issue #30273 (this one should already be fixed). Maybe the devguide should be updated too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 21:28:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 01:28:20 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1493947700.5.0.74050814569.issue30273@psf.upfronthosting.co.za> STINNER Victor added the comment: Jeremy Kloth: "I'm not in the position to be able to check this possibility, ATM, but it is possible that other things have also changed since this was commited 5 years ago." I expect that many bugs have been fixed in virtualenv and venv modules, so maybe bpo-15366 was fixed indirectly? It would be nice if you can tests on your side, since I'm not confident in my own tests :-) I modified the build system of Python 2.7, 3.5, 3.6 and master (3.7). So you can pick any of these branches to run your test :-) I'm not sure that the bug affected or can affect Python 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 21:49:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 01:49:59 +0000 Subject: [issue30255] test_xml_etree: python: Objects/sliceobject.c:176: _PySlice_AdjustIndices: Assertion `step >= -PY_SSIZE_T_MAX' failed. In-Reply-To: <1493809598.71.0.198656807245.issue30255@psf.upfronthosting.co.za> Message-ID: <1493948999.73.0.998881971642.issue30255@psf.upfronthosting.co.za> STINNER Victor added the comment: > It's very strange because I expect either a crash: regrtest stops with no more output, or a report of the crash. But no, regrtest displays the summary as everything was fine... It was a bug in regrtest: now fixed by bpo-30258. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 21:52:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 01:52:03 +0000 Subject: [issue30231] test_imaplib needs a TLS server accepting self-signed certificates In-Reply-To: <1493736284.13.0.622029485806.issue30231@psf.upfronthosting.co.za> Message-ID: <1493949123.54.0.922465016379.issue30231@psf.upfronthosting.co.za> STINNER Victor added the comment: If no one speak up to propose a fix for the two skipped tests before a deadline of two weeks, I will removed them, apply: https://github.com/python/cpython/pull/1419 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 21:57:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 01:57:48 +0000 Subject: [issue30172] test_tools takes longer than 5 minutes on some buildbots In-Reply-To: <1493217815.35.0.304443202168.issue30172@psf.upfronthosting.co.za> Message-ID: <1493949468.72.0.0507427097586.issue30172@psf.upfronthosting.co.za> STINNER Victor added the comment: I modified regrtest to log the system load: bpo-30263. > On x86-64 El Capitan 3.x buildbot, test_tools takes longer than 5 minutes, whereas the overall test suite took 31 min. Is someone wrong in test_tools? On this buildbot which has 2 CPUs, the system load starts at 3.33, but goes up 35.40: 0:04:48 load avg: 35.40 [ 41/405] test_tokenize passed (257 sec) -- running: test_lib2to3 (171 sec) The system load is between 3.88 and 17.47 while test_tools is running. running: test_multiprocessing_spawn (158 sec), test_tools (30 sec) running: test_multiprocessing_spawn (188 sec), test_tools (60 sec) running: test_multiprocessing_spawn (218 sec), test_tools (90 sec) 0:27:38 load avg: 4.04 [380/405] test_multiprocessing_spawn passed (247 sec) -- running: test_tools (120 sec) 0:27:39 load avg: 4.04 [381/405] test_telnetlib passed -- running: test_tools (121 sec) 0:27:43 load avg: 3.88 [382/405] test_dis passed -- running: test_tools (125 sec) 0:27:44 load avg: 3.88 [383/405] test_script_helper passed -- running: test_tools (126 sec) 0:27:45 load avg: 3.88 [384/405] test_glob passed -- running: test_tools (127 sec) 0:27:46 load avg: 4.21 [385/405] test_ensurepip passed -- running: test_tools (128 sec) 0:27:51 load avg: 4.59 [386/405] test_descr passed -- running: test_tools (133 sec) 0:27:52 load avg: 4.59 [387/405] test_sax passed -- running: test_tools (134 sec) 0:27:53 load avg: 4.59 [388/405] test_unicode_file_functions passed -- running: test_tools (135 sec) 0:27:54 load avg: 4.59 [389/405] test_xml_dom_minicompat passed -- running: test_tools (136 sec) 0:27:57 load avg: 4.54 [390/405] test___all__ passed -- running: test_tools (139 sec) 0:27:58 load avg: 4.54 [391/405] test_grammar passed -- running: test_tools (140 sec) 0:27:59 load avg: 4.54 [392/405] test_unpack passed -- running: test_tools (141 sec) 0:28:17 load avg: 4.48 [393/405] test_weakref passed -- running: test_tools (159 sec) 0:28:19 load avg: 4.48 [394/405] test_parser passed -- running: test_tools (160 sec) 0:28:25 load avg: 4.52 [395/405] test_difflib passed -- running: test_tools (167 sec) 0:28:26 load avg: 4.52 [396/405] test_compare passed -- running: test_tools (167 sec) 0:28:47 load avg: 9.68 [397/405] test_long passed -- running: test_tools (189 sec) 0:28:48 load avg: 9.68 [398/405] test_mailcap passed -- running: test_tools (190 sec) 0:28:49 load avg: 9.68 [399/405] test_rlcompleter passed -- running: test_tools (191 sec) running: test_pickle (30 sec), test_tools (221 sec) 0:29:38 load avg: 17.47 [400/405] test_pickle passed (49 sec) -- running: test_tools (240 sec) 0:29:49 load avg: 14.94 [401/405] test_nntplib passed -- running: test_tools (251 sec) 0:29:50 load avg: 14.94 [402/405] test_with passed -- running: test_tools (252 sec) 0:29:52 load avg: 14.22 [403/405] test_enum passed -- running: test_tools (254 sec) 0:29:55 load avg: 14.22 [404/405] test_source_encoding passed -- running: test_tools (257 sec) running: test_tools (287 sec) running: test_tools (317 sec) 0:30:58 load avg: 5.59 [405/405] test_tools passed (319 sec) Is it ok to have such system load? Is there something wrong on this buildbot? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 4 23:23:43 2017 From: report at bugs.python.org (Bernhard M. Wiedemann) Date: Fri, 05 May 2017 03:23:43 +0000 Subject: [issue30276] import hashlib makes many programs slow Message-ID: <1493954623.26.0.714784938457.issue30276@psf.upfronthosting.co.za> New submission from Bernhard M. Wiedemann: Steps to Reproduce: echo import hashlib > test.py time python -m cProfile -s tottime test.py 2>&1 | head Actual Results: shows 27ms spent in hashlib.py The problem goes away when dropping everything after line 133 in hashlib.py see also issue 21288 ---------- assignee: christian.heimes components: Library (Lib), SSL messages: 293039 nosy: bmwiedemann, christian.heimes priority: normal severity: normal status: open title: import hashlib makes many programs slow versions: 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 Fri May 5 00:36:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 04:36:36 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493958996.46.0.433041016231.issue30264@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: As you said, calling close() can have side effects (for example invoking self._cont_handler.endDocument()). This was the argument against PR 1444. It seems to me that if _entity_stack is not empty (this happens in case of error in entity parsing) the close() method does nothing. And maybe there are other leaks in entity parsing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 00:48:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 04:48:38 +0000 Subject: [issue30247] Make importlib.machinery class handle os.PathLike path In-Reply-To: <1493797358.8.0.753635690258.issue30247@psf.upfronthosting.co.za> Message-ID: <1493959718.4.0.496788394107.issue30247@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If the path attribute can be None or list it looks to me that it isn't a filesystem path, and it may be incorrect to use os.fspath() with it. How this attribute is used? What wrong if left it a pathlib.Path? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 01:01:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 05:01:49 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493960509.07.0.0241499061023.issue19903@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: As well as __name__, __qualname__, __module__, __bases__, __call__, mro, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 01:10:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 05:10:00 +0000 Subject: [issue30243] Core dump when use uninitialized _json objects In-Reply-To: <1493793710.25.0.994343860918.issue30243@psf.upfronthosting.co.za> Message-ID: <1493961000.32.0.893922330591.issue30243@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 01:27:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 05:27:24 +0000 Subject: [issue30243] Core dump when use uninitialized _json objects In-Reply-To: <1493793710.25.0.994343860918.issue30243@psf.upfronthosting.co.za> Message-ID: <1493962044.36.0.410021520818.issue30243@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Repeated calling of the __init__ method caused memory leaks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 01:53:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 05:53:42 +0000 Subject: [issue30215] Make re.compile() locale agnostic In-Reply-To: <1493529699.82.0.722013579131.issue30215@psf.upfronthosting.co.za> Message-ID: <1493963622.2.0.363097118356.issue30215@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 898ff03e1e7925ecde3da66327d3cdc7e07625ba by Serhiy Storchaka in branch 'master': bpo-30215: Make re.compile() locale agnostic. (#1361) https://github.com/python/cpython/commit/898ff03e1e7925ecde3da66327d3cdc7e07625ba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 02:07:51 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 05 May 2017 06:07:51 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1493964471.06.0.768699193565.issue29094@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- pull_requests: +1566 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 02:20:02 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 05 May 2017 06:20:02 +0000 Subject: [issue30247] Make importlib.machinery class handle os.PathLike path In-Reply-To: <1493797358.8.0.753635690258.issue30247@psf.upfronthosting.co.za> Message-ID: <1493965202.04.0.94225625986.issue30247@psf.upfronthosting.co.za> Nick Coghlan added the comment: FileFinder only handles a single directory, and FileLoader only handles a single file, so their "path" attributes are paths in the "fspath" sense, rather than the "sys.path" or "PathFinder" sense. Perhaps it would be worth the hassle of migrating to "fspath" as the attribute and parameter names here? The attribute can be renamed without breaking backwards compatibility by also adding a "path" property that manipulates the renamed "fspath" attribute. Renaming the parameters would be a bit trickier, since we would need to allow the parameter to be supplied under either name for at least 3.7, so we'd need to do something like: 1. Remove the current positional-or-keyword "path" parameter 2. Add keyword-only "path" and "fspath" parameters that default to None 3. Accept arbitrary additional positional arguments (which is already the case for FileFinder) 4. If both of the new keyword-only parameters are None, then extract "fspath" from the tuple of positional parameters (i.e. by doing "fspath, *loader_details loader_details" in FileFinder, and "fspath, * = args" in the FileLoader classes At a documentation level, this would just be described as the parameter name being "fspath", and a versionchanged note for 3.7 saying that the parameter name changed from "path" to "fspath" and the old "path' name is still supported as a keyword argument for backwards compatibility reasons. If we actively deprecated the old names, then the deprecation warnings would live in the access function definitions for the "path" attribute, and in the case where the "path" keyword argument was non-None for the renamed parameters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 02:35:59 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 05 May 2017 06:35:59 +0000 Subject: [issue29621] telnetlib.Telnet.write gives confusing error message when a string is passed in In-Reply-To: <1487781321.4.0.45367640243.issue29621@psf.upfronthosting.co.za> Message-ID: <1493966159.09.0.0185805525792.issue29621@psf.upfronthosting.co.za> Berker Peksag added the comment: I agree with David. The documentation of the method starts with "Write a byte string to the socket [...]" and the example at https://docs.python.org/3/library/telnetlib.html#telnet-example is pretty clear. ---------- nosy: +berker.peksag resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 02:42:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 06:42:44 +0000 Subject: [issue30215] Make re.compile() locale agnostic In-Reply-To: <1493529699.82.0.722013579131.issue30215@psf.upfronthosting.co.za> Message-ID: <1493966564.85.0.219784368591.issue30215@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 02:54:45 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 05 May 2017 06:54:45 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1493967285.97.0.641328767358.issue29094@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset ef4c6ba169ff59215442fc4047d83f7a3d39bf39 by Benjamin Peterson in branch '2.7': Revert "Issue #29094: Offsets in a ZIP file created with extern file object and modes" (#1467) https://github.com/python/cpython/commit/ef4c6ba169ff59215442fc4047d83f7a3d39bf39 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 02:58:19 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 05 May 2017 06:58:19 +0000 Subject: [issue30192] hashlib module breaks with 64-bit kernel and 32-bit user space In-Reply-To: <1493328003.41.0.178410988374.issue30192@psf.upfronthosting.co.za> Message-ID: <1493967499.25.0.521153718875.issue30192@psf.upfronthosting.co.za> Berker Peksag added the comment: Neil, can this issue be closed or do you want to backport to 3.6? ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:03:05 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 07:03:05 +0000 Subject: [issue30277] Speeds up compiling cases-insensitive regular expressions Message-ID: <1493967785.05.0.264912808117.issue30277@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Currently _sre.getlower() takes two arguments. Depending on the bits set in the second argument it uses one of three algorithms for determining the lower case of the character -- Unicode, ASCII-only, and locale-depended. After resolving issue30215 _sre.getlower() no longer used for locale-depended case. Proposed patch replaces _sre.getlower() with two one-argument functions: _sre.ascii_tolower() and _sre.unicode_tolower(). This slightly speeds up compiling cases-insensitive regular expressions, especially containing ranges. $ ./python -m timeit -s 'import sre_compile' 'sre_compile.compile("(?i)ABCDEFGHIJKLMNOPQRSTUVWXYZ", 0)' Unpatched: 2000 loops, best of 5: 180 usec per loop Patched: 2000 loops, best of 5: 173 usec per loop $ ./python -m timeit -s 'import sre_compile' 'sre_compile.compile("(?ia)ABCDEFGHIJKLMNOPQRSTUVWXYZ", 0)' Unpatched: 2000 loops, best of 5: 175 usec per loop Patched: 2000 loops, best of 5: 168 usec per loop $ ./python -m timeit -s 'import sre_compile' 'sre_compile.compile("(?i)[A-Z]", 0)' Unpatched: 500 loops, best of 5: 788 usec per loop Patched: 500 loops, best of 5: 766 usec per loop $ ./python -m timeit -s 'import sre_compile' 'sre_compile.compile("(?ia)[A-Z]", 0)' Unpatched: 5000 loops, best of 5: 92 usec per loop Patched: 5000 loops, best of 5: 83.2 usec per loop $ ./python -m timeit -s 'import sre_compile' 'sre_compile.compile("(?i)[\u0410-\u042f]", 0)' Unpatched: 2000 loops, best of 5: 141 usec per loop Patched: 2000 loops, best of 5: 122 usec per loop $ ./python -m timeit -s 'import sre_compile' 'sre_compile.compile("(?i)[\u0000-\uffff]", 0)' Unpatched: 5 loops, best of 5: 59 msec per loop Patched: 10 loops, best of 5: 28.9 msec per loop ---------- assignee: serhiy.storchaka components: Library (Lib), Regular Expressions messages: 293049 nosy: ezio.melotti, mrabarnett, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Speeds up compiling cases-insensitive regular expressions type: performance versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:08:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 07:08:51 +0000 Subject: [issue30243] Core dump when use uninitialized _json objects In-Reply-To: <1493793710.25.0.994343860918.issue30243@psf.upfronthosting.co.za> Message-ID: <1493968131.89.0.0645393731197.issue30243@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 76a3e51a403bc84ed536921866c86dd7d07aaa7e by Serhiy Storchaka in branch 'master': bpo-30243: Fixed the possibility of a crash in _json. (#1420) https://github.com/python/cpython/commit/76a3e51a403bc84ed536921866c86dd7d07aaa7e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:09:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 07:09:37 +0000 Subject: [issue30277] Speeds up compiling cases-insensitive regular expressions In-Reply-To: <1493967785.05.0.264912808117.issue30277@psf.upfronthosting.co.za> Message-ID: <1493968177.53.0.582498674388.issue30277@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1567 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:12:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 07:12:41 +0000 Subject: [issue30243] Core dump when use uninitialized _json objects In-Reply-To: <1493793710.25.0.994343860918.issue30243@psf.upfronthosting.co.za> Message-ID: <1493968361.16.0.711942669584.issue30243@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1568 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:13:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 07:13:13 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493968393.67.0.534626927261.issue30264@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy: "As you said, calling close() can have side effects (for example invoking self._cont_handler.endDocument()). This was the argument against PR 1444. It seems to me that if _entity_stack is not empty (this happens in case of error in entity parsing) the close() method does nothing. And maybe there are other leaks in entity parsing." Right, it seems that the conclusion is that there is not only a high risk of regression because of unexpected side effects, but also an issue with unknown external parsers. So finally I moved backward and proposed my change on ExpatParser.parse(): * the change has a narrow scope: only ExpatParser.parse() is modified, external unknown code is not impact, low risk of regression for external parsers. * the change is well defined: it does exactly one thing, it makes sure that the source is closed, especially the inner file object or urllib object. My change makes sure that the sure is always closed, even if the close() method does nothing. According to the long list of constraints for this fix, I don't think that we can do better. I made one design choice: the close() method of byte and character streams are called twice, I didn't call setByteStream(None) / setCharacterStream(None) to avoid creating an inconsistent source. If you really care, maybe we can reset the source to a new xmlreader.InputSource() object instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:14:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 07:14:08 +0000 Subject: [issue30243] Core dump when use uninitialized _json objects In-Reply-To: <1493793710.25.0.994343860918.issue30243@psf.upfronthosting.co.za> Message-ID: <1493968448.97.0.995507262366.issue30243@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1569 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:16:56 2017 From: report at bugs.python.org (Louie Lu) Date: Fri, 05 May 2017 07:16:56 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493968616.25.0.492357528428.issue19903@psf.upfronthosting.co.za> Louie Lu added the comment: But somehow in this case, List have no __text_signature__: >>> str(i.signature(list)) '(iterable=(), /)' >>> list.__text_signature__ '(iterable=(), /)' >>> str(i.signature(List)) '(iterable=(), /)' >>> List.__text_signature__ >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:17:39 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 07:17:39 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1493968659.47.0.185871876092.issue29094@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: commit review -> backport needed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:19:48 2017 From: report at bugs.python.org (Aviv Palivoda) Date: Fri, 05 May 2017 07:19:48 +0000 Subject: [issue30270] Remove sqlite3.Cache display method In-Reply-To: <1493923794.77.0.260659079397.issue30270@psf.upfronthosting.co.za> Message-ID: <1493968788.43.0.606451860492.issue30270@psf.upfronthosting.co.za> Aviv Palivoda added the comment: >From looking at the git blame this is there since 2006. Maybe this should be dependent on issue #30262. Maybe at first there should be a deprecation warning and then removing this later. I understand that this might break someone's code but this is an undocumented method of an undocumented class in the sqlite3 module. I don't think that there will be a lot of people that use the sqlite3.Cache object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:31:14 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 05 May 2017 07:31:14 +0000 Subject: [issue30190] unittest's assertAlmostEqual improved error message In-Reply-To: <1493323962.23.0.575947649634.issue30190@psf.upfronthosting.co.za> Message-ID: <1493969474.15.0.0353555616527.issue30190@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- components: +Library (Lib) resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:32:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 07:32:39 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493969559.78.0.77235153639.issue30264@psf.upfronthosting.co.za> STINNER Victor added the comment: > I made one design choice: the close() method of byte and character streams are called twice, I didn't call setByteStream(None) / setCharacterStream(None) to avoid creating an inconsistent source. If you really care, maybe we can reset the source to a new xmlreader.InputSource() object instead. Hum, I just modified my PR one more time to replace try/finally: self._close_source() with "try/except: self._close_source(); raise", so file.close() is now only called once. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:33:38 2017 From: report at bugs.python.org (Louie Lu) Date: Fri, 05 May 2017 07:33:38 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493969618.09.0.68445399652.issue19903@psf.upfronthosting.co.za> Louie Lu added the comment: And, another case, the __text_signature__ and i.signature() is similar, but not the same: >>> range.__init__.__text_signature__ '($self, /, *args, **kwargs)' ^ >>> str(i.signature(range.__init__)) '(self, /, *args, **kwargs)' So we can't simply compare-and-eliminate this case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:36:46 2017 From: report at bugs.python.org (Kyle Thomas) Date: Fri, 05 May 2017 07:36:46 +0000 Subject: [issue30278] The element div#sidebar on documentation requires the attribute role="button". Message-ID: <1493969806.2.0.294346675831.issue30278@psf.upfronthosting.co.za> New submission from Kyle Thomas: Elements other than buttons which act as buttons require metadata to be accessible. Refer to https://www.w3.org/TR/wai-aria-practices/examples/button/button.html ---------- assignee: docs at python components: Documentation messages: 293056 nosy: Kyle Thomas, docs at python priority: normal severity: normal status: open title: The element div#sidebar on documentation requires the attribute role="button". type: enhancement versions: 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 Fri May 5 03:36:46 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 05 May 2017 07:36:46 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1493969806.26.0.729106300079.issue30119@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:38:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 07:38:37 +0000 Subject: [issue30243] Core dump when use uninitialized _json objects In-Reply-To: <1493793710.25.0.994343860918.issue30243@psf.upfronthosting.co.za> Message-ID: <1493969917.58.0.287972787241.issue30243@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1570 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:39:25 2017 From: report at bugs.python.org (Masayuki Yamamoto) Date: Fri, 05 May 2017 07:39:25 +0000 Subject: [issue30279] Remove unused Python/thread_foobar.h Message-ID: <1493969965.31.0.346215953104.issue30279@psf.upfronthosting.co.za> New submission from Masayuki Yamamoto: Python/thread_foobar.h is the template code that is threading adaptation for new platforms, and it hasn't been used on actual platforms. As a matter of fact, Python/thread_pthread.h and Python/thread_nt.h give concrete examples of adaptation, therefore, I think thread_foobar.h hasn't needed no more. In addition, there was an issue that only changed thread_foobar.h to fix overlooking (issue21312). python-dev: https://mail.python.org/pipermail/python-dev/2017-May/147840.html ---------- components: Interpreter Core messages: 293057 nosy: masamoto priority: normal severity: normal status: open title: Remove unused Python/thread_foobar.h type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:40:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 07:40:16 +0000 Subject: [issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long In-Reply-To: <1490033654.49.0.302428807584.issue29861@psf.upfronthosting.co.za> Message-ID: <1493970016.55.0.983507352458.issue29861@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1571 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:40:32 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 07:40:32 +0000 Subject: [issue30243] Core dump when use uninitialized _json objects In-Reply-To: <1493793710.25.0.994343860918.issue30243@psf.upfronthosting.co.za> Message-ID: <1493970032.34.0.813660816296.issue30243@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 39b73dd5131ce205dcee3b9e24ba0fc28934d79c by Serhiy Storchaka in branch '3.6': [3.6] bpo-30243: Fixed the possibility of a crash in _json. (GH-1420) (#1469) https://github.com/python/cpython/commit/39b73dd5131ce205dcee3b9e24ba0fc28934d79c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:40:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 07:40:49 +0000 Subject: [issue30243] Core dump when use uninitialized _json objects In-Reply-To: <1493793710.25.0.994343860918.issue30243@psf.upfronthosting.co.za> Message-ID: <1493970049.76.0.911225776931.issue30243@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset ee2294860e224c2b08cc6847d3c9a0ec3875c3d8 by Serhiy Storchaka in branch '3.5': [3.5] bpo-30243: Fixed the possibility of a crash in _json. (GH-1420) (#1470) https://github.com/python/cpython/commit/ee2294860e224c2b08cc6847d3c9a0ec3875c3d8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:40:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 07:40:55 +0000 Subject: [issue30269] [2.7] test_release_task_refs() of test_multiprocessing.py is unstable In-Reply-To: <1493918341.49.0.687778990456.issue30269@psf.upfronthosting.co.za> Message-ID: <1493970055.04.0.00284365028308.issue30269@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, it's just a missed backport of the last bpo-29861 fix, only 2.7 miss a backport. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> multiprocessing Pool keeps objects (tasks, args, results) alive too long _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:41:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 07:41:54 +0000 Subject: [issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long In-Reply-To: <1490033654.49.0.302428807584.issue29861@psf.upfronthosting.co.za> Message-ID: <1493970114.59.0.512983042368.issue29861@psf.upfronthosting.co.za> STINNER Victor added the comment: > New changeset 685cdb9acc3fca04a9897d88b89771ddfd50e772 by Antoine Pitrou in branch 'master': > Relax test timing (bpo-29861) to avoid sporadic failures (#1120) Oh, this change wasn't backported to 2.7 and caused the bpo-30269. I proposed a backport: https://github.com/python/cpython/pull/1472 I will merge it once tests pass ;-) ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:42:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 07:42:49 +0000 Subject: [issue30277] Speeds up compiling cases-insensitive regular expressions In-Reply-To: <1493967785.05.0.264912808117.issue30277@psf.upfronthosting.co.za> Message-ID: <1493970169.22.0.391960786114.issue30277@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 7186cc29be352bed6f1110873283d073fd0643e4 by Serhiy Storchaka in branch 'master': bpo-30277: Replace _sre.getlower() with _sre.ascii_tolower() and _sre.unicode_tolower(). (#1468) https://github.com/python/cpython/commit/7186cc29be352bed6f1110873283d073fd0643e4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:43:31 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 07:43:31 +0000 Subject: [issue30277] Speeds up compiling cases-insensitive regular expressions In-Reply-To: <1493967785.05.0.264912808117.issue30277@psf.upfronthosting.co.za> Message-ID: <1493970211.39.0.44156120755.issue30277@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:46:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 07:46:49 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493970409.13.0.511125628154.issue30264@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset ef9c0e732fc50aefbdd7c5a80e04e14b31684e66 by Victor Stinner in branch 'master': bpo-30264: ExpatParser closes the source on error (#1451) https://github.com/python/cpython/commit/ef9c0e732fc50aefbdd7c5a80e04e14b31684e66 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:47:14 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 07:47:14 +0000 Subject: [issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long In-Reply-To: <1490033654.49.0.302428807584.issue29861@psf.upfronthosting.co.za> Message-ID: <1493970434.0.0.325241234621.issue29861@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset fd6094cdebb5736745d164e0207de2d4cb0b50dc by Victor Stinner in branch '2.7': Relax test timing (bpo-29861) to avoid sporadic failures (#1120) (#1472) https://github.com/python/cpython/commit/fd6094cdebb5736745d164e0207de2d4cb0b50dc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:47:53 2017 From: report at bugs.python.org (Masayuki Yamamoto) Date: Fri, 05 May 2017 07:47:53 +0000 Subject: [issue30279] Remove unused Python/thread_foobar.h In-Reply-To: <1493969965.31.0.346215953104.issue30279@psf.upfronthosting.co.za> Message-ID: <1493970473.72.0.699917313334.issue30279@psf.upfronthosting.co.za> Changes by Masayuki Yamamoto : ---------- pull_requests: +1572 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:50:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 07:50:54 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493970654.95.0.271879646384.issue30264@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1573 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:52:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 07:52:38 +0000 Subject: [issue30279] Remove unused Python/thread_foobar.h In-Reply-To: <1493969965.31.0.346215953104.issue30279@psf.upfronthosting.co.za> Message-ID: <1493970758.42.0.233732459422.issue30279@psf.upfronthosting.co.za> STINNER Victor added the comment: Copy of my answer on the python-dev thread: You can remove thread_foobar.h. I don't think that anyone still wants to use this template. The other thread_*.h files can be used as template as well. Victor ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 03:55:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 07:55:28 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493970928.44.0.98831412875.issue30264@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1574 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 04:03:14 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 08:03:14 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493971394.29.0.0295064541808.issue30264@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1575 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 04:04:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 08:04:05 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493971445.12.0.239140753768.issue30264@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, the fix for Python 2.7 is different. In fact, the file object was never explicitly closed by the parser. It is now always closed by the parser, on success or error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 04:04:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 08:04:15 +0000 Subject: [issue30279] Remove unused Python/thread_foobar.h In-Reply-To: <1493969965.31.0.346215953104.issue30279@psf.upfronthosting.co.za> Message-ID: <1493971455.94.0.428138792772.issue30279@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset fdaeea620f8c78da89cddba4ab010c64535800e0 by Victor Stinner (Masayuki Yamamoto) in branch 'master': bpo-30279: Remove unused Python/thread_foobar.h (#1473) https://github.com/python/cpython/commit/fdaeea620f8c78da89cddba4ab010c64535800e0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 04:04:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 08:04:59 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493971499.54.0.15920394327.issue30264@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 0fe870f3f95ba883b2b06bc0d814bdab8d53df98 by Victor Stinner in branch '3.6': bpo-30264: ExpatParser closes the source on error (#1451) (#1474) https://github.com/python/cpython/commit/0fe870f3f95ba883b2b06bc0d814bdab8d53df98 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 04:08:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 08:08:07 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493971687.64.0.213899394728.issue30264@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 0c9aa6ffd318c04ce23997b4704477d4a4d82829 by Victor Stinner in branch '3.5': bpo-30264: ExpatParser closes the source on error (#1451) (#1475) https://github.com/python/cpython/commit/0c9aa6ffd318c04ce23997b4704477d4a4d82829 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 04:09:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 08:09:04 +0000 Subject: [issue30279] Remove unused Python/thread_foobar.h In-Reply-To: <1493969965.31.0.346215953104.issue30279@psf.upfronthosting.co.za> Message-ID: <1493971744.28.0.64152523111.issue30279@psf.upfronthosting.co.za> STINNER Victor added the comment: I hope that your merged change will now make your work simpler ;-) I don't want to backport this change, so I close the issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 04:11:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 08:11:57 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493971917.27.0.299817991347.issue30264@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d81f9e24ea89c0aaded1e0d3f8d8076bbd58c19a by Victor Stinner in branch '2.7': bpo-30264: ExpatParser now closes the source (#1476) https://github.com/python/cpython/commit/d81f9e24ea89c0aaded1e0d3f8d8076bbd58c19a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 04:15:14 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 05 May 2017 08:15:14 +0000 Subject: [issue29920] Document cgitb.text and cgitb.html In-Reply-To: <1490620609.02.0.405950190914.issue29920@psf.upfronthosting.co.za> Message-ID: <1493972114.19.0.334358404755.issue29920@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset c07b3a15be5e0a68a73b4c532861ed8de6932bd2 by Berker Peksag (masklinn) in branch 'master': bpo-29920: Document cgitb.text() and cgitb.html() functions (GH-849) https://github.com/python/cpython/commit/c07b3a15be5e0a68a73b4c532861ed8de6932bd2 ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 04:16:13 2017 From: report at bugs.python.org (Bernhard M. Wiedemann) Date: Fri, 05 May 2017 08:16:13 +0000 Subject: [issue30276] import hashlib makes many programs slow In-Reply-To: <1493954623.26.0.714784938457.issue30276@psf.upfronthosting.co.za> Message-ID: <1493972173.12.0.369756116385.issue30276@psf.upfronthosting.co.za> Bernhard M. Wiedemann added the comment: traced it down a bit further. nearly all that time is spent in import _hashlib which probably means, it is spent in functions like PyInit__hashlib in Modules/_hashopenssl.c I can see in strace that after loading libssl, libcrypto and libz, it calls getpid and opens /dev/urandom 8 times and most of the time is spent in the middle of these: grep open...dev.uran strace.out 1493970277.542629 open("/dev/urandom", O_RDONLY|O_CLOEXEC) = 4 1493970277.542847 open("/dev/urandom", O_RDONLY|O_NOCTTY|O_NONBLOCK|O_CLOEXEC) = 4 1493970277.543370 open("/dev/urandom", O_RDONLY|O_CLOEXEC) = 4 1493970277.543967 open("/dev/urandom", O_RDONLY|O_CLOEXEC) = 4 1493970277.592232 open("/dev/urandom", O_RDONLY|O_CLOEXEC) = 4 1493970277.592518 open("/dev/urandom", O_RDONLY|O_CLOEXEC) = 4 1493970277.597778 open("/dev/urandom", O_RDONLY|O_CLOEXEC) = 4 1493970277.598629 open("/dev/urandom", O_RDONLY|O_CLOEXEC) = 4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 04:21:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 08:21:47 +0000 Subject: [issue30243] Core dump when use uninitialized _json objects In-Reply-To: <1493793710.25.0.994343860918.issue30243@psf.upfronthosting.co.za> Message-ID: <1493972507.85.0.917552264435.issue30243@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 5d7a18f3b65bd958d876391cca3c381396021639 by Serhiy Storchaka in branch '2.7': [2.7] bpo-30243: Fixed the possibility of a crash in _json. (GH-1420) (#1471) https://github.com/python/cpython/commit/5d7a18f3b65bd958d876391cca3c381396021639 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 04:22:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 08:22:25 +0000 Subject: [issue30258] [2.7] regrtest: handle child process crash In-Reply-To: <1493821528.82.0.0272255783657.issue30258@psf.upfronthosting.co.za> Message-ID: <1493972545.4.0.733222621554.issue30258@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1576 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 04:22:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 08:22:42 +0000 Subject: [issue30243] Core dump when use uninitialized _json objects In-Reply-To: <1493793710.25.0.994343860918.issue30243@psf.upfronthosting.co.za> Message-ID: <1493972562.35.0.736525419009.issue30243@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 04:26:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 08:26:40 +0000 Subject: [issue30255] test_xml_etree: python: Objects/sliceobject.c:176: _PySlice_AdjustIndices: Assertion `step >= -PY_SSIZE_T_MAX' failed. In-Reply-To: <1493809598.71.0.198656807245.issue30255@psf.upfronthosting.co.za> Message-ID: <1493972800.37.0.446987743069.issue30255@psf.upfronthosting.co.za> STINNER Victor added the comment: > The change announces "... clip the step to [-PY_SSIZE_T_MAX, PY_SSIZE_T_MAX] ...", but there is no explicit to clip the maximum to PY_SSIZE_T_MAX. Maybe there is a bug on this side too! The code should be reviewed one more time. Ok, I checked: _PySlice_Unpack() uses _PyEval_SliceIndex() to convert the step Python object into a C Py_ssize_t, so the code is already correct: it does "clip the step to [-PY_SSIZE_T_MAX, PY_SSIZE_T_MAX]" as announced ;-) I close the issue. Thanks Serhiy for your work on fixing corner cases related to slices ;-) ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 04:27:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 08:27:36 +0000 Subject: [issue30265] [2.7] test.support.unlink() should fail or emit a warning on WindowsError: [Error 32] The process cannot access the file ... In-Reply-To: <1493856195.4.0.0572132111963.issue30265@psf.upfronthosting.co.za> Message-ID: <1493972856.98.0.331719798038.issue30265@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 03b278895fa0db355af4e450eac71dd0532db394 by Victor Stinner in branch '2.7': bpo-30265: support.unlink() don't catch any OSError (#1456) https://github.com/python/cpython/commit/03b278895fa0db355af4e450eac71dd0532db394 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 04:28:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 08:28:25 +0000 Subject: [issue30265] [2.7] test.support.unlink() should fail or emit a warning on WindowsError: [Error 32] The process cannot access the file ... In-Reply-To: <1493856195.4.0.0572132111963.issue30265@psf.upfronthosting.co.za> Message-ID: <1493972905.69.0.619120386004.issue30265@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, fixed. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 04:28:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 08:28:37 +0000 Subject: [issue30258] [2.7] regrtest: handle child process crash In-Reply-To: <1493821528.82.0.0272255783657.issue30258@psf.upfronthosting.co.za> Message-ID: <1493972917.68.0.28000003359.issue30258@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 228da42961ac9bf2990e6c191ecc9b762ead617c by Victor Stinner in branch '2.7': bpo-30258: Fix handling of child error in regrtest (#1477) https://github.com/python/cpython/commit/228da42961ac9bf2990e6c191ecc9b762ead617c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 04:29:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 08:29:56 +0000 Subject: [issue30258] [2.7] regrtest: handle child process crash In-Reply-To: <1493821528.82.0.0272255783657.issue30258@psf.upfronthosting.co.za> Message-ID: <1493972996.41.0.946776727717.issue30258@psf.upfronthosting.co.za> STINNER Victor added the comment: @Serhiy: I fixed the bug you found. Don't hesitate to propose directly a PR if I missed something (or open an issue, it's up to you). At least, regrtest of Python 2.7 should now handle correctly crashes when using -jN. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 04:30:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 08:30:16 +0000 Subject: [issue30257] _bsddb: else misleadingly indented In-Reply-To: <1493813081.42.0.70374068517.issue30257@psf.upfronthosting.co.za> Message-ID: <1493973016.29.0.599098865322.issue30257@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 04:31:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 08:31:42 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493973102.34.0.75720824232.issue30264@psf.upfronthosting.co.za> STINNER Victor added the comment: I applied my fix to 2.7, 3.5, 3.6 and master (3.7). Thanks for the helpful reviews Serhiy ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 04:47:58 2017 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Fri, 05 May 2017 08:47:58 +0000 Subject: [issue30095] HTMLCalendar allow custom classes In-Reply-To: <1492544277.59.0.956887104329.issue30095@psf.upfronthosting.co.za> Message-ID: <1493974078.5.0.248864686481.issue30095@psf.upfronthosting.co.za> Walter D?rwald added the comment: See comments on Github ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 05:08:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 09:08:35 +0000 Subject: [issue30280] Warning -- threading._dangling was modified by test_asyncio on FreeBSD 9 Message-ID: <1493975315.11.0.159651594974.issue30280@psf.upfronthosting.co.za> New submission from STINNER Victor: On the FreeBSD 9 buildbot, I saw this warning: Warning -- threading._dangling was modified by test_asyncio http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.6/builds/124/steps/test/logs/warnings%20%281%29 http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.5/builds/78/steps/test/logs/warnings%20%281%29 ---------- components: Tests, asyncio messages: 293082 nosy: haypo, yselivanov priority: normal severity: normal status: open title: Warning -- threading._dangling was modified by test_asyncio on FreeBSD 9 versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 05:20:43 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 May 2017 09:20:43 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1493976043.64.0.949698618601.issue19903@psf.upfronthosting.co.za> Terry J. Reedy added the comment: What is List? Not a builtin. I am guessing that $self means to remove for bound methods. In any case, __text_signature__ is effectively private to inspect.signature. We only care what the latter produces. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 05:34:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 09:34:52 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493976892.52.0.109757228904.issue30264@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This changes the behavior if pass a file object to the parser. When the parser failed it was possible to use the passed file object (for example call tell()). Now it is closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 05:38:30 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 09:38:30 +0000 Subject: [issue30258] [2.7] regrtest: handle child process crash In-Reply-To: <1493821528.82.0.0272255783657.issue30258@psf.upfronthosting.co.za> Message-ID: <1493977110.2.0.951160179707.issue30258@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You just pressed the merge button 2 minutes before I finished a review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 05:40:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 09:40:41 +0000 Subject: [issue30258] [2.7] regrtest: handle child process crash In-Reply-To: <1493821528.82.0.0272255783657.issue30258@psf.upfronthosting.co.za> Message-ID: <1493977241.98.0.494997828821.issue30258@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Do you mind to port changes to 3.x? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 05:42:29 2017 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 May 2017 09:42:29 +0000 Subject: [issue30276] import hashlib makes many programs slow In-Reply-To: <1493954623.26.0.714784938457.issue30276@psf.upfronthosting.co.za> Message-ID: <1493977349.12.0.303991578847.issue30276@psf.upfronthosting.co.za> Christian Heimes added the comment: I cannot reproduce the open /dev/urandom calls locally. You seem to be running an old Python version and/or old Kernel. Python prefers getrandom() over /dev/urandom. The urandom code caches the fd for /dev/urandom. $ strace ./python -c 'import hashlib' 2>&1 | grep random getrandom("\xe0\xa5\x00\xda\xe1\xce\x1a\x9c\xe7\x61\x71\xf2\x1d\x15\x63\x19\xdc\x60\x70\x3c\xef\xf6\xcb\xdb", 24, GRND_NONBLOCK) = 24 open("/dev/urandom", O_RDONLY|O_NOCTTY|O_NONBLOCK) = 3 The O_RDONLY|O_NOCTTY|O_NONBLOCK|O_CLOEXEC comes from OpenSSL. What's your Python version, OpenSSL version, Kernel version and which platform/distribution are you on? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 05:44:52 2017 From: report at bugs.python.org (Tomas Orsava) Date: Fri, 05 May 2017 09:44:52 +0000 Subject: [issue29243] --enable-optimizations makes common build commands always need to compile from scratch In-Reply-To: <1484151314.82.0.308427338149.issue29243@psf.upfronthosting.co.za> Message-ID: <1493977492.2.0.417897502092.issue29243@psf.upfronthosting.co.za> Changes by Tomas Orsava : ---------- pull_requests: +1577 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 05:45:01 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 09:45:01 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493977501.29.0.459015753903.issue30264@psf.upfronthosting.co.za> STINNER Victor added the comment: > This changes the behavior if pass a file object to the parser. When the parser failed it was possible to use the passed file object (for example call tell()). Now it is closed. If the high-level *function* parse() is called with a filename, the caller doesn't have access to the file object nor the parser. If you use directly the parser class and pass an open file object, in that case, yes, my change closes the file. If you want to keep the old behaviour for that case, we can change the code to only close the source if source is not a string (not isinstance(source, str)) in the ExpatParser.parse() method. Since the caller owns the file object, (s)he is responsible to close it. Note: on parser success, the source is always closed, even if the user pass an already open file object. I'm not convince that using the file object on parser error and using directly the ExpatParser class is a common use case. I expect that the XML parser reads more data than it needs (read ahead for speed), so I don't think that file.tell() will you exactly the file position where the XML parser failed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 05:56:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 09:56:16 +0000 Subject: [issue30258] [2.7] regrtest: handle child process crash In-Reply-To: <1493821528.82.0.0272255783657.issue30258@psf.upfronthosting.co.za> Message-ID: <1493978176.45.0.350223287898.issue30258@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1578 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 05:56:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 09:56:57 +0000 Subject: [issue30258] [2.7] regrtest: handle child process crash In-Reply-To: <1493821528.82.0.0272255783657.issue30258@psf.upfronthosting.co.za> Message-ID: <1493978217.59.0.87367269277.issue30258@psf.upfronthosting.co.za> STINNER Victor added the comment: > You just pressed the merge button 2 minutes before I finished a review. Oh sorry, I didn't expect a review on this small change. > Do you mind to port changes to 3.x? I created https://github.com/python/cpython/pull/1479 for the run_tests_multiprocess() bugfix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 05:57:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 09:57:03 +0000 Subject: [issue30258] [2.7] regrtest: handle child process crash In-Reply-To: <1493821528.82.0.0272255783657.issue30258@psf.upfronthosting.co.za> Message-ID: <1493978223.52.0.120581773918.issue30258@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 06:00:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 10:00:45 +0000 Subject: [issue30276] import hashlib makes many programs slow In-Reply-To: <1493954623.26.0.714784938457.issue30276@psf.upfronthosting.co.za> Message-ID: <1493978445.08.0.0220675927061.issue30276@psf.upfronthosting.co.za> STINNER Victor added the comment: What is your Python version? It looks like an old version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 06:01:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 10:01:53 +0000 Subject: [issue30276] import hashlib makes many programs slow In-Reply-To: <1493954623.26.0.714784938457.issue30276@psf.upfronthosting.co.za> Message-ID: <1493978513.26.0.617068750879.issue30276@psf.upfronthosting.co.za> STINNER Victor added the comment: What is your OS? Which kind of computer is it? I'm surprised that you noticed open calls on /dev/urandom, it should be very quick, no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 06:12:54 2017 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 May 2017 10:12:54 +0000 Subject: [issue30276] import hashlib makes many programs slow In-Reply-To: <1493954623.26.0.714784938457.issue30276@psf.upfronthosting.co.za> Message-ID: <1493979174.34.0.53020900018.issue30276@psf.upfronthosting.co.za> Christian Heimes added the comment: I rather suspect it's OpenSSL. It takes a bit to load and initialize libcrypto.so. On my system it takes about 17ms to import _hashlib. There is nothing we can do about it in CPython. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 06:29:41 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 05 May 2017 10:29:41 +0000 Subject: [issue23404] 'make touch' does not work with git clones of the source repository In-Reply-To: <1423262765.96.0.527396909.issue23404@psf.upfronthosting.co.za> Message-ID: <1493980181.58.0.364631969225.issue23404@psf.upfronthosting.co.za> Nick Coghlan added the comment: As noted on python-dev, it would be helpful if this change was mentioned in the 2.7, 3.5, and 3.6 What's New documents under a "Notable changes in maintenance releases" section. For 2.7, that would be a retitling of the existing section "New features added to Python 2.7 maintenance releases": https://docs.python.org/dev/whatsnew/2.7.html#new-features-added-to-python-2-7-maintenance-releases For 3.5 and 3.6, this would be a new entry at the end of the document, with "Change to handling of pre-generated files" as the sole subsection. (As another example of an existing section along these lines, see https://docs.python.org/dev/whatsnew/3.4.html#changed-in-3-4-3) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 06:31:29 2017 From: report at bugs.python.org (Matteo Bertini) Date: Fri, 05 May 2017 10:31:29 +0000 Subject: [issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb' In-Reply-To: <1330513271.31.0.437438851478.issue14156@psf.upfronthosting.co.za> Message-ID: <1493980289.8.0.106639712065.issue14156@psf.upfronthosting.co.za> Matteo Bertini added the comment: Bumped in this bug yesterday, sadly a script working (by chance) in Python2 doesn't work in Python3 because of this bug. ---------- nosy: +naufraghi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 06:46:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 10:46:50 +0000 Subject: [issue30264] [Windows] test_sax: Warning -- files was modified by test_sax In-Reply-To: <1493855404.54.0.178478037782.issue30264@psf.upfronthosting.co.za> Message-ID: <1493981210.18.0.640328150699.issue30264@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > If you use directly the parser class and pass an open file object, in that case, yes, my change closes the file. Or if the high-level *function* parse() is called with an open file object. I don't know whether this is desirable change, but this change can break third-party code, therefore it should be documented in Misc/NEWS. And it is worth to add a check in test_parse_bytes that the passed file object is closed after error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 06:47:45 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 05 May 2017 10:47:45 +0000 Subject: [issue30281] set stop default to -PY_SSIZE_T_MAX-1 in PySlice_Unpack Message-ID: <1493981265.53.0.830080121255.issue30281@psf.upfronthosting.co.za> New submission from Xiang Zhang: The default value for stop in PySlice_Unpack should be -PY_SSIZE_T_MAX-1. Otherwise a sequence of length PY_SSIZE_T_MAX could get a wrong slicelength when doing L[::-1]. ---------- components: Interpreter Core messages: 293097 nosy: serhiy.storchaka, xiang.zhang priority: normal severity: normal stage: patch review status: open title: set stop default to -PY_SSIZE_T_MAX-1 in PySlice_Unpack type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 06:50:02 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 05 May 2017 10:50:02 +0000 Subject: [issue30281] set stop default to -PY_SSIZE_T_MAX-1 in PySlice_Unpack In-Reply-To: <1493981265.53.0.830080121255.issue30281@psf.upfronthosting.co.za> Message-ID: <1493981402.64.0.308473115793.issue30281@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1579 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 06:56:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 10:56:04 +0000 Subject: [issue30281] set stop default to -PY_SSIZE_T_MAX-1 in PySlice_Unpack In-Reply-To: <1493981265.53.0.830080121255.issue30281@psf.upfronthosting.co.za> Message-ID: <1493981764.62.0.859972414639.issue30281@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm not sure that -PY_SSIZE_T_MAX-1 always is representable. I would use PY_SSIZE_T_MIN and add a static assert (Py_BUILD_ASSERT) that PY_SSIZE_T_MIN + 1 <= -PY_SSIZE_T_MAX. Actually currently PY_SSIZE_T_MIN is -PY_SSIZE_T_MAX-1 by definition, but this can be changed in future. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 07:09:17 2017 From: report at bugs.python.org (Tomas Orsava) Date: Fri, 05 May 2017 11:09:17 +0000 Subject: [issue29243] --enable-optimizations makes common build commands always need to compile from scratch In-Reply-To: <1484151314.82.0.308427338149.issue29243@psf.upfronthosting.co.za> Message-ID: <1493982557.19.0.288810611805.issue29243@psf.upfronthosting.co.za> Tomas Orsava added the comment: I've opened a PR#1478 that I believe fixes the issue. ---------- nosy: +torsava _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 07:54:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 11:54:51 +0000 Subject: [issue30281] set stop default to -PY_SSIZE_T_MAX-1 in PySlice_Unpack In-Reply-To: <1493981265.53.0.830080121255.issue30281@psf.upfronthosting.co.za> Message-ID: <1493985291.95.0.501019901025.issue30281@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum, integer overflows are complex issues. It deserves an unit test, maybe even in C written in _testcapi? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 08:18:11 2017 From: report at bugs.python.org (Bernhard M. Wiedemann) Date: Fri, 05 May 2017 12:18:11 +0000 Subject: [issue30276] import hashlib makes many programs slow In-Reply-To: <1493954623.26.0.714784938457.issue30276@psf.upfronthosting.co.za> Message-ID: <1493986691.28.0.754480434557.issue30276@psf.upfronthosting.co.za> Bernhard M. Wiedemann added the comment: I'm running openSUSE Tumbleweed with python-2.7.13 and python3-3.6.1 on an Intel Pentium N3530 with linux-4.10.12 There the total time of the "import _hashlib" oneliner varies between 100 and 250 ms (python3 is a bit slower and the machine is slower when running on battery) the urandom calls themselves are not slow, but probably the processing in between. Can't that be done on demand on first use? This is (one minor part of) slowing down python CLI tools like OpenStack's cinder help ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 08:51:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 12:51:07 +0000 Subject: [issue30276] import hashlib makes many programs slow In-Reply-To: <1493986691.28.0.754480434557.issue30276@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > the urandom calls themselves are not slow, but probably the processing in between. Can't that be done on demand on first use? If the time is spent on loading OpenSSL, maybe you should try to import hashlib on demand? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 09:17:33 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 May 2017 13:17:33 +0000 Subject: [issue30262] Don't expose sqlite3 Cache and Statement In-Reply-To: <1493841130.42.0.625787216583.issue30262@psf.upfronthosting.co.za> Message-ID: <1493990253.48.0.729315138656.issue30262@psf.upfronthosting.co.za> R. David Murray added the comment: If these objects have been exposed in the past, we won't simply delete them. At a minimum there would need to be a deprecation period, but is there a real motivation for deleting them? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 09:18:19 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 May 2017 13:18:19 +0000 Subject: [issue30262] Don't expose sqlite3 Cache and Statement In-Reply-To: <1493841130.42.0.625787216583.issue30262@psf.upfronthosting.co.za> Message-ID: <1493990299.6.0.608540201397.issue30262@psf.upfronthosting.co.za> R. David Murray added the comment: Sorry, by "real motivation" I meant something beyond just cleaning up the API...that's a real motivation, it may just not be enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 09:38:09 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 May 2017 13:38:09 +0000 Subject: [issue30268] Make mimetypes.guess_type accept path-like objects In-Reply-To: <1493914086.8.0.9964529869.issue30268@psf.upfronthosting.co.za> Message-ID: <1493991489.44.0.608668803068.issue30268@psf.upfronthosting.co.za> R. David Murray added the comment: Why do you think this is a bug? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 09:40:15 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 May 2017 13:40:15 +0000 Subject: [issue30268] Make mimetypes.guess_type accept path-like objects In-Reply-To: <1493914086.8.0.9964529869.issue30268@psf.upfronthosting.co.za> Message-ID: <1493991615.66.0.708037374041.issue30268@psf.upfronthosting.co.za> R. David Murray added the comment: To clarify my question, I don't think it is a bug, but the fact that you do might mean there needs to be a doc clarification. Or it might not. Or, there might be a desirable enhancement here, maybe relating to the pathlike protocol. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 10:04:02 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 14:04:02 +0000 Subject: [issue30268] Make mimetypes.guess_type accept path-like objects In-Reply-To: <1493914086.8.0.9964529869.issue30268@psf.upfronthosting.co.za> Message-ID: <1493993042.34.0.932378115541.issue30268@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There were issues with mimetypes.guess_type() on Windows in Python 2 (issue9291 and a number of duplicate issues). I afraid that adding support of bytes paths will return the hell from which we ran in Python 3. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 10:21:17 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 05 May 2017 14:21:17 +0000 Subject: [issue30262] Don't expose sqlite3 Cache and Statement In-Reply-To: <1493841130.42.0.625787216583.issue30262@psf.upfronthosting.co.za> Message-ID: <1493994077.99.0.756052179518.issue30262@psf.upfronthosting.co.za> Berker Peksag added the comment: Even if users somehow managed to create Cache and Statement objects themselves, they are basically implementation details of the module and there is no way to use them to mess with the internal state of the module via using the current API (e.g. Cursor.statement is not exposed) ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 10:50:32 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Fri, 05 May 2017 14:50:32 +0000 Subject: [issue24932] Use proper command line parsing in _testembed In-Reply-To: <1440481888.38.0.825081560944.issue24932@psf.upfronthosting.co.za> Message-ID: <1493995832.26.0.0856788056365.issue24932@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Downstream backporting of PEP 538 to the 3.6 branch also depends on this fix. Would it be beneficial in any way to cherry-pick it for 3.6? ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 11:09:35 2017 From: report at bugs.python.org (Ondrej Kubecka) Date: Fri, 05 May 2017 15:09:35 +0000 Subject: [issue30282] object returned by tarfile.extractfile has an incorrect value of name attribute Message-ID: <1493996975.48.0.516954690623.issue30282@psf.upfronthosting.co.za> New submission from Ondrej Kubecka: Consider the following code snippet: import tarfile tar1 = tarfile.open('tar1.tar.gz') file_ = tar1.extractfile('FILE') print(file_.name) Up until 3.2.x, the value of name attribute would be 'FILE' as derived from tarinfo of the member. Starting with 3.3 (commits: b062a2fa 7a919e99) this value be obtained from tarfile.fileobj ("parent" tarball file) and would return 'tar1.tar.gz' instead. This does not seem to be correct as it's not a filename of the ExFileObject / _FileInFile / io.BufferedReader object itself which would otherwise be consistent with values normally found under name. There is also a problem that this information no longer appears to be accessible at all looking at the object returned from extractfile alone. And looking at release notes of 3.3, this does not seem to be intentional effect. ---------- components: Library (Lib) messages: 293111 nosy: Ondrej Kubecka priority: normal severity: normal status: open title: object returned by tarfile.extractfile has an incorrect value of name attribute type: behavior versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 11:35:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 15:35:52 +0000 Subject: [issue29243] --enable-optimizations makes common build commands always need to compile from scratch In-Reply-To: <1484151314.82.0.308427338149.issue29243@psf.upfronthosting.co.za> Message-ID: <1493998552.7.0.844987345344.issue29243@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a1054c3b0037d4c2a5492e79fc193f36245366c7 by Victor Stinner (torsava) in branch 'master': bpo-29243: Fix Makefile with respect to --enable-optimizations (#1478) https://github.com/python/cpython/commit/a1054c3b0037d4c2a5492e79fc193f36245366c7 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 11:39:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 15:39:52 +0000 Subject: [issue29243] --enable-optimizations makes common build commands always need to compile from scratch In-Reply-To: <1484151314.82.0.308427338149.issue29243@psf.upfronthosting.co.za> Message-ID: <1493998792.14.0.908468982089.issue29243@psf.upfronthosting.co.za> STINNER Victor added the comment: I closed my issue #29641 as a duplicate of this one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 11:57:41 2017 From: report at bugs.python.org (Bernhard M. Wiedemann) Date: Fri, 05 May 2017 15:57:41 +0000 Subject: [issue30276] import hashlib makes many programs slow In-Reply-To: <1493954623.26.0.714784938457.issue30276@psf.upfronthosting.co.za> Message-ID: <1493999861.9.0.0606405581705.issue30276@psf.upfronthosting.co.za> Bernhard M. Wiedemann added the comment: This might work in some places, but if you look at real-world users like urllib3/util/ssl_.py > from hashlib import md5, sha1, sha256 or twisted/words/protocols/jabber/xmlstream.py > from hashlib import sha1 It would probably not need any openssl at all, but still gets the full penalty time from the import. So you get all or nothing. It would be nice to just get access to those few hashes you need for your protocal (because you certainly do not want to reimplement it). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 11:59:37 2017 From: report at bugs.python.org (ProgVal) Date: Fri, 05 May 2017 15:59:37 +0000 Subject: [issue30268] Make mimetypes.guess_type accept path-like objects In-Reply-To: <1493914086.8.0.9964529869.issue30268@psf.upfronthosting.co.za> Message-ID: <1493999977.36.0.36086220358.issue30268@psf.upfronthosting.co.za> ProgVal added the comment: @r.david.murray I don't think it's a bug either, but a possible enhancement. @serhiy.storchaka We could simply do this: if isinstance(url, bytes): url = os.fsdecode(url) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 12:02:36 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 05 May 2017 16:02:36 +0000 Subject: [issue30281] set stop default to -PY_SSIZE_T_MAX-1 in PySlice_Unpack In-Reply-To: <1493981265.53.0.830080121255.issue30281@psf.upfronthosting.co.za> Message-ID: <1494000156.42.0.327515615256.issue30281@psf.upfronthosting.co.za> Xiang Zhang added the comment: I am okay to use PY_SSIZE_T_MIN. But if we are worried about future change of PY_SSIZE_T_MIN, seems we also need to change the API doc of PySlice_Unpack(). Although _PyEval_SliceIndex's comment says it clips value to -PY_SSIZE_T_MAX-1, actually it uses PyNumber_AsSize_t and clips value to PY_SSIZE_T_MIN. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 12:08:52 2017 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 May 2017 16:08:52 +0000 Subject: [issue30276] import hashlib makes many programs slow In-Reply-To: <1493999861.9.0.0606405581705.issue30276@psf.upfronthosting.co.za> Message-ID: Christian Heimes added the comment: If import of hashlib is slowed down by OpenSSL, then import of ssl module will be even slower. Am 5. Mai 2017 17:57:41 MESZ schrieb "Bernhard M. Wiedemann" : > >Bernhard M. Wiedemann added the comment: > >This might work in some places, but if you look at real-world users >like >urllib3/util/ssl_.py >> from hashlib import md5, sha1, sha256 > >or >twisted/words/protocols/jabber/xmlstream.py >> from hashlib import sha1 > >It would probably not need any openssl at all, but still gets the full >penalty time from the import. >So you get all or nothing. >It would be nice to just get access to those few hashes you need for >your protocal (because you certainly do not want to reimplement it). > >---------- > >_______________________________________ >Python tracker > >_______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 12:13:35 2017 From: report at bugs.python.org (Neil Schemenauer) Date: Fri, 05 May 2017 16:13:35 +0000 Subject: [issue30192] hashlib module breaks with 64-bit kernel and 32-bit user space In-Reply-To: <1493328003.41.0.178410988374.issue30192@psf.upfronthosting.co.za> Message-ID: <1494000815.96.0.218987519581.issue30192@psf.upfronthosting.co.za> Neil Schemenauer added the comment: It should be backported in my opinion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 12:21:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 16:21:10 +0000 Subject: [issue30223] Add Lib/test/__main__.py in 2.7 In-Reply-To: <1493708216.05.0.00341541887295.issue30223@psf.upfronthosting.co.za> Message-ID: <1494001270.26.0.21615631809.issue30223@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Victor for fixing this bug. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 12:23:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 16:23:09 +0000 Subject: [issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7 Message-ID: <1494001389.01.0.0290337792937.issue30283@psf.upfronthosting.co.za> New submission from STINNER Victor: I would like to continue to backport enhancements of regrtest from master to 2.7. In master, regrtest has so many super useful features! This week, Serhiy and me backported some basic features, but we introduced regressions. I now would like to backport test_regrtest to reduce risk of breaking things (like buildbots and the Python CI). ---------- components: Tests messages: 293120 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: [2.7] Backport test_regrtest (partially) on Python 2.7 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 12:23:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 16:23:16 +0000 Subject: [issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7 In-Reply-To: <1494001389.01.0.0290337792937.issue30283@psf.upfronthosting.co.za> Message-ID: <1494001396.81.0.607663559378.issue30283@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- assignee: -> haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 12:27:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 16:27:13 +0000 Subject: [issue30284] Build CPython out of tree with a read-only source tree Message-ID: <1494001633.16.0.215498233114.issue30284@psf.upfronthosting.co.za> New submission from STINNER Victor: I tried to build CPython out of the source tree with a customized read-only source tree (chmod -R -w). I got an error when running tests: tests want to write into a build/ directory... in the source tree. Attached patch fixes this issue. ---------- components: Build messages: 293121 nosy: haypo priority: normal severity: normal status: open title: Build CPython out of tree with a read-only source tree versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 12:27:44 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 16:27:44 +0000 Subject: [issue30284] Build CPython out of tree with a read-only source tree In-Reply-To: <1494001633.16.0.215498233114.issue30284@psf.upfronthosting.co.za> Message-ID: <1494001664.54.0.144857420203.issue30284@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 12:34:30 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 May 2017 16:34:30 +0000 Subject: [issue30274] Make importlib.abc.ExtensionFileLoader.__init__() documentation match code In-Reply-To: <1493936689.45.0.0881901800669.issue30274@psf.upfronthosting.co.za> Message-ID: <1494002070.38.0.824597763753.issue30274@psf.upfronthosting.co.za> Brett Cannon added the comment: Another option is to rename 'name' to 'fullname', make 'name' keyword-only, and then raise a DeprecationWarning if 'name' is used, eventually removing the keyword-only argument. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 12:36:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 16:36:52 +0000 Subject: [issue30284] Build CPython out of tree with a read-only source tree In-Reply-To: <1494001633.16.0.215498233114.issue30284@psf.upfronthosting.co.za> Message-ID: <1494002212.16.0.915454888442.issue30284@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1581 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 12:38:14 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 05 May 2017 16:38:14 +0000 Subject: [issue30192] hashlib module breaks with 64-bit kernel and 32-bit user space In-Reply-To: <1493328003.41.0.178410988374.issue30192@psf.upfronthosting.co.za> Message-ID: <1494002294.1.0.813315462742.issue30192@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: patch review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 12:42:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 16:42:42 +0000 Subject: [issue30276] import hashlib makes many programs slow In-Reply-To: <1493954623.26.0.714784938457.issue30276@psf.upfronthosting.co.za> Message-ID: <1494002562.85.0.674351292147.issue30276@psf.upfronthosting.co.za> STINNER Victor added the comment: I ran a quick benchmark on my laptop, Fedora 25: haypo at selma$ python3 -m perf command -o ref.json -- python3 -c 'pass' && python3 -m perf command -o hashlib.json -- python3 -c 'import hashlib' && python3 -m perf compare_to ref.json hashlib.json --table +-----------+---------+------------------------------+ | Benchmark | ref | hashlib | +===========+=========+==============================+ | command | 26.7 ms | 30.2 ms: 1.13x slower (+13%) | +-----------+---------+------------------------------+ Importing hashlib only takes 3.5 ms on my laptop. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 12:47:27 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 May 2017 16:47:27 +0000 Subject: [issue30270] Remove sqlite3.Cache display method In-Reply-To: <1493923794.77.0.260659079397.issue30270@psf.upfronthosting.co.za> Message-ID: <1494002847.34.0.0960302577664.issue30270@psf.upfronthosting.co.za> Brett Cannon added the comment: With over 10 years of existence for that method, I can guarantee you someone relies on it, and so we should do a reasonable job to avoid breaking them without at least some warning first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 12:59:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 16:59:15 +0000 Subject: [issue30284] Build CPython out of tree with a read-only source tree In-Reply-To: <1494001633.16.0.215498233114.issue30284@psf.upfronthosting.co.za> Message-ID: <1494003555.13.0.784022084362.issue30284@psf.upfronthosting.co.za> STINNER Victor added the comment: Ah, there is one and only one failing test: ====================================================================== ERROR: test_synopsis_sourceless (test.test_pydoc.PydocDocTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/haypo/prog/python/ro.master/Lib/test/test_pydoc.py", line 586, in test_synopsis_sourceless synopsis = pydoc.synopsis(filename) File "/home/haypo/prog/python/ro.master/Lib/pydoc.py", line 253, in synopsis mtime = os.stat(filename).st_mtime FileNotFoundError: [Errno 2] No such file or directory: '/home/haypo/prog/python/ro.master/Lib/__pycache__/os.cpython-37.pyc' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 13:00:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 May 2017 17:00:21 +0000 Subject: [issue30284] Build CPython out of tree with a read-only source tree In-Reply-To: <1494001633.16.0.215498233114.issue30284@psf.upfronthosting.co.za> Message-ID: <1494003621.84.0.0347384854724.issue30284@psf.upfronthosting.co.za> STINNER Victor added the comment: test_synopsis_sourceless() should create a script, build it and test the generated .pyc file. So we control how the .pyc file is created. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 13:02:59 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 17:02:59 +0000 Subject: [issue30285] Optimize case-insensitive regular expressions Message-ID: <1494003779.18.0.0568506065862.issue30285@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Matching and searching case-insensitive regular expressions is much slower than matching and searching case-sensitive regular expressions. Case-insensitivity requires converting every character in input string to lower case and disables some optimizations. But there are only 2669 cased characters (52 in ASCII mode). For all other characters in the pattern we can use case-sensitive matching. Results of microbenchmarks: $ ./python -m timeit -s "import re; p = re.compile(r'(?ai) +x'); s = ' '*10000+'x'" "p.match(s)" Unpatched: 5000 loops, best of 5: 47.1 usec per loop Patched: 20000 loops, best of 5: 17.6 usec per loop $ ./python -m timeit -s "import re; p = re.compile(r'(?i) +x'); s = ' '*10000+'x'" "p.match(s)" Unpatched: 2000 loops, best of 5: 109 usec per loop Patched: 20000 loops, best of 5: 17.6 usec per loop $ ./python -m timeit -s "import re; p = re.compile(r'(?ai)[ \t]+x'); s = ' '*10000+'x'" "p.match(s)" Unpatched: 500 loops, best of 5: 537 usec per loop Patched: 5000 loops, best of 5: 84.2 usec per loop $ ./python -m timeit -s "import re; p = re.compile(r'(?i)[ \t]+x'); s = ' '*10000+'x'" "p.match(s)" Unpatched: 500 loops, best of 5: 608 usec per loop Patched: 5000 loops, best of 5: 84.1 usec per loop $ ./python -m timeit -s "import re; p = re.compile(r'(?ai)/x'); s = ' '*10000+'/x'" "p.search(s)" Unpatched: 1000 loops, best of 5: 226 usec per loop Patched: 20000 loops, best of 5: 13.4 usec per loop $ ./python -m timeit -s "import re; p = re.compile(r'(?i)/x'); s = ' '*10000+'/x'" "p.search(s)" Unpatched: 1000 loops, best of 5: 284 usec per loop Patched: 20000 loops, best of 5: 13.4 usec per loop $ ./python -m timeit -s "import re; p = re.compile(r'(?ai)[/%]x'); s = ' '*10000+'/x'" "p.search(s)" Unpatched: 500 loops, best of 5: 483 usec per loop Patched: 1000 loops, best of 5: 279 usec per loop $ ./python -m timeit -s "import re; p = re.compile(r'(?i)[/%]x'); s = ' '*10000+'/x'" "p.search(s)" Unpatched: 500 loops, best of 5: 549 usec per loop Patched: 1000 loops, best of 5: 279 usec per loop The patch also optimizes searching some complex case-sensitive patterns. This is a side effect, I'll provide more comprehensive optimization in other issue. $ ./python -m timeit -s "import re; p = re.compile(r'([xy])'); s = ' '*10000+'x'" "p.search(s)" Unpatched: 500 loops, best of 5: 633 usec per loop Patched: 1000 loops, best of 5: 250 usec per loop $ ./python -m timeit -s "import re; p = re.compile(r'((x|y)z)'); s = ' '*10000+'xz'" "p.search(s)" Unpatched: 500 loops, best of 5: 716 usec per loop Patched: 1000 loops, best of 5: 250 usec per loop ---------- assignee: serhiy.storchaka components: Library (Lib), Regular Expressions messages: 293127 nosy: ezio.melotti, mrabarnett, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Optimize case-insensitive regular expressions type: performance versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 13:17:13 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 May 2017 17:17:13 +0000 Subject: [issue30262] Don't expose sqlite3 Cache and Statement In-Reply-To: <1493841130.42.0.625787216583.issue30262@psf.upfronthosting.co.za> Message-ID: <1494004633.01.0.548072471413.issue30262@psf.upfronthosting.co.za> R. David Murray added the comment: That's the same motivation, not a new one :) Someone somewhere may be using them for something, they've been around for a long time. I hope not, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 13:18:32 2017 From: report at bugs.python.org (Bernhard M. Wiedemann) Date: Fri, 05 May 2017 17:18:32 +0000 Subject: [issue30276] import hashlib makes many programs slow In-Reply-To: <1493954623.26.0.714784938457.issue30276@psf.upfronthosting.co.za> Message-ID: <1494004712.67.0.460785074984.issue30276@psf.upfronthosting.co.za> Bernhard M. Wiedemann added the comment: getting to a similar size on Debian, so I'll move this into the openSUSE bugtracker to find out why it is so slow there. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 13:18:48 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 May 2017 17:18:48 +0000 Subject: [issue30270] Remove sqlite3.Cache display method In-Reply-To: <1493923794.77.0.260659079397.issue30270@psf.upfronthosting.co.za> Message-ID: <1494004728.28.0.376982482979.issue30270@psf.upfronthosting.co.za> R. David Murray added the comment: If it is there for debugging, why would we want to remove it? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 13:22:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 17:22:03 +0000 Subject: [issue30285] Optimize case-insensitive regular expressions In-Reply-To: <1494003779.18.0.0568506065862.issue30285@psf.upfronthosting.co.za> Message-ID: <1494004923.98.0.80593604579.issue30285@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1582 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 13:41:33 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 05 May 2017 17:41:33 +0000 Subject: [issue30231] test_imaplib needs a TLS server accepting self-signed certificates In-Reply-To: <1493736284.13.0.622029485806.issue30231@psf.upfronthosting.co.za> Message-ID: <1494006093.44.0.944909447251.issue30231@psf.upfronthosting.co.za> Berker Peksag added the comment: I'd suggest marking them with @unittest.expectedFailure as an alternative way to move forward. ---------- nosy: +berker.peksag stage: -> patch review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 13:41:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 17:41:48 +0000 Subject: [issue30248] Using boolean arguments in the _json module In-Reply-To: <1493800695.72.0.112994453765.issue30248@psf.upfronthosting.co.za> Message-ID: <1494006108.25.0.926068831445.issue30248@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Initially I was going to add explicit bool() calls in Python implementations, so that Python and C implementation behave the same in case of non-constant options. But then I figured out that is behavior is insane and we shouldn't guarantee anything in this case. If we don't bother to satisfy matching the behavior in Python and C implementations, this change is not worth to be mentioned in Misc/NEWS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 14:26:05 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 05 May 2017 18:26:05 +0000 Subject: [issue30272] distutils.version.LooseVersion's compare raises exception in corner-case In-Reply-To: <1493927689.09.0.0396614156141.issue30272@psf.upfronthosting.co.za> Message-ID: <1494008765.89.0.289268244634.issue30272@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report. This is a duplicate of issue 14894. ---------- nosy: +berker.peksag resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> distutils.LooseVersion fails to compare number and a word _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 14:46:54 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 05 May 2017 18:46:54 +0000 Subject: [issue30262] Don't expose sqlite3 Cache and Statement In-Reply-To: <1493841130.42.0.625787216583.issue30262@psf.upfronthosting.co.za> Message-ID: <1494010014.0.0.199090624669.issue30262@psf.upfronthosting.co.za> Berker Peksag added the comment: > Someone somewhere may be using them for something, they've been around for a long time. Well, you can use the same argument for every issue on the tracker. People can even rely on real bugs that are still open for 10 years, but that doesn't mean they shouldn't be fixed. In this case, your argument looks a bit hypothetical to me. I can't think of valid usages of these objects (I understand people can abuse Python's dynamic nature, but still... :)) You've obviously spent much more time working on sqlite3 than me so I wonder how can they can be useful to third party users :) (e.g. can someone use them for some reason to test their enhanced version of pydoc's extension module support?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 14:59:55 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 05 May 2017 18:59:55 +0000 Subject: [issue30286] ctypes FreeLibrary fails on Windows 64-bit Message-ID: <1494010795.37.0.519448367815.issue30286@psf.upfronthosting.co.za> New submission from Giampaolo Rodola': >>> import ctypes >>> path = 'C:\\Python35-64\\vcruntime140.dll' >>> cfile = ctypes.CDLL(path) >>> cfile._handle 140736170229760 >>> ctypes.windll.kernel32.FreeLibrary(cfile._handle) Traceback (most recent call last): ctypes.windll.kernel32.FreeLibrary(cfile._handle) ctypes.ArgumentError: argument 1: : int too long to convert Everything is fine on 32-bit. ---------- components: ctypes messages: 293135 nosy: giampaolo.rodola priority: normal severity: normal status: open title: ctypes FreeLibrary fails on Windows 64-bit versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 15:00:38 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 05 May 2017 19:00:38 +0000 Subject: [issue30286] ctypes FreeLibrary fails on Windows 64-bit In-Reply-To: <1494010795.37.0.519448367815.issue30286@psf.upfronthosting.co.za> Message-ID: <1494010838.55.0.873884661255.issue30286@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +amaury.forgeotdarc, belopolsky, meador.inge, theller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 15:08:55 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 05 May 2017 19:08:55 +0000 Subject: [issue30286] ctypes FreeLibrary fails on Windows 64-bit In-Reply-To: <1494010795.37.0.519448367815.issue30286@psf.upfronthosting.co.za> Message-ID: <1494011335.58.0.17324461336.issue30286@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: http://stackoverflow.com/questions/23522055/error-when-unload-a-64bit-dll-using-ctypes-windll Adding "ctypes.windll.kernel32.FreeLibrary.argtypes = [wintypes.HMODULE]" fixes the issue. This works: import ctypes from ctypes import wintypes path = 'C:\\Python35-64\\vcruntime140.dll' cfile = ctypes.CDLL(path) print(cfile._handle) ctypes.windll.kernel32.FreeLibrary.argtypes = [wintypes.HMODULE] ctypes.windll.kernel32.FreeLibrary(cfile._handle) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 15:11:57 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 05 May 2017 19:11:57 +0000 Subject: [issue30270] Remove sqlite3.Cache display method In-Reply-To: <1493923794.77.0.260659079397.issue30270@psf.upfronthosting.co.za> Message-ID: <1494011517.68.0.850409582227.issue30270@psf.upfronthosting.co.za> Berker Peksag added the comment: FWIW, I agree with Brett and David. Did you try to use it? I prefer to fix it even if it's broken at the moment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 15:19:05 2017 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 May 2017 19:19:05 +0000 Subject: [issue30282] object returned by tarfile.extractfile has an incorrect value of name attribute In-Reply-To: <1493996975.48.0.516954690623.issue30282@psf.upfronthosting.co.za> Message-ID: <1494011945.7.0.871134623726.issue30282@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +1583 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 15:40:11 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 05 May 2017 19:40:11 +0000 Subject: [issue29302] add contextlib.AsyncExitStack In-Reply-To: <1484693382.32.0.211448130443.issue29302@psf.upfronthosting.co.za> Message-ID: <1494013211.02.0.912504702046.issue29302@psf.upfronthosting.co.za> Yury Selivanov added the comment: Overall, the approach looks fine. Alexander, do you want to make a PR to start working on adding this to 3.7? ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 16:36:09 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 May 2017 20:36:09 +0000 Subject: [issue30282] object returned by tarfile.extractfile has an incorrect value of name attribute In-Reply-To: <1493996975.48.0.516954690623.issue30282@psf.upfronthosting.co.za> Message-ID: <1494016569.03.0.94241820806.issue30282@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +lars.gustaebel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 17:20:27 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 May 2017 21:20:27 +0000 Subject: [issue30275] pickle doesn't work in compile/exec In-Reply-To: <1493943605.77.0.767455241721.issue30275@psf.upfronthosting.co.za> Message-ID: <1494019227.15.0.439703775378.issue30275@psf.upfronthosting.co.za> Brett Cannon added the comment: It won't work without the global namespace as pickle needs to be able to figure out where the function lives (the function itself doesn't get pickled, just the name of the function). ---------- nosy: +brett.cannon resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 17:24:03 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 May 2017 21:24:03 +0000 Subject: [issue30267] Deprecate os.path.commonprefix In-Reply-To: <1493913753.36.0.555235038331.issue30267@psf.upfronthosting.co.za> Message-ID: <1494019443.44.0.92220646395.issue30267@psf.upfronthosting.co.za> Brett Cannon added the comment: I agree with Serhiy that it might be time to create a seqtools module. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 17:27:14 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 May 2017 21:27:14 +0000 Subject: [issue30218] shutil.unpack_archive doesn't support PathLike In-Reply-To: <1493589048.1.0.871428133703.issue30218@psf.upfronthosting.co.za> Message-ID: <1494019634.85.0.826341577308.issue30218@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset a12df7b7d40dbf47825917c8fa03d2c09b5a382c by Brett Cannon (Jelle Zijlstra) in branch 'master': bpo-30218: support path-like objects in shutil.unpack_archive() (GH-1367) https://github.com/python/cpython/commit/a12df7b7d40dbf47825917c8fa03d2c09b5a382c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 17:27:43 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 May 2017 21:27:43 +0000 Subject: [issue30218] shutil.unpack_archive doesn't support PathLike In-Reply-To: <1493589048.1.0.871428133703.issue30218@psf.upfronthosting.co.za> Message-ID: <1494019663.02.0.550501172728.issue30218@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 17:27:58 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 May 2017 21:27:58 +0000 Subject: [issue30218] shutil.unpack_archive doesn't support PathLike In-Reply-To: <1493589048.1.0.871428133703.issue30218@psf.upfronthosting.co.za> Message-ID: <1494019678.9.0.688279136723.issue30218@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks for the patch (and patience), Jelle! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 17:53:15 2017 From: report at bugs.python.org (Martin Panter) Date: Fri, 05 May 2017 21:53:15 +0000 Subject: [issue4755] Add function to get common path prefix In-Reply-To: <1230350435.61.0.221193783724.issue4755@psf.upfronthosting.co.za> Message-ID: <1494021195.54.0.0856966203.issue4755@psf.upfronthosting.co.za> Martin Panter added the comment: Issue 10395 added ?os.path.commonpath? in 3.5. ---------- nosy: +martin.panter resolution: -> duplicate stage: patch review -> resolved status: languishing -> closed superseder: -> new os.path function to extract common prefix based on path components _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 17:57:14 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 May 2017 21:57:14 +0000 Subject: [issue30262] Don't expose sqlite3 Cache and Statement In-Reply-To: <1493841130.42.0.625787216583.issue30262@psf.upfronthosting.co.za> Message-ID: <1494021434.63.0.650631956412.issue30262@psf.upfronthosting.co.za> R. David Murray added the comment: No, I'm arguing purely from a generic backward compatibility perspective. There does not seem to be me be sufficient benefit to removing them to justify doing it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 18:01:33 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 May 2017 22:01:33 +0000 Subject: [issue30217] Missing entry for the tilde (~) operator in the Index In-Reply-To: <1493582160.76.0.882487661277.issue30217@psf.upfronthosting.co.za> Message-ID: <1494021693.14.0.109691274817.issue30217@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +terry.reedy versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 18:06:10 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 May 2017 22:06:10 +0000 Subject: [issue30220] Why are custom messages for ValueError, TypeError suppressed in argparse? In-Reply-To: <1493655591.13.0.717623445702.issue30220@psf.upfronthosting.co.za> Message-ID: <1494021970.46.0.350089824494.issue30220@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> test needed title: Why are the custom messages for ValueError and TypeError suppressed in argparse? -> Why are custom messages for ValueError, TypeError suppressed in argparse? versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 18:11:14 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 May 2017 22:11:14 +0000 Subject: [issue30238] 2to3 doesn't detect or fix Exception indexing In-Reply-To: <1493753516.03.0.383972145792.issue30238@psf.upfronthosting.co.za> Message-ID: <1494022274.73.0.774146754026.issue30238@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +benjamin.peterson stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 18:13:21 2017 From: report at bugs.python.org (=?utf-8?b?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?=) Date: Fri, 05 May 2017 22:13:21 +0000 Subject: [issue30287] cpython and Clang Static Analyzer Message-ID: <1494022401.59.0.120432906774.issue30287@psf.upfronthosting.co.za> New submission from ????? ????????: I compiled cpython using Clang 4.0 Static Analyzer with scan-build ./configure --enable-loadable-sqlite-extensions --enable-ipv6 --with-system-expat --with-system-ffi --with-system-libmpdec scan-build make and here are the results https://mail.aegee.org/dpa/scan-build-python-a1054c3b00/ Please note, that the information is only about what gets actually compiled, code disabled by #if .. #endif is not considered (e.g. when determining whether a variable assignment is useless). There are probably some false-positives. Consider this as information, I do not pretend there are any bugs found by the static analyzer. ---------- messages: 293145 nosy: dilyan.palauzov priority: normal severity: normal status: open title: cpython and Clang Static Analyzer type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 18:16:18 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 May 2017 22:16:18 +0000 Subject: [issue30251] Windows Visual Studio solution does not have an install target In-Reply-To: <1493805308.24.0.584899845977.issue30251@psf.upfronthosting.co.za> Message-ID: <1494022578.35.0.817181592253.issue30251@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 18:17:25 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 May 2017 22:17:25 +0000 Subject: [issue30252] Configuration system does not work for Windows/Visual Studio In-Reply-To: <1493805691.1.0.682843236937.issue30252@psf.upfronthosting.co.za> Message-ID: <1494022645.8.0.545558165032.issue30252@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware stage: -> test needed type: -> enhancement versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 18:18:16 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 May 2017 22:18:16 +0000 Subject: [issue30253] Python does not build without WITH_THREADS defined on Windows/Visual Studio In-Reply-To: <1493806200.91.0.0331403501702.issue30253@psf.upfronthosting.co.za> Message-ID: <1494022696.86.0.434727019549.issue30253@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 19:38:45 2017 From: report at bugs.python.org (DenSA-Inc) Date: Fri, 05 May 2017 23:38:45 +0000 Subject: [issue30288] ssl.wrap_ssl will fail on do_handshake if default parameters are supplied by user Message-ID: <1494027525.33.0.822182237835.issue30288@psf.upfronthosting.co.za> New submission from DenSA-Inc: After a big problem with the newest ejabberd-version and sleekxmpp I located the problem in ssl.wrap_socket. When called with no parameters the later do_handshake (method of ssl.SSLSocket) fails with an exception. When called with keyword-parameters which match the default values (except for do_handshake_on_connect), do_handshake will fail when called after that. Once I have time I will edit this post to add the required information here, but for now I refer to the issue filed on github: https://github.com/fritzy/SleekXMPP/issues/452 The important information is in comments 2 and 3. ---------- assignee: christian.heimes components: SSL messages: 293146 nosy: botter, christian.heimes priority: normal severity: normal status: open title: ssl.wrap_ssl will fail on do_handshake if default parameters are supplied by user type: crash versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 20:43:24 2017 From: report at bugs.python.org (DenSA-Inc) Date: Sat, 06 May 2017 00:43:24 +0000 Subject: [issue30288] ssl.wrap_ssl will fail on do_handshake if default parameters are supplied by user In-Reply-To: <1494027525.33.0.822182237835.issue30288@psf.upfronthosting.co.za> Message-ID: <1494031404.97.0.591816787114.issue30288@psf.upfronthosting.co.za> DenSA-Inc added the comment: I just realised that the server stopped supporting TLS-v1.0 and the code still tried to establish a TLS-v1.0-connection. Yet the server responded with TLS-v1.2. So no bug here. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 22:24:14 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 May 2017 02:24:14 +0000 Subject: [issue30263] regrtest: log the system load? In-Reply-To: <1493852971.75.0.704908002937.issue30263@psf.upfronthosting.co.za> Message-ID: <1494037454.15.0.54151040467.issue30263@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I have a 6 core, 12 cpu Pentium. I previously stopped with -j10. Reading the above, I tried -j14 and -j18. Times for one run on a quiet system of 'test -jnn -ugui' with a fresh download and debug build were 3:55 (-j10), 3:48, and 3:53. Not much affect. A more promising source of reduced running time on this system is shown by the last 4 finish times: 2:42 tarfile (:42), 3:13 zipfile (:43), 3:16 venv (:54), and 3:48 multiprocessing_spawn (2:29). If m._s. were split into files taking at most 40 seconds, I suspect the total running time would be perhaps 20 seconds less due to better CPU utilization. Currently, the total running time could be from about 30 seconds less to about 2 minutes more depending on when m._s. starts in a randomized run. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 22:48:30 2017 From: report at bugs.python.org (Eryk Sun) Date: Sat, 06 May 2017 02:48:30 +0000 Subject: [issue30286] ctypes FreeLibrary fails on Windows 64-bit In-Reply-To: <1494010795.37.0.519448367815.issue30286@psf.upfronthosting.co.za> Message-ID: <1494038910.93.0.229542195329.issue30286@psf.upfronthosting.co.za> Eryk Sun added the comment: It's documented that the default conversion for integer arguments is a 32-bit C int, which is also the default for result types. Whenever pointers (and Windows handles, which are sometimes 64-bit pointers, such as HMODULE values) are passed as arguments, integer values either need to be manually wrapped as ctypes pointer instances, or you need to set the function's argtypes to override the default behavior. Whenever a pointer is returned, you must set the function's restype. BTW, _ctypes.FreeLibrary and _ctypes.dlclose already exist as built-in functions. They're just not imported to the main ctypes namespace, most likely because there's nothing in the design to prevent crashing Python if the shared library's reference count drops to 0 and the loader unmaps it from the process while there's remaining references to its address range. Also, I recommend using ctypes.WinDLL and avoiding ctypes.windll, especially for common Windows APIs. It caches libraries, which cache function pointer instances. What if my library also uses it and customizes FreeLibrary.argtypes or FreeLibrary.errcheck in a way that breaks yours? It also doesn't allow setting use_last_error=True to capture the last error value in a thread-local variable that can be accessed via ctypes.get_last_error() and ctypes.set_last_error(). Capturing the last error value is a good idea in a high-level language like Python -- especially when working interactively in the REPL. This way ctypes.WinError(ctypes.get_last_error()) will reliable create an exception for whatever the error value was for the last FFI call. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 23:03:00 2017 From: report at bugs.python.org (Pedro) Date: Sat, 06 May 2017 03:03:00 +0000 Subject: [issue30220] Why are custom messages for ValueError, TypeError suppressed in argparse? In-Reply-To: <1493655591.13.0.717623445702.issue30220@psf.upfronthosting.co.za> Message-ID: <1494039780.32.0.788090626274.issue30220@psf.upfronthosting.co.za> Pedro added the comment: Paul, There are a number of scenarios in which you need to check a value and not just a type. For instance, I have a tool with several command-line arguments that need to be *nonnegative* integers, and a call to int() would not catch that. Many other utilities that ask for an argument of "how many times do you want to do X?" only make sense if you provide a nonnegative number. Entering dates is another one. There is no callable in the datetime module or built-in that takes only one argument that can be used to validate a date. And if you write your own, you may need to make sure the date is within a specified range: only in the future, only in the past, no more/fewer than X days away from today, etc. My tool receives a date to execute a database query in the form of "select * from table where created_date >= argument_date." I can perform the validation further into the script, but performing as much validation up front when the arguments are parsed allows you to fail more quickly in the case of invalid input. I can understand that ArgumentTypeError is available to be used when there is a problem with the arguments' type. But disallowing the use of custom messages in TypeError and ValueError seems like an arbitrary restriction with no pros and at least some cons. I assume that this was not an arbitrary decision and there really was a reason for it, but I can't see what that reason is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 23:41:10 2017 From: report at bugs.python.org (=?utf-8?b?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?=) Date: Sat, 06 May 2017 03:41:10 +0000 Subject: [issue30289] make distclean and Misc/python-config.sh Message-ID: <1494042070.28.0.252520928526.issue30289@psf.upfronthosting.co.za> New submission from ????? ????????: 'make distclean' forgets to delete Misc/python-config.sh . ---------- messages: 293151 nosy: dilyan.palauzov priority: normal severity: normal status: open title: make distclean and Misc/python-config.sh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 5 23:41:21 2017 From: report at bugs.python.org (=?utf-8?b?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?=) Date: Sat, 06 May 2017 03:41:21 +0000 Subject: [issue30289] make distclean and Misc/python-config.sh In-Reply-To: <1494042070.28.0.252520928526.issue30289@psf.upfronthosting.co.za> Message-ID: <1494042081.52.0.988473769652.issue30289@psf.upfronthosting.co.za> Changes by ????? ???????? : ---------- components: +Build _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 01:03:19 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 May 2017 05:03:19 +0000 Subject: [issue30290] IDLE: add tests for help_about.py Message-ID: <1494046999.85.0.702748551727.issue30290@psf.upfronthosting.co.za> New submission from Terry J. Reedy: Initial plan. 1a. Change AboutDialog to mimic query.Query with respect to _utest and suppression of dialog display and waiting. 1b. Create AboutDialog instance. 2a. Change textview.TextViewer as with AboutDialog. Also change textview functions and AboutDialog methods to pass on _utest. 2b. Simulate keyclicks on buttons and test that root gains appropriate child. Then destroy it. 3. At some point, remove dead code and change now incorrect encoding comment. Separate issue: add simulated button click tests to test_textview and other popup dialogs. Directly calling commands does not test that buttons invoke the right command. ---------- assignee: terry.reedy components: IDLE messages: 293152 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: add tests for help_about.py type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 05:57:32 2017 From: report at bugs.python.org (Steve Barnes) Date: Sat, 06 May 2017 09:57:32 +0000 Subject: [issue30291] Allow windows launcher to specify bit lengths with & without minor version Message-ID: <1494064652.52.0.930357680293.issue30291@psf.upfronthosting.co.za> New submission from Steve Barnes: Currently you can use, assuming all are installed: py -2 # gets the latest python 2 with 64 bit as the default py -2.7 # gets python 2.7 with 64 bit as the default py -2.7-32 # gets -32 bit python 2.7 py -3 # gets the latest python 3 with 64 bit as the default py -3.5 # gets python 3.5 with 64 bit as the default py -3.5-32 # gets -32 bit python 3.5 But you cannot use: py -2-32 # Usage Error but would be handy for the latest 32 bit python 2 py -3-32 # Usage Error but would be handy for the latest 32 bit python 3 Note that you also cannot use: py -3.5-64 # Unknown option: -3 would be handy for testing with I need 64 bit python 3.5 with an error if it doesn't exist currently -3.5 defaults to 3.5 64 bit if available 32 bit otherwise. For testing packages and programs it would be very useful to be able to specify any of: - Latest available 32 bit python 2 or 3 - 64 bit python 3 fail if unavailable. ---------- messages: 293153 nosy: Steve Barnes priority: normal severity: normal status: open title: Allow windows launcher to specify bit lengths with & without minor version type: enhancement versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 07:13:01 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 May 2017 11:13:01 +0000 Subject: [issue26293] Embedded zipfile fields dependent on absolute position In-Reply-To: <1454662355.53.0.48718125489.issue26293@psf.upfronthosting.co.za> Message-ID: <1494069181.61.0.0917149362009.issue26293@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1584 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 07:13:01 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 May 2017 11:13:01 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1494069181.75.0.208009454274.issue29094@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1585 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 07:46:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 May 2017 11:46:03 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1494071163.63.0.44413634287.issue29094@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 3763ea865cee5bbabcce11cd577811135e0fc747 by Serhiy Storchaka in branch 'master': Revert bpo-26293 for zipfile breakage. See also bpo-29094. (#1484) https://github.com/python/cpython/commit/3763ea865cee5bbabcce11cd577811135e0fc747 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 07:46:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 May 2017 11:46:03 +0000 Subject: [issue26293] Embedded zipfile fields dependent on absolute position In-Reply-To: <1454662355.53.0.48718125489.issue26293@psf.upfronthosting.co.za> Message-ID: <1494071163.88.0.043863201766.issue26293@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 3763ea865cee5bbabcce11cd577811135e0fc747 by Serhiy Storchaka in branch 'master': Revert bpo-26293 for zipfile breakage. See also bpo-29094. (#1484) https://github.com/python/cpython/commit/3763ea865cee5bbabcce11cd577811135e0fc747 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 07:54:20 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 May 2017 11:54:20 +0000 Subject: [issue26293] Embedded zipfile fields dependent on absolute position In-Reply-To: <1454662355.53.0.48718125489.issue26293@psf.upfronthosting.co.za> Message-ID: <1494071660.48.0.570119897288.issue26293@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1586 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 07:54:20 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 May 2017 11:54:20 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1494071660.61.0.201520109679.issue29094@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1587 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 07:57:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 May 2017 11:57:37 +0000 Subject: [issue26293] Embedded zipfile fields dependent on absolute position In-Reply-To: <1454662355.53.0.48718125489.issue26293@psf.upfronthosting.co.za> Message-ID: <1494071857.13.0.652513194408.issue26293@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1588 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 07:57:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 May 2017 11:57:37 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1494071857.23.0.152413482634.issue29094@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1589 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 08:10:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 May 2017 12:10:52 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1494072652.79.0.157361133084.issue29094@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 70dc6a7a0b7f104d87512556fca242c2ca96a010 by Serhiy Storchaka in branch '3.6': [3.6] Revert bpo-26293 for zipfile breakage. See also bpo-29094. (GH-1484). (#1485) https://github.com/python/cpython/commit/70dc6a7a0b7f104d87512556fca242c2ca96a010 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 08:10:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 May 2017 12:10:52 +0000 Subject: [issue26293] Embedded zipfile fields dependent on absolute position In-Reply-To: <1454662355.53.0.48718125489.issue26293@psf.upfronthosting.co.za> Message-ID: <1494072652.94.0.255242063501.issue26293@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 70dc6a7a0b7f104d87512556fca242c2ca96a010 by Serhiy Storchaka in branch '3.6': [3.6] Revert bpo-26293 for zipfile breakage. See also bpo-29094. (GH-1484). (#1485) https://github.com/python/cpython/commit/70dc6a7a0b7f104d87512556fca242c2ca96a010 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 08:11:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 May 2017 12:11:22 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1494072682.67.0.579975544063.issue29094@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c8faabce6ef318f3b425c6defd846e274d61e2ef by Serhiy Storchaka in branch '3.5': [3.5] Revert bpo-26293 for zipfile breakage. See also bpo-29094. (GH-1484). (#1486) https://github.com/python/cpython/commit/c8faabce6ef318f3b425c6defd846e274d61e2ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 08:11:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 May 2017 12:11:22 +0000 Subject: [issue26293] Embedded zipfile fields dependent on absolute position In-Reply-To: <1454662355.53.0.48718125489.issue26293@psf.upfronthosting.co.za> Message-ID: <1494072682.81.0.498485214097.issue26293@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c8faabce6ef318f3b425c6defd846e274d61e2ef by Serhiy Storchaka in branch '3.5': [3.5] Revert bpo-26293 for zipfile breakage. See also bpo-29094. (GH-1484). (#1486) https://github.com/python/cpython/commit/c8faabce6ef318f3b425c6defd846e274d61e2ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 09:05:43 2017 From: report at bugs.python.org (debuggy) Date: Sat, 06 May 2017 13:05:43 +0000 Subject: [issue30292] Why is there a concept "unbound method" in python3 version? Message-ID: <1494075943.31.0.565968699812.issue30292@psf.upfronthosting.co.za> New submission from debuggy: When I read (python 3.6.1 version), I found there is a concept of 'unbound method' in some places. However, when I referred to , it said the concept of ?unbound methods? has been removed from the language. So I wondered if there should be a change in python3 version? For instance, in this code example of the guide: >>> class D(object): ... def f(self, x): ... return x ... >>> d = D() >>> D.__dict__['f'] # Stored internally as a function >>> D.f # Get from a class becomes an unbound method >>> d.f # Get from an instance becomes a bound method > When I tested myself, the result of statement "D.f" should be not . ---------- assignee: docs at python components: Documentation messages: 293160 nosy: debuggy, docs at python priority: normal severity: normal status: open title: Why is there a concept "unbound method" in python3 version? type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 10:16:47 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 06 May 2017 14:16:47 +0000 Subject: [issue12077] Harmonizing descriptor protocol documentation In-Reply-To: <1305381385.94.0.81554539251.issue12077@psf.upfronthosting.co.za> Message-ID: <1494080207.31.0.514591691661.issue12077@psf.upfronthosting.co.za> Martin Panter added the comment: See Issue 23702 specifically about unbound methods in Python 3, and Issue 25435 about general problems with the how-to in Python 3. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 10:20:15 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 06 May 2017 14:20:15 +0000 Subject: [issue30292] Why is there a concept "unbound method" in python3 version? In-Reply-To: <1494075943.31.0.565968699812.issue30292@psf.upfronthosting.co.za> Message-ID: <1494080415.88.0.761771894474.issue30292@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> docs.python.org/3/howto/descriptor.html still refers to "unbound methods" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 10:23:47 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 06 May 2017 14:23:47 +0000 Subject: [issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation) In-Reply-To: <1445194189.09.0.0973348556564.issue25435@psf.upfronthosting.co.za> Message-ID: <1494080627.69.0.209666192047.issue25435@psf.upfronthosting.co.za> Martin Panter added the comment: Raymond I suggest you unassign this and let others work on it. ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 10:45:05 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 06 May 2017 14:45:05 +0000 Subject: [issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation) In-Reply-To: <1445194189.09.0.0973348556564.issue25435@psf.upfronthosting.co.za> Message-ID: <1494081905.53.0.289723926562.issue25435@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- versions: +Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 10:52:30 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 May 2017 14:52:30 +0000 Subject: [issue12870] Regex object should have introspection methods In-Reply-To: <1314811774.34.0.509713448629.issue12870@psf.upfronthosting.co.za> Message-ID: <1494082350.07.0.740431762264.issue12870@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 11:15:56 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 May 2017 15:15:56 +0000 Subject: [issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation) In-Reply-To: <1445194189.09.0.0973348556564.issue25435@psf.upfronthosting.co.za> Message-ID: <1494083756.19.0.0709776518742.issue25435@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I will have a chance to work on this before long. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 11:16:26 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 May 2017 15:16:26 +0000 Subject: [issue12077] Harmonizing descriptor protocol documentation In-Reply-To: <1305381385.94.0.81554539251.issue12077@psf.upfronthosting.co.za> Message-ID: <1494083786.48.0.765272887588.issue12077@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I will have a chance to work on this before long. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 12:32:33 2017 From: report at bugs.python.org (paul j3) Date: Sat, 06 May 2017 16:32:33 +0000 Subject: [issue30220] Why are custom messages for ValueError, TypeError suppressed in argparse? In-Reply-To: <1493655591.13.0.717623445702.issue30220@psf.upfronthosting.co.za> Message-ID: <1494088353.04.0.940143698888.issue30220@psf.upfronthosting.co.za> paul j3 added the comment: I didn't mean to question the use of value tests in the 'type' callable. The ArgumentTypeError example in the documentation does that kind of test. Argparse is using the term 'type' loosely. It just means any kind of conversion and/or test that can be applied to a string. I doubt if _get_value() ever traps a TypeError. That error complains about the type of the input argument. As in, for example 'int([])'. But 'int(astring)' only produces a ValueError. If the callable issues a TypeError when given a string, it shouldn't be used as a 'type' parameter. If your prewritten test produces a ValueError, and you don't like the standardization, you can just wrap it in simple function reraises the 'custom' message as an ArgumentTypeError. There's no other way of identifying a 'custom' message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 13:04:19 2017 From: report at bugs.python.org (Aviv Palivoda) Date: Sat, 06 May 2017 17:04:19 +0000 Subject: [issue30262] Don't expose sqlite3 Cache and Statement In-Reply-To: <1493841130.42.0.625787216583.issue30262@psf.upfronthosting.co.za> Message-ID: <1494090258.99.0.258711725158.issue30262@psf.upfronthosting.co.za> Aviv Palivoda added the comment: I have 3 argument for the motivation for this change: 1. Cleaner API - Both objects are internal implementation details. I think that we can look on exposing them as a bug. 2. Easier development - When you remove these objects from the API you can change them without any concern. I for one think that I can make the sqlite3 module faster by changing them from Python objects to simple C structs. 3. Documentation - Currently both objects are part of the API. Thus they should be documented but how would you document the Statement class? Do we really want to have a generic Cache class in the sqlite3 module? I have less experience with cpython then you. Do you think that maybe the Cache class should be moved to more appropriate place (maybe collections) and be used by others? > At a minimum there would need to be a deprecation period, Is there a place that document the deprecation process? I will update the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 15:04:17 2017 From: report at bugs.python.org (Martijn Pieters) Date: Sat, 06 May 2017 19:04:17 +0000 Subject: [issue30293] Peephole binops folding can lead to memory and bytecache ballooning Message-ID: <1494097457.83.0.135778883063.issue30293@psf.upfronthosting.co.za> New submission from Martijn Pieters: The following expression produces 127MB in constants in `co_consts` due to two 63.5MB integer objects produced when folding: ((200*200 - 2) & ((1 << 500000000) - 1)) + ((200*200 - 2) >> 500000000) The optimizer already does not store optimized *sequences* of more than 20 elements to avoid making bytecode files too large: If the new constant is a sequence, only folds when the size is below a threshold value. That keeps pyc files from becoming large in the presence of code like: (None,)*1000. Perhaps the same should be extended to number objects? Context: https://stackoverflow.com/questions/43823807/why-does-using-arguments-make-this-function-so-much-slower ---------- messages: 293167 nosy: mjpieters priority: normal severity: normal status: open title: Peephole binops folding can lead to memory and bytecache ballooning _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 15:35:18 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 06 May 2017 19:35:18 +0000 Subject: [issue28087] macOS 12 poll syscall returns prematurely In-Reply-To: <1473637008.93.0.918549766701.issue28087@psf.upfronthosting.co.za> Message-ID: <1494099318.33.0.391159442542.issue28087@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Please DO NOT REMOVE select.poll() on MacOS. It is still useful. Apple needs to live with their bug that they refuse to acknowledge by forcing developers to learn the special case that it now breaks in (0 fds). We should not pretend that poll() does not exist as a result. For reference about the details of the MacOS change they were stupid enough to force upon the world, see this comment - which links to the source of their bug in the "open" source side of their OS. https://github.com/curl/curl/issues/1057#issuecomment-252286017 ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 15:39:39 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 06 May 2017 19:39:39 +0000 Subject: [issue28087] macOS 12 poll syscall returns prematurely In-Reply-To: <1473637008.93.0.918549766701.issue28087@psf.upfronthosting.co.za> Message-ID: <1494099579.43.0.0609520550578.issue28087@psf.upfronthosting.co.za> Gregory P. Smith added the comment: The only thing CPython should do is apply workarounds to any standard library internal uses of poll with 0 fds guarded by a MacOS platform check. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 15:45:52 2017 From: report at bugs.python.org (R. David Murray) Date: Sat, 06 May 2017 19:45:52 +0000 Subject: [issue30262] Don't expose sqlite3 Cache and Statement In-Reply-To: <1493841130.42.0.625787216583.issue30262@psf.upfronthosting.co.za> Message-ID: <1494099952.96.0.0849037306362.issue30262@psf.upfronthosting.co.za> R. David Murray added the comment: They are not part of the API, that is why they are not documented. The convention of "always" using _ prefixed names for non-API stuff is (relatively) recent. It used to be we just didn't document the non-API stuff. Your second argument is a good motivation. Let's see what others think. I thought the deprecation process was documented in a PEP, but I can't find it. Basically, we introduce a deprecation warning (and a document the deprecation, but that isn't needed here) in the next release, and then the release after that we actually do the removal. Or in many cases we don't do the removal at all, we just leave the deprecation warning in place until 2.7 is out of maintenance (but I don't think we need to worry about that in this case). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 15:50:03 2017 From: report at bugs.python.org (Joshua Jay Herman) Date: Sat, 06 May 2017 19:50:03 +0000 Subject: [issue24459] Mention PYTHONFAULTHANDLER in the man page In-Reply-To: <1434487895.85.0.561507121326.issue24459@psf.upfronthosting.co.za> Message-ID: <1494100203.22.0.803319607208.issue24459@psf.upfronthosting.co.za> Joshua Jay Herman added the comment: Ping ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 15:55:39 2017 From: report at bugs.python.org (Zachary Ware) Date: Sat, 06 May 2017 19:55:39 +0000 Subject: [issue30291] Allow windows launcher to specify bit lengths with & without minor version In-Reply-To: <1494064652.52.0.930357680293.issue30291@psf.upfronthosting.co.za> Message-ID: <1494100539.07.0.879007900273.issue30291@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 3.7 -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 16:12:37 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 May 2017 20:12:37 +0000 Subject: [issue30293] Peephole binops folding can lead to memory and bytecache ballooning In-Reply-To: <1494097457.83.0.135778883063.issue30293@psf.upfronthosting.co.za> Message-ID: <1494101557.46.0.200377651025.issue30293@psf.upfronthosting.co.za> Raymond Hettinger added the comment: A few thoughts: * This is very unlikely to come up in real code. Accordingly, I've marked this a low priority -- the peepholer is over a decade old and seems to work-out fine in actual practice. * The user explicitly asked for 1 << 500000000 to be computed. At some point, either during compilation or during execution, a large object is going to be produced. * The binops folding in peephole.c was originally much simpler and did not recursively combine results. The patch that added the recursive application of constant folding added a lot of complexity, but it demonstrated very little real world benefit, and it opened the door to examples like this where the computer is being explicitly told to do a lot of work. Perhaps constant folding should be reverted to its simpler state. * We could do a size check after each folding step and abandon folding when the size hit some limit. I'm not sure that is worth it though. Someone can just add more zeros and then complain that the compilation step took a lot of time and memory without producing any benefit. * We could try to detect an expensive computation before it is run, but in general that is hard to do right and it adds yet more complexity to something that started-out simple. * One of the design objectives for the peephole transformations was to keep it fast and slim rather than trying to be all things to all people. Burdening the optimizer with insanity checks just slows down the compilation of normal, sane code. * With sum(), Guido and Alex took the position that users should be blocked from using it with list-of-strings, but we didn't do block other unfavorable possibilities like a list-of-lists. The rationale was that the list-of-strings was too tempting and likely but that other cases weren't common or easy to detect. Likewise for Tim and I, the early decision for the peephole optimized (the decision being second guessed by this issue) was that large strings were easy to detect and likely enough to warrant extra code but that numeric folding issues were much less likely and didn't warrant extra code. * Constant folding was introduced before the AST branch. Once that branch landed, it has been a long standing objective to move constant folding out of the peepholer and into the AST stage. Accordingly, we've tried to refrain from further build-outs of constant folding. It is a pit of snakes. If someone really cares about this, they should work on an AST transformation. * Programming languages are different from applications. Users are allowed to explicitly create code that tells the computer to do something resource intensive and there are a myriad of ways to do so. In general, it will be difficult to prevent the execution of such code without unduly burdening execution of normal code. ---------- nosy: +rhettinger priority: normal -> low type: -> resource usage versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 16:16:23 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 May 2017 20:16:23 +0000 Subject: [issue30267] Deprecate os.path.commonprefix In-Reply-To: <1493913753.36.0.555235038331.issue30267@psf.upfronthosting.co.za> Message-ID: <1494101783.42.0.834257740313.issue30267@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The ``os.path.commonprefix`` function has been around for a very long time. Deprecating it will just cause unnecessary pain for users and make it harder to upgrade to Python 3. The function isn't broken, the only issue here is that a new function was added with a similar name. ---------- nosy: +rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 16:31:13 2017 From: report at bugs.python.org (mahboubi) Date: Sat, 06 May 2017 20:31:13 +0000 Subject: [issue30195] writing non-ascii characters in xml file using python code embedded in C In-Reply-To: <1493374492.88.0.89710812833.issue30195@psf.upfronthosting.co.za> Message-ID: <1494102673.57.0.896504535934.issue30195@psf.upfronthosting.co.za> Changes by mahboubi : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 17:09:31 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 May 2017 21:09:31 +0000 Subject: [issue30285] Optimize case-insensitive regular expressions In-Reply-To: <1494003779.18.0.0568506065862.issue30285@psf.upfronthosting.co.za> Message-ID: <1494104971.49.0.349105910287.issue30285@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This seems like a great idea. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 18:48:22 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 06 May 2017 22:48:22 +0000 Subject: [issue6931] dreadful performance in difflib: ndiff and HtmlDiff In-Reply-To: <1253199298.69.0.280559653373.issue6931@psf.upfronthosting.co.za> Message-ID: <1494110902.17.0.0252241957803.issue6931@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- assignee: gregory.p.smith -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 18:48:36 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 06 May 2017 22:48:36 +0000 Subject: [issue6931] dreadful performance in difflib: ndiff and HtmlDiff In-Reply-To: <1253199298.69.0.280559653373.issue6931@psf.upfronthosting.co.za> Message-ID: <1494110916.29.0.780885180868.issue6931@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: -gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 18:50:43 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 06 May 2017 22:50:43 +0000 Subject: [issue26700] Make digest_size a class variable In-Reply-To: <1459929550.45.0.656140899063.issue26700@psf.upfronthosting.co.za> Message-ID: <1494111043.17.0.0393113107467.issue26700@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I'm rejecting this one as low value / infeasible. ---------- assignee: gregory.p.smith -> resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 20:17:48 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 07 May 2017 00:17:48 +0000 Subject: [issue28087] macOS 12 poll syscall returns prematurely In-Reply-To: <1473637008.93.0.918549766701.issue28087@psf.upfronthosting.co.za> Message-ID: <1494116268.46.0.757084245.issue28087@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Do we need to work around this issue at all? Apple appears to have fixed it already: https://github.com/opensource-apple/xnu/commit/0cccba1c831cfe36f0d67d672f8aa67b4a7d4b6a#diff-e61c2932bb9d5cea2dd0732acd8ec626R1783 A comment in https://github.com/curl/curl/issues/1057 suggests Apple has shipped that change in 10.12.2. If you still want to have Python deal with the 10.12.0 and 10.12.1 cases you could update your PR to check those versions, but given these are security fix releases as 10.12.4 is already current I think it is better to tell people just to apply their security updates and not bother with a workaround in Python. ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 20:26:00 2017 From: report at bugs.python.org (=?utf-8?b?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?=) Date: Sun, 07 May 2017 00:26:00 +0000 Subject: [issue30159] gdb autoloading python-gdb.py In-Reply-To: <1493123460.02.0.558737612722.issue30159@psf.upfronthosting.co.za> Message-ID: <1494116760.48.0.244409944061.issue30159@psf.upfronthosting.co.za> ????? ???????? added the comment: This is what I mean. I asked at https://sourceware.org/bugzilla/show_bug.cgi?id=21465 how configure.ac is supposed to be tweaked. ---- diff --git a/Makefile.pre.in b/Makefile.pre.in --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1093,6 +1093,8 @@ $(DESTSHARED): # Install the interpreter with $(VERSION) affixed # This goes into $(exec_prefix) +datadir=@datadir@ +GDB_AUTO_LOAD_SCRIPTS_DIRECTORY=@GDB_AUTO_LOAD_SCRIPTS_DIRECTORY@ altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@ @for i in $(BINDIR) $(LIBDIR); \ do \ @@ -1118,6 +1120,11 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@ $(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \ else \ $(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \ + if test ! -d $(DESTDIR)$(GDB_AUTO_LOAD_SCRIPTS_DIRECTORY); then \ + echo "Creating directory $(GDB_AUTO_LOAD_SCRIPTS_DIRECTORY)"; \ + $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(GDB_AUTO_LOAD_SCRIPTS_DIRECTORY)/$(LIBDIR); \ + fi; \ + $(INSTALL_SCRIPT) Tools/gdb/libpython.py $(DESTDIR)$(GDB_AUTO_LOAD_SCRIPTS_DIRECTORY)/$(LIBDIR)/$(INSTSONAME)-gdb.py; \ if test $(LDLIBRARY) != $(INSTSONAME); then \ (cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) $(LDLIBRARY)) \ fi \ diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -5422,6 +5422,14 @@ if test "$have_getrandom" = yes; then [Define to 1 if the getrandom() function is available]) fi +AC_CHECK_PROG(gdb, gdb, found) +if test $gdb = found; then + GDB_AUTO_LOAD_SCRIPTS_DIRECTORY=$(gdb -q -ex "show data-directory" -ex "show auto-load scripts-directory" -ex quit |sed "1d;2{N;s/\n//g; s/.*\"\(.*\)\".*:\(.*\)./\1 \2/}; /\$datadir/ {s/\(.*\) \$datadir\(.*\)/\1\2/;q}; s/.* \(.\)/\1/") +else + GDB_AUTO_LOAD_SCRIPTS_DIRECTORY='${datadir}/gdb/auto-load' +fi +AC_SUBST(GDB_AUTO_LOAD_SCRIPTS_DIRECTORY) + # generate output files AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh) AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix]) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 6 20:26:32 2017 From: report at bugs.python.org (=?utf-8?b?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?=) Date: Sun, 07 May 2017 00:26:32 +0000 Subject: [issue30159] gdb autoloading python-gdb.py In-Reply-To: <1493123460.02.0.558737612722.issue30159@psf.upfronthosting.co.za> Message-ID: <1494116792.56.0.920489635507.issue30159@psf.upfronthosting.co.za> Changes by ????? ???????? : ---------- components: +Build _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 02:54:54 2017 From: report at bugs.python.org (Steve Barnes) Date: Sun, 07 May 2017 06:54:54 +0000 Subject: [issue30291] Allow windows launcher to specify bit lengths with & without minor version In-Reply-To: <1494064652.52.0.930357680293.issue30291@psf.upfronthosting.co.za> Message-ID: <1494140094.93.0.320084788436.issue30291@psf.upfronthosting.co.za> Steve Barnes added the comment: Also noted when looking at the code that the validate function, (validate_version), has a couple of issues: - It will allow python major versions 0-9 (at the moment only 2 or 3 are valid). - It will not allow minor versions with more than one digit so if/when python 3.10 comes out it will stop working, (if there is a 3.10 rather than or as well as 4.0). I am not sure if these potential issues warrant a separate ticket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 02:59:08 2017 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 May 2017 06:59:08 +0000 Subject: [issue30287] cpython and Clang Static Analyzer In-Reply-To: <1494022401.59.0.120432906774.issue30287@psf.upfronthosting.co.za> Message-ID: <1494140348.09.0.77966823276.issue30287@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks for this. I took a look at the 5 reports for Objects/longobject.c, and I don't think there's any action to be taken on any of them. (Two false positives; two "dead assignments" that are used when asserts are enabled, and one division-by-zero that depends on a function being called in a way that never happens in practice.) * Objects/longobject.c:2823 Assigned value is garbage or undefined This is a false positive. Here we have: a_bits <= a_size * PyLongShift shift_digits = (a_bits - DBL_MANT_DIG - 2) / PyLong_SHIFT; and then we call v_rshift(x_digits, ..., a_size - shift_digits, ...), which fills the first a_size - shift_digits entries of x_digits. Since DBL_MANT_DIG >= PyLong_SHIFT, we have shift_digits < a_size, so x_digits[0] is always initialised by v_rshift. * Objects/longobject.c:2723 Dead assignment The value of the assignment is used in a following assert statement; I don't think this should be changed. * Objects/longobject.c:2463 Dead assignment Again, the value of the assignment is used in an assert. * Objects/longobject.c:1828 Division by zero This function will never get called with bits=0. There are asserts to check this. * Objects/longobject.c:2830 Assigned value is garbage or undefined This is another false positive, similar to the first one. Analysing the arithmetic shows that x_digits[0] is always defined. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 03:18:17 2017 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 May 2017 07:18:17 +0000 Subject: [issue29956] math.exp documentation is misleading In-Reply-To: <1490990917.06.0.404933995002.issue29956@psf.upfronthosting.co.za> Message-ID: <1494141497.8.0.649464361505.issue29956@psf.upfronthosting.co.za> Mark Dickinson added the comment: Can this be closed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 03:22:00 2017 From: report at bugs.python.org (Eryk Sun) Date: Sun, 07 May 2017 07:22:00 +0000 Subject: [issue30291] Allow windows launcher to specify bit lengths with & without minor version In-Reply-To: <1494064652.52.0.930357680293.issue30291@psf.upfronthosting.co.za> Message-ID: <1494141720.2.0.0585943292767.issue30291@psf.upfronthosting.co.za> Eryk Sun added the comment: I don't see a pressing need to support a -64 architecture suffix. If you run 3.6 and get a 32-bit version, you can assume there's no 64-bit version installed and error out if you need 64-bit. That said, supporting this suffix would make the interface and error handling more consistent. I also noticed the problem with double-digit minor versions, but that's years away. It would be an obvious problem resolved early in 3.10 development, assuming 3.10 even uses the py launcher as it exists today. I'd just kick the can on that one. Maybe add a comment noting the potential problem. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 03:58:03 2017 From: report at bugs.python.org (=?utf-8?b?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?=) Date: Sun, 07 May 2017 07:58:03 +0000 Subject: [issue30294] ./configure, pydebug and pymalloc Message-ID: <1494143883.23.0.254430026718.issue30294@psf.upfronthosting.co.za> New submission from ????? ????????: Providing that during ./configure Py_DEBUG can either be set or not, but there is no third state, which third state would justify calling ./configure --with-pydebug=lambda, --with-pydebug shall be renamed to --enable-pydebug . Likewise for --with-pymalloc , but it is more tricky. Currently ./configure --help emits "--with(out)-pymalloc disable/enable specialized mallocs". Usually from the output of ./configure --help one shall be able to conclude, whether a switch is on or off by default, if it is not provided. E.g. if it is by default off, then "--enable-X enable feature X" is printed; and "--disable-Y disable feature-Y" is printed when by default the feature is on. The code says, that if pymalloc is enabled implicitly, if neither --with-pymalloc nor --without-pymalloc is provided. Let's update the AS_HELP_STRING to show the default and also shorten the code, which makes it also easier to understand (for me at least) which makes it also easier to understand (for me at least): diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -3290,12 +3290,7 @@ AC_MSG_RESULT($with_doc_strings) # Check for Python-specific malloc support AC_MSG_CHECKING(for --with-pymalloc) AC_ARG_WITH(pymalloc, - AS_HELP_STRING([--with(out)-pymalloc], [disable/enable specialized mallocs])) - -if test -z "$with_pymalloc" -then - with_pymalloc="yes" -fi + AS_HELP_STRING([--without-pymalloc], [disable specialized mallocs]),,with_pymalloc=yes) if test "$with_pymalloc" != "no" then AC_DEFINE(WITH_PYMALLOC, 1, configure.ac:4629 mentions "# * --with-wide-unicode (adds a 'u')", but since commit d63a3b8beb4a0841cb59fb3515347ccaab34b733 "Implement PEP 393", one cannot pass --with-wide-unicode to ./configure. ---------- components: Build messages: 293182 nosy: dilyan.palauzov priority: normal severity: normal status: open title: ./configure, pydebug and pymalloc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 04:12:35 2017 From: report at bugs.python.org (=?utf-8?b?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?=) Date: Sun, 07 May 2017 08:12:35 +0000 Subject: [issue30294] ./configure, pydebug and pymalloc In-Reply-To: <1494143883.23.0.254430026718.issue30294@psf.upfronthosting.co.za> Message-ID: <1494144755.27.0.0714374784041.issue30294@psf.upfronthosting.co.za> ????? ???????? added the comment: ./configure --help also does not indicate, whether just "./configure" enables or disables IPv6, thread support, dtrace*, computed-gotos*, doc-strings*. The asterisk features, suggest replacing AC_ARG_WITH with AC_ARG_ENABLE, as there are only two states. For ensurepip, AS_HELP_STRING shall be "[--with-ensurepip=@<:@=upgrade@:>@]". AC_ARG_WITH(lto, AS_HELP_STRING([--with-lto], [Enable Link Time Optimization in PGO builds. Disabled by default.]), Here you see the whole point of the logic, that by inspecting the "--with-"/"--without-" status of ./configure --help, one can conclude what the defaults are. "Disabled by default" is redundant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 05:20:37 2017 From: report at bugs.python.org (=?utf-8?b?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?=) Date: Sun, 07 May 2017 09:20:37 +0000 Subject: [issue30287] cpython and Clang Static Analyzer In-Reply-To: <1494022401.59.0.120432906774.issue30287@psf.upfronthosting.co.za> Message-ID: <1494148837.76.0.28892727402.issue30287@psf.upfronthosting.co.za> ????? ???????? added the comment: I forgot to pass --with-pydebug to ./configure in order to consider also the asserts. Here we go: scan-build ./configure --enable-loadable-sqlite-extensions --enable-ipv6 --with-system-expat --with-system-libmpdec --with-pydebug scan-build -o /home/didopalauzov/public_html/scan-build-python-3763ea865c make The output, which has now 9 hints less, is at https://mail.aegee.org/dpa/scan-build-python-3763ea865c/ The assignments in Modules/socketmodule.c:1456 and Modules/_datetimemodule.c:2232 are correctly detected as superfluous. In Objects/longobject.c/long_format_binary: default: assert(0); /* shouldn't ever get here*/ bits = 0; /* to silence gcc warning */ I guess return -1 instead of bits=0 will silent both gcc and the static analyzer warning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 05:29:04 2017 From: report at bugs.python.org (Martin Panter) Date: Sun, 07 May 2017 09:29:04 +0000 Subject: [issue30097] Command-line option to suppress "from None" for debugging In-Reply-To: <1492553512.25.0.992335940269.issue30097@psf.upfronthosting.co.za> Message-ID: <1494149344.94.0.867219791133.issue30097@psf.upfronthosting.co.za> Martin Panter added the comment: This proposal would be useful. My use case is for when an API suppresses an external exception context: >>> import os >>> try: ... os.environ["NEW_VARIABLE"] = bug # Hidden exception ... finally: ... del os.environ["NEW_VARIABLE"] # KeyError ... Traceback (most recent call last): File "", line 4, in File "/usr/lib/python3.5/os.py", line 699, in __delitem__ raise KeyError(key) from None KeyError: 'NEW_VARIABLE' This feels like a step backwards to Python 2, and enabling the full backtrace would make this easier to analyze: >>> try: ... os.environ["NEW_VARIABLE"] = bug # TypeError ... finally: ... del dict()["NEW_VARIABLE"] # KeyError ... Traceback (most recent call last): File "", line 2, in File "/usr/lib/python3.5/os.py", line 688, in __setitem__ value = self.encodevalue(value) File "/usr/lib/python3.5/os.py", line 756, in encode raise TypeError("str expected, not %s" % type(value).__name__) TypeError: str expected, not object During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 4, in KeyError: 'NEW_VARIABLE' ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 07:14:36 2017 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 May 2017 11:14:36 +0000 Subject: [issue30291] Allow windows launcher to specify bit lengths with & without minor version In-Reply-To: <1494064652.52.0.930357680293.issue30291@psf.upfronthosting.co.za> Message-ID: <1494155676.55.0.0969035627862.issue30291@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +1590 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 07:35:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 May 2017 11:35:22 +0000 Subject: [issue28087] macOS 12 poll syscall returns prematurely In-Reply-To: <1494116268.46.0.757084245.issue28087@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: You want to get poll() on macOS. I'm ok with that but I would like to see tests for it. We should remove the skip in the test. Ok, I will update my PR to just blacklist macOS 10.12.0 and 10.2.1, and reenable the test. I just have to find the Darwin versions. I don't think that we have to suggests Python users to upgrade, I expect macOS popups requesting to apply upgrades are enough ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 07:36:17 2017 From: report at bugs.python.org (Steve Barnes) Date: Sun, 07 May 2017 11:36:17 +0000 Subject: [issue30291] Allow windows launcher to specify bit lengths with & without minor version In-Reply-To: <1494064652.52.0.930357680293.issue30291@psf.upfronthosting.co.za> Message-ID: <1494156977.49.0.501074331828.issue30291@psf.upfronthosting.co.za> Steve Barnes added the comment: I believe that I have a fix in pull request #1488 for the following points, and have manually tested for them: - py Still defaults to highest py3 with 64 bits as the default - py -2/3.n-32 Still works or reports not present as appropriate - py -2/3.n-64 Works or reports not present as appropriate - py -2/3 Still defaults to highest then 64 bit if present - py -2/3-32/64 Gives highest python 2/3 or reports not present - py -2/3.nn Should now work if/when there is such a version present, (any number of digits as far as the validation goes), or reports no such python. - py -4, etc., Ditto - py n.m-anything other than 32 or 64 - no change of behaviour. CLA - Signed and submitted but not a working day yet. All automatic checks passed. Will add another push to update to the help message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 08:21:44 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 07 May 2017 12:21:44 +0000 Subject: [issue30286] ctypes FreeLibrary fails on Windows 64-bit In-Reply-To: <1494010795.37.0.519448367815.issue30286@psf.upfronthosting.co.za> Message-ID: <1494159704.28.0.425270145709.issue30286@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > It's documented that the default conversion for integer arguments is a 32-bit C int. [...] Whenever a pointer is returned, you must set the function's restype. OK, clear. Closing this out. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 08:24:20 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 07 May 2017 12:24:20 +0000 Subject: [issue30295] msvcrt SetErrorMode not documented Message-ID: <1494159860.93.0.93225035242.issue30295@psf.upfronthosting.co.za> New submission from Giampaolo Rodola': Also SEM_FAILCRITICALERRORS and other SEM_constants. They should as setting error mode on Windows for console applications is a pretty common use case (in fact ./Lib/test/libregrtest/setup.py uses it). ---------- assignee: docs at python components: Documentation messages: 293189 nosy: docs at python, giampaolo.rodola priority: normal severity: normal status: open title: msvcrt SetErrorMode not documented versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 09:08:04 2017 From: report at bugs.python.org (Jon Dufresne) Date: Sun, 07 May 2017 13:08:04 +0000 Subject: [issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib Message-ID: <1494162484.35.0.941296488498.issue30296@psf.upfronthosting.co.za> New submission from Jon Dufresne: Lib has some patterns that could be easily discovered and cleaned up. Doing so will reduce the number of unnecessary temporary lists in memory and unnecessary function calls. It will also take advantage of Python's own rich features in a way that better dog foods the language. For example: * Replace list() with list comprehension * Replace dict() with dict comprehension * Replace set() with set comprehension * Replace builtin func() with func() when supported (e.g. any(), all(), tuple(), min(), & max()) ---------- components: Library (Lib) messages: 293190 nosy: jdufresne priority: normal pull_requests: 1591 severity: normal status: open title: Remove unnecessary tuples, lists, sets, and dicts from Lib versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 09:30:37 2017 From: report at bugs.python.org (Louie Lu) Date: Sun, 07 May 2017 13:30:37 +0000 Subject: [issue29447] Add/check os.PathLike support for the tempfile module's 'dir' arguments In-Reply-To: <1486273182.96.0.640027026479.issue29447@psf.upfronthosting.co.za> Message-ID: <1494163837.86.0.514846697245.issue29447@psf.upfronthosting.co.za> Louie Lu added the comment: Since tempfile is relay on `os`, e.g. `file = _os.join.path(dir, pre+name+suf)`, it can directly accept dir as PathLike type, this should need to add test case for it. ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 09:31:52 2017 From: report at bugs.python.org (Sebastian Noack) Date: Sun, 07 May 2017 13:31:52 +0000 Subject: [issue30297] Recursive starmap causes Segmentation fault Message-ID: <1494163912.12.0.28043122667.issue30297@psf.upfronthosting.co.za> New submission from Sebastian Noack: If I run following code (on Python 3.5.3, Linux) the interpreter crashes with a segfault: def pbkdf2_bin(data, salt, iterations=1000, keylen=24, hashfunc=None): hashfunc = hashfunc or hashlib.sha1 mac = hmac.new(data, None, hashfunc) def _pseudorandom(x, mac=mac): h = mac.copy() h.update(x) return h.digest() buf = [] for block in range(1, -(-keylen // mac.digest_size) + 1): rv = u = _pseudorandom(salt + _pack_int(block)) for i in range(iterations - 1): u = _pseudorandom(u) rv = starmap(xor, zip(rv, u)) buf.extend(rv) return bytes(buf[:keylen]) pbkdf2_bin(b'1234567890', b'1234567890', 200000, 32) I was able to track it down to the line of buf.extend(rv) which apparently is causing the segfault. Note that rv is a lazy-evaluated starmap. I also get a segfault if I evaluate it by other means (e.g. by passing it to the list constructor). However, if I evaluate it immediately by wrapping the starmap constructor with the list constructor, the code works as expected. But I wasn't able yet, to further isolate the issue. FWIW, the Python 2 version [1] of this code works just fine without forcing immediate evaluation of the starmap. Note that the code posted, except for the bits I changed in order to make it compatible with Python 3, is under the copyright of Armin Ronacher, who published it under the BSD license. [1]: https://github.com/mitsuhiko/python-pbkdf2 ---------- messages: 293192 nosy: Sebastian.Noack priority: normal severity: normal status: open title: Recursive starmap causes Segmentation fault type: crash versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 09:42:56 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 07 May 2017 13:42:56 +0000 Subject: [issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib In-Reply-To: <1494162484.35.0.941296488498.issue30296@psf.upfronthosting.co.za> Message-ID: <1494164576.48.0.435880826182.issue30296@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Is this unnecessary code churn? That's not a rhetorical question. Fixing code that isn't broken is not always a good idea. ``func()`` is not always identical to ``func()``, there are situations where there is a significant performance difference between the two. E.g. str.join() is significantly faster when passed a list than when passed a generator expression. According to my tests: ''.join(['abc' for x in range(1000000)]) is about 40% faster than ''.join('abc' for x in range(1000000)) ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 09:43:10 2017 From: report at bugs.python.org (Sebastian Noack) Date: Sun, 07 May 2017 13:43:10 +0000 Subject: [issue30297] Recursive starmap causes Segmentation fault In-Reply-To: <1494163912.12.0.28043122667.issue30297@psf.upfronthosting.co.za> Message-ID: <1494164590.62.0.49651399795.issue30297@psf.upfronthosting.co.za> Sebastian Noack added the comment: I just noticed that the segfault can also be reproduced with Python 2 [1]. So please ignore what I said before that this wouldn't be the case. While it is debatable whether using a lazy evaluated object with so many recursions is a good idea in the first place, causing it the interpreter to crash with a segfault still seems concerning to me. [1]: https://github.com/mitsuhiko/python-pbkdf2/issues/2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 09:55:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 May 2017 13:55:58 +0000 Subject: [issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib In-Reply-To: <1494162484.35.0.941296488498.issue30296@psf.upfronthosting.co.za> Message-ID: <1494165358.86.0.452458498195.issue30296@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: * Some functions that accept an arbitrary iterable first convert it to temporary list and iterate that list. In these cases there is no significant difference in memory usage between list comprehension and generator, but the variant with list comprehension is slightly faster. * foo(bar(x) for x in a) can be written also as foo(map(bar, a)). Both expressions are idiomatic, different users have different preferences, the variant with map can be faster for larger loops. The variant with map can even be faster than comprehensions. * Proposed patch changes some files which should be kept compatible with old Python versions. Old Python versions can not support set and dict comprehensions. * In general we avoid making changes to many files that doesn't have obvious positive effect. Most changes doesn't have measurable effect, they are just style changes. But different users have different preferences and existing code is not obviously bad. Assigned to Raymond because it usually opposed to such kind of changes but made very similar changes in issue22823. ---------- assignee: -> rhettinger nosy: +rhettinger, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 10:33:14 2017 From: report at bugs.python.org (Louie Lu) Date: Sun, 07 May 2017 14:33:14 +0000 Subject: [issue29447] Add/check os.PathLike support for the tempfile module's 'dir' arguments In-Reply-To: <1486273182.96.0.640027026479.issue29447@psf.upfronthosting.co.za> Message-ID: <1494167594.16.0.314838797141.issue29447@psf.upfronthosting.co.za> Louie Lu added the comment: Regards my words, some place need to changed to support PathLike, I'll test it tomorrow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 10:39:18 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 May 2017 14:39:18 +0000 Subject: [issue30298] Weak deprecations for inline regular expression modifiers Message-ID: <1494167958.42.0.581219852932.issue30298@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: There is a difference between handling inline modifiers in regular expressions between Python and all other regular expression engines that support inline modifiers. In other engines an inline modifier affect only the part of the pattern after it. It Python it affects also the part before it. For avoiding possible confusion and for removing this difference in distant future, using inline modifiers not at the start of the pattern was deprecated in 3.6 (see issue22493). But the condition for raising a warning is too strong. It allows using '(?is)...', but '(?i)(?s)...' emits a warning. This makes hard modifying regular expressions by prefixing them with inline modifiers. This condition is unjustifiably strong because '(?i)(?s)...' doesn't have any ambiguity. It also disallows ' (?i)...' in verbose mode despite the fact that whitespaces are not significant in verbose mode. Proposed patch weaks the condition of deprecation warnings. It allows using several subsequent inline modifiers at the start of the pattern and ignores whitespaces in verbose mode. ---------- components: Library (Lib), Regular Expressions messages: 293197 nosy: ezio.melotti, mrabarnett, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Weak deprecations for inline regular expression modifiers type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 10:53:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 May 2017 14:53:07 +0000 Subject: [issue30298] Weak deprecations for inline regular expression modifiers In-Reply-To: <1494167958.42.0.581219852932.issue30298@psf.upfronthosting.co.za> Message-ID: <1494168787.15.0.178248769766.issue30298@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1592 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 11:27:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 May 2017 15:27:38 +0000 Subject: [issue30299] Display the bytecode when compiled a regular expression in debug mode Message-ID: <1494170858.78.0.223872265764.issue30299@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Proposed patch makes compiling a regular expression in debug mode (with the re.DEBUG flag) displaying the bytecode in human readable form (in addition to the syntax tree). For example: >>> re.compile('test_[a-z_]+', re.DEBUG) LITERAL 116 LITERAL 101 LITERAL 115 LITERAL 116 LITERAL 95 MAX_REPEAT 1 MAXREPEAT IN RANGE (97, 122) LITERAL 95 0. INFO 16 0b1 6 MAXREPEAT (to 17) prefix_skip 5 prefix [0x74, 0x65, 0x73, 0x74, 0x5f] ('test_') overlap [0, 0, 0, 1, 0] 17: LITERAL 0x74 ('t') 19. LITERAL 0x65 ('e') 21. LITERAL 0x73 ('s') 23. LITERAL 0x74 ('t') 25. LITERAL 0x5f ('_') 27. REPEAT_ONE 12 1 MAXREPEAT (to 40) 31. IN 7 (to 39) 33. RANGE 0x61 0x7a ('a'-'z') 36. LITERAL 0x5f ('_') 38. FAILURE 39: SUCCESS 40: SUCCESS re.compile('test_[a-z_]+', re.DEBUG) This feature is needed mainly for our own needs. It can help optimizing regular expression compilation. ---------- components: Library (Lib), Regular Expressions messages: 293198 nosy: ezio.melotti, mrabarnett, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Display the bytecode when compiled a regular expression in debug mode type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 11:32:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 May 2017 15:32:41 +0000 Subject: [issue30299] Display the bytecode when compiled a regular expression in debug mode In-Reply-To: <1494170858.78.0.223872265764.issue30299@psf.upfronthosting.co.za> Message-ID: <1494171161.85.0.218701972496.issue30299@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1593 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 11:41:59 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 May 2017 15:41:59 +0000 Subject: [issue26336] Expose regex bytecode as attribute of compiled pattern object In-Reply-To: <1455163527.75.0.996534901196.issue26336@psf.upfronthosting.co.za> Message-ID: <1494171719.25.0.691420585467.issue26336@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See issue30299 which adds the output of decoded bytecode in debug mode. The format of the bytecode is implementation detail, it is irregular, new opcodes can be added, and the format of existing opcodes can be changed. Thus it is hard to support third-party disassembler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 11:56:09 2017 From: report at bugs.python.org (Eryk Sun) Date: Sun, 07 May 2017 15:56:09 +0000 Subject: [issue30295] msvcrt SetErrorMode not documented In-Reply-To: <1494159860.93.0.93225035242.issue30295@psf.upfronthosting.co.za> Message-ID: <1494172569.38.0.653479048734.issue30295@psf.upfronthosting.co.za> Eryk Sun added the comment: msvcrt set_error_mode, CrtReportMode, CrtReportFile and the associated CRT constants should be documented for use with debug builds. Also, msvcrt is missing the set_error_mode constants _OUT_TO_DEFAULT, _OUT_TO_STDERR, _OUT_TO_MSGBOX, and _REPORT_ERRMODE. SetErrorMode [1] and the SEM_* constants are defined in msvcrt, for convenience I suppose. They're not related to the CRT. I think they should be aliased in the os module and documented there. GetErrorMode [2] can also be provided in Python 3.5+. It would be useful to also provide SetThreadErrorMode [3] and GetThreadErrorMode conditionally in Windows 7+, which is practically all Windows users nowadays. [1]: https://msdn.microsoft.com/en-us/library/ms680621 [2]: https://msdn.microsoft.com/en-us/library/ms679355 [3]: https://msdn.microsoft.com/en-us/library/dd553630 ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 11:56:43 2017 From: report at bugs.python.org (Eryk Sun) Date: Sun, 07 May 2017 15:56:43 +0000 Subject: [issue30295] msvcrt SetErrorMode not documented In-Reply-To: <1494159860.93.0.93225035242.issue30295@psf.upfronthosting.co.za> Message-ID: <1494172603.83.0.191546841204.issue30295@psf.upfronthosting.co.za> Changes by Eryk Sun : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 12:20:17 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 07 May 2017 16:20:17 +0000 Subject: [issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib In-Reply-To: <1494162484.35.0.941296488498.issue30296@psf.upfronthosting.co.za> Message-ID: <1494174017.19.0.330788274662.issue30296@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Jon, we usually try to avoid sweeping changes across the library and instead preference to focus on one module at a time (Guido calls this "holistic refactoring"). There is a risk of introducing bugs and of destabiliizing code that has sat untouched but working for a long time. Also, as Serhiy and Steven have pointed out, there are sometimes subtle reasons to prevent the existing code. For example, I find the original to be clearer in this example: - return list(set(item.name for item in self.list)) + + return list({item.name for item in self.list}) and the original to be both clearer and faster in this example: - return list(map(_convert, node.elts)) + return [_convert(v) for v in node.elts] In some cases, using "dict(...)" or "set(...)" is clearer about the intension or more readable because it is parallel to the surrounding code (such as the parallelism of successive line in ast.py). In some cases such as _pydecimal we have a aversion to changing code that aspires to be backwards compatible across many versions. That said, there are a few places where it might be worthwhile for making a change. Converting to set literals is almost always a win: - interesting = set(("include", "lib", "libpath", "path")) + interesting = {"include", "lib", "libpath", "path"} As Serhiy noted, in some places using map() would be an improvement, so we should look at doing a few of those (where there is a win in term of speed, space, and readability): - version_info = tuple([int(x) for x in version.split(".")]) + version_info = tuple(map(int, version.split("."))) Overall, I think most of these shouldn't be done, but I will mark a few where some change might be considered an improvement. Steven or Serhiy are both welcome to veto any one of those. Likewise, if the original author of the code is still active, they have a veto as well. The status quo usually wins until we're refactoring a single module and make improvements while thinking about that module. You picked a difficult first patch because you picked a topic that we usually avoid (wholesale sweeps through the standard library) and an area where deciding "what is best" involves subtleties with respect to clarity, parallelism with surrounding code, speed, clear intention, back compatibility, and how the original author thinks about the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 13:38:04 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 07 May 2017 17:38:04 +0000 Subject: [issue30248] Using boolean arguments in the _json module In-Reply-To: <1493800695.72.0.112994453765.issue30248@psf.upfronthosting.co.za> Message-ID: <1494178684.22.0.045204879345.issue30248@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This looks like a nice improvement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 13:41:41 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 07 May 2017 17:41:41 +0000 Subject: [issue30298] Weak deprecations for inline regular expression modifiers In-Reply-To: <1494167958.42.0.581219852932.issue30298@psf.upfronthosting.co.za> Message-ID: <1494178901.29.0.923934448059.issue30298@psf.upfronthosting.co.za> Raymond Hettinger added the comment: LGTM ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 14:11:07 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 07 May 2017 18:11:07 +0000 Subject: [issue30297] Recursive starmap causes Segmentation fault In-Reply-To: <1494163912.12.0.28043122667.issue30297@psf.upfronthosting.co.za> Message-ID: <1494180667.55.0.915741427876.issue30297@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'm not sure this can be fixed reasonably. It would entail taking every possible iterator in all of Python and adding some sort of recursion depth check. That approach risks introducing bugs, risks breaking existing code that relies on heavy iteration depth (we know YouTube uses such code), and it would slow-down iteration everywhere (possibly by quite a bit since iteration is a thin and fast protocol). Also, this is a general case of recursive crashers (there are a number of open bugs on this) that are hard to detect and prevent. IMO, what is really needed is something that monitors the C stack and gracefully detects the situation just before a crash and gracefully unwinds the calls. This isn't easy to do but it would be a broad, complete, performant, and minimally invasive solution to a problem that is irritating but only arises very rarely (and typically only in code that isn't really sane to begin with). The usual recursion depth checks on function calls are reasonable because 1) their overhead is minimal compared to overall function call overhead and 2) they detect common programming errors. To me, the starmap() case is different because the problem is rare and because iteration is a tight fast protocol. One other thought: While a RuntimeError would be much preferred to a crash, the programmer has to respond in the same way, by changing their code. In the pbkdf2_bin() example, the code can't be made to run as-is. The approach has to be changed to a list based approach (even using hand-rolled iterators instead of starmap() won't help). A last thought: I presume that the whole reason for using starmap() instead of "yield from" or somesuch is the person writing code needed good performance, so taking away performance defeats the original intent. ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 14:22:29 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 07 May 2017 18:22:29 +0000 Subject: [issue30145] Create a How to or Tutorial documentation for asyncio In-Reply-To: <1492960602.26.0.461554169011.issue30145@psf.upfronthosting.co.za> Message-ID: <1494181349.5.0.935360186467.issue30145@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 14:24:57 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 07 May 2017 18:24:57 +0000 Subject: [issue30300] asyncio.Controller Message-ID: <1494181497.37.0.0898291474199.issue30300@psf.upfronthosting.co.za> New submission from Barry A. Warsaw: Over in https://github.com/aio-libs/aiosmtpd we have a Controller class which is very handy for testing and other cases. I realized that this isn't really aiosmtpd specific, and with just a few tweaks it could be appropriate for the stdlib. I have a branch ready for a pull request. This is the tracking/discussion issue. ---------- components: Library (Lib) messages: 293205 nosy: barry priority: normal severity: normal status: open title: asyncio.Controller versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 14:26:25 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 07 May 2017 18:26:25 +0000 Subject: [issue30300] asyncio.Controller In-Reply-To: <1494181497.37.0.0898291474199.issue30300@psf.upfronthosting.co.za> Message-ID: <1494181585.41.0.281608048447.issue30300@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- pull_requests: +1594 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 14:40:20 2017 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 07 May 2017 18:40:20 +0000 Subject: [issue30168] Class Logger is unindented in the documentation. In-Reply-To: <1493210640.98.0.578541878256.issue30168@psf.upfronthosting.co.za> Message-ID: <1494182420.27.0.258383760862.issue30168@psf.upfronthosting.co.za> Vinay Sajip added the comment: New changeset 55ace65eba587fe3cf3759a43cccf85214651971 by Vinay Sajip (Jim Fasarakis-Hilliard) in branch 'master': Closes bpo-30168: indent methods in Logger Class (#1295) https://github.com/python/cpython/commit/55ace65eba587fe3cf3759a43cccf85214651971 ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 14:44:05 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 May 2017 18:44:05 +0000 Subject: [issue30297] Recursive starmap causes Segmentation fault In-Reply-To: <1494163912.12.0.28043122667.issue30297@psf.upfronthosting.co.za> Message-ID: <1494182645.48.0.878735163786.issue30297@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This looks as a duplicate of issue14010 (and many other issues). ---------- nosy: +serhiy.storchaka resolution: -> duplicate superseder: -> deeply nested filter segfaults _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 14:45:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 May 2017 18:45:58 +0000 Subject: [issue14010] deeply nested filter segfaults In-Reply-To: <1329235106.54.0.737183388066.issue14010@psf.upfronthosting.co.za> Message-ID: <1494182758.06.0.198051888943.issue14010@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See issue30297 for yet one instance of this in starmap(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 15:01:50 2017 From: report at bugs.python.org (Daniel Moore) Date: Sun, 07 May 2017 19:01:50 +0000 Subject: =?utf-8?q?=5Bissue30301=5D_=E2=80=9CAttributeError=3A_=27SimpleQueue=27_o?= =?utf-8?b?YmplY3QgaGFzIG5vIGF0dHJpYnV0ZSAnX3BvbGwn4oCd?= Message-ID: <1494183710.88.0.708414094068.issue30301@psf.upfronthosting.co.za> New submission from Daniel Moore: I originally posted this as a question on StackOverflow thinking I was doing something wrong: http://stackoverflow.com/questions/43834494/python-3-6-attributeerror-simplequeue-object-has-no-attribute-poll/43835368#43835368 But I think I found the solution and answered my own question. I'm pretty sure you need to set: self._poll = self._reader.poll in the __setstate__ method in the SimpleQueue class of queues.py from the multiprocessing library. Otherwise, I'd love to know an alternative solution. Thanks! ---------- components: Library (Lib), Windows messages: 293209 nosy: Daniel Moore, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: ?AttributeError: 'SimpleQueue' object has no attribute '_poll'? type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 15:33:48 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 May 2017 19:33:48 +0000 Subject: [issue26336] Expose regex bytecode of compiled pattern object In-Reply-To: <1455163527.75.0.996534901196.issue26336@psf.upfronthosting.co.za> Message-ID: <1494185627.99.0.740400840502.issue26336@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I changed the title because I believe a) the Python-level tuple of ints should be created on demand (I am not sure what the patch does); and b) the exposure should be done by an overt function rather than be an 'attribute', even if that is a front for a property getter. The former would have to come with re. A function does not need to be a method, and can therefore be provided in a 3rd party module that accesses the C attribute via ctypes. Such a function could be used with past versions of CPython. Jelle, I suggest that you augment regdis with such function, so it does not depend on this issue. I am closing this for reasons stated and the following. I reread the thread. Only one person with commit privileges participated. The proposal got only tepid support for stdlib inclusion and at least as much or more support for 3rd party activity. The thread ended with Jonathan saying "I've decided to shelve this idea for the time being". Given the opposition of the current re maintainer, this proposal lacks sufficient support. Modules as a whole can be OS specific (several examples) or CPython-specific (dis). We generally avoid adding features within modules whose existence is implementation-specific. "This attribute [a tuple of ints] is not guaranteed to exist in all implementations of Python." is almost enough to kill the proposal. ---------- resolution: -> rejected stage: -> resolved status: open -> closed title: Expose regex bytecode as attribute of compiled pattern object -> Expose regex bytecode of compiled pattern object versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 15:36:27 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 May 2017 19:36:27 +0000 Subject: [issue30299] Display the bytecode when compiled a regular expression in debug mode In-Reply-To: <1494170858.78.0.223872265764.issue30299@psf.upfronthosting.co.za> Message-ID: <1494185787.32.0.776901022367.issue30299@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The new output is the blank line and numbered lines, produced by the new dis function. The addition is specific to CPython's re module. Thus the doc for re.DEBUG remains "Display debug information about compiled expression." I think that the NEWS entry should also mention that this is a cpython-specific enhancement and not a language change. See review note. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 15:57:27 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Sun, 07 May 2017 19:57:27 +0000 Subject: [issue30302] Improve .__repr__ implementation for datetime.datetime.timedelta Message-ID: <1494187046.46.0.90330515352.issue30302@psf.upfronthosting.co.za> New submission from Utkarsh Upadhyay: Currently, the default implementation of datetime.datetime.__repr__ (the default output string produced at the console/IPython) gives a rather cryptic output: from datetime import datetime as D D.fromtimestamp(1390953543.1) - D.fromtimestamp(1121871596) # datetime.timedelta(3114, 28747, 100000) For the uninitiated, it is not obvious that the numeric values here are `days`, `seconds` and `microsecond` respectively. Would there be any pushback against changing this to: # datetime.timedelta(days=3114, seconds=28747, microseconds=100000) ? ---------- components: Library (Lib) messages: 293212 nosy: musically_ut priority: normal severity: normal status: open title: Improve .__repr__ implementation for datetime.datetime.timedelta type: enhancement versions: 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 May 7 15:59:32 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Sun, 07 May 2017 19:59:32 +0000 Subject: [issue30302] Improve .__repr__ implementation for datetime.datetime.timedelta In-Reply-To: <1494187046.46.0.90330515352.issue30302@psf.upfronthosting.co.za> Message-ID: <1494187172.95.0.171697032254.issue30302@psf.upfronthosting.co.za> Changes by Utkarsh Upadhyay : ---------- pull_requests: +1595 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 16:15:32 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 May 2017 20:15:32 +0000 Subject: [issue30302] Improve .__repr__ implementation for datetime.datetime.timedelta In-Reply-To: <1494187046.46.0.90330515352.issue30302@psf.upfronthosting.co.za> Message-ID: <1494188132.45.0.711267047066.issue30302@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The drawback is that this change increases the length of the repr. If you output few values in a row (for example output the repr of a list of timedeltas), this makes the output less readable. Users of datetime.timedelta know what arguments mean. If they don't know they always can look in the documentation or builtin help. datetime.datetime has more arguments, and its repr doesn't use keywords. ---------- nosy: +belopolsky, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 16:17:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 May 2017 20:17:07 +0000 Subject: [issue30299] Display the bytecode when compiled a regular expression in debug mode In-Reply-To: <1494170858.78.0.223872265764.issue30299@psf.upfronthosting.co.za> Message-ID: <1494188227.84.0.308389820049.issue30299@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What the review note you mean Terry? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 16:58:19 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Sun, 07 May 2017 20:58:19 +0000 Subject: [issue30302] Improve .__repr__ implementation for datetime.datetime.timedelta In-Reply-To: <1494187046.46.0.90330515352.issue30302@psf.upfronthosting.co.za> Message-ID: <1494190699.86.0.0761226669728.issue30302@psf.upfronthosting.co.za> Utkarsh Upadhyay added the comment: > The drawback is that this change increases the length of the repr. I would argue that it is a reasonable trade-off given the increase in ease of understanding. I know that this is a weak argument, but, keywords are not without precedent. Consider the comically more verbose example: import time time.gmtime(1121871596) # time.struct_time(tm_year=2005, tm_mon=7, tm_mday=20, tm_hour=14, tm_min=59, tm_sec=56, tm_wday=2, tm_yday=201, tm_isdst=0) > datetime.datetime has more arguments, and its repr doesn't use keywords. I think that guessing the meaning of values is much harder when it comes to timedelta. > Users of datetime.timedelta know what arguments mean. If they don't know they always can look in the documentation or builtin help. I created the issue after ... a friend ... spent an embarrassing amount of time debugging because he thought that the third argument represented milliseconds and not microseconds. <_< I could, of course, tell him: > In the face of ambiguity, resist the temptation to guess. But he could retort: > Explicit is better than implicit. and > Readability counts. I think he has a point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 19:41:43 2017 From: report at bugs.python.org (Martin Panter) Date: Sun, 07 May 2017 23:41:43 +0000 Subject: [issue30302] Improve .__repr__ implementation for datetime.timedelta In-Reply-To: <1494187046.46.0.90330515352.issue30302@psf.upfronthosting.co.za> Message-ID: <1494200503.86.0.639185254091.issue30302@psf.upfronthosting.co.za> Martin Panter added the comment: This was discussed fairly recently: . There seems to be a bit of support for changing this. It is not a bug fix, so has to go into the next release, now 3.7. I disagree that the positional timedelta parameters are well-known. The built-in help was also discussed in that thread. I don?t think it got fixed yet, did it? The datetime class represents absolute dates. It is nonsense to specify a date without a year. Timedelta is different, because time is measured with different units. The first parameter (days) is surprising considering most other Python APIs (sleep etc) deal with seconds. The size of the repr could be reduced a bit by dropping the module name: datetime.timedelta vs just timedelta. Although that would be inconsistent with the other classes; I?m not sure about this. Other improvements that I would like to see: 1. Drop leading zeros: timedelta(seconds=60) rather than timedelta(days=0, seconds=60). This would also help reduce the size. 2. Factor out the negative sign: -timedelta(seconds=60) rather than timedelta(days=-1, seconds=86340). ---------- nosy: +martin.panter title: Improve .__repr__ implementation for datetime.datetime.timedelta -> Improve .__repr__ implementation for datetime.timedelta versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 20:20:51 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 May 2017 00:20:51 +0000 Subject: [issue30297] Recursive starmap causes Segmentation fault In-Reply-To: <1494163912.12.0.28043122667.issue30297@psf.upfronthosting.co.za> Message-ID: <1494202851.49.0.192323600641.issue30297@psf.upfronthosting.co.za> Raymond Hettinger added the comment: What makes this report unique is that it is the first one occurring in the wild (i.e. wasn't an example contrived solely for the purpose of producing a crash). Otherwise, we're not ever seeing this happen in real code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 20:42:05 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 May 2017 00:42:05 +0000 Subject: [issue30297] Recursive starmap causes Segmentation fault In-Reply-To: <1494163912.12.0.28043122667.issue30297@psf.upfronthosting.co.za> Message-ID: <1494204125.93.0.417533342841.issue30297@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Serhiy, do you have any ideas for a non-invasive global solution to running out of C-stack? The GCC options for -fno-stack-limit and -fsplit-stack are one avenue. Another is to put in a periodic check in the c-eval loop to test whether available stack is getting too small and to find a way to exit gracefully. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 20:42:52 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Mon, 08 May 2017 00:42:52 +0000 Subject: [issue30302] Improve .__repr__ implementation for datetime.timedelta In-Reply-To: <1494187046.46.0.90330515352.issue30302@psf.upfronthosting.co.za> Message-ID: <1494204172.4.0.742895511498.issue30302@psf.upfronthosting.co.za> Utkarsh Upadhyay added the comment: > This was discussed fairly recently: That thread went deep and culminated here, as far as I can tell: https://marc.info/?l=python-dev&m=145077422417470&w=2 (I may not have explored all the branches, though.) So there indeed seems to be general agreement about changing this. It was heartening to know that I wasn't the only one to stumble. \o/ > The built-in help was also discussed in that thread. I don?t think it got fixed yet, did it? No, the doc-string is as uninformative as then, as far as I can tell: In [178]: datetime.timedelta? Init signature: datetime.timedelta(self, /, *args, **kwargs) Docstring: Difference between two datetime values. File: ~/miniconda3/lib/python3.5/datetime.py Type: type I'll investigate what documentation for other functions looks like and see if I can come up with something better. The exact documentation would be best discussed over diffs on Github. Then there is the issue of repr being explicitly documented, as you had pointed out on the Github issue. Guido thinks that any breakage is _unlikely_ but "asked around" here: https://marc.info/?l=python-dev&m=145065347022557&w=2 As far as I can tell, he didn't see an explicit response. > The size of the repr could be reduced a bit by dropping the module name: datetime.timedelta vs just timedelta. Although that would be inconsistent with the other classes; I?m not sure about this. Personally, I don't see a big problem either way but having datetime.timedelta in the repr feels reassuring to me that I have the 'right' type instead of some other 'timedelta' from a non-stdlib module (e.g. moments or pandas). > 1. Drop leading zeros: timedelta(seconds=60) rather than timedelta(days=0, seconds=60). This would also help reduce the size. This sounds reasonable. I'll make this change and add corresponding tests. > 2. Factor out the negative sign: -timedelta(seconds=60) rather than timedelta(days=-1, seconds=86340). I'm not sure there was consensus about this; if I understand correctly, Guido thinks that it is important that the repr return what the attributes hold: https://marc.info/?l=python-dev&m=145066934224955&w=2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 20:59:10 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 08 May 2017 00:59:10 +0000 Subject: [issue23702] docs.python.org/3/howto/descriptor.html still refers to "unbound methods" In-Reply-To: <1426708114.47.0.635748134131.issue23702@psf.upfronthosting.co.za> Message-ID: <1494205150.68.0.428907785087.issue23702@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Be careful with the documentation patch. Although unbound method as an object type is gone, unbound method as a concept is not. Conceptually, something like ``MyClass.spam`` is an unbound method: it is a method of the MyClass type, but bound to no instance. In Python 2 that concept was implemented by MethodType. In Python 3, the concept is implemented by FunctionType. While it is certainly true from one perspective that unbound methods are nothing but functions, it is nevertheless also sometimes useful to distinguish from "functions defined in a class" (methods) and "other functions". I think that nearly all Python programmers would be happy to call ``spam`` below: class MyClass: def spam(self, arg): ... a method, even though it is also/really a function. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 21:17:18 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 May 2017 01:17:18 +0000 Subject: [issue23702] docs.python.org/3/howto/descriptor.html still refers to "unbound methods" In-Reply-To: <1426708114.47.0.635748134131.issue23702@psf.upfronthosting.co.za> Message-ID: <1494206238.82.0.916723373213.issue23702@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'll fix that up. I've already been working on revising the document. There are a number of updates needed (user-friendly intro, properties revised to show the setting methods, __set_name__, etc). ---------- assignee: docs at python -> rhettinger nosy: +rhettinger priority: high -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 21:28:52 2017 From: report at bugs.python.org (Kostis Anagnostopoulos) Date: Mon, 08 May 2017 01:28:52 +0000 Subject: [issue11245] Implementation of IMAP IDLE in imaplib? In-Reply-To: <1298061371.03.0.0638918089315.issue11245@psf.upfronthosting.co.za> Message-ID: <1494206932.96.0.793775116812.issue11245@psf.upfronthosting.co.za> Kostis Anagnostopoulos added the comment: Before merging `imaplib2` please consider making proper use of the Python's standard `logging` module. ---------- nosy: +ankostis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 23:25:20 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 08 May 2017 03:25:20 +0000 Subject: [issue29990] Range checking in GB18030 decoder In-Reply-To: <1491364203.61.0.947006759836.issue29990@psf.upfronthosting.co.za> Message-ID: <1494213920.58.0.287335149149.issue29990@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1597 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 7 23:29:54 2017 From: report at bugs.python.org (Louie Lu) Date: Mon, 08 May 2017 03:29:54 +0000 Subject: [issue29447] Add/check os.PathLike support for the tempfile module's 'dir' arguments In-Reply-To: <1486273182.96.0.640027026479.issue29447@psf.upfronthosting.co.za> Message-ID: <1494214194.06.0.564930354956.issue29447@psf.upfronthosting.co.za> Louie Lu added the comment: @Brett, do you think if given a path-like dir, it should only be treated as `str`, or it could be `str` and `bytes`? My PR is now treated path-like dir as `str`, not `bytes`. This will affect at this places: tempfile.mkdtemp(dir=pathlike.Path(''), pre=b'', suf=b'') Should it raise a TypeError (since we can't mix str and bytes), or it will convert path-like to bytes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 00:04:04 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 May 2017 04:04:04 +0000 Subject: [issue30299] Display the bytecode when compiled a regular expression in debug mode In-Reply-To: <1494170858.78.0.223872265764.issue30299@psf.upfronthosting.co.za> Message-ID: <1494216244.02.0.53136916003.issue30299@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Whoops, the one I thought I added previously. I must not have clicked the [comment] button after writing it and before closing the tab. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 00:16:49 2017 From: report at bugs.python.org (Louie Lu) Date: Mon, 08 May 2017 04:16:49 +0000 Subject: [issue29947] In SocketServer, why not passing a factory instance for the RequestHandlerClass instead of the class itself? In-Reply-To: <1490875733.83.0.750732897079.issue29947@psf.upfronthosting.co.za> Message-ID: <1494217009.4.0.892617651779.issue29947@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +1598 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 00:17:16 2017 From: report at bugs.python.org (Louie Lu) Date: Mon, 08 May 2017 04:17:16 +0000 Subject: [issue29447] Add/check os.PathLike support for the tempfile module's 'dir' arguments In-Reply-To: <1486273182.96.0.640027026479.issue29447@psf.upfronthosting.co.za> Message-ID: <1494217036.66.0.0807780687999.issue29447@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +1599 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 00:53:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 May 2017 04:53:15 +0000 Subject: [issue29447] Add/check os.PathLike support for the tempfile module's 'dir' arguments In-Reply-To: <1486273182.96.0.640027026479.issue29447@psf.upfronthosting.co.za> Message-ID: <1494219195.71.0.978868489969.issue29447@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't see any changes in tempfile.py. If the path-like protocol already is supported for the dir argument, no change in the documentation is needed. tempfile.mkdtemp(dir=pathlike.Path(''), pre=b'', suf=b'') should raise a TypeError, but add also tests for path-like objects returning bytes path. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 01:44:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 May 2017 05:44:34 +0000 Subject: [issue30297] Recursive starmap causes Segmentation fault In-Reply-To: <1494163912.12.0.28043122667.issue30297@psf.upfronthosting.co.za> Message-ID: <1494222274.4.0.737693571344.issue30297@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Options like -fno-stack-limit and -fsplit-stack can help to avoid a crash, but they are compiler-specific and we should test how they affect the performance and memory consumption. How can we test that the available stack is too small? This is not a part of the language, we need to use some compiler-specific tricks. If add such check, it should be added not in the c-eval loop (or not only in the c-eval loop), but for every call of tp_iternext. Recursive call can avoid the c-eval loop. Maybe add the check in PyIter_Next() and always use PyIter_Next() instead of direct calls of tp_iternext. If the check for the stack size is not cheap we can just count the deep of the recursion and check the exact stack size every say 50 levels. And this is a good opportunity to check for KeyboardInterrupt . In any case it would be useful to add a user specified limit on the deep of the recursion similar to sys.getrecursionlimit(). Even if the stack grows unlimitedly we don't want to fall in the swapping on unexpected deep recursion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 02:39:29 2017 From: report at bugs.python.org (Louie Lu) Date: Mon, 08 May 2017 06:39:29 +0000 Subject: [issue29447] Add/check os.PathLike support for the tempfile module's 'dir' arguments In-Reply-To: <1486273182.96.0.640027026479.issue29447@psf.upfronthosting.co.za> Message-ID: <1494225568.99.0.932190169791.issue29447@psf.upfronthosting.co.za> Louie Lu added the comment: Serhiy, though this no need to add versionchanged, should this need to explicit note in doc, that tempfile support os.PathLike? also, I didn't get "add also tests for path-like objects returning bytes path", if `tempfile.mkdtemp(dir=pathlike.Path(''), pre=b'', suf=b'')` will raise TypeError, then we don't need to deal with path-like objects returning bytes. because tempfile._infer_return_type will treat path-like objects as str. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 03:17:24 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 08 May 2017 07:17:24 +0000 Subject: [issue30289] make distclean and Misc/python-config.sh In-Reply-To: <1494042070.28.0.252520928526.issue30289@psf.upfronthosting.co.za> Message-ID: <1494227844.78.0.882491333696.issue30289@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1600 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 03:58:09 2017 From: report at bugs.python.org (Louie Lu) Date: Mon, 08 May 2017 07:58:09 +0000 Subject: [issue30303] IDLE: Add _utest to textview Message-ID: <1494230289.92.0.930894896454.issue30303@psf.upfronthosting.co.za> New submission from Louie Lu: Relate to #30290, add _utest to textview to support direct unittest. ---------- assignee: terry.reedy components: IDLE messages: 293228 nosy: louielu, terry.reedy priority: normal severity: normal status: open title: IDLE: Add _utest to textview versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 04:23:59 2017 From: report at bugs.python.org (Louie Lu) Date: Mon, 08 May 2017 08:23:59 +0000 Subject: [issue30303] IDLE: Add _utest to textview In-Reply-To: <1494230289.92.0.930894896454.issue30303@psf.upfronthosting.co.za> Message-ID: <1494231839.12.0.771306055516.issue30303@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +1601 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 04:24:50 2017 From: report at bugs.python.org (Louie Lu) Date: Mon, 08 May 2017 08:24:50 +0000 Subject: [issue30303] IDLE: Add _utest to textview In-Reply-To: <1494230289.92.0.930894896454.issue30303@psf.upfronthosting.co.za> Message-ID: <1494231890.54.0.548306650331.issue30303@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 04:50:09 2017 From: report at bugs.python.org (Martin Panter) Date: Mon, 08 May 2017 08:50:09 +0000 Subject: [issue30304] TestCase.assertMultiLineEqual only registered for Unicode strings in 2.7 Message-ID: <1494233409.78.0.688533240712.issue30304@psf.upfronthosting.co.za> New submission from Martin Panter: In Mercurial revision 6e5b5d1b6714, the documentation for ?assertMultiLineEqual? was changed from This method is used by default when comparing Unicode strings with ?assertEqual?. to This method is used by default when comparing strings with ?assertEqual?. The new text is misleading because ?str? objects are also strings, but the default does not apply to ?str? objects. ---------- assignee: docs at python components: Documentation, Tests keywords: easy messages: 293229 nosy: docs at python, ezio.melotti, martin.panter priority: normal severity: normal stage: needs patch status: open title: TestCase.assertMultiLineEqual only registered for Unicode strings in 2.7 type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 06:50:59 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 08 May 2017 10:50:59 +0000 Subject: [issue30260] sock_dealloc() may call __repr__ when socket class is already collected by GC In-Reply-To: <1493829842.08.0.612214340964.issue30260@psf.upfronthosting.co.za> Message-ID: <1494240659.48.0.102051532255.issue30260@psf.upfronthosting.co.za> Xiang Zhang added the comment: Checked with asterite's scripts and it crashes in 3.5 but not in 3.6 and master. Victor, your patch in #26590 seems the resolution of this failure. ---------- nosy: +xiang.zhang versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 06:52:56 2017 From: report at bugs.python.org (=?utf-8?b?5pa55paH5re7?=) Date: Mon, 08 May 2017 10:52:56 +0000 Subject: [issue30305] python 2.7.13 join issue Message-ID: <1494240776.22.0.622107687448.issue30305@psf.upfronthosting.co.za> New submission from ???: when i use str join , i find some issue, such as str_msg = 'malluin=MTg5Njk2ODIyMA==; Path=/bizmall/; HttpOnly, mallkey=9a9b172e5cac49c6b1ef970f4405c5e91712468846bb23c477c852d4987703b074ce9a48b440d92ec7dd1012275c926a41a8e76cd5a0e4b17efa705ab2d42fc85192b6542b218d2ecefc88f0f7cd7c68; Path=/bizmall/; HttpOnly, malluin=EXPIRED; Path=/; Expires=Sun, 07-May-2017 09:49:24 GMT; HttpOnly, mallkey=EXPIRED; Path=/; Expires=Sun, 07-May-2017 09:49:24 GMT; HttpOnly, payforreadsn=EXPIRED; Path=/; Expires=Sun, 07-May-2017 09:49:24 GMT; HttpOnly, wxtokenkey=b7945ae2cd97e8e5d3029cd7b90a893f68ace0b498b100ff63d61d8bb2a0259c; Path=/; HttpOnly, wxticket=3510401828; Path=/; HttpOnly, wxticketkey=72a9df89b5c9460ea7507b21f5c6938068ace0b498b100ff63d61d8bb2a0259c; Path=/; HttpOnly, wap_sid=CJzgxYgHEkBVSXBfZVJUdktUVi1QV0RrSVNTR08wV3poTjE4UEpyVHU1b2JmMFZCaEhqVGVjTHJQRTVzaENzLXhWUnV2cGlFGAQg/BEo7rzXnwswpP7AyAU=; Path=/; HttpOnly, wap_sid2=CJzgxYgHEnBTM045bVNlZ0xOQmROSVNydEV4UExZZFhma1BpZVI2UVlybXc1WFlpa2NZbXRLLVpnTnl6UldVeGQxSnotbDgtR2tkVTFEek96U3ExU2VWYzQ1cTRiVmc3R0JBZWlMUEU3S1NScG9KTmhubUhBd0FBMKT+wMgF; Path=/; HttpOnly, pass_ticket=0JAIZfxQAFgv68rxGl33/gZEtmgCTyHk3Jd2pSWZOnQg0u5FKjc3BdNJABTOAyQ+; Path=/; HttpOnly'.replace( 'HttpOnly', '').replace(',', '').replace(' ', '') items = str_msg.split(';') new_item = '' for item in items: if 'wxtokenkey' in item: new_item = new_item.join((item + ';')) if 'wxticketkey' in item: new_item = new_item.join((item + ';')) if 'wap_sid=' in item: new_item = new_item.join((item + ';')) if 'wap_sid2' in item: new_item = new_item.join((item + ';')) if 'pass_ticket' in item: new_item = new_item.join((item + ';')) print new_item it would no stop !!! and such as str_msg = 'malluin=MTg5Njk2ODIyMA==; Path=/bizmall/; HttpOnly, mallkey=9a9b172e5cac49c6b1ef970f4405c5e91712468846bb23c477c852d4987703b074ce9a48b440d92ec7dd1012275c926a41a8e76cd5a0e4b17efa705ab2d42fc85192b6542b218d2ecefc88f0f7cd7c68; Path=/bizmall/; HttpOnly, malluin=EXPIRED; Path=/; Expires=Sun, 07-May-2017 09:49:24 GMT; HttpOnly, mallkey=EXPIRED; Path=/; Expires=Sun, 07-May-2017 09:49:24 GMT; HttpOnly, payforreadsn=EXPIRED; Path=/; Expires=Sun, 07-May-2017 09:49:24 GMT; HttpOnly, wxtokenkey=b7945ae2cd97e8e5d3029cd7b90a893f68ace0b498b100ff63d61d8bb2a0259c; Path=/; HttpOnly, wxticket=3510401828; Path=/; HttpOnly, wxticketkey=72a9df89b5c9460ea7507b21f5c6938068ace0b498b100ff63d61d8bb2a0259c; Path=/; HttpOnly, wap_sid=CJzgxYgHEkBVSXBfZVJUdktUVi1QV0RrSVNTR08wV3poTjE4UEpyVHU1b2JmMFZCaEhqVGVjTHJQRTVzaENzLXhWUnV2cGlFGAQg/BEo7rzXnwswpP7AyAU=; Path=/; HttpOnly, wap_sid2=CJzgxYgHEnBTM045bVNlZ0xOQmROSVNydEV4UExZZFhma1BpZVI2UVlybXc1WFlpa2NZbXRLLVpnTnl6UldVeGQxSnotbDgtR2tkVTFEek96U3ExU2VWYzQ1cTRiVmc3R0JBZWlMUEU3S1NScG9KTmhubUhBd0FBMKT+wMgF; Path=/; HttpOnly, pass_ticket=0JAIZfxQAFgv68rxGl33/gZEtmgCTyHk3Jd2pSWZOnQg0u5FKjc3BdNJABTOAyQ+; Path=/; HttpOnly'.replace( 'HttpOnly', '').replace(',', '').replace(' ', '') items = str_msg.split(';') new_item = '' for item in items: if 'wxtokenkey' in item: # new_item = new_item.join((item + ';')) new_item = new_item.join([item, ';']) if 'wxticketkey' in item: new_item = new_item.join([item, ';']) if 'wap_sid=' in item: new_item = new_item.join([item, ';']) if 'wap_sid2' in item: new_item = new_item.join([item, ';']) if 'pass_ticket' in item: new_item = new_item.join([item, ';']) print new_item it would be have a str and this str is pass_ticket=0JAIZfxQAFgv68rxGl33/gZEtmgCTyHk3Jd2pSWZOnQg0u5FKjc3BdNJABTOAyQ+wap_sid2=CJzgxYgHEnBTM045bVNlZ0xOQmROSVNydEV4UExZZFhma1BpZVI2UVlybXc1WFlpa2NZbXRLLVpnTnl6UldVeGQxSnotbDgtR2tkVTFEek96U3ExU2VWYzQ1cTRiVmc3R0JBZWlMUEU3S1NScG9KTmhubUhBd0FBMKT+wMgFwap_sid=CJzgxYgHEkBVSXBfZVJUdktUVi1QV0RrSVNTR08wV3poTjE4UEpyVHU1b2JmMFZCaEhqVGVjTHJQRTVzaENzLXhWUnV2cGlFGAQg/BEo7rzXnwswpP7AyAU=wxticketkey=72a9df89b5c9460ea7507b21f5c6938068ace0b498b100ff63d61d8bb2a0259cwxtokenkey=b7945ae2cd97e8e5d3029cd7b90a893f68ace0b498b100ff63d61d8bb2a0259c;;;;; but i think it should be wxtokenkey=b7945ae2cd97e8e5d3029cd7b90a893f68ace0b498b100ff63d61d8bb2a0259c;wxticketkey=72a9df89b5c9460ea7507b21f5c6938068ace0b498b100ff63d61d8bb2a0259c;wap_sid=CJzgxYgHEkBVSXBfZVJUdktUVi1QV0RrSVNTR08wV3poTjE4UEpyVHU1b2JmMFZCaEhqVGVjTHJQRTVzaENzLXhWUnV2cGlFGAQg/BEo7rzXnwswpP7AyAU=;wap_sid2=CJzgxYgHEnBTM045bVNlZ0xOQmROSVNydEV4UExZZFhma1BpZVI2UVlybXc1WFlpa2NZbXRLLVpnTnl6UldVeGQxSnotbDgtR2tkVTFEek96U3ExU2VWYzQ1cTRiVmc3R0JBZWlMUEU3S1NScG9KTmhubUhBd0FBMKT+wMgF;pass_ticket=0JAIZfxQAFgv68rxGl33/gZEtmgCTyHk3Jd2pSWZOnQg0u5FKjc3BdNJABTOAyQ+; ---------- components: macOS messages: 293231 nosy: ned.deily, ronaldoussoren, ??? priority: normal severity: normal status: open title: python 2.7.13 join issue type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 07:11:16 2017 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 08 May 2017 11:11:16 +0000 Subject: [issue30305] python 2.7.13 join issue In-Reply-To: <1494240776.22.0.622107687448.issue30305@psf.upfronthosting.co.za> Message-ID: <1494241876.81.0.726776378561.issue30305@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think you are misunderstanding how join works. join is useful when you have a list of strings, and you want to combine them together, possibly specifying a separator. The syntax is separator.join(list_of_strings), for example: >>> '-'.join(['foo', 'bar', 'baz']) 'foo-bar-baz' What you are doing is: new_item = new_item.join((item + ';')) Here new_item is the separator, and (item + ';') is a string (a sequence of characters), so the separator is added between each character of the string: >>> '-'.join('foobarbaz') 'f-o-o-b-a-r-b-a-z' new_item will grow bigger and bigger, and since you keep adding it between each character of the item, Python will soon run out of memory: >>> 'newitem'.join('foobarbaz') 'fnewitemonewitemonewitembnewitemanewitemrnewitembnewitemanewitemz' You probably want to add the items to a new list, and after the for loop you just need to do '; '.join(new_list_of_items), or, if you want a ; at the end, you can add (item + ';') to the list and then use ' '.join(new_list_of_items). I also suggest you to use the interactive interpreter to experiment with join. ---------- nosy: +ezio.melotti resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 08:08:36 2017 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 08 May 2017 12:08:36 +0000 Subject: [issue29979] cgi.parse_multipart is not consistent with FieldStorage In-Reply-To: <1491296331.11.0.181533719685.issue29979@psf.upfronthosting.co.za> Message-ID: <1494245316.98.0.287949804423.issue29979@psf.upfronthosting.co.za> Senthil Kumaran added the comment: New changeset cc3fa204d357be5fafc10eb8c2a80fe0bca998f1 by Senthil Kumaran (Pierre Quentel) in branch 'master': bpo-29979: Rewrite cgi.parse_multipart to make it consistent with FieldStorage (#991) https://github.com/python/cpython/commit/cc3fa204d357be5fafc10eb8c2a80fe0bca998f1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 08:09:05 2017 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 08 May 2017 12:09:05 +0000 Subject: [issue29979] cgi.parse_multipart is not consistent with FieldStorage In-Reply-To: <1491296331.11.0.181533719685.issue29979@psf.upfronthosting.co.za> Message-ID: <1494245345.96.0.789554180299.issue29979@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 10:04:41 2017 From: report at bugs.python.org (Martin Teichmann) Date: Mon, 08 May 2017 14:04:41 +0000 Subject: [issue30306] release arguments of contextmanager Message-ID: <1494252281.4.0.796080303271.issue30306@psf.upfronthosting.co.za> New submission from Martin Teichmann: The arguments of a function which was decorated to be a context manager are stored inside the context manager, and are thus kept alive. This is a memory leak. Example: @contextmanager def f(a): do_something_with(a) a = None # should release the memory yield if this is now called with something big, say with f(something_really_huge): pass then this something_really_huge is kept alive during the with statement, even though the function explicitly let go of it. ---------- components: Library (Lib) messages: 293234 nosy: Martin.Teichmann priority: normal severity: normal status: open title: release arguments of contextmanager type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 10:18:20 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 May 2017 14:18:20 +0000 Subject: [issue30306] release arguments of contextmanager In-Reply-To: <1494252281.4.0.796080303271.issue30306@psf.upfronthosting.co.za> Message-ID: <1494253100.73.0.56799658507.issue30306@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> ncoghlan nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 10:18:51 2017 From: report at bugs.python.org (Martin Teichmann) Date: Mon, 08 May 2017 14:18:51 +0000 Subject: [issue30306] release arguments of contextmanager In-Reply-To: <1494252281.4.0.796080303271.issue30306@psf.upfronthosting.co.za> Message-ID: <1494253131.4.0.498622571848.issue30306@psf.upfronthosting.co.za> Changes by Martin Teichmann : ---------- pull_requests: +1602 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 10:22:30 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 08 May 2017 14:22:30 +0000 Subject: [issue30291] Allow windows launcher to specify bit lengths with & without minor version In-Reply-To: <1494064652.52.0.930357680293.issue30291@psf.upfronthosting.co.za> Message-ID: <1494253350.29.0.186058182146.issue30291@psf.upfronthosting.co.za> Steve Dower added the comment: The actual change I want here is to support Company/Tag pairs as defined in PEP 514. There is no suffix on 64-bit CPython tags, so interpreting "-64" is going outside the PEP. I'd also be okay with a strict mode that requires -32 for 32-bit interpreters, rather than assuming the language version is close enough. Perhaps a "-only" flag or suffix? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 10:26:33 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 08 May 2017 14:26:33 +0000 Subject: [issue30251] Windows Visual Studio solution does not have an install target In-Reply-To: <1493805308.24.0.584899845977.issue30251@psf.upfronthosting.co.za> Message-ID: <1494253593.2.0.569286084906.issue30251@psf.upfronthosting.co.za> Steve Dower added the comment: Visual Studio has some deployment concepts, but for multi-project solutions like ours you would generally have a separate project. It's a build tool, not an install tool, and mixing the concepts is generally a bad idea. For building an installer, these projects are in tools/msi. For doing a quick layout, we could write a script to simply copy files around. There are scripts in Tools/msi that do some of this already that could be adapted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 10:26:44 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 08 May 2017 14:26:44 +0000 Subject: [issue30251] Windows Visual Studio solution does not have an install target In-Reply-To: <1493805308.24.0.584899845977.issue30251@psf.upfronthosting.co.za> Message-ID: <1494253604.63.0.367227200809.issue30251@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 11:15:13 2017 From: report at bugs.python.org (Marco Buttu) Date: Mon, 08 May 2017 15:15:13 +0000 Subject: [issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation) In-Reply-To: <1445194189.09.0.0973348556564.issue25435@psf.upfronthosting.co.za> Message-ID: <1494256513.62.0.209251578539.issue25435@psf.upfronthosting.co.za> Marco Buttu added the comment: I also noticed that the howto differentiates between objects and classes: "The details of invocation depend on whether obj is an object or a class." I think it is misleading, because a class is actually an object. IMHO is better to differentiate between classes and non-classes objects: "The details of invocation depend on whether obj is a class or not." ---------- nosy: +marco.buttu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 11:50:22 2017 From: report at bugs.python.org (Marco Buttu) Date: Mon, 08 May 2017 15:50:22 +0000 Subject: [issue30217] Missing entry for the tilde (~) operator in the Index In-Reply-To: <1493582160.76.0.882487661277.issue30217@psf.upfronthosting.co.za> Message-ID: <1494258622.72.0.858298679078.issue30217@psf.upfronthosting.co.za> Marco Buttu added the comment: Thanks Eric. I think the reference should be added here, as we do for the other operators: https://docs.python.org/3/library/stdtypes.html#bitwise-operations-on-integer-types ---------- nosy: +marco.buttu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 11:56:23 2017 From: report at bugs.python.org (Marco Buttu) Date: Mon, 08 May 2017 15:56:23 +0000 Subject: [issue30217] Missing entry for the tilde (~) operator in the Index In-Reply-To: <1493582160.76.0.882487661277.issue30217@psf.upfronthosting.co.za> Message-ID: <1494258983.53.0.116235294933.issue30217@psf.upfronthosting.co.za> Changes by Marco Buttu : ---------- pull_requests: +1603 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 12:01:56 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 08 May 2017 16:01:56 +0000 Subject: [issue30291] Allow windows launcher to specify bit lengths with & without minor version In-Reply-To: <1494064652.52.0.930357680293.issue30291@psf.upfronthosting.co.za> Message-ID: <1494259316.84.0.660447054867.issue30291@psf.upfronthosting.co.za> Steve Dower added the comment: With a few more minutes thought, being able to nicely support PEP 514 here might be too much for this poor launcher to handle, so it may just be best to do that as a separate tool. (In particular, the matching rules would have to change from "enter a Python version" to "enter some convenient search pattern as a command line option", and that's a non-trivial change.) Given that, I'm in favour of this change. When Eryk says the code is good (and the CLA notice comes through), I'll merge it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 12:02:01 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 08 May 2017 16:02:01 +0000 Subject: [issue30291] Allow windows launcher to specify bit lengths with & without minor version In-Reply-To: <1494064652.52.0.930357680293.issue30291@psf.upfronthosting.co.za> Message-ID: <1494259321.74.0.941731197648.issue30291@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- assignee: -> steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 12:24:08 2017 From: report at bugs.python.org (Kostis Anagnostopoulos) Date: Mon, 08 May 2017 16:24:08 +0000 Subject: [issue26543] imaplib noop Debug In-Reply-To: <1457738623.54.0.0867122071018.issue26543@psf.upfronthosting.co.za> Message-ID: <1494260648.82.0.992610573184.issue26543@psf.upfronthosting.co.za> Kostis Anagnostopoulos added the comment: That is a show-stopper, and the patch works fine. Should I submit a PR with a special test-case with debug >= 3 just for this? ---------- nosy: +ankostis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 13:10:15 2017 From: report at bugs.python.org (Eric Lebigot) Date: Mon, 08 May 2017 17:10:15 +0000 Subject: [issue30217] Missing entry for the tilde (~) operator in the Index In-Reply-To: <1493582160.76.0.882487661277.issue30217@psf.upfronthosting.co.za> Message-ID: <1494263415.58.0.724491788293.issue30217@psf.upfronthosting.co.za> Eric Lebigot added the comment: Good reference. Another one would be https://docs.python.org/3/reference/expressions.html#unary-arithmetic-and-bitwise-operations, which explicitly indicates that it only makes sense for integer types (which is useful to keep in mind, as one may think that it could somehow apply to floating point numbers as well). The one at https://docs.python.org/3.6/reference/datamodel.html#object.__invert__ is also important for learning that it is related to __invert__(). ---------- nosy: +Eric Lebigot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 13:14:18 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 08 May 2017 17:14:18 +0000 Subject: [issue29956] math.exp documentation is misleading In-Reply-To: <1490990917.06.0.404933995002.issue29956@psf.upfronthosting.co.za> Message-ID: <1494263658.51.0.204561630536.issue29956@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 13:21:38 2017 From: report at bugs.python.org (Aviv Palivoda) Date: Mon, 08 May 2017 17:21:38 +0000 Subject: [issue30262] Don't expose sqlite3 Cache and Statement In-Reply-To: <1493841130.42.0.625787216583.issue30262@psf.upfronthosting.co.za> Message-ID: <1494264098.12.0.577661813673.issue30262@psf.upfronthosting.co.za> Aviv Palivoda added the comment: I am not sure how to raise the deprecation waning in this case. We use both the Cache and Statement objects as part of the sqlite3 module internal flow. How can I only warn the user when he creates this classes directly and not when the sqlite3 module uses them? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 13:22:52 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 May 2017 17:22:52 +0000 Subject: [issue26543] imaplib noop Debug In-Reply-To: <1457738623.54.0.0867122071018.issue26543@psf.upfronthosting.co.za> Message-ID: <1494264172.97.0.305605846443.issue26543@psf.upfronthosting.co.za> R. David Murray added the comment: That sounds reasonable, if the debug output doesn't pollute the test run output. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 13:24:09 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Mon, 08 May 2017 17:24:09 +0000 Subject: [issue30230] Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard In-Reply-To: <1493735445.03.0.987403403044.issue30230@psf.upfronthosting.co.za> Message-ID: <1494264249.13.0.198907910568.issue30230@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: Additional question, are tests required to check this behavior? (Also, bumping) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 13:40:48 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 08 May 2017 17:40:48 +0000 Subject: [issue29447] Add/check os.PathLike support for the tempfile module's 'dir' arguments In-Reply-To: <1486273182.96.0.640027026479.issue29447@psf.upfronthosting.co.za> Message-ID: <1494265248.87.0.243743089561.issue29447@psf.upfronthosting.co.za> Brett Cannon added the comment: The key thing with the docs is that it doesn't say anywhere "takes a string path" or a "path as a string" or something else that suggests path-like objects don't work. If you want to clearly state that path-like objects are acceptable that is fine as well. As for the bytes/str parts, path-like objects that return bytes should work, but only if everything is str or bytes as passed into the function (e.g. mixing the types should not be expected to work). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 14:26:22 2017 From: report at bugs.python.org (rohit singh) Date: Mon, 08 May 2017 18:26:22 +0000 Subject: [issue30307] https://docs.python.org/3/tutorial/introduction.html#strings Section 3.1.2 doc issue Message-ID: <1494267982.7.0.781940622722.issue30307@psf.upfronthosting.co.za> New submission from rohit singh: The documentation says: >>> '"Isn\'t," she said.' '"Isn\'t," she said.' It should be: >>> '"Isn\'t," she said.' '"Isn't," she said.' ---------- assignee: docs at python components: Documentation messages: 293246 nosy: docs at python, rohit singh priority: normal severity: normal status: open title: https://docs.python.org/3/tutorial/introduction.html#strings Section 3.1.2 doc issue versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 14:30:28 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 May 2017 18:30:28 +0000 Subject: [issue30307] https://docs.python.org/3/tutorial/introduction.html#strings Section 3.1.2 doc issue In-Reply-To: <1494267982.7.0.781940622722.issue30307@psf.upfronthosting.co.za> Message-ID: <1494268228.31.0.773197549781.issue30307@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> Mariatta nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 14:39:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 May 2017 18:39:25 +0000 Subject: [issue29447] Add/check os.PathLike support for the tempfile module's 'dir' arguments In-Reply-To: <1486273182.96.0.640027026479.issue29447@psf.upfronthosting.co.za> Message-ID: <1494268765.29.0.989472442029.issue29447@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If tempfile doesn't have special code for supporting path-like objects, and nothing in the documentation points that path-like objects don't work, then the documentation doesn't need changes. This is just a consequence of implementing PEP 519 in low-level functions. If tempfile._infer_return_type will treat *all* path-like objects as str, this is a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 15:15:23 2017 From: report at bugs.python.org (David Hess) Date: Mon, 08 May 2017 19:15:23 +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: <1494270923.69.0.965088456423.issue4963@psf.upfronthosting.co.za> David Hess added the comment: Concur with @sivert ? the result of guess_extension() is non-deterministic between mimetypes module initialization. $ python Python 3.4.3 (default, Nov 17 2016, 01:08:31) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or "license" for more information. >>> $ python -c 'import mimetypes;print(mimetypes.guess_extension("image/jpeg"))' .jpe $ python -c 'import mimetypes;print(mimetypes.guess_extension("image/jpeg"))' .jpe $ python -c 'import mimetypes;print(mimetypes.guess_extension("image/jpeg"))' .jpe $ python -c 'import mimetypes;print(mimetypes.guess_extension("image/jpeg"))' .jpeg $ python -c 'import mimetypes;print(mimetypes.guess_extension("image/jpeg"))' .jpeg $ python -c 'import mimetypes;print(mimetypes.guess_extension("image/jpeg"))' .jpe $ python -c 'import mimetypes;print(mimetypes.guess_extension("image/jpeg"))' .jpg $ ---------- nosy: +dhess _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 15:35:57 2017 From: report at bugs.python.org (David Hess) Date: Mon, 08 May 2017 19:35:57 +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: <1494272157.53.0.878596838926.issue4963@psf.upfronthosting.co.za> David Hess added the comment: And the underlying problem causing this: $ python -c 'import mimetypes;print(mimetypes.guess_all_extensions("image/jpeg"))' ['.jpeg', '.jpg', '.jpe'] $ python -c 'import mimetypes;print(mimetypes.guess_all_extensions("image/jpeg"))' ['.jpg', '.jpe', '.jpeg'] $ python -c 'import mimetypes;print(mimetypes.guess_all_extensions("image/jpeg"))' ['.jpg', '.jpeg', '.jpe'] $ python -c 'import mimetypes;print(mimetypes.guess_all_extensions("image/jpeg"))' ['.jpe', '.jpg', '.jpeg'] $ python -c 'import mimetypes;print(mimetypes.guess_all_extensions("image/jpeg"))' ['.jpeg', '.jpg', '.jpe'] $ If the module can't know which extension is preferred, perhaps guess_extension should just be deprecated and the results of guess_all_extensions sorted on return? At least that would give us some determinism to work with. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 16:12:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 May 2017 20:12:41 +0000 Subject: [issue30193] Support the buffer protocol in json.loads() In-Reply-To: <1493333744.87.0.320689923757.issue30193@psf.upfronthosting.co.za> Message-ID: <1494274361.69.0.398688992498.issue30193@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The proposed patch doesn't work with all objects supporting the buffer protocol, for example it doesn't work with array.array('u', '\ufeff[1,2,3]'). This is easy to fix. But I'm not sure that it is worth to complicate the code for adding support of the buffer protocol. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 16:22:27 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 May 2017 20:22:27 +0000 Subject: [issue30193] Support the buffer protocol in json.loads() In-Reply-To: <1493333744.87.0.320689923757.issue30193@psf.upfronthosting.co.za> Message-ID: <1494274947.65.0.358147687664.issue30193@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> bob.ippolito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 16:23:10 2017 From: report at bugs.python.org (Nikolay Kim) Date: Mon, 08 May 2017 20:23:10 +0000 Subject: [issue30193] Support the buffer protocol in json.loads() In-Reply-To: <1493333744.87.0.320689923757.issue30193@psf.upfronthosting.co.za> Message-ID: <1494274990.22.0.375856892228.issue30193@psf.upfronthosting.co.za> Nikolay Kim added the comment: I am fine with any decision. close with "won't fix" is fine too ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 16:28:46 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 May 2017 20:28:46 +0000 Subject: [issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation) In-Reply-To: <1445194189.09.0.0973348556564.issue25435@psf.upfronthosting.co.za> Message-ID: <1494275325.99.0.861229065795.issue25435@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I think it is misleading, because a class is actually an object. This is only misleading *after* you know all the interesting details about Python and metaclasses. Prior to that, it is a reasonable and important distinction that I don't want to get lost in weasel words. The calls from object.__getattribute__ are different that those from type.__getattribute__. Likewise, data and non-data descriptors can only be described in terms of objects versus classes. Lastly, descriptors only work when stored in a class, if you store them in instances, they don't get invoked. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 17:20:00 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 08 May 2017 21:20:00 +0000 Subject: [issue30308] Add code coverage for argument in random.shuffle Message-ID: <1494278400.3.0.911074987674.issue30308@psf.upfronthosting.co.za> New submission from Cheryl Sabella: Added test cases for `random` argument in random.shuffle for code coverage. Two interesting results (documented within test cases): 1. In the docs, `random` is defined as a function returning a float in the range [0, 1), but negative floats could be returned and shuffle worked using slice notation. 2. A dictionary with sequential numeric keys could be shuffled. ---------- components: Tests messages: 293253 nosy: csabella priority: normal severity: normal status: open title: Add code coverage for argument in random.shuffle type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 17:23:30 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 08 May 2017 21:23:30 +0000 Subject: [issue30308] Add code coverage for argument in random.shuffle In-Reply-To: <1494278400.3.0.911074987674.issue30308@psf.upfronthosting.co.za> Message-ID: <1494278610.14.0.388992126937.issue30308@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +1604 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 17:26:16 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 08 May 2017 21:26:16 +0000 Subject: [issue30308] Add code coverage for argument in random.shuffle In-Reply-To: <1494278400.3.0.911074987674.issue30308@psf.upfronthosting.co.za> Message-ID: <1494278776.49.0.693219348131.issue30308@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Add Mark Dickinson and Raymond Hettinger to nosy list per Brett's suggestion on core-mentorship. ---------- nosy: +mark.dickinson, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 17:42:16 2017 From: report at bugs.python.org (Marc Culler) Date: Mon, 08 May 2017 21:42:16 +0000 Subject: [issue30310] tkFont.py assumes that all font families are encoded as ascii in Python 2.7 Message-ID: <1494279736.5.0.821030807704.issue30310@psf.upfronthosting.co.za> New submission from Marc Culler: And that is a very bad assumption. On Windows 10 in the Japanese locale the default TkFixedFont has family u'\uff2d\uff33 \u30b4\u30b7\u30c3\u30af' (a transliteration of MS Gothic). The error occurs on line 51: 47 def _set(self, kw): 48 options = [] 49 for k, v in kw.items(): 50 options.append("-"+k) >>>> 51 options.append(str(v)) 52 return tuple(options) I will attach a screenshot showing the crash on a Japanese Windows 10 system, running in the Python 2.7 command line application. ---------- components: Tkinter messages: 293256 nosy: culler priority: normal severity: normal status: open title: tkFont.py assumes that all font families are encoded as ascii in Python 2.7 type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 17:44:22 2017 From: report at bugs.python.org (Marc Culler) Date: Mon, 08 May 2017 21:44:22 +0000 Subject: [issue30310] tkFont.py assumes that all font families are encoded as ascii in Python 2.7 In-Reply-To: <1494279736.5.0.821030807704.issue30310@psf.upfronthosting.co.za> Message-ID: <1494279862.75.0.475444102728.issue30310@psf.upfronthosting.co.za> Changes by Marc Culler : Added file: http://bugs.python.org/file46851/JapanesePythonBug.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 18:17:56 2017 From: report at bugs.python.org (Martin Panter) Date: Mon, 08 May 2017 22:17:56 +0000 Subject: [issue29823] mimetypes guesses XSL mimetype when passed an XML file In-Reply-To: <1489636404.8.0.316801040698.issue29823@psf.upfronthosting.co.za> Message-ID: <1494281876.83.0.730275949995.issue29823@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 18:19:07 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 08 May 2017 22:19:07 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1494281947.7.0.713853553618.issue30273@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 18:26:49 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 May 2017 22:26:49 +0000 Subject: [issue30262] Don't expose sqlite3 Cache and Statement In-Reply-To: <1493841130.42.0.625787216583.issue30262@psf.upfronthosting.co.za> Message-ID: <1494282409.59.0.213277207153.issue30262@psf.upfronthosting.co.za> R. David Murray added the comment: I don't do much with the C API, but since your goal is to remove them from the PyMODINIT_FUNC, I would think you could replace those entries with calls to wrapper functions that issue the deprecation and then call the real function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 18:34:41 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 May 2017 22:34:41 +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: <1494282881.44.0.506854073848.issue4963@psf.upfronthosting.co.za> R. David Murray added the comment: @dhess: do you want to work on the OrderedDict + correctly ordered hardcoded lists solution? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 18:35:03 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 May 2017 22:35:03 +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: <1494282903.13.0.204082368899.issue4963@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- stage: test needed -> needs patch versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 18:39:08 2017 From: report at bugs.python.org (Kostis Anagnostopoulos) Date: Mon, 08 May 2017 22:39:08 +0000 Subject: [issue26543] imaplib noop Debug In-Reply-To: <1457738623.54.0.0867122071018.issue26543@psf.upfronthosting.co.za> Message-ID: <1494283148.47.0.482355401715.issue26543@psf.upfronthosting.co.za> Changes by Kostis Anagnostopoulos : ---------- pull_requests: +1605 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 18:58:21 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 May 2017 22:58:21 +0000 Subject: [issue30308] Add code coverage for argument in random.shuffle In-Reply-To: <1494278400.3.0.911074987674.issue30308@psf.upfronthosting.co.za> Message-ID: <1494284301.21.0.554351931125.issue30308@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 19:02:32 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 May 2017 23:02:32 +0000 Subject: [issue30308] Add code coverage for argument in random.shuffle In-Reply-To: <1494278400.3.0.911074987674.issue30308@psf.upfronthosting.co.za> Message-ID: <1494284552.28.0.486701511167.issue30308@psf.upfronthosting.co.za> Raymond Hettinger added the comment: * Why not use unittest.mock to test the *random* argument for shuffle? * Try to avoid direct calls to _randbelow(). That method is a non-public implementation detail subject to change. * Also please don't make test_random.py depend on secrets which itself depends on random.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 19:06:28 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Mon, 08 May 2017 23:06:28 +0000 Subject: [issue30300] asyncio.Controller In-Reply-To: <1494181497.37.0.0898291474199.issue30300@psf.upfronthosting.co.za> Message-ID: <1494284788.34.0.135054216894.issue30300@psf.upfronthosting.co.za> Nathaniel Smith added the comment: Looks interesting! What's the advantage over running the server and the test in the same loop? The ability to use blocking operations in the tests, and to re-use an expensive-to-start server over multiple tests? (I've mostly used threads in tests to run blocking code for interoperability testing, and kept the async code in the main thread, so this is a bit novel to me.) ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 19:47:04 2017 From: report at bugs.python.org (Martin Panter) Date: Mon, 08 May 2017 23:47:04 +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: <1494287224.41.0.502301595238.issue4963@psf.upfronthosting.co.za> Martin Panter added the comment: I suggest to discuss the non-determinism problem in Issue 1043134 (about determining a canonical extension for each content type). I understood this bug (Issue 4963) is about the behaviour of repeated initialization of the same instance of mimetypes. BTW an ordered dictionary wouldn?t help with duplicate dictionary keys; see guess_extension("application/excel"). ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 20:16:15 2017 From: report at bugs.python.org (Martin Panter) Date: Tue, 09 May 2017 00:16:15 +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: <1494288975.23.0.954528542199.issue4963@psf.upfronthosting.co.za> Martin Panter added the comment: I understand hash randomization was added after this bug was opened. Here is a demonstration with ?video/mp4?, which only has the extension ?.mp4? built in. But my /etc/mime.types file lists ?mp4 mp4v mpg4?, so after the second initialization the behaviour changes: PYTHONHASHSEED=0 python3.5 -c 'from mimetypes import *; print(guess_all_extensions("video/mp4")); init(); print(guess_all_extensions("video/mp4"))' ['.mp4', '.mp4v', '.mpg4'] ['.mpg4', '.mp4', '.mp4v'] The first extension is always ?.mp4?, regardless of hash randomization, due to the built-in list. But after re-initialization, the first extension depends on the order in the internal dictionary. Using an ordered dictionary may work as a bug fix, but the whole initialization logic is so complex and it would be good to simplify it in the long term. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 20:34:10 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 09 May 2017 00:34:10 +0000 Subject: [issue29505] Submit the re, json, & csv modules to oss-fuzz testing In-Reply-To: <1486587261.97.0.342323514088.issue29505@psf.upfronthosting.co.za> Message-ID: <1494290050.14.0.37256858676.issue29505@psf.upfronthosting.co.za> Gregory P. Smith added the comment: you can list me as a oss-fuzz contact. use my work email address. simplejson is worthy but as both it and the python standard library ship separately people use both so they both ultimately deserve fuzzing and fixing on their own so I'd add it to CPython as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 20:44:57 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 09 May 2017 00:44:57 +0000 Subject: [issue30300] asyncio.Controller In-Reply-To: <1494284788.34.0.135054216894.issue30300@psf.upfronthosting.co.za> Message-ID: <20170508204443.203cfe7d@presto> Barry A. Warsaw added the comment: On May 08, 2017, at 11:06 PM, Nathaniel Smith wrote: >Looks interesting! What's the advantage over running the server and the test >in the same loop? The ability to use blocking operations in the tests, and to >re-use an expensive-to-start server over multiple tests? So, the ability to re-use expensive-to-start servers is definitely one of the advantages. I use nose2's layers, but test fixtures would fall into the same category. As for running the server and tests in the same loop; I haven't tried that, but it seems like it would be more complicated to set up (maybe that's dependent on the code under test). More important is that I want to block the tests until the server starts up. I'm not sure (haven't tried) whether that's possible when running them all in the same loop. One other use case I have is for the LMTP server in Mailman 3. The controller turns out to be useful based on the start/stop framework for MM3 "runners". That's probably strictly doable without the controller, but it's convenient, readable, and a nice reuse. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 20:48:53 2017 From: report at bugs.python.org (Jonathan Goble) Date: Tue, 09 May 2017 00:48:53 +0000 Subject: [issue30299] Display the bytecode when compiled a regular expression in debug mode In-Reply-To: <1494170858.78.0.223872265764.issue30299@psf.upfronthosting.co.za> Message-ID: <1494290933.61.0.999642511037.issue30299@psf.upfronthosting.co.za> Changes by Jonathan Goble : ---------- nosy: +Jonathan Goble _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 21:34:22 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 09 May 2017 01:34:22 +0000 Subject: [issue30311] random.shuffle pointlessly shuffles dicts Message-ID: <1494293662.45.0.505067861838.issue30311@psf.upfronthosting.co.za> New submission from Steven D'Aprano: According to the documentation, random.shuffle() should accept a sequence. But it also accepts dicts, in which case it does nothing, expensively: py> x = dict.fromkeys(range(10**6)) py> random.shuffle(x) py> str(x)[:55] + "...}" '{0: None, 1: None, 2: None, 3: None, 4: None, 5: None, ...}' I'm not sure if it is better to explicitly test for and reject dicts and mappings, or just document that sorting dicts will apparently succeed while doing nothing. Do we want to support sorting OrderedDicts? That at least makes sense, since they have an order, but again shuffle() seemingly works but actually does nothing. I lean towards explicitly testing for dicts and raising. ---------- messages: 293265 nosy: rhettinger, steven.daprano priority: normal severity: normal status: open title: random.shuffle pointlessly shuffles dicts type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 21:58:20 2017 From: report at bugs.python.org (Martin Panter) Date: Tue, 09 May 2017 01:58:20 +0000 Subject: [issue30311] random.shuffle pointlessly shuffles dicts In-Reply-To: <1494293662.45.0.505067861838.issue30311@psf.upfronthosting.co.za> Message-ID: <1494295100.74.0.894202581563.issue30311@psf.upfronthosting.co.za> Martin Panter added the comment: It is also pointless to shuffle a list object repeating the same item, but that is no reason to add a special case. Is there a real problem with allowing dictionaries and OrderedDict? It seems to behave sensibly if you give each item a unique value: >>> D = {i: i * 100 for i in range(5)} >>> D {0: 0, 1: 100, 2: 200, 3: 300, 4: 400} >>> shuffle(D) >>> D {0: 300, 1: 100, 2: 200, 3: 0, 4: 400} ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 22:05:47 2017 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 May 2017 02:05:47 +0000 Subject: [issue30181] Correct the parsing of a test case docstring. In-Reply-To: <1493261074.73.0.807341942876.issue30181@psf.upfronthosting.co.za> Message-ID: <1494295547.15.0.578594037458.issue30181@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +1606 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 22:25:11 2017 From: report at bugs.python.org (Brian May) Date: Tue, 09 May 2017 02:25:11 +0000 Subject: [issue30181] Correct the parsing of a test case docstring. In-Reply-To: <1493261074.73.0.807341942876.issue30181@psf.upfronthosting.co.za> Message-ID: <1494296711.9.0.638710970069.issue30181@psf.upfronthosting.co.za> Brian May added the comment: I made an attempt at a PR. Unfortunately some of the tests appear to fail on some environments, and the messages produced don't exactly clarify why. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 22:29:38 2017 From: report at bugs.python.org (Tim Peters) Date: Tue, 09 May 2017 02:29:38 +0000 Subject: [issue30311] random.shuffle pointlessly shuffles dicts In-Reply-To: <1494293662.45.0.505067861838.issue30311@psf.upfronthosting.co.za> Message-ID: <1494296978.41.0.385924348248.issue30311@psf.upfronthosting.co.za> Tim Peters added the comment: Generally speaking, trying to shuffle a dict D already blows up, unless D's keys are the integers range(len(D)). In that case, D is indistinguishable from a list in the sense that both map range(N) to values via __getitem__. `shuffle()` does no type checks whatsoever now, and will shuffle any object that maps range(N) to values. Fine by me the way it is. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 22:32:15 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 09 May 2017 02:32:15 +0000 Subject: [issue30289] make distclean and Misc/python-config.sh In-Reply-To: <1494042070.28.0.252520928526.issue30289@psf.upfronthosting.co.za> Message-ID: <1494297135.55.0.94865526177.issue30289@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset fa5abac1e6cd74979557d5a6f960a55f40a10b0e by Xiang Zhang in branch 'master': bpo-30289: remove Misc/python-config.sh when make distclean (#1498) https://github.com/python/cpython/commit/fa5abac1e6cd74979557d5a6f960a55f40a10b0e ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 22:37:18 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 09 May 2017 02:37:18 +0000 Subject: [issue30289] make distclean and Misc/python-config.sh In-Reply-To: <1494042070.28.0.252520928526.issue30289@psf.upfronthosting.co.za> Message-ID: <1494297438.33.0.816794078738.issue30289@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1608 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 22:47:51 2017 From: report at bugs.python.org (Brian May) Date: Tue, 09 May 2017 02:47:51 +0000 Subject: [issue30181] Correct the parsing of a test case docstring. In-Reply-To: <1493261074.73.0.807341942876.issue30181@psf.upfronthosting.co.za> Message-ID: <1494298071.36.0.0499497698079.issue30181@psf.upfronthosting.co.za> Brian May added the comment: Me getting confused at the newline in the comparison output. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 22:56:32 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 09 May 2017 02:56:32 +0000 Subject: [issue30289] make distclean and Misc/python-config.sh In-Reply-To: <1494042070.28.0.252520928526.issue30289@psf.upfronthosting.co.za> Message-ID: <1494298592.65.0.809081074263.issue30289@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 410d75ab71e2db0fdc8b2016600a3d3d4830f38e by Xiang Zhang in branch '3.6': bpo-30289: remove Misc/python-config.sh when make distclean (#1498) (#1506) https://github.com/python/cpython/commit/410d75ab71e2db0fdc8b2016600a3d3d4830f38e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 22:57:31 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 09 May 2017 02:57:31 +0000 Subject: [issue30289] make distclean and Misc/python-config.sh In-Reply-To: <1494042070.28.0.252520928526.issue30289@psf.upfronthosting.co.za> Message-ID: <1494298651.63.0.608479769304.issue30289@psf.upfronthosting.co.za> Xiang Zhang added the comment: Thanks for your report! ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 23:22:43 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 09 May 2017 03:22:43 +0000 Subject: [issue30306] release arguments of contextmanager In-Reply-To: <1494252281.4.0.796080303271.issue30306@psf.upfronthosting.co.za> Message-ID: <1494300163.56.0.354453537913.issue30306@psf.upfronthosting.co.za> Nick Coghlan added the comment: Nice catch. This behaviour is an artifact of the ContextDecorator support in _GeneratorContextManager, where context managers created with `@contextmanager` can be used as function decorators (implicitly wrapping them in a with statement) as well as directly in with statements: to handle the ContextDecorator case, the original arguments are stored on the _GeneratorContextManager instance, which has the side effect of keeping those arguments referenced for the whole of the with statement body (due to the reference to the instance from the bound __exit__ method). Martin's initial patch just unconditionally deletes those attributes in __enter__, which is technically correct, but *looks* wrong when reading the code (understanding why it's correct requires understanding the private _recreate_cm API used for collaboration between ContextDecorator and _GeneratorContextManager, and the fact that that relationship is a bit weird and convoluted is the main reason it's private in the first place). My recommendation on the PR for a more self-obviously correct fix is to do the following: - add a new "allow_recreation=True" flag parameter to `_GeneratorContextManager.__init__` that controls whether or not the CM recreation attributes get set or not - pass `False` for that argument in `_recreate_cm` so they get set to None instead - update `__enter__` to set them to None if they're not already None The practical effect is the same as Martin's original patch, but the more explicit version should make it easier for readers to see what is going on (i.e. even when recreation is allowed during construction, the intent is that for any given instance, you will only ever call either __enter__() *or* _recreate_cm(), and once you do call __enter__(), that's it - the only permitted call after that point on that particular instance is __exit__()). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 23:38:35 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 09 May 2017 03:38:35 +0000 Subject: [issue29990] Range checking in GB18030 decoder In-Reply-To: <1491364203.61.0.947006759836.issue29990@psf.upfronthosting.co.za> Message-ID: <1494301115.68.0.192058421668.issue29990@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 9da408d15bdef624a5632182cb4edf98001fa82f by Xiang Zhang in branch 'master': bpo-29990: Fix range checking in GB18030 decoder (#1495) https://github.com/python/cpython/commit/9da408d15bdef624a5632182cb4edf98001fa82f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 23:46:14 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 09 May 2017 03:46:14 +0000 Subject: [issue29990] Range checking in GB18030 decoder In-Reply-To: <1491364203.61.0.947006759836.issue29990@psf.upfronthosting.co.za> Message-ID: <1494301574.67.0.0250108891382.issue29990@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1609 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 8 23:47:37 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 09 May 2017 03:47:37 +0000 Subject: [issue29990] Range checking in GB18030 decoder In-Reply-To: <1491364203.61.0.947006759836.issue29990@psf.upfronthosting.co.za> Message-ID: <1494301657.31.0.73919413641.issue29990@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1610 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 00:03:56 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 09 May 2017 04:03:56 +0000 Subject: [issue29990] Range checking in GB18030 decoder In-Reply-To: <1491364203.61.0.947006759836.issue29990@psf.upfronthosting.co.za> Message-ID: <1494302635.99.0.532568756427.issue29990@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1611 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 00:16:52 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 09 May 2017 04:16:52 +0000 Subject: [issue29990] Range checking in GB18030 decoder In-Reply-To: <1491364203.61.0.947006759836.issue29990@psf.upfronthosting.co.za> Message-ID: <1494303412.55.0.0650226701076.issue29990@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 72e1b61da0920c5607481304879e039b63e2a3d5 by Xiang Zhang in branch '3.6': bpo-29990: Fix range checking in GB18030 decoder (#1495) (#1507) https://github.com/python/cpython/commit/72e1b61da0920c5607481304879e039b63e2a3d5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 00:17:11 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 09 May 2017 04:17:11 +0000 Subject: [issue29990] Range checking in GB18030 decoder In-Reply-To: <1491364203.61.0.947006759836.issue29990@psf.upfronthosting.co.za> Message-ID: <1494303431.94.0.670725828897.issue29990@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset f5f7870d9322b46ab87c45b2c4c46f6b10ecbd70 by Xiang Zhang in branch '3.5': bpo-29990: Fix range checking in GB18030 decoder (#1495) (#1508) https://github.com/python/cpython/commit/f5f7870d9322b46ab87c45b2c4c46f6b10ecbd70 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 00:18:58 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 09 May 2017 04:18:58 +0000 Subject: [issue29990] Range checking in GB18030 decoder In-Reply-To: <1491364203.61.0.947006759836.issue29990@psf.upfronthosting.co.za> Message-ID: <1494303538.41.0.558357382474.issue29990@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 4e7457b85316e6591a4f0c3a4d0807bfdf7a2bea by Xiang Zhang in branch '2.7': bpo-29990: Fix range checking in GB18030 decoder (#1509) https://github.com/python/cpython/commit/4e7457b85316e6591a4f0c3a4d0807bfdf7a2bea ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 00:19:26 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 09 May 2017 04:19:26 +0000 Subject: [issue29990] Range checking in GB18030 decoder In-Reply-To: <1491364203.61.0.947006759836.issue29990@psf.upfronthosting.co.za> Message-ID: <1494303566.81.0.129907293371.issue29990@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 00:22:14 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 09 May 2017 04:22:14 +0000 Subject: [issue29990] Range checking in GB18030 decoder In-Reply-To: <1491364203.61.0.947006759836.issue29990@psf.upfronthosting.co.za> Message-ID: <1494303734.42.0.442633895556.issue29990@psf.upfronthosting.co.za> Xiang Zhang added the comment: Thanks Ma Lin for finding the problem! Don't know why you close the PR but anyway, we solve it finally. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 02:04:12 2017 From: report at bugs.python.org (Sebastian Noack) Date: Tue, 09 May 2017 06:04:12 +0000 Subject: [issue30297] Recursive starmap causes Segmentation fault In-Reply-To: <1494163912.12.0.28043122667.issue30297@psf.upfronthosting.co.za> Message-ID: <1494309852.96.0.20958658296.issue30297@psf.upfronthosting.co.za> Sebastian Noack added the comment: Thanks for your response, both of you. All you said, make sense. Just for the record, I wouldn't necessarily expect 200k nested iterators to work. Even if it could be made work, I guess it would use way too much memory. But a RuntimeError would be much preferable over a crash. For the code above, the fix would be to just immediately convert the iterator returned by starmap() to a list. But in the end, regardless of this additional operation, it didn't perform well, so that I tossed that code, and used openssl's PBKDF2 implementation through the ctypes module. Still, I'm somewhat concerned that code like this, will cause an unexpected crash that cannot be handled, dependent on run time variables. Could this perhaps even provide a security vulnerability? It seems to be a buffer overflow, after all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 02:08:04 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 09 May 2017 06:08:04 +0000 Subject: [issue21261] Teach IDLE to Autocomplete dictionary keys In-Reply-To: <1397672472.64.0.119805531416.issue21261@psf.upfronthosting.co.za> Message-ID: <1494310084.55.0.989436559369.issue21261@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +1612 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 02:10:51 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 09 May 2017 06:10:51 +0000 Subject: [issue24932] Use proper command line parsing in _testembed In-Reply-To: <1440481888.38.0.825081560944.issue24932@psf.upfronthosting.co.za> Message-ID: <1494310251.92.0.0811494215605.issue24932@psf.upfronthosting.co.za> Nick Coghlan added the comment: Based on the latest round of PEP 538 review, the related test case that currently relies on _testembed is going to be able to be simplified to just setting LC_ALL=C when calling the subprocess (the amount of code it's letting me delete from the draft patch is further persuading me that changing the env var updates from "LC_ALL & LANG" to "LC_CTYPE & LANG" is the right call). That means that change will also eliminate the dependence on this test suite enhancement for backports. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 02:11:20 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 09 May 2017 06:11:20 +0000 Subject: [issue21261] Teach IDLE to Autocomplete dictionary keys In-Reply-To: <1397672472.64.0.119805531416.issue21261@psf.upfronthosting.co.za> Message-ID: <1494310280.35.0.0943197309896.issue21261@psf.upfronthosting.co.za> Louie Lu added the comment: In this PR, it will complete dictionary key with string, int, and others. for example: d = {'long_key': 10, 'short_key': 20, 30: 40, (((1, 2), 3, 4), 5): 50} d['lo -> d['long_key' d[(((1 -> d[(((1, 2), 3, 4), 5) d[3 -> d[30 The problem is, autocomplete_w can't figure the original key is string or others, so this will be possible: d[long -> d[long_key] d[shor -> d[short_key] ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 02:36:46 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 09 May 2017 06:36:46 +0000 Subject: [issue30311] random.shuffle pointlessly shuffles dicts In-Reply-To: <1494293662.45.0.505067861838.issue30311@psf.upfronthosting.co.za> Message-ID: <1494311806.53.0.151440674174.issue30311@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I concur with Tim. These are just duck-typing facts of life. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 02:38:11 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 09 May 2017 06:38:11 +0000 Subject: [issue21261] Teach IDLE to Autocomplete dictionary keys In-Reply-To: <1397672472.64.0.119805531416.issue21261@psf.upfronthosting.co.za> Message-ID: <1494311891.92.0.19937619842.issue21261@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Would it be safer/simpler to just autocomplete string keys. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 02:48:55 2017 From: report at bugs.python.org (Steve Barnes) Date: Tue, 09 May 2017 06:48:55 +0000 Subject: [issue30291] Allow windows launcher to specify bit lengths with & without minor version In-Reply-To: <1494064652.52.0.930357680293.issue30291@psf.upfronthosting.co.za> Message-ID: <1494312535.26.0.655385120493.issue30291@psf.upfronthosting.co.za> Steve Barnes added the comment: CLA Now showing on profile. Minor change to help message, (Defaults to matching 64 bit installation), pushed to hopefully auto-update the CLA flag. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 03:33:24 2017 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 09 May 2017 07:33:24 +0000 Subject: [issue30308] Add code coverage for argument in random.shuffle In-Reply-To: <1494278400.3.0.911074987674.issue30308@psf.upfronthosting.co.za> Message-ID: <1494315204.74.0.524080496284.issue30308@psf.upfronthosting.co.za> Mark Dickinson added the comment: I see you've added a test for the behaviour of: shuffle(seq, random=lambda: -1.0) I'd suggest leaving that test out: that this works right now is really just an accident of the (CPython) implementation, and it may well not work on other Python implementations. Adding a test in effect says that there was a deliberate decision to support this (which as far as I know there isn't, and shouldn't be). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 03:54:25 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 09 May 2017 07:54:25 +0000 Subject: [issue29262] Provide a way to check for *real* typing.Union instances In-Reply-To: <1484322347.31.0.5780880295.issue29262@psf.upfronthosting.co.za> Message-ID: <1494316465.22.0.12531000026.issue29262@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: The discussed functionality is published as a separate package: https://pypi.python.org/pypi/typing-inspect https://github.com/ilevkivskyi/typing_inspect After the API is settled, some introspection functions may be added directly to typing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 03:57:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 07:57:22 +0000 Subject: [issue30308] Add code coverage for argument in random.shuffle In-Reply-To: <1494278400.3.0.911074987674.issue30308@psf.upfronthosting.co.za> Message-ID: <1494316642.56.0.187495706149.issue30308@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 03:58:18 2017 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 09 May 2017 07:58:18 +0000 Subject: [issue30308] Add code coverage for argument in random.shuffle In-Reply-To: <1494278400.3.0.911074987674.issue30308@psf.upfronthosting.co.za> Message-ID: <1494316698.09.0.901980077973.issue30308@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'm also a bit uncomfortable with adding tests for other specific exceptions when a misbehaving `random` is passed: again, the details of whether an exception is raised or not for "self.assertRaises(IndexError, shuffle, seq, random=lambda: -1.1)", and which precise class of exception is raised, seem like something that could be left as implementation-defined. I'm not sure I see much value in pinning down the precise behaviour in this case (which is effectively what a testcase does). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 03:59:14 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 09 May 2017 07:59:14 +0000 Subject: [issue21261] Teach IDLE to Autocomplete dictionary keys In-Reply-To: <1397672472.64.0.119805531416.issue21261@psf.upfronthosting.co.za> Message-ID: <1494316754.14.0.956469503078.issue21261@psf.upfronthosting.co.za> Louie Lu added the comment: I'm not sure the "safer" meaning. If it is about for beginner less confuse when mistakenly typing "d[long_", the answer will be yes for only complete string keys. Impl complexity between str-only and not-str-only will not have too much different, only need to change the sentinel and some other work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 04:40:15 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 09 May 2017 08:40:15 +0000 Subject: [issue30297] Recursive starmap causes Segmentation fault In-Reply-To: <1494163912.12.0.28043122667.issue30297@psf.upfronthosting.co.za> Message-ID: <1494319215.34.0.585763122223.issue30297@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Since this is duplicate, marking as closed. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 04:47:27 2017 From: report at bugs.python.org (Oskar Weser) Date: Tue, 09 May 2017 08:47:27 +0000 Subject: [issue30312] Small correction in set code sample Message-ID: <1494319647.07.0.625979333092.issue30312@psf.upfronthosting.co.za> New submission from Oskar Weser: There is a code example about the set type found under: https://docs.python.org/3/tutorial/datastructures.html It reads as: ``` >>> basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'} >>> print(basket) # show that duplicates have been removed {'orange', 'banana', 'pear', 'apple'} >>> 'orange' in basket # fast membership testing True >>> 'crabgrass' in basket False >>> # Demonstrate set operations on unique letters from two words ... >>> a = set('abracadabra') >>> b = set('alacazam') >>> a # unique letters in a {'a', 'r', 'b', 'c', 'd'} >>> a - b # letters in a but not in b {'r', 'd', 'b'} >>> a | b # letters in either a or b ``` I read "either a or b" as "a .EXOR. b". Shouldn't it be: ``` >>> a | b # letters in a or b ``` I don't speak English as a native language, so perhaps I am wrong. ---------- assignee: docs at python components: Documentation messages: 293291 nosy: docs at python, mcocdawc priority: normal severity: normal status: open title: Small correction in set code sample versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 05:01:32 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 09 May 2017 09:01:32 +0000 Subject: [issue30293] Peephole binops folding can lead to memory and bytecache ballooning In-Reply-To: <1494097457.83.0.135778883063.issue30293@psf.upfronthosting.co.za> Message-ID: <1494320492.07.0.374795494837.issue30293@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Looking back at the OP's timings in the referenced SO question, I would expect that if someone "fixed" this issue, it wouldn't be long before someone else filed a performance regression bug claiming a 63,000x slowdown in exactly the same code. I'm marking this as closed because if this ever did arise in real code, it is unclear whether the desirable behavior is to eat memory but run fast, or to save memory upfront but run dog slow and eat memory later when the function is called. Either way, the situation is likely to be very rare. Your guess is as good as mine regarding which behavior would be more desirable to the user. Presumably, if they direct the computer to build a large object, they won't be surprised if a large object is created. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 05:10:11 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 09 May 2017 09:10:11 +0000 Subject: [issue30312] Small correction in set code sample In-Reply-To: <1494319647.07.0.625979333092.issue30312@psf.upfronthosting.co.za> Message-ID: <1494321011.78.0.667375386841.issue30312@psf.upfronthosting.co.za> Raymond Hettinger added the comment: ISTM the result of the expression makes the meaning clear: >>> a | b {'r', 'l', 'b', 'c', 'z', 'd', 'a', 'm'} That said, the text might be a little clearer like this: # letters in a or b or both ---------- assignee: docs at python -> Mariatta nosy: +Mariatta, rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 05:12:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 May 2017 09:12:24 +0000 Subject: [issue30306] release arguments of contextmanager In-Reply-To: <1494252281.4.0.796080303271.issue30306@psf.upfronthosting.co.za> Message-ID: <1494321144.29.0.525652304123.issue30306@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Wouldn't be better to split _GeneratorContextManager on two classes rather than add a boolean argument? Currently _GeneratorContextManager used two different functions -- an one-shot context manager and a decorator that recreates context managers. Proposed patch makes _GeneratorContextManager an one-shot context manager again (it no longer keep references to arguments), and adds _GeneratorContextManagerDecorator which can be used either as an one-shot context manager (references to arguments are removed after use) or as a decorator (in the last case the gen attribute is not created). ---------- keywords: +patch nosy: +serhiy.storchaka Added file: http://bugs.python.org/file46852/refactor-contextmanager.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 05:13:18 2017 From: report at bugs.python.org (Martijn Pieters) Date: Tue, 09 May 2017 09:13:18 +0000 Subject: [issue30293] Peephole binops folding can lead to memory and bytecache ballooning In-Reply-To: <1494097457.83.0.135778883063.issue30293@psf.upfronthosting.co.za> Message-ID: <1494321198.66.0.827006457148.issue30293@psf.upfronthosting.co.za> Martijn Pieters added the comment: Thanks Raymond, for the response. I agree, we can't prevent all possible misuse, and avoiding the memory issue would require overly costly checks as to what is being multiplied or added. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 05:34:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 09:34:05 +0000 Subject: [issue30258] [2.7] regrtest: handle child process crash In-Reply-To: <1493821528.82.0.0272255783657.issue30258@psf.upfronthosting.co.za> Message-ID: <1494322445.16.0.0474991875125.issue30258@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 74683fc6247c522ae955a6e7308b8ff51def35d8 by Victor Stinner in branch 'master': bpo-30258: regrtest: Fix run_tests_multiprocess() (#1479) https://github.com/python/cpython/commit/74683fc6247c522ae955a6e7308b8ff51def35d8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 05:49:54 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 09 May 2017 09:49:54 +0000 Subject: [issue504219] locale.resetlocale is broken Message-ID: <1494323394.59.0.967012238323.issue504219@psf.upfronthosting.co.za> Nick Coghlan added the comment: Trying to come up with a short LC_MONETARY example for PEP 538, I just ran into what seems to be a related problem with locale.resetlocale(), which is that it doesn't work properly for categories other than LC_CTYPE: locale.getdefaultlocale() doesn't let you say which category you're actually interested in, so even if you specific a category for resetlocale(), it's going to look at the LC_CTYPE setting, *NOT* the one for the category you're interested in. So perhaps a suitable design change here would be to update resetlocale() to just pass an empty string (letting the underlying platform API call figure out the right default), rather than passing the result of locale.getdefaultlocale()? ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 06:02:10 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 09 May 2017 10:02:10 +0000 Subject: =?utf-8?q?=5Bissue30301=5D_=E2=80=9CAttributeError=3A_=27SimpleQueue=27_o?= =?utf-8?b?YmplY3QgaGFzIG5vIGF0dHJpYnV0ZSAnX3BvbGwn4oCd?= In-Reply-To: <1494183710.88.0.708414094068.issue30301@psf.upfronthosting.co.za> Message-ID: <1494324130.94.0.821059798703.issue30301@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +davin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 06:58:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 10:58:11 +0000 Subject: [issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7 In-Reply-To: <1494001389.01.0.0290337792937.issue30283@psf.upfronthosting.co.za> Message-ID: <1494327491.39.0.0912800893815.issue30283@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1613 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 07:09:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 11:09:36 +0000 Subject: [issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7 In-Reply-To: <1494001389.01.0.0290337792937.issue30283@psf.upfronthosting.co.za> Message-ID: <1494328176.66.0.621684532392.issue30283@psf.upfronthosting.co.za> STINNER Victor added the comment: I backported test_regrtest from master to 2.7. I removed: * ParseArgsTestCase: regrtest.py of 2.7 has no API to easily write unit tests for argument parsing * test_huntrleaks_fd_leak(): this features doesn't exist in regrtest 2.7 * test_coverage(): regrtest 2.7 argument parser doesn't support --coverage, moreover this is an issue with the test summary * check_executed_tests() doesn't check the final list "Tests results: xxx" since it doesn't exist in Python 2.7 * test_list_tests(): --list-tests feature doesn't exist in 2.7 * test_fromlist() only supports the most basic format: "test_xxx" * test_slowest_interrupted(): the test failed and I was too lazy to try to fix it, this test is fragile * test_wait(): no --wait feature in 2.7 I made minor changes (ex: super()) to port the code from Python 3.7 to 2.7. I removed code using faulthandler, since faulthandler doesn't exist in 2.7. test_slowest() was renamed to test_slow(), since regrtest 2.7 has the cmdline option --slow, not --slowest. I will try to fix test_coverage() later, after test_regrtest is added to 2.7. test_crashed() uses "import ctypes; ctypes.string_at(0)" instead of "import faulthandler; faulthandler._sigsegv()", I hope that ctypes.string_at(0) is enough to crash on all platforms :-D Otherwise, I may add something to _testcapi. I may try to backport/fix other issues later to fix other removed tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 07:09:40 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 09 May 2017 11:09:40 +0000 Subject: [issue30306] release arguments of contextmanager In-Reply-To: <1494252281.4.0.796080303271.issue30306@psf.upfronthosting.co.za> Message-ID: <1494328180.01.0.55015872078.issue30306@psf.upfronthosting.co.za> Nick Coghlan added the comment: You're right, there's no actual requirement that _recreate_cm() call self.__class__, so it can use a different type internally. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 07:22:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 11:22:11 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1494328931.15.0.0232844399809.issue30273@psf.upfronthosting.co.za> STINNER Victor added the comment: The coverage job has been fixed and I'm unable to reproduce bpo-15366 bug (my change doesn't seem to have introduced a regression), so I close the issue. I sent an email to python-dev to warn about this change, so maybe others will double check. @Jeremy: please double check my change to make sure that I didn't introduce a regression. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 07:23:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 11:23:56 +0000 Subject: [issue15366] venv assumes header files in sys._home + '/Include' In-Reply-To: <1342438211.61.0.183367325622.issue15366@psf.upfronthosting.co.za> Message-ID: <1494329036.58.0.145243610589.issue15366@psf.upfronthosting.co.za> STINNER Victor added the comment: I reverted the commit in 2.7, 3.5, 3.6 and master (3.7) branches to fix bpo-30273, but I'm unable to reproduce this bug so it seems like venv and virtualend have been updated in the meanwhile to add ${venv}/include to the include directories. See for example the commit ab6b962ef241be97536573d7490ce1cfc74fde18. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 07:57:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 11:57:22 +0000 Subject: [issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7 In-Reply-To: <1494001389.01.0.0290337792937.issue30283@psf.upfronthosting.co.za> Message-ID: <1494331042.35.0.790575809297.issue30283@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d2aff607199a24182714404777c80c7f180a35af by Victor Stinner in branch '2.7': [2.7] bpo-30283: Backport test_regrtest from master to 2.7 (#1513) https://github.com/python/cpython/commit/d2aff607199a24182714404777c80c7f180a35af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 08:13:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 12:13:21 +0000 Subject: [issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7 In-Reply-To: <1494001389.01.0.0290337792937.issue30283@psf.upfronthosting.co.za> Message-ID: <1494332001.55.0.813118803639.issue30283@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, test_regrtest of Python 3.5 only tests regrtest command line parser, it doesn't contain functional tests. We may also backport functional tests for 3.5. ---------- versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 08:42:33 2017 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 May 2017 12:42:33 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1494333753.64.0.80996384596.issue30273@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +1614 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 08:42:33 2017 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 May 2017 12:42:33 +0000 Subject: [issue15366] venv assumes header files in sys._home + '/Include' In-Reply-To: <1342438211.61.0.183367325622.issue15366@psf.upfronthosting.co.za> Message-ID: <1494333753.76.0.683806924244.issue15366@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +1615 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 08:52:50 2017 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 09 May 2017 12:52:50 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1494334370.92.0.432661641259.issue30273@psf.upfronthosting.co.za> Jeremy Kloth added the comment: PR1515 addresses the issue from bpo-15366 (venv from Python compiled with builddir != srcdir). It seems that the original fix from bpo-15366 no longer worked. This addresses that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 09:05:22 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 09 May 2017 13:05:22 +0000 Subject: [issue15786] IDLE code completion window can hang or misbehave with mouse In-Reply-To: <1346027701.33.0.908436854594.issue15786@psf.upfronthosting.co.za> Message-ID: <1494335122.37.0.945221406107.issue15786@psf.upfronthosting.co.za> Louie Lu added the comment: The reason why click on listbox will disappear is because we bind HIDE_VIRTUAL_EVENT with on widget.text. When click on listbox, it will focusOut the widget.text then focusOn listbox, thus trigger the hide process. The reason why click on listbox and move the cursor out of box, then click will freeze IDLE cursor, it because tk will generate three event: FocusOut, FocusOut, and ButtonPress: hidell generated by: .!listedtoplevel.!frame.text.!toplevel2.!listbox focus on: None hidell generated by: .!listedtoplevel.!frame.text.!toplevel2 focus on: None prove generated by: .!listedtoplevel.!frame.text focus on: .!listedtoplevel.!frame.text Becase we bind HIDE process on widget.text, it will then trigger hide_window, and at the same time, FoucsOut event is still on the half-way, and then the listbox is destory and reset to None, I think this is why it will freeze until re-focus on IDEL. Attach PR solve this problem, it re-bind the HIDE process from widget.text to listbox, thus it will not trigger some race-contidion when destroying autocompletewindow. ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 09:07:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 13:07:59 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1494335279.15.0.783192024098.issue30273@psf.upfronthosting.co.za> STINNER Victor added the comment: I reopen the issue since Jeremy posted a new PR. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 09:08:51 2017 From: report at bugs.python.org (flying sheep) Date: Tue, 09 May 2017 13:08:51 +0000 Subject: [issue10436] tarfile.extractfile in "r|" stream mode fails with filenames or members from getmembers() In-Reply-To: <1289931464.79.0.618120236196.issue10436@psf.upfronthosting.co.za> Message-ID: <1494335331.91.0.950567600608.issue10436@psf.upfronthosting.co.za> flying sheep added the comment: well, we should just allow extractall(members=['foo', 'bar']) currently members only accepts TarInfo objects, not filenames, but it?s easy to accept both. https://github.com/python/cpython/blob/74683fc6247c522ae955a6e7308b8ff51def35d8/Lib/tarfile.py#L1991-L1999 sth like: filenames = set() for member in members: if isinstance(member, TarInfo): # do what?s done now else: filenames.add(member) for tarinfo in self: if tarinfo.name in filenames: self.extract(tarinfo) ---------- nosy: +flying sheep _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 09:10:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 13:10:27 +0000 Subject: [issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7 In-Reply-To: <1494001389.01.0.0290337792937.issue30283@psf.upfronthosting.co.za> Message-ID: <1494335427.07.0.196560605842.issue30283@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1616 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 09:15:08 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 09 May 2017 13:15:08 +0000 Subject: [issue15786] IDLE code completion window can hang or misbehave with mouse In-Reply-To: <1346027701.33.0.908436854594.issue15786@psf.upfronthosting.co.za> Message-ID: <1494335708.02.0.496900845581.issue15786@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +1617 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 09:15:54 2017 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 09 May 2017 13:15:54 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1494335754.01.0.530973750453.issue30273@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Yeah, sorry, I was working (fighting ;) with the new GitHub workflow while you updated the status. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 09:22:53 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 09 May 2017 13:22:53 +0000 Subject: [issue15786] IDLE code completion window can hang or misbehave with mouse In-Reply-To: <1346027701.33.0.908436854594.issue15786@psf.upfronthosting.co.za> Message-ID: <1494336173.91.0.603793861617.issue15786@psf.upfronthosting.co.za> Louie Lu added the comment: Test PR on MacOS with Tk 5.8.9, when double click on listbox will cause freeze after hide window ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 09:34:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 13:34:45 +0000 Subject: [issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7 In-Reply-To: <1494001389.01.0.0290337792937.issue30283@psf.upfronthosting.co.za> Message-ID: <1494336885.18.0.0616002421482.issue30283@psf.upfronthosting.co.za> STINNER Victor added the comment: PR 1516 is the real stuff. I would like to enhance regrtest output in 2.7 to be able to debug buildbots stuck somewhere. Example: --- filecmp [398/402] test_setcomps [399/402] test_array [400/402] test_tools [24166 refs] (...) [24167 refs] recursedown('@test_33891_tmp') [401/402] test_trace command timed out: 1200 seconds without output running ['make', 'buildbottest', 'TESTOPTS=-j2 -j4', 'TESTPYTHONOPTS=', 'TESTTIMEOUT=900'], attempting to kill process killed by signal 9 program finished with exit code -1 elapsedTime=1628.312249 --- http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%202.7/builds/73/steps/test/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 09:36:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 13:36:21 +0000 Subject: [issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7 In-Reply-To: <1494001389.01.0.0290337792937.issue30283@psf.upfronthosting.co.za> Message-ID: <1494336981.15.0.782896459799.issue30283@psf.upfronthosting.co.za> STINNER Victor added the comment: I chose to not backport "loadavg: 1.73" feature (bpo-30263) in PR 1516. I still consider this feature as experimental, not sure that it's really useful :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 09:39:43 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 13:39:43 +0000 Subject: [issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7 In-Reply-To: <1494001389.01.0.0290337792937.issue30283@psf.upfronthosting.co.za> Message-ID: <1494337183.73.0.0654798007096.issue30283@psf.upfronthosting.co.za> STINNER Victor added the comment: test_regrtest failed on "x86 Windows XP VS9.0 2.7" buildbot, but passed on "x86 Windows XP 2.7" buildbot? --- [279/402/1] test_regrtest test test_regrtest failed -- multiple errors occurred; run in verbose mode for details --- http://buildbot.python.org/all/builders/x86%20Windows%20XP%20VS9.0%202.7/builds/140/steps/test/logs/stdio The test isn't rerun in verbose mode. Another bug? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 09:46:08 2017 From: report at bugs.python.org (Tomas Orsava) Date: Tue, 09 May 2017 13:46:08 +0000 Subject: [issue29243] --enable-optimizations makes common build commands always need to compile from scratch In-Reply-To: <1484151314.82.0.308427338149.issue29243@psf.upfronthosting.co.za> Message-ID: <1494337568.04.0.0268625035888.issue29243@psf.upfronthosting.co.za> Changes by Tomas Orsava : ---------- pull_requests: +1618 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 09:50:04 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 09 May 2017 13:50:04 +0000 Subject: [issue28787] Out of tree --with--dtrace builds fail with a traceback In-Reply-To: <1479982245.65.0.843842109576.issue28787@psf.upfronthosting.co.za> Message-ID: <1494337804.47.0.916770531283.issue28787@psf.upfronthosting.co.za> Changes by Charalampos Stratakis : ---------- pull_requests: +1619 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 09:59:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 13:59:58 +0000 Subject: [issue30313] Tests of Python 2.7 VS9.0 buildbots must be run with -uall -rwW options Message-ID: <1494338398.28.0.940820958867.issue30313@psf.upfronthosting.co.za> New submission from STINNER Victor: After my commit d2aff607199a24182714404777c80c7f180a35af of bpo-30283, test_regrtest failed with "multiple errors occurred; run in verbose mode for details" on "x86 Windows XP VS9.0 2.7" buildbot, but tests are not re-run in verbose mode on this buildbot :-( See http://bugs.python.org/issue30283#msg293312 The "test" step of the buildbot runs directly the PC/VS9.0/rt.bat command which only pass -j2 option to regrtest.py, but not -uall -rwW. Other Windows buildbots run Tools/buildbot/test.bat which pass -uall -rwW to regrtest.py. I see different options: * Modify PC/VS9.0/rt.bat to pass extra options: I dislike this option, it changes the behaviour, some people may rely on the current behaviour (and Python 2.7 is now considered as super stable) * Copy Tools/buildbot/test.bat to PC/VS9.0/test.bat and modify the copy to run PC/VS9.0/rt.bat. I dislike this option, it duplicates code. * Modify Tools/buildbot/test.bat to add an option to specify the pass to rt.bat and then modify the buildbot config to use test.bat instead of rt.bat but also use the new option to pass PC/VS9.0/rt.bat (or just "PC/VS9.0/" depending how the option is designed). @Zach: I request your advice on this issue ;-) ---------- components: Tests, Windows keywords: buildbot messages: 293313 nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Tests of Python 2.7 VS9.0 buildbots must be run with -uall -rwW options versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 10:00:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 14:00:30 +0000 Subject: [issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7 In-Reply-To: <1494001389.01.0.0290337792937.issue30283@psf.upfronthosting.co.za> Message-ID: <1494338430.17.0.35814584284.issue30283@psf.upfronthosting.co.za> STINNER Victor added the comment: > The test isn't rerun in verbose mode. Another bug? Yes, I opened bpo-30313. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 10:05:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 14:05:23 +0000 Subject: [issue29243] --enable-optimizations makes common build commands always need to compile from scratch In-Reply-To: <1484151314.82.0.308427338149.issue29243@psf.upfronthosting.co.za> Message-ID: <1494338723.28.0.55640010934.issue29243@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 03b8a378dfa46372b96790f82c85e9b72518f1bf by Victor Stinner (torsava) in branch '3.6': [3.6] bpo-29243: Fix Makefile with respect to --enable-optimizations (GH-1478) (#1518) https://github.com/python/cpython/commit/03b8a378dfa46372b96790f82c85e9b72518f1bf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 10:56:08 2017 From: report at bugs.python.org (Tomas Orsava) Date: Tue, 09 May 2017 14:56:08 +0000 Subject: [issue29243] --enable-optimizations makes common build commands always need to compile from scratch In-Reply-To: <1484151314.82.0.308427338149.issue29243@psf.upfronthosting.co.za> Message-ID: <1494341768.3.0.115280041264.issue29243@psf.upfronthosting.co.za> Changes by Tomas Orsava : ---------- pull_requests: +1620 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 10:56:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 14:56:48 +0000 Subject: [issue30314] Buildbots: 15 min is too low for test_tools on x86 Tiger 3.6 buildbot Message-ID: <1494341808.3.0.862589804304.issue30314@psf.upfronthosting.co.za> New submission from STINNER Victor: We should give more than 15 min to the "x86 Tiger 3.6" buildbot, since test_tools was killed by the timeout. On the previous build, test_tools took min 25 sec. The global 15 min timeout was designed to detect deadlocks issues, but here it's just that the buildbot is sometimes too slow. Maybe we should increase the timeout to 30 min on all buildbots, but also increase the timeout of the "tests" step to long than 1 hour? Otherwise, the test can be killed by buildbot without logging the Python traceback. Maybe we can configured buildbot to first send a signal (SIGUSR1? SIGINT?) before killing the process to dump a traceback, but that's something different. --- 0:15:54 [ 52/405] test_tools crashed -- running: test_zipfile (178 sec) Timeout (0:15:00)! Thread 0xa000d000 (most recent call first): File "/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/ast.py", line 101 in ... File "/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/test/test_tools/test_unparse.py", line 124 in assertASTEqual ... --- http://buildbot.python.org/all/builders/x86%20Tiger%203.6/builds/349/steps/test/logs/stdio See also bpo-30172: "test_tools takes longer than 5 minutes on some buildbots". ---------- messages: 293316 nosy: haypo priority: normal severity: normal status: open title: Buildbots: 15 min is too low for test_tools on x86 Tiger 3.6 buildbot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 11:06:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 15:06:37 +0000 Subject: [issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7 In-Reply-To: <1494001389.01.0.0290337792937.issue30283@psf.upfronthosting.co.za> Message-ID: <1494342397.3.0.323411941897.issue30283@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 453a6857023a0a2c714772cda8717ecf03de64f5 by Victor Stinner in branch '2.7': bpo-30283: Backport regrtest features from master to 2.7 (#1516) https://github.com/python/cpython/commit/453a6857023a0a2c714772cda8717ecf03de64f5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 11:08:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 15:08:20 +0000 Subject: [issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7 In-Reply-To: <1494001389.01.0.0290337792937.issue30283@psf.upfronthosting.co.za> Message-ID: <1494342500.43.0.746889644071.issue30283@psf.upfronthosting.co.za> STINNER Victor added the comment: I merged a first serie of enhancements for regrtest output in the 2.7 branch. Let's see how things are going, if it helps to debug stuck buildbots. For Python 3.5, I'm less motivated to backport enhancements since Python 3.5 has faulthandler which is used in regrtest to kill a stuck test after 15 min with a nice Python traceback. But maybe I will do the similar backports, since I'm now trying to watching buildbots of all Python branches, not only matser ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 11:12:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 15:12:40 +0000 Subject: [issue29243] --enable-optimizations makes common build commands always need to compile from scratch In-Reply-To: <1484151314.82.0.308427338149.issue29243@psf.upfronthosting.co.za> Message-ID: <1494342760.98.0.693877002336.issue29243@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 8489409bbfabb2ddc30ed55c9f4d679a3710ebe4 by Victor Stinner (torsava) in branch '3.5': [3.5] bpo-29243: Fix Makefile with respect to --enable-optimizations (GH-1478) (#1520) https://github.com/python/cpython/commit/8489409bbfabb2ddc30ed55c9f4d679a3710ebe4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 11:14:08 2017 From: report at bugs.python.org (Tomas Orsava) Date: Tue, 09 May 2017 15:14:08 +0000 Subject: [issue29243] --enable-optimizations makes common build commands always need to compile from scratch In-Reply-To: <1484151314.82.0.308427338149.issue29243@psf.upfronthosting.co.za> Message-ID: <1494342848.67.0.0105162675015.issue29243@psf.upfronthosting.co.za> Changes by Tomas Orsava : ---------- pull_requests: +1621 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 11:21:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 15:21:29 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1494343289.24.0.976252788025.issue30273@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, I reproduced the bug: cd ~/prog/python/master git clean -fdx mkdir ~/build_cpython cd ~/build_cpython/ ~/prog/python/master/configure --with-pydebug --prefix=/home/haypo/prefix make ./python -m venv ~/venv cd ~/venv . bin/activate python -m pip install fat => error on missing Python.h ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 11:24:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 15:24:15 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1494343455.36.0.164603050169.issue30273@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset dbdea629e2e0e4bd8845aa55041e0a0ca4172cf3 by Victor Stinner (Jeremy Kloth) in branch 'master': bpo-30273: update distutils.sysconfig for venv's created from Python (#1515) https://github.com/python/cpython/commit/dbdea629e2e0e4bd8845aa55041e0a0ca4172cf3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 11:24:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 15:24:15 +0000 Subject: [issue15366] venv assumes header files in sys._home + '/Include' In-Reply-To: <1342438211.61.0.183367325622.issue15366@psf.upfronthosting.co.za> Message-ID: <1494343455.71.0.658108121935.issue15366@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset dbdea629e2e0e4bd8845aa55041e0a0ca4172cf3 by Victor Stinner (Jeremy Kloth) in branch 'master': bpo-30273: update distutils.sysconfig for venv's created from Python (#1515) https://github.com/python/cpython/commit/dbdea629e2e0e4bd8845aa55041e0a0ca4172cf3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 11:25:31 2017 From: report at bugs.python.org (kxroberto) Date: Tue, 09 May 2017 15:25:31 +0000 Subject: [issue3839] wsgi.simple_server resets 'Content-Length' header on empty content even if app defined it. In-Reply-To: <1221156514.39.0.145827705782.issue3839@psf.upfronthosting.co.za> Message-ID: <1494343531.43.0.590335958992.issue3839@psf.upfronthosting.co.za> kxroberto added the comment: However, setting a default "0" when no content, that is still too much in general. In case of a '304 Not Modified' for example (which is probably the most frequent HTTP status used on the web overall!) a Content-Length header obviously is disallowed at all according to https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.5 "this prevents inconsistencies between cached entity-bodies and updated headers" Apache, NGINX and other servers observed indeed do not set Content-Length in 304. And there were bugfix issues regarding that. Some browsers obviously pick up a Content-Length "0", update the cached resource and thus zero the cached data. Literally obeying "If a cache uses a received 304 response to update a cache entry, the cache MUST update the entry to reflect any new field values given in the response." (Though that seems rather silly, as that would mean "Modified". And Content-Length should reasonably perhaps be better always associated with the current transmission for needs of keep-alive connections and buffer management at a lower level, and not with cache & status issues.) Possibly the same problem for 204. ---------- nosy: +kxroberto _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 11:38:14 2017 From: report at bugs.python.org (Marco Buttu) Date: Tue, 09 May 2017 15:38:14 +0000 Subject: [issue30217] Missing entry for the tilde (~) operator in the Index In-Reply-To: <1493582160.76.0.882487661277.issue30217@psf.upfronthosting.co.za> Message-ID: <1494344294.91.0.0603854254434.issue30217@psf.upfronthosting.co.za> Marco Buttu added the comment: Looking at Doc/reference/expressions.rst and Doc/reference/datamodel.rst, I do not see any reference to the symbols, but only to the operator name (negation, minus, plus, inversion, etc.). Therefore I think it is better to not change these files. In the PR [*] I added (in Doc/library/stdtypes.rst) both a reference to the symbol and to the name. Thank you very much [*] https://github.com/python/cpython/pull/1502/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 11:45:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 15:45:18 +0000 Subject: [issue30280] Warning -- threading._dangling was modified by test_asyncio on FreeBSD 9 and 10 In-Reply-To: <1493975315.11.0.159651594974.issue30280@psf.upfronthosting.co.za> Message-ID: <1494344718.37.0.0424903833605.issue30280@psf.upfronthosting.co.za> STINNER Victor added the comment: Warning also seen on FreeBSD 10: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/240/steps/test/logs/stdio Warning -- threading._dangling was modified by test_asyncio Before: <_weakrefset.WeakSet object at 0x805f5d810> After: <_weakrefset.WeakSet object at 0x807929948> ---------- title: Warning -- threading._dangling was modified by test_asyncio on FreeBSD 9 -> Warning -- threading._dangling was modified by test_asyncio on FreeBSD 9 and 10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 11:47:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 15:47:49 +0000 Subject: [issue30315] test_ftplib.TestTLS_FTPClass: "[Errno 54] Connection reset by peer" on "AMD64 FreeBSD CURRENT Debug 3.x" buildbot Message-ID: <1494344869.6.0.553746122368.issue30315@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%203.x/builds/246/steps/test/logs/stdio test_check_hostname (test.test_ftplib.TestTLS_FTPClass) ... Exception in thread Thread-84: Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncore.py", line 83, in read obj.handle_read_event() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_ftplib.py", line 366, in handle_read_event super(SSLConnection, self).handle_read_event() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncore.py", line 423, in handle_read_event self.handle_read() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asynchat.py", line 171, in handle_read self.found_terminator() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_ftplib.py", line 116, in found_terminator method(arg) File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_ftplib.py", line 207, in cmd_quit self.close() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_ftplib.py", line 406, in close super(SSLConnection, self).close() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncore.py", line 397, in close self.socket.close() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/socket.py", line 417, in close self._real_close() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/socket.py", line 411, in _real_close _ss.close(self) ConnectionResetError: [Errno 54] Connection reset by peer During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_ftplib.py", line 279, in run asyncore.loop(timeout=0.1, count=1) File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncore.py", line 207, in loop poll_fun(timeout, map) File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncore.py", line 150, in poll read(obj) File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncore.py", line 87, in read obj.handle_error() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_ftplib.py", line 399, in handle_error raise Exception Exception ERROR (...) ====================================================================== ERROR: test_check_hostname (test.test_ftplib.TestTLS_FTPClass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_ftplib.py", line 950, in test_check_hostname self.client.connect("localhost", self.server.port) File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/ftplib.py", line 155, in connect self.welcome = self.getresp() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/ftplib.py", line 234, in getresp resp = self.getmultiline() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/ftplib.py", line 220, in getmultiline line = self.getline() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/ftplib.py", line 202, in getline line = self.file.readline(self.maxline + 1) File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/socket.py", line 586, in readinto return self._sock.recv_into(b) socket.timeout: timed out ---------------------------------------------------------------------- Ran 89 tests in 15.001s FAILED (errors=1) Warning -- threading_cleanup() failed to cleanup 0 threads after 4 sec (count: 0, dangling: 2) Warning -- threading._dangling was modified by test_ftplib Before: <_weakrefset.WeakSet object at 0x80577ce28> After: <_weakrefset.WeakSet object at 0x80577c810> test test_ftplib failed ---------- components: Tests messages: 293326 nosy: haypo priority: normal severity: normal status: open title: test_ftplib.TestTLS_FTPClass: "[Errno 54] Connection reset by peer" on "AMD64 FreeBSD CURRENT Debug 3.x" buildbot versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 11:47:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 15:47:57 +0000 Subject: [issue30315] test_ftplib.TestTLS_FTPClass: "[Errno 54] Connection reset by peer" on "AMD64 FreeBSD CURRENT Debug 3.x" buildbot In-Reply-To: <1494344869.6.0.553746122368.issue30315@psf.upfronthosting.co.za> Message-ID: <1494344877.96.0.529462616515.issue30315@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- keywords: +buildbot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 11:49:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 15:49:35 +0000 Subject: [issue30316] test_default_timeout() of test_threading.BarrierTests: random failures on AMD64 FreeBSD CURRENT Debug 3.x Message-ID: <1494344975.72.0.584129176678.issue30316@psf.upfronthosting.co.za> New submission from STINNER Victor: test_default_timeout() of test_threading.BarrierTests randomly fails on AMD64 FreeBSD CURRENT Debug 3.x: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%203.x/builds/246/steps/test/logs/stdio test_default_timeout (test.test_threading.BarrierTests) ... ERROR test_reset (test.test_threading.BarrierTests) ... Unhandled exception in thread started by .task at 0x8057bed48> Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/lock_tests.py", line 38, in task Unhandled exception in thread started by .task at 0x8057bed48> Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/lock_tests.py", line 38, in task f() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/lock_tests.py", line 917, in f i = barrier.wait() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", line 603, in wait self._enter() # Block while the barrier drains. File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", line 627, in _enter raise BrokenBarrierError threading.BrokenBarrierError Unhandled exception in thread started by .task at 0x8057bed48> Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/lock_tests.py", line 38, in task f() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/lock_tests.py", line 917, in f i = barrier.wait() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", line 612, in wait self._wait(timeout) File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", line 652, in _wait raise BrokenBarrierError threading.BrokenBarrierError Unhandled exception in thread started by .task at 0x8057bed48> Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/lock_tests.py", line 38, in task f() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/lock_tests.py", line 917, in f i = barrier.wait() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", line 603, in wait self._enter() # Block while the barrier drains. File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", line 627, in _enter raise BrokenBarrierError threading.BrokenBarrierError f() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/lock_tests.py", line 917, in f i = barrier.wait() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", line 612, in wait self._wait(timeout) File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", line 652, in _wait raise BrokenBarrierError threading.BrokenBarrierError ok (...) test_frame_tstate_tracing (test.test_threading.ThreadTests) ... ok test_ident_of_no_threading_threads (test.test_threading.ThreadTests) ... ok test_is_alive_after_fork (test.test_threading.ThreadTests) ... Warning -- threading_cleanup() failed to cleanup 0 threads after 4 sec (count: 0, dangling: 21) ok test_join_nondaemon_on_shutdown (test.test_threading.ThreadTests) ... ok test_limbo_cleanup (test.test_threading.ThreadTests) ... ok (...) ====================================================================== ERROR: test_default_timeout (test.test_threading.BarrierTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/lock_tests.py", line 922, in test_default_timeout self.run_threads(f) File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/lock_tests.py", line 751, in run_threads f() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/lock_tests.py", line 917, in f i = barrier.wait() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", line 612, in wait self._wait(timeout) File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", line 650, in _wait raise BrokenBarrierError threading.BrokenBarrierError ---------- components: Tests keywords: buildbot messages: 293327 nosy: haypo priority: normal severity: normal status: open title: test_default_timeout() of test_threading.BarrierTests: random failures on AMD64 FreeBSD CURRENT Debug 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 11:52:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 15:52:59 +0000 Subject: [issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot Message-ID: <1494345179.69.0.743787858569.issue30317@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/588/steps/test/logs/stdio 0:49:08 [225/405/1] test_multiprocessing_spawn failed Process Process-59: Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\process.py", line 249, in _bootstrap self.run() File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\process.py", line 93, in run self._target(*self._args, **self._kwargs) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1179, in task self.f(*self.args) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1385, in _test_timeout_f i = barrier.wait() File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\managers.py", line 1040, in wait return self._callmethod('wait', (timeout,)) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\managers.py", line 774, in _callmethod raise convert_to_error(kind, result) threading.BrokenBarrierError Process Process-60: Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\process.py", line 249, in _bootstrap self.run() File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\process.py", line 93, in run self._target(*self._args, **self._kwargs) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1179, in task self.f(*self.args) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1385, in _test_timeout_f i = barrier.wait() File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\managers.py", line 1040, in wait return self._callmethod('wait', (timeout,)) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\managers.py", line 774, in _callmethod raise convert_to_error(kind, result) threading.BrokenBarrierError Process Process-62: Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\process.py", line 249, in _bootstrap self.run() File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\process.py", line 93, in run self._target(*self._args, **self._kwargs) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1179, in task self.f(*self.args) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1385, in _test_timeout_f i = barrier.wait() File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\managers.py", line 1040, in wait return self._callmethod('wait', (timeout,)) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\managers.py", line 774, in _callmethod raise convert_to_error(kind, result) threading.BrokenBarrierError Process Process-61: Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\process.py", line 249, in _bootstrap self.run() File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\process.py", line 93, in run self._target(*self._args, **self._kwargs) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1179, in task self.f(*self.args) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1385, in _test_timeout_f i = barrier.wait() File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\managers.py", line 1040, in wait return self._callmethod('wait', (timeout,)) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\managers.py", line 774, in _callmethod raise convert_to_error(kind, result) threading.BrokenBarrierError test_answer_challenge_auth_failure (test.test_multiprocessing_spawn.OtherTest) ... ok test_deliver_challenge_auth_failure (test.test_multiprocessing_spawn.OtherTest) ... ok (...) ====================================================================== ERROR: test_timeout (test.test_multiprocessing_spawn.WithManagerTestBarrier) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1399, in test_timeout self.run_threads(self._test_timeout_f, (self.barrier, results)) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1228, in run_threads f(*args) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1385, in _test_timeout_f i = barrier.wait() File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\managers.py", line 1040, in wait return self._callmethod('wait', (timeout,)) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\managers.py", line 774, in _callmethod raise convert_to_error(kind, result) threading.BrokenBarrierError ---------------------------------------------------------------------- Ran 277 tests in 762.297s FAILED (errors=1, skipped=24) test test_multiprocessing_spawn failed ---------- components: Tests keywords: buildbot messages: 293328 nosy: haypo priority: normal severity: normal status: open title: test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 11:53:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 May 2017 15:53:13 +0000 Subject: [issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']` In-Reply-To: <1491736314.56.0.10945117979.issue30024@psf.upfronthosting.co.za> Message-ID: <1494345193.37.0.335186519848.issue30024@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could anyone please make a review? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 11:54:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 15:54:26 +0000 Subject: [issue30318] test_distutils is too verbose on Windows Message-ID: <1494345266.31.0.621231206863.issue30318@psf.upfronthosting.co.za> New submission from STINNER Victor: test_distutils should only dump stdout/stderr on compilation failure, but hide them on success (by default). Example of output: http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/588/steps/test/logs/stdio 0:58:52 [277/405/1] test_distutils passed (124 sec) -- running: test_tokenize (322 sec) xxmodule.c Creating library d:\temp\tmp1byjf67b\Debug\temp\tmp1byjf67b\xx_d.cp37-win32.lib and object d:\temp\tmp1byjf67b\Debug\temp\tmp1byjf67b\xx_d.cp37-win32.exp LINK : /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance foo.c Creating library d:\temp\tmp78_8qa47\tempt\temp\tmpduqip5h3\foo_d.cp37-win32.lib and object d:\temp\tmp78_8qa47\tempt\temp\tmpduqip5h3\foo_d.cp37-win32.exp LINK : /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance foo.c Creating library d:\temp\tmp78_8qa47\tempt\temp\tmpduqip5h3\foo_d.cp37-win32.lib and object d:\temp\tmp78_8qa47\tempt\temp\tmpduqip5h3\foo_d.cp37-win32.exp LINK : /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance xxmodule.c Creating library d:\temp\tmpruuda1qt\Debug\temp\tmpruuda1qt\xx_d.cp37-win32.lib and object d:\temp\tmpruuda1qt\Debug\temp\tmpruuda1qt\xx_d.cp37-win32.exp LINK : /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance foo.c Creating library d:\temp\tmpxzrh56h5\tempt\temp\tmpht642isv\foo_d.cp37-win32.lib and object d:\temp\tmpxzrh56h5\tempt\temp\tmpht642isv\foo_d.cp37-win32.exp LINK : /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance foo.c Creating library d:\temp\tmpxzrh56h5\tempt\temp\tmpht642isv\foo_d.cp37-win32.lib and object d:\temp\tmpxzrh56h5\tempt\temp\tmpht642isv\foo_d.cp37-win32.exp LINK : /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance xxmodule.c Creating library build\temp.win32-3.7-pydebug\Debug\xx_d.cp37-win32.lib and object build\temp.win32-3.7-pydebug\Debug\xx_d.cp37-win32.exp LINK : /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\build\test_python_204>exit 1 D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\build\test_python_204>exit 0 ---------- components: Distutils, Tests, Windows messages: 293330 nosy: dstufft, haypo, merwok, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: test_distutils is too verbose on Windows versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 12:00:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 16:00:13 +0000 Subject: [issue30319] test_invalid_authentication() of test_imaplib: random failure on AMD64 FreeBSD 9.x 3.6 Message-ID: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.6/builds/128/steps/test/logs/stdio test_invalid_authentication (test.test_imaplib.NewIMAPSSLTests) ... SENT: b'* OK IMAP4rev1' GOT: b'OMOH0 CAPABILITY' SENT: b'* CAPABILITY IMAP4rev1' SENT: b'OMOH0 OK CAPABILITY completed' GOT: b'OMOH1 AUTHENTICATE MYAUTH' SENT: b'+' GOT: b'ZmFrZQ==' SENT: b'OMOH1 NO [AUTHENTICATIONFAILED] invalid' ERROR ====================================================================== ERROR: test_invalid_authentication (test.test_imaplib.NewIMAPSSLTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/test/test_imaplib.py", line 223, in _cleanup self.client.shutdown() File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/imaplib.py", line 326, in shutdown self.sock.close() File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/socket.py", line 417, in close self._real_close() File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/ssl.py", line 1052, in _real_close socket._real_close(self) File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/socket.py", line 411, in _real_close _ss.close(self) ConnectionResetError: [Errno 54] Connection reset by peer ---------------------------------------------------------------------- Ran 95 tests in 32.694s FAILED (errors=1, skipped=2) Warning -- threading._dangling was modified by test_imaplib Before: <_weakrefset.WeakSet object at 0x805e2b608> After: <_weakrefset.WeakSet object at 0x8014a25a0> test test_imaplib failed ---------- components: Tests keywords: buildbot messages: 293331 nosy: haypo priority: normal severity: normal status: open title: test_invalid_authentication() of test_imaplib: random failure on AMD64 FreeBSD 9.x 3.6 versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 12:01:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 16:01:51 +0000 Subject: [issue30320] test_eintr.test_sigwaitinfo(): race condition on AMD64 FreeBSD 10.x Shared 3.6 Message-ID: <1494345711.78.0.148323197443.issue30320@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.6/builds/129/steps/test/logs/stdio running: test_eintr (584 sec) 0:16:01 [405/405/1] test_eintr failed test_all (test.test_eintr.EINTRTests) ... FAIL ====================================================================== FAIL: test_all (test.test_eintr.EINTRTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/test_eintr.py", line 18, in test_all script_helper.assert_python_ok("-u", tester) File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/support/script_helper.py", line 150, in assert_python_ok return _assert_python(True, *args, **env_vars) File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/support/script_helper.py", line 136, in _assert_python err)) AssertionError: Process return code is 1 command line: ['/usr/home/buildbot/python/3.6.koobs-freebsd10/build/python', '-X', 'faulthandler', '-I', '-u', '/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/eintrdata/eintr_tester.py'] stdout: --- test_read (__main__.OSEINTRTest) ... ok test_wait (__main__.OSEINTRTest) ... ok test_wait3 (__main__.OSEINTRTest) ... ok test_wait4 (__main__.OSEINTRTest) ... ok test_waitpid (__main__.OSEINTRTest) ... ok test_write (__main__.OSEINTRTest) ... ok test_accept (__main__.SocketEINTRTest) ... ok test_open (__main__.SocketEINTRTest) ... ok test_os_open (__main__.SocketEINTRTest) ... ok test_recv (__main__.SocketEINTRTest) ... ok test_recvmsg (__main__.SocketEINTRTest) ... ok test_send (__main__.SocketEINTRTest) ... ok test_sendall (__main__.SocketEINTRTest) ... ok test_sendmsg (__main__.SocketEINTRTest) ... ok test_sleep (__main__.TimeEINTRTest) ... ok test_sigtimedwait (__main__.SignalEINTRTest) ... ok test_sigwaitinfo (__main__.SignalEINTRTest) ... --- stderr: --- Timeout (0:10:00)! Thread 0x0000000802006400 (most recent call first): File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/eintrdata/eintr_tester.py", line 422 in test_sigwaitinfo File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/case.py", line 601 in run File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/case.py", line 649 in __call__ File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/runner.py", line 176 in run File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/support/__init__.py", line 1889 in _run_suite File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/support/__init__.py", line 1923 in run_unittest File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/eintrdata/eintr_tester.py", line 492 in test_main File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/eintrdata/eintr_tester.py", line 496 in --- ---------------------------------------------------------------------- Ran 1 test in 607.847s FAILED (failures=1) test test_eintr failed ---------- components: Tests messages: 293332 nosy: haypo, martin.panter priority: normal severity: normal status: open title: test_eintr.test_sigwaitinfo(): race condition on AMD64 FreeBSD 10.x Shared 3.6 versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 12:03:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 16:03:38 +0000 Subject: [issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot In-Reply-To: <1494345179.69.0.743787858569.issue30317@psf.upfronthosting.co.za> Message-ID: <1494345818.23.0.0979147526656.issue30317@psf.upfronthosting.co.za> STINNER Victor added the comment: Other similar errors. http://buildbot.python.org/all/builders/x86%20Windows7%203.6/builds/339/steps/test/logs/stdio 1:05:52 [382/405/1] test_multiprocessing_spawn failed -- running: test_mmap (556 sec) Process Process-129: Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\multiprocessing\process.py", line 249, in _bootstrap self.run() File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\multiprocessing\process.py", line 93, in run self._target(*self._args, **self._kwargs) File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1179, in task self.f(*self.args) File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1317, in _test_reset_f i = barrier.wait() File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\threading.py", line 603, in wait self._enter() # Block while the barrier drains. File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\threading.py", line 627, in _enter raise BrokenBarrierError threading.BrokenBarrierError Process Process-130: Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\multiprocessing\process.py", line 249, in _bootstrap self.run() File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\multiprocessing\process.py", line 93, in run self._target(*self._args, **self._kwargs) File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1179, in task self.f(*self.args) File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1317, in _test_reset_f i = barrier.wait() File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\threading.py", line 603, in wait self._enter() # Block while the barrier drains. File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\threading.py", line 627, in _enter raise BrokenBarrierError threading.BrokenBarrierError Process Process-132: Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\multiprocessing\process.py", line 249, in _bootstrap self.run() File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\multiprocessing\process.py", line 93, in run self._target(*self._args, **self._kwargs) File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1179, in task self.f(*self.args) File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1317, in _test_reset_f i = barrier.wait() File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\threading.py", line 603, in wait self._enter() # Block while the barrier drains. File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\threading.py", line 627, in _enter raise BrokenBarrierError threading.BrokenBarrierError Process Process-131: Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\multiprocessing\process.py", line 249, in _bootstrap self.run() File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\multiprocessing\process.py", line 93, in run self._target(*self._args, **self._kwargs) File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1179, in task self.f(*self.args) File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1317, in _test_reset_f i = barrier.wait() File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\threading.py", line 603, in wait self._enter() # Block while the barrier drains. File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\threading.py", line 627, in _enter raise BrokenBarrierError threading.BrokenBarrierError test_answer_challenge_auth_failure (test.test_multiprocessing_spawn.OtherTest) ... ok test_deliver_challenge_auth_failure (test.test_multiprocessing_spawn.OtherTest) ... ok (...) test_barrier_10 (test.test_multiprocessing_spawn.WithProcessesTestBarrier) ... ok test_default_timeout (test.test_multiprocessing_spawn.WithProcessesTestBarrier) ... ok test_reset (test.test_multiprocessing_spawn.WithProcessesTestBarrier) ... ERROR test_single_thread (test.test_multiprocessing_spawn.WithProcessesTestBarrier) ... ok test_thousand (test.test_multiprocessing_spawn.WithProcessesTestBarrier) ... ok (...) ====================================================================== ERROR: test_reset (test.test_multiprocessing_spawn.WithProcessesTestBarrier) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1341, in test_reset (self.barrier, results1, results2, results3)) File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1228, in run_threads f(*args) File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1317, in _test_reset_f i = barrier.wait() File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\threading.py", line 612, in wait self._wait(timeout) File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\threading.py", line 650, in _wait raise BrokenBarrierError threading.BrokenBarrierError ====================================================================== FAIL: test_timeout (test.test_multiprocessing_spawn.WithProcessesTestQueue) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 753, in test_timeout self.assertGreaterEqual(delta, 0.170) AssertionError: 0.16138982772827148 not greater than or equal to 0.17 ---------------------------------------------------------------------- Ran 277 tests in 579.477s ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 12:04:32 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 16:04:32 +0000 Subject: [issue29243] --enable-optimizations makes common build commands always need to compile from scratch In-Reply-To: <1484151314.82.0.308427338149.issue29243@psf.upfronthosting.co.za> Message-ID: <1494345872.9.0.235209025633.issue29243@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a473a73d0cb42c534a3047bbf781b3c592fc33ca by Victor Stinner (torsava) in branch '2.7': [2.7] bpo-29243: Fix Makefile with respect to --enable-optimizations (GH-1478) (#1522) https://github.com/python/cpython/commit/a473a73d0cb42c534a3047bbf781b3c592fc33ca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 12:07:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 16:07:23 +0000 Subject: [issue29889] test_asyncio fails always In-Reply-To: <1490304644.24.0.581268594683.issue29889@psf.upfronthosting.co.za> Message-ID: <1494346043.36.0.0877807334916.issue29889@psf.upfronthosting.co.za> STINNER Victor added the comment: Can someone test again with a development branch? The bpo-29243 has been fixed in 2.7, 3.5, 3.6 and master (3.7) branches thanks to Tomas Orsava! ---------- nosy: +torsava _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 12:07:44 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 09 May 2017 16:07:44 +0000 Subject: [issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']` In-Reply-To: <1491736314.56.0.10945117979.issue30024@psf.upfronthosting.co.za> Message-ID: <1494346064.85.0.815765137906.issue30024@psf.upfronthosting.co.za> Brett Cannon added the comment: I've added your PR to my review queue, Serhiy, so I will get to it, I just can't make any promises as to when (hopefully this week). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 12:10:07 2017 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 09 May 2017 16:10:07 +0000 Subject: [issue30318] test_distutils is too verbose on Windows In-Reply-To: <1494345266.31.0.621231206863.issue30318@psf.upfronthosting.co.za> Message-ID: <1494346207.89.0.635027949977.issue30318@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 12:32:30 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 09 May 2017 16:32:30 +0000 Subject: [issue30230] Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard In-Reply-To: <1493735445.03.0.987403403044.issue30230@psf.upfronthosting.co.za> Message-ID: <1494347550.64.0.900440475795.issue30230@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 12:35:10 2017 From: report at bugs.python.org (Zachary Ware) Date: Tue, 09 May 2017 16:35:10 +0000 Subject: [issue30313] Tests of Python 2.7 VS9.0 buildbots must be run with -uall -rwW options In-Reply-To: <1494338398.28.0.940820958867.issue30313@psf.upfronthosting.co.za> Message-ID: <1494347709.99.0.906101971861.issue30313@psf.upfronthosting.co.za> Zachary Ware added the comment: I think best would be to add a flag to the Tools/buildbot scripts (build and clean as well as test) that is ignored on 3.x and substitutes PC/VS9.0 for PCbuild on 2.7. The buildbot config will need to be updated to pass the flag on the VS9 builders. My first thought for a name for the flag was '--legacy', but that doesn't seem quite right. ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 13:41:37 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 09 May 2017 17:41:37 +0000 Subject: [issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']` In-Reply-To: <1491736314.56.0.10945117979.issue30024@psf.upfronthosting.co.za> Message-ID: <1494351697.39.0.988006645686.issue30024@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 15:01:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 May 2017 19:01:29 +0000 Subject: [issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']` In-Reply-To: <1491736314.56.0.10945117979.issue30024@psf.upfronthosting.co.za> Message-ID: <1494356489.45.0.210904097626.issue30024@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Brett. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 15:02:00 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 May 2017 19:02:00 +0000 Subject: [issue15786] IDLE code completion window can hang or misbehave with mouse In-Reply-To: <1346027701.33.0.908436854594.issue15786@psf.upfronthosting.co.za> Message-ID: <1494356520.54.0.377891643396.issue15786@psf.upfronthosting.co.za> Terry J. Reedy added the comment: While 8.5.9 on OSX is more usable than 8.5.7, it is known to crash occasionally. Hence the startup warning. See idlelib.macosx.tkVersionWarning and https://www.python.org/download/mac/tcltk/. (The problems listed in the latter for 8.5.9 seems incomplete ;-). So I am not greatly concerned about another one specific to Apple 8.5.9. runscript.Script_binding.run_module_event has a workaround, a 200 millesecond delay, when one uses F5 instead of the menu. Would that work here? (editor.get_accelerator has a different workaround for other keys.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 15:08:38 2017 From: report at bugs.python.org (Devin Jeanpierre) Date: Tue, 09 May 2017 19:08:38 +0000 Subject: [issue29505] Submit the re, json, & csv modules to oss-fuzz testing In-Reply-To: <1486587261.97.0.342323514088.issue29505@psf.upfronthosting.co.za> Message-ID: <1494356918.33.0.273511698825.issue29505@psf.upfronthosting.co.za> Devin Jeanpierre added the comment: https://github.com/google/oss-fuzz/pull/583 is the PR to oss-fuzz to add the project. I'm working on actual tests to be submitted here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 15:22:54 2017 From: report at bugs.python.org (Wolfgang Maier) Date: Tue, 09 May 2017 19:22:54 +0000 Subject: [issue30307] https://docs.python.org/3/tutorial/introduction.html#strings Section 3.1.2 doc issue In-Reply-To: <1494267982.7.0.781940622722.issue30307@psf.upfronthosting.co.za> Message-ID: <1494357774.91.0.0435225123274.issue30307@psf.upfronthosting.co.za> Wolfgang Maier added the comment: The section is correct as it is. Just try it in the interactive interpreter to convince yourself. ---------- nosy: +wolma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 15:30:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 May 2017 19:30:34 +0000 Subject: [issue30307] https://docs.python.org/3/tutorial/introduction.html#strings Section 3.1.2 doc issue In-Reply-To: <1494267982.7.0.781940622722.issue30307@psf.upfronthosting.co.za> Message-ID: <1494358234.24.0.0675358019084.issue30307@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 15:31:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 May 2017 19:31:07 +0000 Subject: [issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']` In-Reply-To: <1491736314.56.0.10945117979.issue30024@psf.upfronthosting.co.za> Message-ID: <1494358267.84.0.247298507483.issue30024@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset f93234bb8a87855f295d441524e519481ce6ab13 by Serhiy Storchaka in branch 'master': bpo-30024: Circular imports involving absolute imports with binding (#1264) https://github.com/python/cpython/commit/f93234bb8a87855f295d441524e519481ce6ab13 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 15:32:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 May 2017 19:32:51 +0000 Subject: [issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']` In-Reply-To: <1491736314.56.0.10945117979.issue30024@psf.upfronthosting.co.za> Message-ID: <1494358371.18.0.11083128069.issue30024@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 15:45:12 2017 From: report at bugs.python.org (PradeepKumar) Date: Tue, 09 May 2017 19:45:12 +0000 Subject: [issue30321] format() function prints fillchar as backslash twice Message-ID: <1494359112.44.0.238269745811.issue30321@psf.upfronthosting.co.za> New submission from PradeepKumar: The output expected is, '\R\' but it shows this. >>> '{:\^3}'.format('R') '\\R\\' >>> ---------- messages: 293343 nosy: pradeepkr priority: normal severity: normal status: open title: format() function prints fillchar as backslash twice versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 15:49:19 2017 From: report at bugs.python.org (Zachary Ware) Date: Tue, 09 May 2017 19:49:19 +0000 Subject: [issue30321] format() function prints fillchar as backslash twice In-Reply-To: <1494359112.44.0.238269745811.issue30321@psf.upfronthosting.co.za> Message-ID: <1494359359.56.0.391794933456.issue30321@psf.upfronthosting.co.za> Zachary Ware added the comment: >>> result = '{:\^3}'.format('R') >>> result '\\R\\' >>> print(result) \R\ >>> print("backslash (\\) is escaped by another backslash in str's repr") backslash (\) is escaped by another backslash in str's repr ---------- nosy: +zach.ware resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 16:09:48 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 09 May 2017 20:09:48 +0000 Subject: [issue15786] IDLE code completion window can hang or misbehave with mouse In-Reply-To: <1346027701.33.0.908436854594.issue15786@psf.upfronthosting.co.za> Message-ID: <1494360588.13.0.780664523076.issue15786@psf.upfronthosting.co.za> Louie Lu added the comment: There is a difference between Linux and Mac freeze. On linux, if freeze and I insert pdb.set_trace() at the end of the hide_window, it will let cursor blink again, while on Mac, this won't work. I try self.widget.after(200, self.hide_window) and it doesn't work, too. I install Tk 8.5.18 as the web recommand, should I need to reboot or chnage the default path? it still bump out the warning that I'm using 8.5.9 instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 16:19:39 2017 From: report at bugs.python.org (Sam De Meyer) Date: Tue, 09 May 2017 20:19:39 +0000 Subject: [issue30322] PyObject_GetIter does not behave as documented on dict objects Message-ID: <1494361179.47.0.337252878474.issue30322@psf.upfronthosting.co.za> New submission from Sam De Meyer: According to the docs (https://docs.python.org/3/c-api/object.html) the `PyObject_GetIter` method should be equivalent to the python call `iter()`, but, when given a dict, the `PyObject_GetIter` returns an iterator over key-value pairs whereas the `iter()` method returns an iterator over keys only. I tripped over this when giving the `.update()` a dict-like object that does not inherit from the builtin dict and implements its own `__iter__()`. The `update()` method eventually reaches the following piece of code: https://hg.python.org/cpython/file/4243df51fe43/Objects/dictobject.c#l2383 > it = PyObject_GetIter(seq2); > ... > item = PyIter_Next(it); > ... > fast = PySequence_Fast(item, ""); > ... > key = PySequence_Fast_GET_ITEM(fast, 0); > value = PySequence_Fast_GET_ITEM(fast, 1); displaying the difference in behaviour between `PyObject_GetIter` and `iter(o)`. ---------- assignee: docs at python components: Documentation messages: 293346 nosy: Sam De Meyer, docs at python priority: normal severity: normal status: open title: PyObject_GetIter does not behave as documented on dict objects versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 16:35:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 May 2017 20:35:36 +0000 Subject: [issue30322] PyObject_GetIter does not behave as documented on dict objects In-Reply-To: <1494361179.47.0.337252878474.issue30322@psf.upfronthosting.co.za> Message-ID: <1494362136.53.0.534834000192.issue30322@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I can't believe in this since one-argument iter() just calls PyObject_GetIter(). dict.update() accepts either a dict-like object (which should have the keys() method) or an iterable producing key-value pairs. If your dict-like object doesn't work as expected, check that it has the keys() method. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 16:37:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 May 2017 20:37:16 +0000 Subject: [issue30285] Optimize case-insensitive regular expressions In-Reply-To: <1494003779.18.0.0568506065862.issue30285@psf.upfronthosting.co.za> Message-ID: <1494362236.83.0.961521787268.issue30285@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 6d336a027913327fc042b0d758a16724fea27b9c by Serhiy Storchaka in branch 'master': bpo-30285: Optimize case-insensitive matching and searching (#1482) https://github.com/python/cpython/commit/6d336a027913327fc042b0d758a16724fea27b9c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 16:37:56 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 May 2017 20:37:56 +0000 Subject: [issue30285] Optimize case-insensitive regular expressions In-Reply-To: <1494003779.18.0.0568506065862.issue30285@psf.upfronthosting.co.za> Message-ID: <1494362276.81.0.314338889011.issue30285@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 17:06:18 2017 From: report at bugs.python.org (=?utf-8?b?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?=) Date: Tue, 09 May 2017 21:06:18 +0000 Subject: [issue30289] make distclean and Misc/python-config.sh In-Reply-To: <1494042070.28.0.252520928526.issue30289@psf.upfronthosting.co.za> Message-ID: <1494363978.52.0.123161072959.issue30289@psf.upfronthosting.co.za> ????? ???????? added the comment: 3.5 is also affected. ---------- versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 17:30:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 May 2017 21:30:45 +0000 Subject: [issue30190] unittest's assertAlmostEqual improved error message In-Reply-To: <1493323962.23.0.575947649634.issue30190@psf.upfronthosting.co.za> Message-ID: <1494365445.01.0.376201925203.issue30190@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New test produce deprecation warnings: /home/serhiy/py/cpython/Lib/unittest/test/test_assertions.py:228: DeprecationWarning: invalid escape sequence \( ["^1 != 2 within 7 places \(1 difference\)$", "^oops$", /home/serhiy/py/cpython/Lib/unittest/test/test_assertions.py:229: DeprecationWarning: invalid escape sequence \( "^1 != 2 within 7 places \(1 difference\)$", /home/serhiy/py/cpython/Lib/unittest/test/test_assertions.py:230: DeprecationWarning: invalid escape sequence \( "^1 != 2 within 7 places \(1 difference\) : oops$"]) ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 17:33:36 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 09 May 2017 21:33:36 +0000 Subject: [issue30165] faulthandler acquires lock from signal handler, can deadlock while crashing In-Reply-To: <1493187831.24.0.928802817432.issue30165@psf.upfronthosting.co.za> Message-ID: <1494365616.09.0.154394246988.issue30165@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Follow up note: Note that even with POSIX TLS in use, it isn't entirely safe. pthread_getspecific() as used by the posix thread code is not required to be async signal safe by the POSIX standard. :( The Linux glibc implementation thankfully does not use locks. But it does suffer from a consistency issue in its current implementation when used asynchronously. A trivial patch to fix glibc's pthread_getspecific() with a test exists - https://sourceware.org/ml/libc-alpha/2014-12/msg00583.html - but upstream glibc maintainers are obstinate as usual. Regardless, I believe the worst that happens in that relatively uncommon race condition situation is a faulthandler crash reporting odd information or crashes while crashing. not a deadlock. I have not investigated other pthread_getspecific implementations. The systems I care most about today thankfully run a modified glibc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 17:35:42 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 09 May 2017 21:35:42 +0000 Subject: [issue30322] PyObject_GetIter does not behave as documented on dict objects In-Reply-To: <1494361179.47.0.337252878474.issue30322@psf.upfronthosting.co.za> Message-ID: <1494365742.57.0.70039754582.issue30322@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This from the help on dict.update(): | update(...) | D.update([E, ]**F) -> None. Update D from dict/iterable E and F. | If E present and has a .keys() method, does: for k in E: D[k] = E[k] | If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v | In either case, this is followed by: for k in F: D[k] = F[k] Likewise in the source for collections.abc.MutableMapping: def update(*args, **kwds): ''' D.update([E, ]**F) -> None. Update D from mapping/iterable E and F. If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v ''' if not args: raise TypeError("descriptor 'update' of 'MutableMapping' object " "needs an argument") self, *args = args if len(args) > 1: raise TypeError('update expected at most 1 arguments, got %d' % len(args)) if args: other = args[0] if isinstance(other, Mapping): for key in other: self[key] = other[key] elif hasattr(other, "keys"): for key in other.keys(): self[key] = other[key] else: for key, value in other: self[key] = value for key, value in kwds.items(): self[key] = value ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 17:37:02 2017 From: report at bugs.python.org (Klamann) Date: Tue, 09 May 2017 21:37:02 +0000 Subject: [issue30323] concurrent.futures.Executor.map() consumes all memory when big generators are used Message-ID: <1494365822.25.0.431593996842.issue30323@psf.upfronthosting.co.za> New submission from Klamann: The Executor's map() function accepts a function and an iterable that holds the function arguments for each call to the function that should be made. This iterable could be a generator, and as such it could reference data that won't fit into memory. The behaviour I would expect is that the Executor requests the next element from the iterable whenever a thread, process or whatever is ready to make the next function call. But what actually happens is that the entire iterable gets converted into a list right after the map function is called and therefore any underlying generator will load all referenced data into memory. Here's where the list gets built from the iterable: https://github.com/python/cpython/blob/3.6/Lib/concurrent/futures/_base.py#L548 The way I see it, there's no reason to convert the iterable to a list in the map function (or any other place in the Executor). Just replacing the list comprehension with a generator expression would probably fix that. Here's an example that illustrates the issue: from concurrent.futures import ThreadPoolExecutor import time def generate(): for i in range(10): print("generating input", i) yield i def work(i): print("working on input", i) time.sleep(1) with ThreadPoolExecutor(max_workers=2) as executor: generator = generate() executor.map(work, generator) The output is: generating input 0 working on input 0 generating input 1 working on input 1 generating input 2 generating input 3 generating input 4 generating input 5 generating input 6 generating input 7 generating input 8 generating input 9 working on input 2 working on input 3 working on input 4 working on input 5 working on input 6 working on input 7 working on input 8 working on input 9 Ideally, the lines should alternate, but currently all input is generated immediately. ---------- messages: 293353 nosy: Klamann priority: normal severity: normal status: open title: concurrent.futures.Executor.map() consumes all memory when big generators are used type: resource usage versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 18:07:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 22:07:40 +0000 Subject: [issue30165] faulthandler acquires lock from signal handler, can deadlock while crashing In-Reply-To: <1493187831.24.0.928802817432.issue30165@psf.upfronthosting.co.za> Message-ID: <1494367660.34.0.903369452309.issue30165@psf.upfronthosting.co.za> STINNER Victor added the comment: > Note that even with POSIX TLS in use, it isn't entirely safe. I wrote faulthandler to collect debug data just before dying, when something already gone very bad, like a deadlock or a memory corruption. I didn't design faulthandler for correctness. If you call faulthandler.dump_traceback() from regular Python code, you are safe. For example, if you register your own Python signal handler using signal.signal(), it's ok. The grey area is when you use C signal handlers using the C API of faulthandler, like faulthandler.register(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 18:14:59 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 May 2017 22:14:59 +0000 Subject: [issue15786] IDLE code completion window can hang or misbehave with mouse In-Reply-To: <1346027701.33.0.908436854594.issue15786@psf.upfronthosting.co.za> Message-ID: <1494368099.2.0.0674815877145.issue15786@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I would try rebooting, but not having a Mac, I am not familiar with the details of the instructions on that page. It they are not clear enough, they should be improved. ---------- assignee: -> terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 18:31:41 2017 From: report at bugs.python.org (BeamPower) Date: Tue, 09 May 2017 22:31:41 +0000 Subject: [issue30324] Error using newline='' when writing to CSV file Message-ID: <1494369101.21.0.974352364291.issue30324@psf.upfronthosting.co.za> New submission from BeamPower: I am using the newline='' feature in my program to avoid the extra lines being placed between each line being written?to a CSV file. This error is odd though...?I used it before on a previous rev, and it worked fine. I think the CSV file writing feature has been available since Python 2.3? Here's the error I am getting: Traceback (most recent call last): ? File "C:\Python\parser\parser.py", line 91, in ? ? write_header_to_csv() ? File "C:\Python\parser\parser.py", line 44, in write_header_to_csv ? ? csvfile = open('decodedfile.csv', 'w', newline='') TypeError: 'newline' is an invalid keyword argument for this function At the top of my program, I have the following imports: import sys import binascii import csv ---------- messages: 293356 nosy: BeamPower priority: normal severity: normal status: open title: Error using newline='' when writing to CSV file _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 18:34:24 2017 From: report at bugs.python.org (BeamPower) Date: Tue, 09 May 2017 22:34:24 +0000 Subject: [issue30324] Error using newline='' when writing to CSV file In-Reply-To: <1494369101.21.0.974352364291.issue30324@psf.upfronthosting.co.za> Message-ID: <1494369264.46.0.678268855709.issue30324@psf.upfronthosting.co.za> BeamPower added the comment: Sorry, I left out a detail... I am running Python 2.7.13 ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 18:41:48 2017 From: report at bugs.python.org (Martin Panter) Date: Tue, 09 May 2017 22:41:48 +0000 Subject: [issue30324] Error using newline='' when writing to CSV file In-Reply-To: <1494369101.21.0.974352364291.issue30324@psf.upfronthosting.co.za> Message-ID: <1494369708.09.0.288342981216.issue30324@psf.upfronthosting.co.za> Martin Panter added the comment: In Python 2, the "open" function doesn't have a "newline" parameter. Perhaps you were looking at the wrong documentation version. ---------- nosy: +martin.panter resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 19:03:04 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 09 May 2017 23:03:04 +0000 Subject: [issue30308] Add code coverage for argument in random.shuffle In-Reply-To: <1494278400.3.0.911074987674.issue30308@psf.upfronthosting.co.za> Message-ID: <1494370984.41.0.0223410529746.issue30308@psf.upfronthosting.co.za> Cheryl Sabella added the comment: OK, I've removed the test for the negative values returned by random. In core-mentorship, David Murray had suggested adding a comment to document it as unexpected behavior. I had asked there because I wasn't quite sure what to do about it. Should I also leave out the test for being able to shuffle a dict with numeric keys? Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 19:08:01 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 09 May 2017 23:08:01 +0000 Subject: [issue30308] Add code coverage for argument in random.shuffle In-Reply-To: <1494278400.3.0.911074987674.issue30308@psf.upfronthosting.co.za> Message-ID: <1494371281.08.0.0410293022694.issue30308@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I've also changed the test to use Mock for the random function. I'm new to mock, so I'm not sure if I did it right. Using a return_value seemed to be the best way to go. I didn't know if it was necessary to test if an incorrect function was sent in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 19:10:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 23:10:05 +0000 Subject: [issue30320] test_eintr.test_sigwaitinfo(): race condition on AMD64 FreeBSD 10.x Shared 3.6 In-Reply-To: <1494345711.78.0.148323197443.issue30320@psf.upfronthosting.co.za> Message-ID: <1494371405.81.0.136539528993.issue30320@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1622 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 19:23:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 23:23:21 +0000 Subject: [issue30320] test_eintr.test_sigwaitinfo(): race condition on AMD64 FreeBSD 10.x Shared 3.6 In-Reply-To: <1494345711.78.0.148323197443.issue30320@psf.upfronthosting.co.za> Message-ID: <1494372201.74.0.659453610361.issue30320@psf.upfronthosting.co.za> STINNER Victor added the comment: I checked manually in my FreeBSD CURRENT VM that: * sigwaitinfo() and sigtimedwait() fail with EINTR and automatically restart the interrupted syscall * running the test in a loop doesn't fail: I ran the test during 5 min in 10 shells (tests running 10 times in parallel) => no failure, the race condition seems to be gone. I hacked the test file to only run the sigwaitinfo() and sigtimedwait() unit tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 19:37:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 23:37:08 +0000 Subject: [issue30325] Buildbot: send email notifications to buildbot-status@ Message-ID: <1494373028.15.0.894136349212.issue30325@psf.upfronthosting.co.za> New submission from STINNER Victor: I created a new mailing list to get email notifications when a buildbot starts failing (state change from green/success to red/failure). It seems like the buildbot config already sends email, but I don't see them in the archives of the python-checkins list? Config: https://github.com/python/buildmaster-config/blob/master/master/master.cfg#L820-L827 python-checkins archives: https://mail.python.org/pipermail/python-checkins/2017-May/thread.html ---------- components: Tests keywords: buildbot messages: 293362 nosy: haypo, zach.ware priority: normal severity: normal status: open title: Buildbot: send email notifications to buildbot-status@ versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 19:54:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 23:54:30 +0000 Subject: [issue30325] Buildbot: send email notifications to buildbot-status@ In-Reply-To: <1494373028.15.0.894136349212.issue30325@psf.upfronthosting.co.za> Message-ID: <1494374070.07.0.955176493492.issue30325@psf.upfronthosting.co.za> STINNER Victor added the comment: On the buildbot server, I see the following code in lib/python/buildbot/status/mail.py: # GB: NEW: add test logfile excerpts if "test" in t: # only if the test went wrong for log in build.getLogs(): if "test" in log.getStep().getName(): text += "\n" text += "Excerpt from the test logfile:" text += interpret_test_logfile(log.getText().splitlines()) text += "\n" break But I'm unable to find this code in the upstream code: https://github.com/buildbot/buildbot/blob/v0.8.12/master/buildbot/status/mail.py#L742 Do we have downstream changes on buildbot? I'm asking because it seems like emails cannot be send because of these lines. Extract of logs: 2017-05-05 11:55:42+0000 [-] Exception caught notifying of buildFinished event 2017-05-05 11:55:42+0000 [-] Unhandled Error Traceback (most recent call last): File "/data/buildbot/lib/python/buildbot/status/build.py", line 320, in buildFinished (...) File "/data/buildbot/lib/python/buildbot/status/mail.py", line 792, in buildMessage if "test" in t: # only if the test went wrong exceptions.NameError: global name 't' is not defined Note: It seems like 0.8.14 is deployed, but I don't see any v0.8.14 tag on GitHub, the last one of the 0.8 branch is v0.8.12. https://pypi.python.org/pypi/buildbot/0.8.14 wasn't tagged in Git? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 19:57:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 May 2017 23:57:39 +0000 Subject: [issue30325] Buildbot: send email notifications to buildbot-status@ In-Reply-To: <1494373028.15.0.894136349212.issue30325@psf.upfronthosting.co.za> Message-ID: <1494374259.54.0.0697037345367.issue30325@psf.upfronthosting.co.za> STINNER Victor added the comment: It seems like the code is copied by rsync from a server called dinsdale: https://github.com/python/psf-chef/blob/master/cookbooks/buildmaster.txt#L13 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 20:28:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 00:28:28 +0000 Subject: [issue30325] Buildbot: send email notifications to buildbot-status@ In-Reply-To: <1494373028.15.0.894136349212.issue30325@psf.upfronthosting.co.za> Message-ID: <1494376108.88.0.812486442817.issue30325@psf.upfronthosting.co.za> STINNER Victor added the comment: To rebuild the lib/python/buildbot/ directory, you can start from buildbot 0.8.14 and then apply attached buildbot-0.8.14py1.patch diff. ---------- keywords: +patch Added file: http://bugs.python.org/file46853/buildbot-0.8.14py1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 20:35:19 2017 From: report at bugs.python.org (Jonathan Goble) Date: Wed, 10 May 2017 00:35:19 +0000 Subject: [issue25652] collections.UserString.__rmod__() raises NameError In-Reply-To: <1447823769.89.0.495006915909.issue25652@psf.upfronthosting.co.za> Message-ID: <1494376519.28.0.12887154602.issue25652@psf.upfronthosting.co.za> Jonathan Goble added the comment: Any decision on this? I recently played around and found a reasonable use case where UserString.__rmod__ does get called; run the attached userstringerror.py to see it in action. Basically, it seems the idea of UserString is to subclass it, tweak as desired, and use your subclass as necessary. If you then subclass your subclass (e.g. for a portion of your code with a specialized need) and extend __mod__ and __rmod__ in that sub-subclass (calling the parent method with super()), then any case of "subclass instance % sub-subclass instance" results in Python calling the sub-subclass's __rmod__ method directly without trying a __mod__ method. If that method then calls super().__rmod__ (e.g. it just needed to pre-process the data, such as to normalize it, before the formatting operation), then UserString.__rmod__ will be called and result in the NameError. ---------- versions: +Python 3.7 -Python 3.5 Added file: http://bugs.python.org/file46854/userstringerror.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 20:37:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 00:37:46 +0000 Subject: [issue30320] test_eintr.test_sigwaitinfo(): race condition on AMD64 FreeBSD 10.x Shared 3.6 In-Reply-To: <1494345711.78.0.148323197443.issue30320@psf.upfronthosting.co.za> Message-ID: <1494376666.15.0.675445228402.issue30320@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 211a392cc15f9a7b1b8ce65d8f6c9f8237d1b77f by Victor Stinner in branch 'master': bpo-30320: test_eintr now uses pthread_sigmask() (#1523) https://github.com/python/cpython/commit/211a392cc15f9a7b1b8ce65d8f6c9f8237d1b77f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 20:41:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 00:41:34 +0000 Subject: [issue30320] test_eintr.test_sigwaitinfo(): race condition on AMD64 FreeBSD 10.x Shared 3.6 In-Reply-To: <1494345711.78.0.148323197443.issue30320@psf.upfronthosting.co.za> Message-ID: <1494376894.17.0.676531383541.issue30320@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1623 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 20:43:31 2017 From: report at bugs.python.org (BeamPower) Date: Wed, 10 May 2017 00:43:31 +0000 Subject: [issue30324] Error using newline='' when writing to CSV file In-Reply-To: <1494369101.21.0.974352364291.issue30324@psf.upfronthosting.co.za> Message-ID: <1494377011.95.0.814335490092.issue30324@psf.upfronthosting.co.za> BeamPower added the comment: Sorry, my mistake. I thought I was running Python 2.7, but I was running Python 3.1. By the way, is there a solution to the extra lines being written to a CSV file using Python 2.7? Thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 22:09:07 2017 From: report at bugs.python.org (Marc Culler) Date: Wed, 10 May 2017 02:09:07 +0000 Subject: [issue30310] tkFont.py assumes that all font families are encoded as ascii in Python 2.7 In-Reply-To: <1494279736.5.0.821030807704.issue30310@psf.upfronthosting.co.za> Message-ID: <1494382147.79.0.45936214074.issue30310@psf.upfronthosting.co.za> Marc Culler added the comment: The attached patch simply decodes string options to the Font._set() method using the utf8 codec. Other options (which will be numbers) are converted to ascii strings as currently happens. This makes it possible to use the Font.copy() method without raising an exception when the font family name is not ascii encoded. ---------- keywords: +patch Added file: http://bugs.python.org/file46855/tkFont.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 22:16:15 2017 From: report at bugs.python.org (Martin Panter) Date: Wed, 10 May 2017 02:16:15 +0000 Subject: [issue30324] Error using newline='' when writing to CSV file In-Reply-To: <1494369101.21.0.974352364291.issue30324@psf.upfronthosting.co.za> Message-ID: <1494382575.55.0.546272837357.issue30324@psf.upfronthosting.co.za> Martin Panter added the comment: On Python 2, I'm guessing you are getting extra CRs on Windows? It looks like you have to open in binary mode there to avoid newline translation. This is documented for the "reader" and "writer" functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 22:40:47 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 10 May 2017 02:40:47 +0000 Subject: [issue30289] make distclean and Misc/python-config.sh In-Reply-To: <1494042070.28.0.252520928526.issue30289@psf.upfronthosting.co.za> Message-ID: <1494384047.26.0.0718326159867.issue30289@psf.upfronthosting.co.za> Xiang Zhang added the comment: I know, but this is not a bug. So I only want to backport it to 3.6. ---------- versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 23:05:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 May 2017 03:05:22 +0000 Subject: [issue30298] Weak deprecations for inline regular expression modifiers In-Reply-To: <1494167958.42.0.581219852932.issue30298@psf.upfronthosting.co.za> Message-ID: <1494385522.13.0.708927822885.issue30298@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 305ccbe27ea5ba82fd2d8c32ec739f980e524330 by Serhiy Storchaka in branch 'master': bpo-30298: Weaken the condition of deprecation warnings for inline modifiers. (#1490) https://github.com/python/cpython/commit/305ccbe27ea5ba82fd2d8c32ec739f980e524330 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 23:10:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 May 2017 03:10:06 +0000 Subject: [issue30298] Weak deprecations for inline regular expression modifiers In-Reply-To: <1494167958.42.0.581219852932.issue30298@psf.upfronthosting.co.za> Message-ID: <1494385806.8.0.154574533363.issue30298@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1624 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 23:23:42 2017 From: report at bugs.python.org (Louie Lu) Date: Wed, 10 May 2017 03:23:42 +0000 Subject: [issue15786] IDLE code completion window can hang or misbehave with mouse In-Reply-To: <1346027701.33.0.908436854594.issue15786@psf.upfronthosting.co.za> Message-ID: <1494386622.22.0.611056505458.issue15786@psf.upfronthosting.co.za> Louie Lu added the comment: The step after installing newer Tk will require `make clean` and `make` again to let linker link to the recent install version. I can freeze the cursor after double click on any version of Tk I install, 8.5.9 / 8.5.18 / 8.6.4 on MacOS Sierra. Maybe we should separate this problem, let this issue focus on fixing misbehavior of listbox, and create another for MacOS freeze issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 23:44:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 May 2017 03:44:04 +0000 Subject: [issue30298] Weak deprecations for inline regular expression modifiers In-Reply-To: <1494167958.42.0.581219852932.issue30298@psf.upfronthosting.co.za> Message-ID: <1494387844.85.0.117818936959.issue30298@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 418d60a52579b6847776db3e354a8660b26dc752 by Serhiy Storchaka in branch '3.6': [3.6] bpo-30298: Weaken the condition of deprecation warnings for inline modifiers. (GH-1490) (#1525) https://github.com/python/cpython/commit/418d60a52579b6847776db3e354a8660b26dc752 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 23:44:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 May 2017 03:44:51 +0000 Subject: [issue30298] Weak deprecations for inline regular expression modifiers In-Reply-To: <1494167958.42.0.581219852932.issue30298@psf.upfronthosting.co.za> Message-ID: <1494387891.5.0.495503421041.issue30298@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Raymond. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 9 23:52:16 2017 From: report at bugs.python.org (Louie Lu) Date: Wed, 10 May 2017 03:52:16 +0000 Subject: [issue15786] IDLE code completion window can hang or misbehave with mouse In-Reply-To: <1346027701.33.0.908436854594.issue15786@psf.upfronthosting.co.za> Message-ID: <1494388336.16.0.411986361096.issue15786@psf.upfronthosting.co.za> Louie Lu added the comment: @Terry, this is another too-fast-to-destroy problem. The latest PR commit has fixed the issue on MacOS. When we double click on autocompletewindow, it will try to focusOut autocompletewindow then focusOn widget.text, but, we destroy too fast, after destroy, tk can't re-focusOn widget.text. The commit will re-focus on widget.text first, then destroy the autocompletewindow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 00:13:42 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 10 May 2017 04:13:42 +0000 Subject: [issue29243] --enable-optimizations makes common build commands always need to compile from scratch In-Reply-To: <1484151314.82.0.308427338149.issue29243@psf.upfronthosting.co.za> Message-ID: <1494389622.39.0.547736000385.issue29243@psf.upfronthosting.co.za> Xiang Zhang added the comment: So now we have to run make if we want to trigger the profile procedure since other make commands like make test won't trigger the procedure by itself, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 00:53:16 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 10 May 2017 04:53:16 +0000 Subject: [issue25652] collections.UserString.__rmod__() raises NameError In-Reply-To: <1447823769.89.0.495006915909.issue25652@psf.upfronthosting.co.za> Message-ID: <1494391996.04.0.374832570367.issue25652@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Unless there are objections, I think the wisest course is to remove __rmod__ entirely (refuse the temptation to guess at what the user would expect the semantics to be). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 01:38:33 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 10 May 2017 05:38:33 +0000 Subject: [issue30230] Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard In-Reply-To: <1493735445.03.0.987403403044.issue30230@psf.upfronthosting.co.za> Message-ID: <1494394713.67.0.565566262768.issue30230@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Will deeply grokking this code, I would say to leave it alone. The test seems reasonable and is very fast (likely free of cost on many machines). ---------- nosy: +georg.brandl, pitrou priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 02:13:15 2017 From: report at bugs.python.org (Jensen Taylor) Date: Wed, 10 May 2017 06:13:15 +0000 Subject: [issue30326] Version may be out of date in travis.yml Message-ID: <1494396795.74.0.364359225427.issue30326@psf.upfronthosting.co.za> New submission from Jensen Taylor: It's only 3.6. I may be talking nonsense but it didn't quite look right ---------- components: Build, Tests messages: 293380 nosy: Jensen Taylor priority: normal severity: normal status: open title: Version may be out of date in travis.yml type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 02:14:35 2017 From: report at bugs.python.org (Jensen Taylor) Date: Wed, 10 May 2017 06:14:35 +0000 Subject: [issue30327] Version may be out of date in travis.yml Message-ID: <1494396875.36.0.00921683522074.issue30327@psf.upfronthosting.co.za> New submission from Jensen Taylor: It's only 3.6. I may be talking nonsense but it didn't quite look right ---------- components: Build, Tests messages: 293381 nosy: Jensen Taylor priority: normal severity: normal status: open title: Version may be out of date in travis.yml type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 02:15:48 2017 From: report at bugs.python.org (Jensen Taylor) Date: Wed, 10 May 2017 06:15:48 +0000 Subject: [issue30326] Version may be out of date in travis.yml In-Reply-To: <1494396795.74.0.364359225427.issue30326@psf.upfronthosting.co.za> Message-ID: <1494396948.32.0.961459559352.issue30326@psf.upfronthosting.co.za> Changes by Jensen Taylor : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 02:22:33 2017 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 May 2017 06:22:33 +0000 Subject: [issue30327] Version may be out of date in travis.yml In-Reply-To: <1494396875.36.0.00921683522074.issue30327@psf.upfronthosting.co.za> Message-ID: <1494397353.57.0.19692141783.issue30327@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +1625 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 02:29:38 2017 From: report at bugs.python.org (Martin Teichmann) Date: Wed, 10 May 2017 06:29:38 +0000 Subject: [issue30306] release arguments of contextmanager In-Reply-To: <1494252281.4.0.796080303271.issue30306@psf.upfronthosting.co.za> Message-ID: <1494397778.31.0.748800345983.issue30306@psf.upfronthosting.co.za> Martin Teichmann added the comment: I personally prefer the current situation. The problem is the following: when an @contextmanager is first called, we don't know yet whether the user wants to use it directly, or as a decorator, so we have to have some kind of hybrid class. Once it's used as a decorator, we need to recreate a context manager every time the decorate function is called. Then we need exactly the direct context manager mentioned above. This is why we recreate it with __class__. In my MR on github I simplify that by not recreating the entire context manager, but only the generator function. I think this is the most clear way, as it shows what's going on in a confined area of code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 02:47:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 06:47:24 +0000 Subject: [issue30320] test_eintr.test_sigwaitinfo(): race condition on AMD64 FreeBSD 10.x Shared 3.6 In-Reply-To: <1494345711.78.0.148323197443.issue30320@psf.upfronthosting.co.za> Message-ID: <1494398844.48.0.545448257343.issue30320@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 81ed53784608d44a8d196ad52288b55c7bf665db by Victor Stinner in branch '3.6': bpo-30320: test_eintr now uses pthread_sigmask() (#1523) (#1524) https://github.com/python/cpython/commit/81ed53784608d44a8d196ad52288b55c7bf665db ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 02:49:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 06:49:24 +0000 Subject: [issue30327] Version may be out of date in travis.yml In-Reply-To: <1494396875.36.0.00921683522074.issue30327@psf.upfronthosting.co.za> Message-ID: <1494398964.39.0.608314092464.issue30327@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 3.6 is the latest stable release of Python. It's perfectly fine to *build the documentation* using that version. I don't think that the Travis "docs job" must test that Sphinx works on the nightly version: this work should be done by Sphinx, not by the Python documentation team. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 02:52:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 06:52:00 +0000 Subject: [issue29243] --enable-optimizations makes common build commands always need to compile from scratch In-Reply-To: <1494389622.39.0.547736000385.issue29243@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Xiang Zhang added the comment: > So now we have to run make if we want to trigger the profile procedure since other make commands like make test won't trigger the procedure by itself, right? I don't think that the patch changes the behaviour of "make": it only changes the behaviour of "make install" and "make test" (and a few others). To be honest, I don't know if Makefile knows when a rebuild is needed and how it works. To run benchmarks, I always rebuild Python from scratch, even from an empty directory! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 02:57:06 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 06:57:06 +0000 Subject: [issue30325] Buildbot: send email notifications to buildbot-status@ In-Reply-To: <1494373028.15.0.894136349212.issue30325@psf.upfronthosting.co.za> Message-ID: <1494399426.03.0.827623234769.issue30325@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, Zachary gave me a clue, the code comes from https://github.com/python/buildbot/ It seems like our server is outdated, since buildbot/status/mail.py now contains: # GB: NEW: add test logfile excerpts # AP: disabled (code is broken) if 0 and "test" in t: # only if the test went wrong ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 03:22:03 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 10 May 2017 07:22:03 +0000 Subject: [issue29243] --enable-optimizations makes common build commands always need to compile from scratch In-Reply-To: <1484151314.82.0.308427338149.issue29243@psf.upfronthosting.co.za> Message-ID: <1494400923.98.0.594792002844.issue29243@psf.upfronthosting.co.za> Xiang Zhang added the comment: > I don't think that the patch changes the behaviour of "make": it only > changes the behaviour of "make install" and "make test" (and a few > others). I don't mean "make" is changed. I mean the latter. Before, a single "make test" or "make install" will do all things for you, including the profile procedure. Now they seems not. You have to run "make" before them to trigger the profile procedure. Actually I am quite okay with this change. But don't know others. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 04:06:35 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 10 May 2017 08:06:35 +0000 Subject: [issue29243] --enable-optimizations makes common build commands always need to compile from scratch In-Reply-To: <1484151314.82.0.308427338149.issue29243@psf.upfronthosting.co.za> Message-ID: <1494403595.7.0.7272387496.issue29243@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Yes, this appears true. I'm okay with it because I've always considered the make, test, and install as different command invocations. The package building automation I am aware of tends to do the same. Our buildbots keep the steps separate. But we need document this requirement somewhere. I think if we wanted test and install to accurately figure out if they need to redo the profile build and profiling run, we'd need make to detect that _any_ of its possible profile build+run input files are more recent than the last profiling run. ugh. ---------- stage: -> commit review versions: +Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 04:07:19 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 May 2017 08:07:19 +0000 Subject: [issue15786] IDLE code completion window can hang or misbehave with mouse In-Reply-To: <1346027701.33.0.908436854594.issue15786@psf.upfronthosting.co.za> Message-ID: <1494403639.03.0.299231325333.issue15786@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Some existing idle-macosx issues are 17060 and 18444 (possibly dups), 24570, 24801, 25988 (dup of this?), 21603, 22897, 28928. (At least 1 might be closed). If none of these cover issue you have in mind, please go ahead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 04:31:18 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 May 2017 08:31:18 +0000 Subject: [issue30230] Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard In-Reply-To: <1493735445.03.0.987403403044.issue30230@psf.upfronthosting.co.za> Message-ID: <1494405078.14.0.497970690961.issue30230@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Jim doesn't propose to remove fast test, it proposes to add a test for fast path for avoiding invoking __subclasscheck__ (this is slow). This can change semantic, but isinstance() already contains such fast path. This is similar to testing "elem is seq[i]" before "elem == seq[i]" when search in sequences. This optimization changes semantic for NaNs. Does a "Not-A-Class" class which is not a subclass of itself (issubclass(C, C) returns False) makes any sense? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 04:50:47 2017 From: report at bugs.python.org (Berker Peksag) Date: Wed, 10 May 2017 08:50:47 +0000 Subject: [issue29920] Document cgitb.text and cgitb.html In-Reply-To: <1490620609.02.0.405950190914.issue29920@psf.upfronthosting.co.za> Message-ID: <1494406247.52.0.816614340302.issue29920@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- pull_requests: +1626 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 04:52:34 2017 From: report at bugs.python.org (Berker Peksag) Date: Wed, 10 May 2017 08:52:34 +0000 Subject: [issue29920] Document cgitb.text and cgitb.html In-Reply-To: <1490620609.02.0.405950190914.issue29920@psf.upfronthosting.co.za> Message-ID: <1494406354.49.0.72037023558.issue29920@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- pull_requests: +1627 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 04:56:28 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Wed, 10 May 2017 08:56:28 +0000 Subject: [issue29808] SyslogHandler: should not raise exception in constructor if connection fails In-Reply-To: <1489484201.47.0.147684605376.issue29808@psf.upfronthosting.co.za> Message-ID: <1494406588.52.0.87712315167.issue29808@psf.upfronthosting.co.za> ???? ????????? added the comment: @vinay.sajip I don't see this change in Python 3.5.3: https://github.com/python/cpython/blob/v3.5.3/Lib/logging/handlers.py#L806 How can this be true? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 04:59:02 2017 From: report at bugs.python.org (Louie Lu) Date: Wed, 10 May 2017 08:59:02 +0000 Subject: [issue15786] IDLE code completion window can hang or misbehave with mouse In-Reply-To: <1346027701.33.0.908436854594.issue15786@psf.upfronthosting.co.za> Message-ID: <1494406742.38.0.551031159506.issue15786@psf.upfronthosting.co.za> Louie Lu added the comment: I'm mainly working on Linux, so these problem didn't affect me alot. I did some test on these issue: #24801: right click works on 5.8.18 AS version. #24570: calltips work #25988: wrong issue number (?) -- #21603: concur with Ned, save as a file from foo to bar will have extension name, though it won't display on dialog when save as'ing. #22897: work on 3.x #28928: open file work well on 3.x with 5.8.18 # ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 05:10:11 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 10 May 2017 09:10:11 +0000 Subject: [issue30306] release arguments of contextmanager In-Reply-To: <1494252281.4.0.796080303271.issue30306@psf.upfronthosting.co.za> Message-ID: <1494407411.18.0.56568967957.issue30306@psf.upfronthosting.co.za> Nick Coghlan added the comment: Noting something I picked up in the PR review that apparently isn't covered by the test suite: the whole _recreate_cm() dance is necessary to make recursive and concurrent invocation of decorated functions work correctly. Otherwise the original CM instance ends up being shared between different active calls and problems start to arise. It's these kinds of subtleties that prompted me to declare trying to make otherwise one-shot CMs usable with ContextDecorator an inherently flawed design and hence opt out of making it a public API: https://bugs.python.org/issue11647#msg161113 However, we do still need to keep it working reliably for the @contextmanager case - it's just going to be inherently messy at the implementation level because the original design decision to support the hybrid usage model turned out to be a questionable one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 05:24:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 May 2017 09:24:52 +0000 Subject: [issue29920] Document cgitb.text and cgitb.html In-Reply-To: <1490620609.02.0.405950190914.issue29920@psf.upfronthosting.co.za> Message-ID: <1494408292.31.0.991719442171.issue29920@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The main functions of the cgitb module are enable() and handler(). I would describe them first, and text() and html() at the end (maybe in separate subsection). Actually the main part of the descriptions of text() and html() can be shared and placed in a paragraph preceding them: "The following two functions handle..." Note that the documented name of the first parameter is "info", but actual name is "einfo". ---------- nosy: +martin.panter, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 05:50:46 2017 From: report at bugs.python.org (David Heffernan) Date: Wed, 10 May 2017 09:50:46 +0000 Subject: [issue16865] ctypes arrays >=2GB in length causes exception In-Reply-To: <1357334898.38.0.395259266999.issue16865@psf.upfronthosting.co.za> Message-ID: <1494409846.49.0.489025837406.issue16865@psf.upfronthosting.co.za> David Heffernan added the comment: I just ran into this issue. I'm trying to write code like this: (ctypes.c_char*bufferLen).from_buffer(buffer) where buffer is a bytearray. When bufferLen is greater than 2GB I fail foul of this code in _ctypes.c long length; .... length = PyLong_AsLongAndOverflow(length_attr, &overflow); if (overflow) { PyErr_SetString(PyExc_OverflowError, "The '_length_' attribute is too large"); Py_DECREF(length_attr); goto error; } Surely this should not be forcing long on us. Can't it use PyLong_AsSsize_t or perhaps PyLong_AsLongLongAndOverflow? ---------- nosy: +David Heffernan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 06:19:44 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 10 May 2017 10:19:44 +0000 Subject: [issue30281] set stop default to -PY_SSIZE_T_MAX-1 in PySlice_Unpack In-Reply-To: <1493981265.53.0.830080121255.issue30281@psf.upfronthosting.co.za> Message-ID: <1494411584.05.0.579892774167.issue30281@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 2ddf5a19c3a06978edff2c8ba0aaf5df3528204a by Xiang Zhang in branch 'master': bpo-30281: Fix the default value for stop in PySlice_Unpack() (#1480) https://github.com/python/cpython/commit/2ddf5a19c3a06978edff2c8ba0aaf5df3528204a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 06:29:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 10:29:36 +0000 Subject: [issue29243] --enable-optimizations makes common build commands always need to compile from scratch In-Reply-To: <1484151314.82.0.308427338149.issue29243@psf.upfronthosting.co.za> Message-ID: <1494412176.51.0.694354387066.issue29243@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh wait, I expected that "make test" would build Python with PGO, but it doesn't anymore. Would it be possible to change the Makefile to make sure that "make python" (on Linux, "make python.exe" on macOS) would build Python using PGO? I tried to hack something, but I'm lost in dependencies... "make profile-opt" runs "$(MAKE) build_all_generate_profile" which runs "$(MAKE) build_all CFLAGS_NODIST=..." and build_all depends on "$(BUILDPYTHON)". I'm not sure that it's possible to make everything automatic because of the high number of targets and dependencies. To be honest, I'm not excited by ./configure --enable-optimizations. I was happy with an explicit "make profile-opt". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 06:29:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 May 2017 10:29:50 +0000 Subject: [issue25652] collections.UserString.__rmod__() raises NameError In-Reply-To: <1447823769.89.0.495006915909.issue25652@psf.upfronthosting.co.za> Message-ID: <1494412190.18.0.101587078015.issue25652@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think any solution is better than keeping a bug in the current code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 06:33:06 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 10 May 2017 10:33:06 +0000 Subject: [issue30281] set stop default to -PY_SSIZE_T_MAX-1 in PySlice_Unpack In-Reply-To: <1493981265.53.0.830080121255.issue30281@psf.upfronthosting.co.za> Message-ID: <1494412386.97.0.032328591548.issue30281@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1628 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 06:33:45 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 10 May 2017 10:33:45 +0000 Subject: [issue30281] set stop default to -PY_SSIZE_T_MAX-1 in PySlice_Unpack In-Reply-To: <1493981265.53.0.830080121255.issue30281@psf.upfronthosting.co.za> Message-ID: <1494412425.6.0.567315166335.issue30281@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1629 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 06:36:32 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 10 May 2017 10:36:32 +0000 Subject: [issue30281] set stop default to -PY_SSIZE_T_MAX-1 in PySlice_Unpack In-Reply-To: <1493981265.53.0.830080121255.issue30281@psf.upfronthosting.co.za> Message-ID: <1494412592.23.0.923864113273.issue30281@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1630 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 06:39:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 10:39:13 +0000 Subject: [issue30320] test_eintr.test_sigwaitinfo(): race condition on AMD64 FreeBSD 10.x Shared 3.6 In-Reply-To: <1494345711.78.0.148323197443.issue30320@psf.upfronthosting.co.za> Message-ID: <1494412753.77.0.823154584818.issue30320@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1631 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 06:39:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 10:39:13 +0000 Subject: [issue25277] test_sigwaitinfo() of test_eintr hangs on randomly on FreeBSD buildbots In-Reply-To: <1443605568.0.0.865946740877.issue25277@psf.upfronthosting.co.za> Message-ID: <1494412753.89.0.772288312802.issue25277@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1632 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 07:00:18 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 10 May 2017 11:00:18 +0000 Subject: [issue30281] set stop default to -PY_SSIZE_T_MAX-1 in PySlice_Unpack In-Reply-To: <1493981265.53.0.830080121255.issue30281@psf.upfronthosting.co.za> Message-ID: <1494414018.06.0.41705575116.issue30281@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 98b49a00d413972965044fd355be3b8482caa07c by Xiang Zhang in branch '3.6': bpo-30281: Fix the default value for stop in PySlice_Unpack() (#1480) (#1529) https://github.com/python/cpython/commit/98b49a00d413972965044fd355be3b8482caa07c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 07:11:11 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 10 May 2017 11:11:11 +0000 Subject: [issue30281] set stop default to -PY_SSIZE_T_MAX-1 in PySlice_Unpack In-Reply-To: <1493981265.53.0.830080121255.issue30281@psf.upfronthosting.co.za> Message-ID: <1494414671.25.0.932027242655.issue30281@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 639e295650a51894412c9d976958792010d3bcf8 by Xiang Zhang in branch '3.5': bpo-30281: Fix the default value for stop in PySlice_Unpack() (#1530) (#1480? https://github.com/python/cpython/commit/639e295650a51894412c9d976958792010d3bcf8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 07:12:11 2017 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 10 May 2017 11:12:11 +0000 Subject: [issue29808] SyslogHandler: should not raise exception in constructor if connection fails In-Reply-To: <1489484201.47.0.147684605376.issue29808@psf.upfronthosting.co.za> Message-ID: <1494414731.27.0.316862429687.issue29808@psf.upfronthosting.co.za> Vinay Sajip added the comment: > How can this be true? Perhaps it didn't make the cut for that specific release? Seems to be in the 3.5 branch OK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 07:20:31 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 10 May 2017 11:20:31 +0000 Subject: [issue30281] set stop default to -PY_SSIZE_T_MAX-1 in PySlice_Unpack In-Reply-To: <1493981265.53.0.830080121255.issue30281@psf.upfronthosting.co.za> Message-ID: <1494415231.05.0.604486034423.issue30281@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 05469fa1c05acf55bdca05db21822ecdd7f6487a by Xiang Zhang in branch '2.7': bpo-30281: Fix the default value for stop in PySlice_Unpack() (#1531) (#1480) https://github.com/python/cpython/commit/05469fa1c05acf55bdca05db21822ecdd7f6487a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 07:21:37 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 10 May 2017 11:21:37 +0000 Subject: [issue30281] set stop default to -PY_SSIZE_T_MAX-1 in PySlice_Unpack In-Reply-To: <1493981265.53.0.830080121255.issue30281@psf.upfronthosting.co.za> Message-ID: <1494415297.39.0.253337808331.issue30281@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 07:51:15 2017 From: report at bugs.python.org (Eryk Sun) Date: Wed, 10 May 2017 11:51:15 +0000 Subject: [issue16865] ctypes arrays >=2GB in length causes exception In-Reply-To: <1357334898.38.0.395259266999.issue16865@psf.upfronthosting.co.za> Message-ID: <1494417075.27.0.700728162469.issue16865@psf.upfronthosting.co.za> Eryk Sun added the comment: In older versions of ctypes, before it was added to the standard library, the underlying length field was a C int, and CArrayType_new used the PyInt_AS_LONG macro. ctypes was added to the standard library in 2.5, by which time the length field is Py_ssize_t, but CArrayType_new still used the PyInt_AS_LONG macro. That's still the case in 2.7. Python 3 changed this to call PyLong_AsLongAndOverflow, but apparently Christian Heimes didn't consider fixing this properly to use Py_ssize_t: https://hg.python.org/cpython/rev/612d8dea7f6c David, maybe there's a workaround for your use case, if you can provide some more details. ---------- nosy: +eryksun versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 08:13:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 12:13:40 +0000 Subject: [issue25277] test_sigwaitinfo() of test_eintr hangs on randomly on FreeBSD buildbots In-Reply-To: <1443605568.0.0.865946740877.issue25277@psf.upfronthosting.co.za> Message-ID: <1494418420.98.0.360852219596.issue25277@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset dab10f4f5b52c6de1aac3a8b5dc87d2eb0223a6c by Victor Stinner in branch '3.5': [3.5] bpo-30320, bpo-25277: backport test_eintr enhancements from master to 3.5 (#1532) https://github.com/python/cpython/commit/dab10f4f5b52c6de1aac3a8b5dc87d2eb0223a6c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 08:13:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 12:13:41 +0000 Subject: [issue30320] test_eintr.test_sigwaitinfo(): race condition on AMD64 FreeBSD 10.x Shared 3.6 In-Reply-To: <1494345711.78.0.148323197443.issue30320@psf.upfronthosting.co.za> Message-ID: <1494418421.1.0.165129834083.issue30320@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset dab10f4f5b52c6de1aac3a8b5dc87d2eb0223a6c by Victor Stinner in branch '3.5': [3.5] bpo-30320, bpo-25277: backport test_eintr enhancements from master to 3.5 (#1532) https://github.com/python/cpython/commit/dab10f4f5b52c6de1aac3a8b5dc87d2eb0223a6c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 08:19:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 12:19:20 +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: <1494418760.78.0.729508876965.issue30316@psf.upfronthosting.co.za> STINNER Victor added the comment: Another similar bug different exception in test_thread on AMD64 FreeBSD CURRENT Debug 3.6: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%203.6/builds/145/steps/test/logs/stdio test_save_exception_state_on_error (test.test_thread.ThreadRunningTests) ... FAIL test_stack_size (test.test_thread.ThreadRunningTests) ... ok ... ====================================================================== FAIL: test_save_exception_state_on_error (test.test_thread.ThreadRunningTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_thread.py", line 148, in test_save_exception_state_on_error self.assertIn("Traceback", stderr.getvalue()) AssertionError: 'Traceback' not found in '' ---------------------------------------------------------------------- Ran 23 tests in 1.565s FAILED (failures=1) test test_thread failed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 08:20:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 12:20:02 +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: <1494418802.85.0.609380075669.issue30316@psf.upfronthosting.co.za> STINNER Victor added the comment: Full test output. 0:04:38 [ 86/405/1] test_thread failed -- running: test_multiprocessing_spawn (214 sec) test_barrier (test.test_thread.BarrierTest) ... waiting for tasks to end task 0 will run for 0us task 0 entering 0 task 2 will run for 4us task 2 entering 0 task 6 will run for 90us task 4 will run for 15us task 6 entering 0 task 1 will run for 7us task 3 will run for 33us task 5 will run for 85us task 7 will run for 71us task 7 entering 0 task 5 entering 0 task 9 will run for 45us task 4 entering 0 task 8 will run for 62us task 8 entering 0 task 1 entering 0 task 9 entering 0 task 3 entering 0 task 3 leaving barrier task 3 will run for 15us task 3 entering 1 task 0 leaving barrier task 0 will run for 0us task 0 entering 1 task 2 leaving barrier task 2 will run for 98us task 2 entering 1 task 6 leaving barrier task 6 will run for 91us task 7 leaving barrier task 7 will run for 67us task 6 entering 1 task 7 entering 1 task 4 leaving barrier task 4 will run for 38us task 4 entering 1 task 8 leaving barrier task 8 will run for 84us task 8 entering 1 task 5 leaving barrier task 5 will run for 92us task 5 entering 1 task 9 leaving barrier task 9 will run for 1us task 9 entering 1 task 1 leaving barrier task 1 will run for 55us task 1 entering 1 task 0 leaving barrier task 0 will run for 0us task 0 entering 2 task 9 leaving barrier task 9 will run for 2us task 2 leaving barrier task 2 will run for 92us task 9 entering 2 task 6 leaving barrier task 6 will run for 43us task 2 entering 2 task 7 leaving barrier task 7 will run for 90us task 6 entering 2 task 4 leaving barrier task 4 will run for 1us task 8 leaving barrier task 8 will run for 20us task 4 entering 2 task 8 entering 2 task 5 leaving barrier task 5 will run for 86us task 7 entering 2 task 3 leaving barrier task 3 will run for 3us task 5 entering 2 task 3 entering 2 task 1 leaving barrier task 1 will run for 80us task 1 entering 2 task 1 leaving barrier task 0 leaving barrier task 2 leaving barrier task 9 leaving barrier task 6 leaving barrier task 8 leaving barrier task 4 leaving barrier task 7 leaving barrier task 5 leaving barrier task 3 leaving barrier tasks done ok test_acquire_contended (test.test_thread.LockTests) ... ok test_acquire_destroy (test.test_thread.LockTests) ... ok test_acquire_release (test.test_thread.LockTests) ... ok test_constructor (test.test_thread.LockTests) ... ok test_different_thread (test.test_thread.LockTests) ... ok test_locked_repr (test.test_thread.LockTests) ... ok test_reacquire (test.test_thread.LockTests) ... ok test_repr (test.test_thread.LockTests) ... ok test_state_after_timeout (test.test_thread.LockTests) ... ok test_thread_leak (test.test_thread.LockTests) ... ok test_timeout (test.test_thread.LockTests) ... ok test_try_acquire (test.test_thread.LockTests) ... ok test_try_acquire_contended (test.test_thread.LockTests) ... ok test_weakref_deleted (test.test_thread.LockTests) ... ok test_weakref_exists (test.test_thread.LockTests) ... ok test_with (test.test_thread.LockTests) ... ok test_forkinthread (test.test_thread.TestForkInThread) ... ok test__count (test.test_thread.ThreadRunningTests) ... ok test_nt_and_posix_stack_size (test.test_thread.ThreadRunningTests) ... caught expected ValueError setting stack_size(4096) successfully set stack_size(262144) successfully set stack_size(1048576) successfully set stack_size(0) trying stack_size = (262144) creating task 1 creating task 2 creating task 3 creating task 4 creating task 5 creating task 6 creating task 7 creating task 8 creating task 9 creating task 10 waiting for all tasks to complete task 1 will run for 45us task 2 will run for 22us task 2 done task 3 will run for 57us task 4 will run for 61us task 3 done task 4 done task 7 will run for 73us task 9 will run for 46us task 10 will run for 63us task 8 will run for 71us task 7 done task 5 will run for 54us task 6 will run for 6us task 6 done task 1 done task 8 done task 10 done task 5 done task 9 done all tasks done trying stack_size = (1048576) creating task 1 creating task 2 creating task 3 creating task 4 creating task 5 creating task 6 creating task 7 creating task 8 creating task 9 creating task 10 waiting for all tasks to complete task 1 will run for 74us task 2 will run for 87us task 4 will run for 76us task 6 will run for 41us task 3 will run for 23us task 5 will run for 22us task 2 done task 9 will run for 0us task 3 done task 6 done task 10 will run for 83us task 4 done task 8 will run for 35us task 1 done task 8 done task 10 done task 9 done task 7 will run for 67us task 5 done task 7 done all tasks done ok test_save_exception_state_on_error (test.test_thread.ThreadRunningTests) ... FAIL test_stack_size (test.test_thread.ThreadRunningTests) ... ok test_starting_threads (test.test_thread.ThreadRunningTests) ... creating task 1 creating task 2 creating task 3 creating task 4 creating task 5 creating task 6 creating task 7 creating task 8 creating task 9 creating task 10 waiting for tasks to complete... task 2 will run for 38us task 4 will run for 69us task 8 will run for 41us task 6 will run for 39us task 2 done task 10 will run for 9us Unhandled exception in thread started by .task at 0x805779a68> Traceback (most recent call last): File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_thread.py", line 131, in task raise SyntaxError SyntaxError: None task 1 will run for 96us task 3 will run for 36us task 1 done task 9 will run for 38us task 5 will run for 39us task 5 done task 8 done task 4 done task 7 will run for 36us task 6 done task 10 done task 9 done task 7 done task 3 done all tasks done ok ====================================================================== FAIL: test_save_exception_state_on_error (test.test_thread.ThreadRunningTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_thread.py", line 148, in test_save_exception_state_on_error self.assertIn("Traceback", stderr.getvalue()) AssertionError: 'Traceback' not found in '' ---------------------------------------------------------------------- Ran 23 tests in 1.565s FAILED (failures=1) test test_thread failed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 08:21:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 12:21:29 +0000 Subject: [issue30319] test_invalid_authentication() of test_imaplib: ConnectionResetError: [Errno 54] Connection reset by peer on AMD64 FreeBSD 9.x 3.6 In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1494418889.23.0.661118194505.issue30319@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_invalid_authentication() of test_imaplib: random failure on AMD64 FreeBSD 9.x 3.6 -> test_invalid_authentication() of test_imaplib: ConnectionResetError: [Errno 54] Connection reset by peer on AMD64 FreeBSD 9.x 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 08:24:06 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 12:24:06 +0000 Subject: [issue30328] test_ssl.test_connect_with_context(): ConnectionResetError on AMD64 FreeBSD 9.x 3.6 Message-ID: <1494419046.55.0.785376173684.issue30328@psf.upfronthosting.co.za> New submission from STINNER Victor: See also bpo-30315 (test_ftplib) and bpo-30319 (test_imaplib). http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.6/builds/131/steps/test/logs/stdio test_connect_with_context (test.test_ssl.SimpleBackgroundTests) ... server: new connection from ('127.0.0.1', 53510) server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256) server: selected protocol is now None Test server failure: Traceback (most recent call last): File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/test/test_ssl.py", line 1944, in run self.close() File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/test/test_ssl.py", line 1919, in close self.sslconn.close() File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/socket.py", line 417, in close self._real_close() File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/ssl.py", line 1052, in _real_close socket._real_close(self) File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/socket.py", line 411, in _real_close _ss.close(self) ConnectionResetError: [Errno 54] Connection reset by peer ERROR ... ====================================================================== ERROR: test_connect_with_context (test.test_ssl.SimpleBackgroundTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/test/test_ssl.py", line 1541, in test_connect_with_context s.connect(self.server_addr) File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/ssl.py", line 1093, in connect self._real_connect(addr, False) File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/ssl.py", line 1084, in _real_connect self.do_handshake() File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/ssl.py", line 1061, in do_handshake self._sslobj.do_handshake() File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/ssl.py", line 683, in do_handshake self._sslobj.do_handshake() ConnectionResetError: [Errno 54] Connection reset by peer ---------------------------------------------------------------------- Ran 127 tests in 12.751s FAILED (errors=1, skipped=7) test test_ssl failed ---------- components: Tests keywords: buildbot messages: 293408 nosy: haypo priority: normal severity: normal status: open title: test_ssl.test_connect_with_context(): ConnectionResetError on AMD64 FreeBSD 9.x 3.6 versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 08:24:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 12:24:41 +0000 Subject: [issue30319] test_invalid_authentication() of test_imaplib: ConnectionResetError: [Errno 54] Connection reset by peer on AMD64 FreeBSD 9.x 3.6 In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1494419081.32.0.132669056027.issue30319@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-30328 (test_ssl) and bpo-30315 (test_ftplib). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 08:24:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 12:24:50 +0000 Subject: [issue30315] test_ftplib.TestTLS_FTPClass: "[Errno 54] Connection reset by peer" on "AMD64 FreeBSD CURRENT Debug 3.x" buildbot In-Reply-To: <1494344869.6.0.553746122368.issue30315@psf.upfronthosting.co.za> Message-ID: <1494419090.5.0.450429061376.issue30315@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-30328 (test_ssl) and bpo-30319 (test_imaplib). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 08:26:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 12:26:48 +0000 Subject: [issue30329] test_imaplib.test_login_cram_md5(): OSError: [WinError 10022] An invalid argument was supplied on AMD64 Windows8.1 Non-Debug 3.6 Message-ID: <1494419208.12.0.00943199066561.issue30329@psf.upfronthosting.co.za> New submission from STINNER Victor: See also bpo-30319: test_invalid_authentication() of test_imaplib: ConnectionResetError: [Errno 54] Connection reset by peer on AMD64 FreeBSD 9.x 3.6. http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Non-Debug%203.6/builds/375/steps/test/logs/stdio test_login_cram_md5 (test.test_imaplib.ThreadedNetworkedTestsSSL) ... creating server server created ADDR = ('127.0.0.1', 0) CLASS = HDLR = .AuthHandler'> server running SENT: b'* OK IMAP4rev1' GOT: b'PJGL0 CAPABILITY' SENT: b'* CAPABILITY IMAP4rev1 LOGINDISABLED AUTH=CRAM-MD5' SENT: b'PJGL0 OK CAPABILITY completed' GOT: b'PJGL1 AUTHENTICATE CRAM-MD5' SENT: b'+ PDE4OTYuNjk3MTcwOTUyQHBvc3RvZmZpY2UucmVzdG9uLm1jaS5uZXQ=' GOT: b'dGltIGYxY2E2YmU0NjRiOWVmYTFjY2E2ZmZkNmNmMmQ5ZjMy' SENT: b'PJGL1 OK CRAM-MD5 successful' GOT: b'PJGL2 LOGOUT' SENT: b'* BYE IMAP4ref1 Server logging out' SENT: b'PJGL2 OK LOGOUT completed' waiting for server done ERROR ====================================================================== ERROR: test_login_cram_md5 (test.test_imaplib.ThreadedNetworkedTestsSSL) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\buildarea\3.6.ware-win81-release\build\lib\test\support\__init__.py", line 2035, in decorator return func(*args) File "D:\buildarea\3.6.ware-win81-release\build\lib\test\test_imaplib.py", line 796, in test_login_cram_md5 self.assertEqual(ret, "OK") File "D:\buildarea\3.6.ware-win81-release\build\lib\contextlib.py", line 89, in __exit__ next(self.gen) File "D:\buildarea\3.6.ware-win81-release\build\lib\test\test_imaplib.py", line 567, in reaped_pair client.logout() File "D:\buildarea\3.6.ware-win81-release\build\lib\imaplib.py", line 622, in logout self.shutdown() File "D:\buildarea\3.6.ware-win81-release\build\lib\imaplib.py", line 320, in shutdown self.sock.shutdown(socket.SHUT_RDWR) File "D:\buildarea\3.6.ware-win81-release\build\lib\ssl.py", line 1040, in shutdown socket.shutdown(self, how) OSError: [WinError 10022] An invalid argument was supplied ---------------------------------------------------------------------- Ran 95 tests in 6.890s FAILED (errors=1, skipped=4) test test_imaplib failed ---------- assignee: christian.heimes components: SSL, Tests, Windows keywords: buildbot messages: 293411 nosy: christian.heimes, haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: test_imaplib.test_login_cram_md5(): OSError: [WinError 10022] An invalid argument was supplied on AMD64 Windows8.1 Non-Debug 3.6 versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 08:28:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 12:28:02 +0000 Subject: [issue30330] test_socket.test_idna(): socket.gaierror: [Errno 11001] getaddrinfo failed on AMD64 Windows10 3.6 Message-ID: <1494419282.71.0.653200577669.issue30330@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Windows10%203.6/builds/356/steps/test/logs/stdio ====================================================================== ERROR: test_idna (test.test_socket.GeneralModuleTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\buildarea\3.6.bolen-windows10\build\lib\test\test_socket.py", line 1359, in test_idna socket.getaddrinfo(domain,0,socket.AF_UNSPEC,socket.SOCK_STREAM) File "D:\buildarea\3.6.bolen-windows10\build\lib\socket.py", line 743, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno 11001] getaddrinfo failed ---------------------------------------------------------------------- ---------- components: Tests, Windows keywords: buildbot messages: 293412 nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: test_socket.test_idna(): socket.gaierror: [Errno 11001] getaddrinfo failed on AMD64 Windows10 3.6 versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 08:28:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 12:28:47 +0000 Subject: [issue30330] test_socket.test_idna(): socket.gaierror: [Errno 11001] getaddrinfo failed on AMD64 Windows10 3.6 In-Reply-To: <1494419282.71.0.653200577669.issue30330@psf.upfronthosting.co.za> Message-ID: <1494419327.85.0.538880023842.issue30330@psf.upfronthosting.co.za> STINNER Victor added the comment: In the same build, a retry of the DNS request later succeeded: test_idna (test.test_socket.GeneralModuleTests) ... ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 08:54:26 2017 From: report at bugs.python.org (Tomas Orsava) Date: Wed, 10 May 2017 12:54:26 +0000 Subject: [issue29243] --enable-optimizations makes common build commands always need to compile from scratch In-Reply-To: <1484151314.82.0.308427338149.issue29243@psf.upfronthosting.co.za> Message-ID: <1494420866.12.0.833756858196.issue29243@psf.upfronthosting.co.za> Tomas Orsava added the comment: > Oh wait, I expected that "make test" would build Python with PGO, but it > doesn't anymore. Would it be possible to change the Makefile to make sure > that "make python" (on Linux, "make python.exe" on macOS) would build Python > using PGO? > > I tried to hack something, but I'm lost in dependencies... "make profile-opt" > runs "$(MAKE) build_all_generate_profile" which runs "$(MAKE) build_all > CFLAGS_NODIST=..." and build_all depends on "$(BUILDPYTHON)". > > I'm not sure that it's possible to make everything automatic because of the > high number of targets and dependencies. In addition, profile-opt would have to rewritten to test whether there's already an interpreter built with PGO. And if there is, regenerate it only if the main target is `all` or `profile-opt`, but not when someone runs `make test`, `make install`, etc. It's maybe too radical, but we could change it so that if you run `make test`, `make install` and the like and there's no interpreter built already to test or install, the user is told to run `make` first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 09:02:56 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 10 May 2017 13:02:56 +0000 Subject: [issue30190] unittest's assertAlmostEqual improved error message In-Reply-To: <1493323962.23.0.575947649634.issue30190@psf.upfronthosting.co.za> Message-ID: <1494421376.41.0.648688537027.issue30190@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Mmm I can't see them. Am I supposed to enable this kind of warning somehow? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 09:07:19 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 May 2017 13:07:19 +0000 Subject: [issue30190] unittest's assertAlmostEqual improved error message In-Reply-To: <1493323962.23.0.575947649634.issue30190@psf.upfronthosting.co.za> Message-ID: <1494421639.05.0.171346378277.issue30190@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: $ ./python -Wa Lib/unittest/test/test_assertions.py Lib/unittest/test/test_assertions.py:228: DeprecationWarning: invalid escape sequence \( ["^1 != 2 within 7 places \(1 difference\)$", "^oops$", Lib/unittest/test/test_assertions.py:229: DeprecationWarning: invalid escape sequence \( "^1 != 2 within 7 places \(1 difference\)$", Lib/unittest/test/test_assertions.py:230: DeprecationWarning: invalid escape sequence \( "^1 != 2 within 7 places \(1 difference\) : oops$"]) ................................... ---------------------------------------------------------------------- Ran 35 tests in 0.052s OK ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 09:09:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 May 2017 13:09:58 +0000 Subject: [issue30190] unittest's assertAlmostEqual improved error message In-Reply-To: <1493323962.23.0.575947649634.issue30190@psf.upfronthosting.co.za> Message-ID: <1494421798.53.0.460135236866.issue30190@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Warnings are not shown when the source is already compiled to .pyc file. $ find -name '*.py[co]' -exec rm '{}' + $ ./python -Wa -m test test_unittest Run tests sequentially 0:00:00 load avg: 0.54 [1/1] test_unittest /home/serhiy/py/cpython/Lib/unittest/test/test_assertions.py:228: DeprecationWarning: invalid escape sequence \( ["^1 != 2 within 7 places \(1 difference\)$", "^oops$", /home/serhiy/py/cpython/Lib/unittest/test/test_assertions.py:229: DeprecationWarning: invalid escape sequence \( "^1 != 2 within 7 places \(1 difference\)$", /home/serhiy/py/cpython/Lib/unittest/test/test_assertions.py:230: DeprecationWarning: invalid escape sequence \( "^1 != 2 within 7 places \(1 difference\) : oops$"]) 1 test OK. Total duration: 5 sec Tests result: SUCCESS ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 09:10:48 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 10 May 2017 13:10:48 +0000 Subject: [issue30190] unittest's assertAlmostEqual improved error message In-Reply-To: <1493323962.23.0.575947649634.issue30190@psf.upfronthosting.co.za> Message-ID: <1494421848.75.0.789750944397.issue30190@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: OK thanks. Fix coming. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 09:24:27 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 10 May 2017 13:24:27 +0000 Subject: [issue30190] unittest's assertAlmostEqual improved error message In-Reply-To: <1493323962.23.0.575947649634.issue30190@psf.upfronthosting.co.za> Message-ID: <1494422667.52.0.43139836967.issue30190@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- pull_requests: +1633 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 09:31:13 2017 From: report at bugs.python.org (David Heffernan) Date: Wed, 10 May 2017 13:31:13 +0000 Subject: [issue16865] ctypes arrays >=2GB in length causes exception In-Reply-To: <1357334898.38.0.395259266999.issue16865@psf.upfronthosting.co.za> Message-ID: <1494423073.15.0.0239822972422.issue16865@psf.upfronthosting.co.za> David Heffernan added the comment: Erik, As you can no doubt guess, this is related to the questions I have been asking on SO that you have so expertly been answering. Thank you! When I solved the latest problem, getting at the internal buffer of a bytearray, I used the code in my previous comment, which came from a comment (now deleted) of yours to the question. Looking at this more closely I realise that, as you said in your answer, the array length is not important for my specific needs, to it is fine to use zero. That side steps this issue completely. Thanks again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 10:30:20 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 10 May 2017 14:30:20 +0000 Subject: [issue30323] concurrent.futures.Executor.map() consumes all memory when big generators are used In-Reply-To: <1494365822.25.0.431593996842.issue30323@psf.upfronthosting.co.za> Message-ID: <1494426620.77.0.105063906222.issue30323@psf.upfronthosting.co.za> Xiang Zhang added the comment: IIUC, the meaning of executor.map() is to run the tasks concurrently. So you have to loop the iterable ahead to submit all the tasks. If you make it a generator comprehension, you are actually submitting a task and then getting the result. So you are executing the tasks sequentially. Doesn't it violate the intention and meaning of executor.map()? ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 10:31:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 14:31:03 +0000 Subject: [issue30331] TestPOP3_TLSClass: socket.timeout: timed out on AMD64 FreeBSD 10.x Shared 3.x Message-ID: <1494426662.88.0.428519662658.issue30331@psf.upfronthosting.co.za> New submission from STINNER Victor: See also bpo-30328 (test_ssl), bpo-30315 (test_ftplib) and bpo-30319 (test_imaplib). http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/246/steps/test/logs/stdio 0:07:58 load avg: 3.30 [242/405/1] test_poplib failed -- running: test_datetime (139 sec) test_apop (test.test_poplib.TestPOP3Class) ... ok test_capa (test.test_poplib.TestPOP3Class) ... ok test_dele (test.test_poplib.TestPOP3Class) ... ok test_exceptions (test.test_poplib.TestPOP3Class) ... ok test_getwelcome (test.test_poplib.TestPOP3Class) ... ok test_list (test.test_poplib.TestPOP3Class) ... ok test_noop (test.test_poplib.TestPOP3Class) ... ok test_pass_ (test.test_poplib.TestPOP3Class) ... ok test_quit (test.test_poplib.TestPOP3Class) ... ok test_retr (test.test_poplib.TestPOP3Class) ... ok test_rpop (test.test_poplib.TestPOP3Class) ... ok test_stat (test.test_poplib.TestPOP3Class) ... ok test_stls (test.test_poplib.TestPOP3Class) ... ok test_stls_capa (test.test_poplib.TestPOP3Class) ... ok test_stls_context (test.test_poplib.TestPOP3Class) ... ok test_too_long_lines (test.test_poplib.TestPOP3Class) ... ok test_top (test.test_poplib.TestPOP3Class) ... ok test_uidl (test.test_poplib.TestPOP3Class) ... ok test_user (test.test_poplib.TestPOP3Class) ... ok test_utf8 (test.test_poplib.TestPOP3Class) ... ok test_utf8_raises_if_unsupported (test.test_poplib.TestPOP3Class) ... ok testTimeoutDefault (test.test_poplib.TestTimeouts) ... ok testTimeoutNone (test.test_poplib.TestTimeouts) ... ok testTimeoutValue (test.test_poplib.TestTimeouts) ... ok test__all__ (test.test_poplib.TestPOP3_SSLClass) ... ok test_apop (test.test_poplib.TestPOP3_SSLClass) ... ok test_capa (test.test_poplib.TestPOP3_SSLClass) ... ok test_context (test.test_poplib.TestPOP3_SSLClass) ... ok test_dele (test.test_poplib.TestPOP3_SSLClass) ... ok test_exceptions (test.test_poplib.TestPOP3_SSLClass) ... ok test_getwelcome (test.test_poplib.TestPOP3_SSLClass) ... ok test_list (test.test_poplib.TestPOP3_SSLClass) ... ok test_noop (test.test_poplib.TestPOP3_SSLClass) ... ok test_pass_ (test.test_poplib.TestPOP3_SSLClass) ... ok test_quit (test.test_poplib.TestPOP3_SSLClass) ... ok test_retr (test.test_poplib.TestPOP3_SSLClass) ... ok test_rpop (test.test_poplib.TestPOP3_SSLClass) ... ok test_stat (test.test_poplib.TestPOP3_SSLClass) ... ok test_stls (test.test_poplib.TestPOP3_SSLClass) ... ok test_stls_capa (test.test_poplib.TestPOP3_SSLClass) ... ok test_stls_context (test.test_poplib.TestPOP3_SSLClass) ... ok test_too_long_lines (test.test_poplib.TestPOP3_SSLClass) ... ok test_top (test.test_poplib.TestPOP3_SSLClass) ... ok test_uidl (test.test_poplib.TestPOP3_SSLClass) ... ok test_user (test.test_poplib.TestPOP3_SSLClass) ... ok test_utf8 (test.test_poplib.TestPOP3_SSLClass) ... ok test_utf8_raises_if_unsupported (test.test_poplib.TestPOP3_SSLClass) ... ok test_apop (test.test_poplib.TestPOP3_TLSClass) ... ok test_capa (test.test_poplib.TestPOP3_TLSClass) ... ok test_dele (test.test_poplib.TestPOP3_TLSClass) ... ok test_exceptions (test.test_poplib.TestPOP3_TLSClass) ... ok test_getwelcome (test.test_poplib.TestPOP3_TLSClass) ... ok test_list (test.test_poplib.TestPOP3_TLSClass) ... ERROR test_noop (test.test_poplib.TestPOP3_TLSClass) ... Exception in thread Thread-54: Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 222, in run asyncore.loop(timeout=0.1, count=1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 207, in loop poll_fun(timeout, map) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 150, in poll read(obj) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 87, in read obj.handle_error() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 83, in read obj.handle_read_event() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 423, in handle_read_event self.handle_read() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 188, in handle_read if self.tls_starting: AttributeError: 'DummyPOP3Handler' object has no attribute 'tls_starting' Exception in thread Thread-53: Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 222, in run asyncore.loop(timeout=0.1, count=1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 207, in loop poll_fun(timeout, map) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 150, in poll read(obj) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 87, in read obj.handle_error() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 83, in read obj.handle_read_event() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 417, in handle_read_event self.handle_accept() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 494, in handle_accept self.handle_accepted(*pair) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 232, in handle_accepted self.handler_instance = self.handler(conn) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 52, in __init__ self.push('+OK dummy pop3 server ready. ') File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 79, in push asynchat.async_chat.push(self, data.encode("ISO-8859-1") + b'\r\n') File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asynchat.py", line 202, in push self.initiate_send() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asynchat.py", line 260, in initiate_send del self.producer_fifo[0] IndexError: deque index out of range ERROR test_pass_ (test.test_poplib.TestPOP3_TLSClass) ... Exception in thread Thread-55: Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 222, in run asyncore.loop(timeout=0.1, count=1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 207, in loop poll_fun(timeout, map) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 150, in poll read(obj) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 87, in read obj.handle_error() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 83, in read obj.handle_read_event() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 423, in handle_read_event self.handle_read() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 188, in handle_read if self.tls_starting: AttributeError: 'DummyPOP3Handler' object has no attribute 'tls_starting' ERROR /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py:657: ResourceWarning: unclosed self._sock = None test_quit (test.test_poplib.TestPOP3_TLSClass) ... Exception in thread Thread-56: Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 222, in run asyncore.loop(timeout=0.1, count=1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 207, in loop poll_fun(timeout, map) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 150, in poll read(obj) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 87, in read obj.handle_error() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 83, in read obj.handle_read_event() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 423, in handle_read_event self.handle_read() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 188, in handle_read if self.tls_starting: AttributeError: 'DummyPOP3Handler' object has no attribute 'tls_starting' ERROR /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py:657: ResourceWarning: unclosed self._sock = None test_retr (test.test_poplib.TestPOP3_TLSClass) ... Exception in thread Thread-57: Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 222, in run asyncore.loop(timeout=0.1, count=1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 207, in loop poll_fun(timeout, map) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 150, in poll read(obj) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 87, in read obj.handle_error() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 83, in read obj.handle_read_event() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 423, in handle_read_event self.handle_read() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 188, in handle_read if self.tls_starting: AttributeError: 'DummyPOP3Handler' object has no attribute 'tls_starting' ERROR /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py:657: ResourceWarning: unclosed self._sock = None test_rpop (test.test_poplib.TestPOP3_TLSClass) ... Exception in thread Thread-58: Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 222, in run asyncore.loop(timeout=0.1, count=1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 207, in loop poll_fun(timeout, map) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 150, in poll read(obj) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 87, in read obj.handle_error() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 83, in read obj.handle_read_event() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 423, in handle_read_event self.handle_read() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 188, in handle_read if self.tls_starting: AttributeError: 'DummyPOP3Handler' object has no attribute 'tls_starting' ERROR /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py:657: ResourceWarning: unclosed self._sock = None test_stat (test.test_poplib.TestPOP3_TLSClass) ... Exception in thread Thread-59: Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 222, in run asyncore.loop(timeout=0.1, count=1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 207, in loop poll_fun(timeout, map) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 150, in poll read(obj) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 87, in read obj.handle_error() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 83, in read obj.handle_read_event() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 423, in handle_read_event self.handle_read() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 188, in handle_read if self.tls_starting: AttributeError: 'DummyPOP3Handler' object has no attribute 'tls_starting' ERROR /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py:657: ResourceWarning: unclosed self._sock = None test_stls (test.test_poplib.TestPOP3_TLSClass) ... Exception in thread Thread-60: Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 222, in run asyncore.loop(timeout=0.1, count=1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 207, in loop poll_fun(timeout, map) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 150, in poll read(obj) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 87, in read obj.handle_error() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 83, in read obj.handle_read_event() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 423, in handle_read_event self.handle_read() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 188, in handle_read if self.tls_starting: AttributeError: 'DummyPOP3Handler' object has no attribute 'tls_starting' ERROR /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py:657: ResourceWarning: unclosed self._sock = None test_stls_capa (test.test_poplib.TestPOP3_TLSClass) ... Exception in thread Thread-61: Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 222, in run asyncore.loop(timeout=0.1, count=1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 207, in loop poll_fun(timeout, map) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 150, in poll read(obj) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 87, in read obj.handle_error() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 83, in read obj.handle_read_event() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 423, in handle_read_event self.handle_read() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 188, in handle_read if self.tls_starting: AttributeError: 'DummyPOP3Handler' object has no attribute 'tls_starting' ERROR /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py:657: ResourceWarning: unclosed self._sock = None test_stls_context (test.test_poplib.TestPOP3_TLSClass) ... Exception in thread Thread-62: Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 222, in run asyncore.loop(timeout=0.1, count=1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 207, in loop poll_fun(timeout, map) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 150, in poll read(obj) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 87, in read obj.handle_error() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 83, in read obj.handle_read_event() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 423, in handle_read_event self.handle_read() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 188, in handle_read if self.tls_starting: AttributeError: 'DummyPOP3Handler' object has no attribute 'tls_starting' ERROR /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py:657: ResourceWarning: unclosed self._sock = None test_too_long_lines (test.test_poplib.TestPOP3_TLSClass) ... Exception in thread Thread-63: Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 222, in run asyncore.loop(timeout=0.1, count=1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 207, in loop poll_fun(timeout, map) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 150, in poll read(obj) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 87, in read obj.handle_error() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 83, in read obj.handle_read_event() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 423, in handle_read_event self.handle_read() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 188, in handle_read if self.tls_starting: AttributeError: 'DummyPOP3Handler' object has no attribute 'tls_starting' ERROR /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py:657: ResourceWarning: unclosed self._sock = None test_top (test.test_poplib.TestPOP3_TLSClass) ... Exception in thread Thread-64: Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 222, in run asyncore.loop(timeout=0.1, count=1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 207, in loop poll_fun(timeout, map) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 150, in poll read(obj) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 87, in read obj.handle_error() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 83, in read obj.handle_read_event() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 423, in handle_read_event self.handle_read() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 188, in handle_read if self.tls_starting: AttributeError: 'DummyPOP3Handler' object has no attribute 'tls_starting' ERROR /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py:657: ResourceWarning: unclosed self._sock = None test_uidl (test.test_poplib.TestPOP3_TLSClass) ... Exception in thread Thread-65: Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 222, in run asyncore.loop(timeout=0.1, count=1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 207, in loop poll_fun(timeout, map) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 150, in poll read(obj) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 87, in read obj.handle_error() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 83, in read obj.handle_read_event() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 423, in handle_read_event self.handle_read() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 188, in handle_read if self.tls_starting: AttributeError: 'DummyPOP3Handler' object has no attribute 'tls_starting' ERROR /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py:657: ResourceWarning: unclosed self._sock = None test_user (test.test_poplib.TestPOP3_TLSClass) ... Exception in thread Thread-66: Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 222, in run asyncore.loop(timeout=0.1, count=1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 207, in loop poll_fun(timeout, map) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 150, in poll read(obj) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 87, in read obj.handle_error() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 83, in read obj.handle_read_event() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 423, in handle_read_event self.handle_read() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 188, in handle_read if self.tls_starting: AttributeError: 'DummyPOP3Handler' object has no attribute 'tls_starting' ERROR /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py:657: ResourceWarning: unclosed self._sock = None test_utf8 (test.test_poplib.TestPOP3_TLSClass) ... Exception in thread Thread-67: Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 222, in run asyncore.loop(timeout=0.1, count=1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 207, in loop poll_fun(timeout, map) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 150, in poll read(obj) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 87, in read obj.handle_error() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 83, in read obj.handle_read_event() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 423, in handle_read_event self.handle_read() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 188, in handle_read if self.tls_starting: AttributeError: 'DummyPOP3Handler' object has no attribute 'tls_starting' ERROR /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py:657: ResourceWarning: unclosed self._sock = None test_utf8_raises_if_unsupported (test.test_poplib.TestPOP3_TLSClass) ... Exception in thread Thread-68: Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 222, in run asyncore.loop(timeout=0.1, count=1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 207, in loop poll_fun(timeout, map) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 150, in poll read(obj) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 87, in read obj.handle_error() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 83, in read obj.handle_read_event() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 423, in handle_read_event self.handle_read() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 188, in handle_read if self.tls_starting: AttributeError: 'DummyPOP3Handler' object has no attribute 'tls_starting' ERROR /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py:657: ResourceWarning: unclosed self._sock = None ====================================================================== ERROR: test_list (test.test_poplib.TestPOP3_TLSClass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 432, in tearDown self.client.quit() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 275, in quit self.close() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 296, in close sock.close() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py", line 417, in close self._real_close() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/ssl.py", line 1052, in _real_close socket._real_close(self) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py", line 411, in _real_close _ss.close(self) ConnectionResetError: [Errno 54] Connection reset by peer ====================================================================== ERROR: test_noop (test.test_poplib.TestPOP3_TLSClass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 427, in setUp self.client.stls() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 396, in stls caps = self.capa() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 377, in capa resp = self._longcmd('CAPA') File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 183, in _longcmd return self._getlongresp() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 161, in _getlongresp line, o = self._getline() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 128, in _getline line = self.file.readline(_MAXLINE + 1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py", line 586, in readinto return self._sock.recv_into(b) socket.timeout: timed out ====================================================================== ERROR: test_pass_ (test.test_poplib.TestPOP3_TLSClass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 426, in setUp self.client = poplib.POP3(self.server.host, self.server.port, timeout=3) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 105, in __init__ self.welcome = self._getresp() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 149, in _getresp resp, o = self._getline() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 128, in _getline line = self.file.readline(_MAXLINE + 1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py", line 586, in readinto return self._sock.recv_into(b) socket.timeout: timed out ====================================================================== ERROR: test_quit (test.test_poplib.TestPOP3_TLSClass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 426, in setUp self.client = poplib.POP3(self.server.host, self.server.port, timeout=3) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 105, in __init__ self.welcome = self._getresp() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 149, in _getresp resp, o = self._getline() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 128, in _getline line = self.file.readline(_MAXLINE + 1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py", line 586, in readinto return self._sock.recv_into(b) socket.timeout: timed out ====================================================================== ERROR: test_retr (test.test_poplib.TestPOP3_TLSClass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 426, in setUp self.client = poplib.POP3(self.server.host, self.server.port, timeout=3) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 105, in __init__ self.welcome = self._getresp() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 149, in _getresp resp, o = self._getline() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 128, in _getline line = self.file.readline(_MAXLINE + 1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py", line 586, in readinto return self._sock.recv_into(b) socket.timeout: timed out ====================================================================== ERROR: test_rpop (test.test_poplib.TestPOP3_TLSClass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 426, in setUp self.client = poplib.POP3(self.server.host, self.server.port, timeout=3) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 105, in __init__ self.welcome = self._getresp() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 149, in _getresp resp, o = self._getline() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 128, in _getline line = self.file.readline(_MAXLINE + 1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py", line 586, in readinto return self._sock.recv_into(b) socket.timeout: timed out ====================================================================== ERROR: test_stat (test.test_poplib.TestPOP3_TLSClass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 426, in setUp self.client = poplib.POP3(self.server.host, self.server.port, timeout=3) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 105, in __init__ self.welcome = self._getresp() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 149, in _getresp resp, o = self._getline() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 128, in _getline line = self.file.readline(_MAXLINE + 1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py", line 586, in readinto return self._sock.recv_into(b) socket.timeout: timed out ====================================================================== ERROR: test_stls (test.test_poplib.TestPOP3_TLSClass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 426, in setUp self.client = poplib.POP3(self.server.host, self.server.port, timeout=3) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 105, in __init__ self.welcome = self._getresp() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 149, in _getresp resp, o = self._getline() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 128, in _getline line = self.file.readline(_MAXLINE + 1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py", line 586, in readinto return self._sock.recv_into(b) socket.timeout: timed out ====================================================================== ERROR: test_stls_capa (test.test_poplib.TestPOP3_TLSClass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 426, in setUp self.client = poplib.POP3(self.server.host, self.server.port, timeout=3) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 105, in __init__ self.welcome = self._getresp() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 149, in _getresp resp, o = self._getline() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 128, in _getline line = self.file.readline(_MAXLINE + 1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py", line 586, in readinto return self._sock.recv_into(b) socket.timeout: timed out ====================================================================== ERROR: test_stls_context (test.test_poplib.TestPOP3_TLSClass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 426, in setUp self.client = poplib.POP3(self.server.host, self.server.port, timeout=3) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 105, in __init__ self.welcome = self._getresp() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 149, in _getresp resp, o = self._getline() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 128, in _getline line = self.file.readline(_MAXLINE + 1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py", line 586, in readinto return self._sock.recv_into(b) socket.timeout: timed out ====================================================================== ERROR: test_too_long_lines (test.test_poplib.TestPOP3_TLSClass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 426, in setUp self.client = poplib.POP3(self.server.host, self.server.port, timeout=3) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 105, in __init__ self.welcome = self._getresp() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 149, in _getresp resp, o = self._getline() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 128, in _getline line = self.file.readline(_MAXLINE + 1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py", line 586, in readinto return self._sock.recv_into(b) socket.timeout: timed out ====================================================================== ERROR: test_top (test.test_poplib.TestPOP3_TLSClass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 426, in setUp self.client = poplib.POP3(self.server.host, self.server.port, timeout=3) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 105, in __init__ self.welcome = self._getresp() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 149, in _getresp resp, o = self._getline() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 128, in _getline line = self.file.readline(_MAXLINE + 1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py", line 586, in readinto return self._sock.recv_into(b) socket.timeout: timed out ====================================================================== ERROR: test_uidl (test.test_poplib.TestPOP3_TLSClass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 426, in setUp self.client = poplib.POP3(self.server.host, self.server.port, timeout=3) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 105, in __init__ self.welcome = self._getresp() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 149, in _getresp resp, o = self._getline() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 128, in _getline line = self.file.readline(_MAXLINE + 1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py", line 586, in readinto return self._sock.recv_into(b) socket.timeout: timed out ====================================================================== ERROR: test_user (test.test_poplib.TestPOP3_TLSClass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 426, in setUp self.client = poplib.POP3(self.server.host, self.server.port, timeout=3) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 105, in __init__ self.welcome = self._getresp() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 149, in _getresp resp, o = self._getline() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 128, in _getline line = self.file.readline(_MAXLINE + 1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py", line 586, in readinto return self._sock.recv_into(b) socket.timeout: timed out ====================================================================== ERROR: test_utf8 (test.test_poplib.TestPOP3_TLSClass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 426, in setUp self.client = poplib.POP3(self.server.host, self.server.port, timeout=3) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 105, in __init__ self.welcome = self._getresp() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 149, in _getresp resp, o = self._getline() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 128, in _getline line = self.file.readline(_MAXLINE + 1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py", line 586, in readinto return self._sock.recv_into(b) socket.timeout: timed out ====================================================================== ERROR: test_utf8_raises_if_unsupported (test.test_poplib.TestPOP3_TLSClass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_poplib.py", line 426, in setUp self.client = poplib.POP3(self.server.host, self.server.port, timeout=3) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 105, in __init__ self.welcome = self._getresp() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 149, in _getresp resp, o = self._getline() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/poplib.py", line 128, in _getline line = self.file.readline(_MAXLINE + 1) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py", line 586, in readinto return self._sock.recv_into(b) socket.timeout: timed out ---------------------------------------------------------------------- Ran 68 tests in 51.800s FAILED (errors=16) Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 17) Warning -- asyncore.socket_map was modified by test_poplib Before: {} After: {4: , 5: , 7: , 8: , 9: , 10: , 11: , 12: , 13: , 14: , 15: , 16: , 17: , 18: , 19: , 20: , 21: } Warning -- threading._dangling was modified by test_poplib Before: <_weakrefset.WeakSet object at 0x805f5c9b0> After: <_weakrefset.WeakSet object at 0x805f5c6d8> test test_poplib failed /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py:657: ResourceWarning: unclosed self._sock = None ---------- assignee: christian.heimes components: SSL, Tests keywords: buildbot messages: 293421 nosy: christian.heimes, haypo priority: normal severity: normal status: open title: TestPOP3_TLSClass: socket.timeout: timed out on AMD64 FreeBSD 10.x Shared 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 10:40:31 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 10 May 2017 14:40:31 +0000 Subject: [issue30230] Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard In-Reply-To: <1493735445.03.0.987403403044.issue30230@psf.upfronthosting.co.za> Message-ID: <1494427231.74.0.542659019726.issue30230@psf.upfronthosting.co.za> Raymond Hettinger added the comment: My point was that it isn't wise to propose PRs for code you don't fully understand (he said, "I'm not sure if this was placed inside there due to some wild edge-case,"). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 10:42:58 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 10 May 2017 14:42:58 +0000 Subject: [issue25409] fnmatch.fnmatch normalizes slashes/backslashes on Windows In-Reply-To: <1444889091.12.0.272630391848.issue25409@psf.upfronthosting.co.za> Message-ID: <1494427378.66.0.356287467624.issue25409@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +1634 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 10:57:06 2017 From: report at bugs.python.org (Florian Bruhin) Date: Wed, 10 May 2017 14:57:06 +0000 Subject: [issue25409] fnmatch.fnmatch normalizes slashes/backslashes on Windows In-Reply-To: <1444889091.12.0.272630391848.issue25409@psf.upfronthosting.co.za> Message-ID: <1494428226.31.0.00522002368466.issue25409@psf.upfronthosting.co.za> Florian Bruhin added the comment: https://github.com/python/cpython/pull/1535 seems to be the correct PR, not 1634. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 10:58:51 2017 From: report at bugs.python.org (Jensen Taylor) Date: Wed, 10 May 2017 14:58:51 +0000 Subject: [issue30332] Errors that aren't actually definde Message-ID: <1494428331.35.0.538591805722.issue30332@psf.upfronthosting.co.za> Changes by Jensen Taylor : ---------- nosy: Jensen Taylor priority: normal severity: normal status: open title: Errors that aren't actually definde _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 11:00:40 2017 From: report at bugs.python.org (Jensen Taylor) Date: Wed, 10 May 2017 15:00:40 +0000 Subject: [issue30332] Errors that aren't actually defined are purple in the IDLE Message-ID: <1494428440.67.0.636373927078.issue30332@psf.upfronthosting.co.za> New submission from Jensen Taylor: Things like PermissionError and FileNotFoundError that come under IOError, or OSError in Python 3.7 ---------- assignee: -> terry.reedy components: +IDLE, Windows nosy: +paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware title: Errors that aren't actually definde -> Errors that aren't actually defined are purple in the IDLE versions: +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 Wed May 10 11:08:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 15:08:17 +0000 Subject: [issue28787] Out of tree --with--dtrace builds fail with a traceback In-Reply-To: <1479982245.65.0.843842109576.issue28787@psf.upfronthosting.co.za> Message-ID: <1494428897.61.0.469762216261.issue28787@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset f6eae5bf1c5d7b83e5d5bdbecfff928e478c1cfd by Victor Stinner (stratakis) in branch 'master': bpo-28787: Fix out of tree --with-dtrace builds (#135) https://github.com/python/cpython/commit/f6eae5bf1c5d7b83e5d5bdbecfff928e478c1cfd ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 11:24:33 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 15:24:33 +0000 Subject: [issue30333] test_multiprocessing_forkserver: poll() failed on AMD64 FreeBSD CURRENT Non-Debug 3.5 Message-ID: <1494429873.7.0.669335220252.issue30333@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%203.5/builds/97/steps/test/logs/stdio test_connection (test.test_multiprocessing_forkserver.WithThreadsTestConnection) ... FAIL ... Dangling threads: {} ====================================================================== FAIL: test_connection (test.test_multiprocessing_forkserver.WithThreadsTestConnection) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.5.koobs-freebsd-current.nondebug/build/Lib/test/_test_multiprocessing.py", line 2359, in test_connection self.assertEqual(poll(TIMEOUT1), True) AssertionError: False != True ---------------------------------------------------------------------- Ran 272 tests in 124.653s FAILED (failures=1, skipped=16) Warning -- threading._dangling was modified by test_multiprocessing_forkserver Before: <_weakrefset.WeakSet object at 0x80493d080> After: <_weakrefset.WeakSet object at 0x804956160> test test_multiprocessing_forkserver failed[105/398/1] test_multiprocessing_forkserver ---------- components: Tests messages: 293426 nosy: davin, haypo priority: normal severity: normal status: open title: test_multiprocessing_forkserver: poll() failed on AMD64 FreeBSD CURRENT Non-Debug 3.5 versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 11:46:35 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 10 May 2017 15:46:35 +0000 Subject: [issue25409] fnmatch.fnmatch normalizes slashes/backslashes on Windows In-Reply-To: <1444889091.12.0.272630391848.issue25409@psf.upfronthosting.co.za> Message-ID: <1494431195.86.0.778508168576.issue25409@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Yes, PR 1535 is indeed linked to this issue, if you're reading it from the bug tracker. The pull request number you see from the notification email (+1634) refers to the pull_request item in the bug tracker (https://bugs.python.org/pull_request1634). This number is different than the pull request # on GitHub. Hope this clarifies it :) See also discussions about it: https://github.com/python/core-workflow/issues/35 http://psf.upfronthosting.co.za/roundup/meta/issue624 (I was confused about it too) ---------- nosy: +Mariatta stage: needs patch -> patch review versions: +Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 11:50:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 15:50:11 +0000 Subject: [issue30334] [Windows] support.rmtree() should retry on WindowsError: [Error 32] The process cannot access the file because it is being used by another process Message-ID: <1494431411.13.0.126195064019.issue30334@psf.upfronthosting.co.za> New submission from STINNER Victor: test_startfile uses a weak time.sleep(0.1) to wait until the process started by os.startfile() completes. Instead of a sleep, can't support.rmtree() retry on "WindowsError: [Error 32] The process cannot access the file because it is being used by another process" error? For example, retry every 100 ms during 10 seconds? It's easy to reproduce the bug on Python 2.7: just remove the time.sleep() call in tests. http://buildbot.python.org/all/builders/x86%20Windows7%202.7/builds/145/steps/test/logs/stdio 0:23:42 [363/402/1] test_startfile crashed [1, 5.638000011444092] Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\2.7.bolen-windows7\build\lib\runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "D:\cygwin\home\db3l\buildarea\2.7.bolen-windows7\build\lib\runpy.py", line 72, in _run_code exec code in run_globals File "D:\cygwin\home\db3l\buildarea\2.7.bolen-windows7\build\lib\test\regrtest.py", line 1877, in main_in_temp_cwd() File "D:\cygwin\home\db3l\buildarea\2.7.bolen-windows7\build\lib\test\regrtest.py", line 1864, in main_in_temp_cwd main() File "D:\cygwin\home\db3l\buildarea\2.7.bolen-windows7\build\lib\contextlib.py", line 35, in __exit__ self.gen.throw(type, value, traceback) File "D:\cygwin\home\db3l\buildarea\2.7.bolen-windows7\build\lib\test\support\__init__.py", line 769, in temp_cwd rmtree(name) File "D:\cygwin\home\db3l\buildarea\2.7.bolen-windows7\build\lib\test\support\__init__.py", line 293, in rmtree _rmtree(path) File "D:\cygwin\home\db3l\buildarea\2.7.bolen-windows7\build\lib\test\support\__init__.py", line 249, in _rmtree _waitfor(lambda p: _force_run(p, os.rmdir, p), path) File "D:\cygwin\home\db3l\buildarea\2.7.bolen-windows7\build\lib\test\support\__init__.py", line 202, in _waitfor func(pathname) File "D:\cygwin\home\db3l\buildarea\2.7.bolen-windows7\build\lib\test\support\__init__.py", line 249, in _waitfor(lambda p: _force_run(p, os.rmdir, p), path) File "D:\cygwin\home\db3l\buildarea\2.7.bolen-windows7\build\lib\test\support\__init__.py", line 197, in _force_run return func(*args) WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'D:\\cygwin\\home\\db3l\\buildarea\\2.7.bolen-windows7\\build\\build\\test_python_2944' -- If it's too complex to implement a retry (too complex? really?), an obvious hack is to increase the sleep in test_startfile.py from 100 ms to 200 ms... ---------- components: Tests, Windows messages: 293428 nosy: haypo, jkloth, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: [Windows] support.rmtree() should retry on WindowsError: [Error 32] The process cannot access the file because it is being used by another process versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 11:52:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 15:52:50 +0000 Subject: [issue30334] [Windows] support.rmtree() should retry on WindowsError: [Error 32] The process cannot access the file because it is being used by another process In-Reply-To: <1494431411.13.0.126195064019.issue30334@psf.upfronthosting.co.za> Message-ID: <1494431570.39.0.0455677934415.issue30334@psf.upfronthosting.co.za> STINNER Victor added the comment: For a very generic "retry" library, see https://pypi.python.org/pypi/tenacity But I don't think that we need such advanced library, a simple loop should do the trick ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 11:53:20 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Wed, 10 May 2017 15:53:20 +0000 Subject: [issue30335] Document deprecated alias of assertNotRegex Message-ID: <1494431600.9.0.620975623094.issue30335@psf.upfronthosting.co.za> New submission from Jim Fasarakis-Hilliard: The assertNotRegexpMatches name was deprecated in 3.2 in favor of assertNotRegex [1]. This is currently not documented in unittest.rst. [1]: https://github.com/python/cpython/commit/ed3a7d2d601ce1e65b0bacf24676440631158ec8 ---------- components: Tests messages: 293430 nosy: Jim Fasarakis-Hilliard priority: normal severity: normal status: open title: Document deprecated alias of assertNotRegex versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 12:07:55 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Wed, 10 May 2017 16:07:55 +0000 Subject: [issue30335] Document deprecated alias of assertNotRegex In-Reply-To: <1494431600.9.0.620975623094.issue30335@psf.upfronthosting.co.za> Message-ID: <1494432475.38.0.450789895167.issue30335@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- pull_requests: +1635 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 12:12:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 16:12:50 +0000 Subject: [issue30325] Buildbot: send email notifications to buildbot-status@ In-Reply-To: <1494373028.15.0.894136349212.issue30325@psf.upfronthosting.co.za> Message-ID: <1494432770.68.0.379561309029.issue30325@psf.upfronthosting.co.za> STINNER Victor added the comment: Zachary updated the buildbot Git repository to get the mail.py fix. I changed the email address to buildbot-status at python.org: https://github.com/python/buildmaster-config/pull/5 Let's see how things are going. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 12:21:28 2017 From: report at bugs.python.org (Jeremy Kloth) Date: Wed, 10 May 2017 16:21:28 +0000 Subject: [issue30334] [Windows] support.rmtree() should retry on WindowsError: [Error 32] The process cannot access the file because it is being used by another process In-Reply-To: <1494431411.13.0.126195064019.issue30334@psf.upfronthosting.co.za> Message-ID: <1494433288.61.0.539476354048.issue30334@psf.upfronthosting.co.za> Jeremy Kloth added the comment: See http://bugs.python.org/issue15526 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 12:30:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 16:30:47 +0000 Subject: [issue15526] test_startfile crash on Windows 7 AMD64 In-Reply-To: <1343827804.07.0.425515249327.issue15526@psf.upfronthosting.co.za> Message-ID: <1494433847.57.0.157789326981.issue15526@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1636 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 12:33:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 16:33:21 +0000 Subject: [issue30334] [Windows] support.rmtree() should retry on WindowsError: [Error 32] The process cannot access the file because it is being used by another process In-Reply-To: <1494431411.13.0.126195064019.issue30334@psf.upfronthosting.co.za> Message-ID: <1494434001.27.0.622714952092.issue30334@psf.upfronthosting.co.za> STINNER Victor added the comment: > See http://bugs.python.org/issue15526 Oh, thanks for the hint :-) I proposed a "backport" (modified for 2.7): https://github.com/python/cpython/pull/1537 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 12:41:39 2017 From: report at bugs.python.org (Jonathan Helmus) Date: Wed, 10 May 2017 16:41:39 +0000 Subject: [issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches In-Reply-To: <1490830588.09.0.152876220246.issue29943@psf.upfronthosting.co.za> Message-ID: <1494434498.99.0.482157632194.issue29943@psf.upfronthosting.co.za> Jonathan Helmus added the comment: In Anaconda we ship both Python 3.6.0 and 3.6.1 and have run into this issue when building packages with 3.6.1 and importing them on 3.6.0. We are discussing adding #undef PySlice_GetIndicesEx to the Python.h we ship with Python 3.6.1. From the discussion here this seems like a possible solution but we are worried about ABI compatibility with future releases in the 3.6 branch. Is there a consensus on how this will be addressed in 3.6.2? ---------- nosy: +Jonathan Helmus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 12:42:23 2017 From: report at bugs.python.org (Mark DePristo) Date: Wed, 10 May 2017 16:42:23 +0000 Subject: [issue27144] concurrent.futures.as_completed() memory inefficiency In-Reply-To: <1464441935.81.0.0559700033116.issue27144@psf.upfronthosting.co.za> Message-ID: <1494434543.32.0.524546544138.issue27144@psf.upfronthosting.co.za> Mark DePristo added the comment: Any update on this reviewing, patching, and then backporting to 2.7? We've just run into the exact same issue here in Google using a ThreadPoolExecutor.map call growing memory usage without bounds due to the Future holding onto its result even after being returned from the map call. There's a more specific patch possible for just map() itself, but this more general one seems like it'd be better. ---------- nosy: +Mark DePristo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 12:42:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 16:42:46 +0000 Subject: [issue30330] test_socket.test_idna(): socket.gaierror: [Errno 11001] getaddrinfo failed on AMD64 Windows10 3.6 In-Reply-To: <1494419282.71.0.653200577669.issue30330@psf.upfronthosting.co.za> Message-ID: <1494434566.36.0.668104935522.issue30330@psf.upfronthosting.co.za> STINNER Victor added the comment: I checked the last 50 builds of AMD64 Windows10 3.5, AMD64 Windows10 3.6 and AMD64 Windows10 3.x (total: 150 builds): the bug only occurred once. http://buildbot.python.org/all/builders/AMD64%20Windows10%203.6/builds/356/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 12:51:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 16:51:47 +0000 Subject: [issue30329] test_imaplib.test_login_cram_md5(): OSError: [WinError 10022] An invalid argument was supplied on AMD64 Windows8.1 Non-Debug 3.6 In-Reply-To: <1494419208.12.0.00943199066561.issue30329@psf.upfronthosting.co.za> Message-ID: <1494435107.11.0.3127077872.issue30329@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1637 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 12:58:29 2017 From: report at bugs.python.org (Brett Cannon) Date: Wed, 10 May 2017 16:58:29 +0000 Subject: [issue29243] --enable-optimizations makes common build commands always need to compile from scratch In-Reply-To: <1484151314.82.0.308427338149.issue29243@psf.upfronthosting.co.za> Message-ID: <1494435509.93.0.918368681543.issue29243@psf.upfronthosting.co.za> Brett Cannon added the comment: To be honest, I'm not excited by ./configure --enable-optimizations. I was happy with an explicit "make profile-opt". The configure flag was added because not everything can be enabled just in the Makefile and so that people have a single flag to set to turn on any and all optimizations that work consistently across OSs (it used to be LTO+PGO until we discovered how universally broken LTO seems to be). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 13:00:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 17:00:27 +0000 Subject: [issue30319] test_invalid_authentication() of test_imaplib: ConnectionResetError: [Errno 54] Connection reset by peer on AMD64 FreeBSD 9.x 3.6 In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1494435627.47.0.834629351101.issue30319@psf.upfronthosting.co.za> STINNER Victor added the comment: @Our SSL experts: any idea why sock.close() fails with "ConnectionResetError: [Errno 54] Connection reset by peer" in imaplib? Is that a new error? Should imaplib catch ConnectionResetError on sock.close()? By the way, see also bpo-30329: I proposed a patch to catch the Windows socket error 10022 on shutdown() for poplib and imaplib SSL connections. No idea why this error only occurs on SSL connections. ---------- nosy: +alex, christian.heimes, dstufft, janssen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 13:01:57 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 10 May 2017 17:01:57 +0000 Subject: [issue27144] concurrent.futures.as_completed() memory inefficiency In-Reply-To: <1464441935.81.0.0559700033116.issue27144@psf.upfronthosting.co.za> Message-ID: <1494435717.51.0.117601769775.issue27144@psf.upfronthosting.co.za> Xiang Zhang added the comment: > Any update on this reviewing, patching, and then backporting to 2.7? concurrent package was added in 3.2. How backport to 2.7? Nosy myself. ---------- nosy: +xiang.zhang versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 13:02:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 17:02:26 +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: <1494435746.16.0.428196994304.issue30331@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't understand the following error, since DummyPOP3Handler constructor (__init__) ends with "self.tls_starting = False". AttributeError: 'DummyPOP3Handler' object has no attribute 'tls_starting' Maybe self.handle_read() is called during asynchat.async_chat.__init__(self, conn)? Is that even possible? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 13:03:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 17:03:40 +0000 Subject: [issue30320] test_eintr.test_sigwaitinfo(): race condition on AMD64 FreeBSD 10.x Shared 3.6 In-Reply-To: <1494345711.78.0.148323197443.issue30320@psf.upfronthosting.co.za> Message-ID: <1494435820.37.0.785760327742.issue30320@psf.upfronthosting.co.za> STINNER Victor added the comment: The bug occurs randomly, since it's hard to say at this point if my change fixes it for real or not. I close the bug, but will reopen it if the bug occurs again. But I'm confident that blocking the signal is "the right fix" for such unit test. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 13:03:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 17:03:57 +0000 Subject: [issue30319] test_invalid_authentication() of test_imaplib: ConnectionResetError: [Errno 54] Connection reset by peer in shutdown() on AMD64 FreeBSD 9.x 3.6 In-Reply-To: <1494345613.61.0.862517173328.issue30319@psf.upfronthosting.co.za> Message-ID: <1494435837.6.0.220784147713.issue30319@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_invalid_authentication() of test_imaplib: ConnectionResetError: [Errno 54] Connection reset by peer on AMD64 FreeBSD 9.x 3.6 -> test_invalid_authentication() of test_imaplib: ConnectionResetError: [Errno 54] Connection reset by peer in shutdown() on AMD64 FreeBSD 9.x 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 13:11:14 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 17:11:14 +0000 Subject: [issue30231] test_imaplib needs a TLS server accepting self-signed certificates In-Reply-To: <1493736284.13.0.622029485806.issue30231@psf.upfronthosting.co.za> Message-ID: <1494436274.93.0.261210674419.issue30231@psf.upfronthosting.co.za> STINNER Victor added the comment: > I'd suggest marking them with @unittest.expectedFailure as an alternative way to move forward. I don't understand the purpose of tests known to fail. Is it to validate that we have bugs? :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 13:26:19 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Wed, 10 May 2017 17:26:19 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1494437179.83.0.404423003561.issue9850@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: Bump, any update on what to do with this issue? ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 13:27:20 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 May 2017 17:27:20 +0000 Subject: [issue30332] Errors that aren't actually defined are purple in the IDLE In-Reply-To: <1494428440.67.0.636373927078.issue30332@psf.upfronthosting.co.za> Message-ID: <1494437240.07.0.284436486296.issue30332@psf.upfronthosting.co.za> Terry J. Reedy added the comment: You neglected to say which version of Python you used. 2.7? 3.2? When I type the following in 3.5+ on Win10, >>> IOError, KeyError, PermissionError, int, list, FileNotFoundError all the names have the same builtins highlight. In 2.7 (and early 3.x), PermissionError and FileNotFoundError did not exist as builtins and should not get the hightlight. ---------- versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 13:30:44 2017 From: report at bugs.python.org (Jensen Taylor) Date: Wed, 10 May 2017 17:30:44 +0000 Subject: [issue30332] Errors that aren't actually defined are purple in the IDLE In-Reply-To: <1494428440.67.0.636373927078.issue30332@psf.upfronthosting.co.za> Message-ID: <1494437444.57.0.411924652213.issue30332@psf.upfronthosting.co.za> Jensen Taylor added the comment: I found this bug in python 3.4.1 and I believeit was a problem in 3.5.2 ---------- versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 13:40:20 2017 From: report at bugs.python.org (Marco Buttu) Date: Wed, 10 May 2017 17:40:20 +0000 Subject: [issue30335] Document deprecated alias of assertNotRegex In-Reply-To: <1494431600.9.0.620975623094.issue30335@psf.upfronthosting.co.za> Message-ID: <1494438020.45.0.551610171143.issue30335@psf.upfronthosting.co.za> Marco Buttu added the comment: Hi Jim, I think assertNotRegexpMatches has never been introduced: https://docs.python.org/3/whatsnew/3.1.html https://docs.python.org/3/whatsnew/3.2.html That is why there is no reference in the documentation about that. I also executed a test with Python 3.1 and 3.2. and I found that there is no assertNotRegexpMatches assertion available. ---------- nosy: +marco.buttu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 14:02:47 2017 From: report at bugs.python.org (Jensen Taylor) Date: Wed, 10 May 2017 18:02:47 +0000 Subject: [issue30336] Pull Requests need more detail Message-ID: <1494439367.1.0.278303671769.issue30336@psf.upfronthosting.co.za> New submission from Jensen Taylor: Made a PR for this ---------- messages: 293447 nosy: Jensen Taylor priority: normal severity: normal status: open title: Pull Requests need more detail type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 14:03:24 2017 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 May 2017 18:03:24 +0000 Subject: [issue30336] Pull Requests need more detail In-Reply-To: <1494439367.1.0.278303671769.issue30336@psf.upfronthosting.co.za> Message-ID: <1494439404.99.0.974877740553.issue30336@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +1638 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 14:13:40 2017 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 10 May 2017 18:13:40 +0000 Subject: [issue30190] unittest's assertAlmostEqual improved error message In-Reply-To: <1493323962.23.0.575947649634.issue30190@psf.upfronthosting.co.za> Message-ID: <1494440020.91.0.467547950655.issue30190@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 14:27:15 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 May 2017 18:27:15 +0000 Subject: [issue30332] Errors that aren't actually defined are purple in the IDLE In-Reply-To: <1494428440.67.0.636373927078.issue30332@psf.upfronthosting.co.za> Message-ID: <1494440835.11.0.869315624104.issue30332@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 3.4 only gets security fixes. There is no problem for me in 3.5.3. ---------- resolution: -> out of date stage: -> resolved status: open -> closed versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 15:19:38 2017 From: report at bugs.python.org (Brett Cannon) Date: Wed, 10 May 2017 19:19:38 +0000 Subject: [issue30336] Pull Requests need more detail In-Reply-To: <1494439367.1.0.278303671769.issue30336@psf.upfronthosting.co.za> Message-ID: <1494443978.99.0.0776372440919.issue30336@psf.upfronthosting.co.za> Brett Cannon added the comment: I'm not sure if this is going to be useful enough to force all contributors to deal with. Justification for a change should be on bugs.python.org and that's mentioned in the CONTRIBUTING.md guidelines. As for testing, the Travis/AppVeyor failures should communicate that. And for specifying the issue number, there's a status check for that to help communicate it. I'll let other core devs comment, but while I appreciate what Jensen is trying to help with, I don't think the template helps enough to justify forcing every contributor to have to deal with it. You can also bring this up on the core-workflow mailing list, Jensen, if you want to discuss it there. ---------- nosy: +brett.cannon priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 15:26:42 2017 From: report at bugs.python.org (Berker Peksag) Date: Wed, 10 May 2017 19:26:42 +0000 Subject: [issue30231] test_imaplib needs a TLS server accepting self-signed certificates In-Reply-To: <1493736284.13.0.622029485806.issue30231@psf.upfronthosting.co.za> Message-ID: <1494444402.54.0.582455980242.issue30231@psf.upfronthosting.co.za> Berker Peksag added the comment: > Is it to validate that we have bugs? :) More or less, yes. Since the problem is not in the library code and the tests are not completely useless, using @unittest.expectedFailure might be a better short term solution than skipping or removing them (at least we are not going to forget them :)) Yet another alternative is to tweak test_logincapa_with_client_certfile to just check for DeprecationWarning. See https://github.com/python/cpython/pull/1419/files#r115050499 for details. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 15:38:53 2017 From: report at bugs.python.org (Jonathan Goble) Date: Wed, 10 May 2017 19:38:53 +0000 Subject: [issue25652] collections.UserString.__rmod__() raises NameError In-Reply-To: <1447823769.89.0.495006915909.issue25652@psf.upfronthosting.co.za> Message-ID: <1494445133.03.0.20269224495.issue25652@psf.upfronthosting.co.za> Jonathan Goble added the comment: I would prefer to keep __rmod__ and fix the bug, given that the use case I described above would otherwise create an inconsistency in subclasses, which would be able to easily extend __mod__ by calling super(), but would be forced to fully implement __rmod__ themselves. That said, I will defer to those who are more experienced here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 16:36:59 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Wed, 10 May 2017 20:36:59 +0000 Subject: [issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches In-Reply-To: <1490830588.09.0.152876220246.issue29943@psf.upfronthosting.co.za> Message-ID: <1494448619.83.0.69822494013.issue29943@psf.upfronthosting.co.za> Nathaniel Smith added the comment: @Jonathan: Even 3.6.1 was careful to retain compatibility with code built by 3.6.0. And your proposed 3.6.1-patched will generate binaries equivalent to the ones 3.6.0 generates. So I don't think you need to worry; 3.6.2 is not going to add a new and worse compatibility break, which is what it would take for your proposal to cause a problem. In fact, your 3.6.1-patched is equivalent to what I think 3.6.2 should do. I say go for it; patching 3.6.1 seems like a good solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 16:49:49 2017 From: report at bugs.python.org (Sam Silberstein) Date: Wed, 10 May 2017 20:49:49 +0000 Subject: [issue30337] Vague wording of pkgutil.walk_packages parameter 'prefix' Message-ID: <1494449389.02.0.790150087603.issue30337@psf.upfronthosting.co.za> New submission from Sam Silberstein: Hi there! This is my first submission to the bug tracker, so I apologize if I'm missing some formatting here. I've found what's either vague documentation for the 'prefix' parameter of `pgkutil.walk_packages` or a bug. The method implies that it will only import submodules of the provided path, but if the prefix parameter is not filled, this method will import a module with the same name from outside the path -- so long as it exists in `sys.modules`. I'm unsure if this is due to the documentation not specifying that prefix should always be used when path is set, or if this is a bug (I can provide a fix if it's a bug). Steps to reproduce: Create a directory with a nested package with the same name as a package outside that directory, e.g.: |_ test1 |_ __init__.py |_ should_not_be_included.py |_ test2 |_ test1 |_ __init__.py |_ test1 |_ __init__.py |_ should_be_included.py `list(pkgutil.walk_packages('test2'))` will contain 'should_not_be_included.py' instead of 'should_be_included.py'. Thank you! Sam Silberstein ---------- assignee: docs at python components: Documentation messages: 293453 nosy: docs at python, smsilb priority: normal severity: normal status: open title: Vague wording of pkgutil.walk_packages parameter 'prefix' type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 17:21:24 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 10 May 2017 21:21:24 +0000 Subject: [issue17188] Document 'from None' in raise statement doc. In-Reply-To: <1360631999.8.0.76627095073.issue17188@psf.upfronthosting.co.za> Message-ID: <1494451284.87.0.416255928586.issue17188@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Would any of the original authors be able to prepare a PR for this? Thanks. ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 17:49:41 2017 From: report at bugs.python.org (desbma) Date: Wed, 10 May 2017 21:49:41 +0000 Subject: [issue30219] webbrowser.open outputs xdg-open deprecation warning In-Reply-To: <1493642057.46.0.399695458413.issue30219@psf.upfronthosting.co.za> Message-ID: <1494452981.04.0.441963885589.issue30219@psf.upfronthosting.co.za> desbma added the comment: Ping ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 17:56:50 2017 From: report at bugs.python.org (Sam De Meyer) Date: Wed, 10 May 2017 21:56:50 +0000 Subject: [issue30322] PyObject_GetIter does not behave as documented on dict objects In-Reply-To: <1494361179.47.0.337252878474.issue30322@psf.upfronthosting.co.za> Message-ID: <1494453410.71.0.774682159015.issue30322@psf.upfronthosting.co.za> Sam De Meyer added the comment: You seem to be right, my object was lacking the keys method. Please excuse me for the false alarm, and thanks for pointing it out. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 18:22:18 2017 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 10 May 2017 22:22:18 +0000 Subject: [issue30338] LC_ALL=en_US + io.open() => LookupError: (osx) Message-ID: <1494454938.72.0.336460677547.issue30338@psf.upfronthosting.co.za> New submission from Anthony Sottile: Originally seen here: https://github.com/Microsoft/vscode/issues/26227 ``` $ LC_ALL=en_US python -c 'import io; io.open("/dev/null")' Traceback (most recent call last): File "", line 1, in LookupError: unknown encoding: ``` Admittedly, that `LC_ALL` looks malformed (should be en_US.UTF-8), but given this works on linux: ``` $ env -i LC_ALL=en_US python -c 'import io; io.open("/dev/null")' $ ``` It may be an OSX specific bug? I've only tagged py27 + py36 because I did not have a build toolchain available to try on master, though I imagine it is reproducible there as well. ---------- components: Library (Lib), macOS messages: 293457 nosy: Anthony Sottile, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: LC_ALL=en_US + io.open() => LookupError: (osx) type: crash versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 18:56:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 22:56:34 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1494456994.32.0.0031213758046.issue9850@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1639 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 18:59:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 22:59:45 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1494457185.04.0.386781731532.issue9850@psf.upfronthosting.co.za> STINNER Victor added the comment: > Bump, any update on what to do with this issue? I updated and completed Chi Hsuan Yen's 3.6-deprecate-macpath.patch to create a pull request. I suggest to start by deprecating macpath in 3.7, and remove it from Python 3.8. This module is here for years. macOS 9 is now dead, all macOS users migrated to OS X nowadays. I don't think that there is an urgency to *remove* macpath. The title says "obsolete macpath module dangerously broken": is "dangerous" still up to date after the following fix? New changeset 54987723de99 by Serhiy Storchaka in branch '3.4': Issue #9850: Fixed macpath.join() for empty first component. Patch by https://hg.python.org/cpython/rev/54987723de99 If yes, we may also warn users in the macpath documentation that the module is dangerous, especially in the documentation of Python < 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 19:06:51 2017 From: report at bugs.python.org (Matej Cepl) Date: Wed, 10 May 2017 23:06:51 +0000 Subject: [issue20491] textwrap: Non-breaking space not honored In-Reply-To: <1391373997.78.0.616228125857.issue20491@psf.upfronthosting.co.za> Message-ID: <1494457611.46.0.374739994155.issue20491@psf.upfronthosting.co.za> Changes by Matej Cepl : ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 19:07:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 23:07:16 +0000 Subject: [issue30336] Pull Requests need more detail In-Reply-To: <1494439367.1.0.278303671769.issue30336@psf.upfronthosting.co.za> Message-ID: <1494457636.03.0.0944494698202.issue30336@psf.upfronthosting.co.za> STINNER Victor added the comment: > What is this pull request for? I didn't notice so many PR without useful commit message (PR description). Not sure that it's useful. > Include version updates if necessary. I don't understand this part. > Make sure you have signed the CLA agreement before continuing We have a bot for that and the bot explains how to sign it, no? > ### Reason to modify I never saw such template in any other project. I'm not sure that we must require an exact format for new PR. > ### Tests and reviews > I have tested the code and it works. While I run Linux and have Windows and FreeBSD VM, sometimes I'm lazy and rely on the CI. I consider that it's waste to burn CI CPUs sometimes :-) For example, it's not that easy to test a change specific to Windows on Python 2.7, but AppVeyor now runs tests for you! -- @Jensen: I feel that you have useful hints for new contributors, but I suggest you to enhance the devguide instead of using a template. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 19:11:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 23:11:56 +0000 Subject: [issue30338] LC_ALL=en_US + io.open() => LookupError: (osx) In-Reply-To: <1494454938.72.0.336460677547.issue30338@psf.upfronthosting.co.za> Message-ID: <1494457916.27.0.652236310071.issue30338@psf.upfronthosting.co.za> STINNER Victor added the comment: > It may be an OSX specific bug? Yes, on Linux, it "just works": haypo at selma$ LC_ALL=en_US python2 -c 'import io; io.open("/dev/null")' haypo at selma$ LC_ALL=en_USxxx python2 -c 'import io; io.open("/dev/null")' In fact, you get ASCII encoding for these two locales: haypo at selma$ LC_ALL=en_US python2 -c 'import locale; print(locale.getpreferredencoding(False))' ANSI_X3.4-1968 haypo at selma$ LC_ALL=en_USxxx python2 -c 'import locale; print(locale.getpreferredencoding(False))' ANSI_X3.4-1968 Internally, io.open() uses locale.getpreferredencoding(False) if you don't specify an encoding. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 19:16:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 23:16:15 +0000 Subject: [issue30219] webbrowser.open outputs xdg-open deprecation warning In-Reply-To: <1493642057.46.0.399695458413.issue30219@psf.upfronthosting.co.za> Message-ID: <1494458175.15.0.41726417669.issue30219@psf.upfronthosting.co.za> STINNER Victor added the comment: p = subprocess.Popen(cmdline, close_fds=True, + stdin=subprocess.DEVNULL, + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, start_new_session=True) I don't think that always hiding output for any browser is a good idea. xdg-open is supposed to be cross-desktop (GNOME, XFCE, KDE, etc.). Maybe a better fix is to use "gio" if available, or fallback on xdg-open otherwise? But gio is specific to GNOME no? What if the user has GNOME and KDE installed? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 19:18:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 23:18:26 +0000 Subject: [issue30327] Version may be out of date in travis.yml In-Reply-To: <1494396875.36.0.00921683522074.issue30327@psf.upfronthosting.co.za> Message-ID: <1494458306.11.0.521819107853.issue30327@psf.upfronthosting.co.za> STINNER Victor added the comment: @Brett: What do you think? ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 19:23:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 23:23:21 +0000 Subject: [issue15526] test_startfile crash on Windows 7 AMD64 In-Reply-To: <1343827804.07.0.425515249327.issue15526@psf.upfronthosting.co.za> Message-ID: <1494458601.81.0.643755783956.issue15526@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3837d9797c14c13d170256143c841d29645e772a by Victor Stinner in branch '2.7': bpo-15526: test_startfile changes the cwd (#1537) https://github.com/python/cpython/commit/3837d9797c14c13d170256143c841d29645e772a ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 19:50:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 23:50:26 +0000 Subject: [issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7 In-Reply-To: <1494001389.01.0.0290337792937.issue30283@psf.upfronthosting.co.za> Message-ID: <1494460226.98.0.428746864702.issue30283@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1640 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 19:52:33 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 May 2017 23:52:33 +0000 Subject: [issue30301] multiprocessing: AttributeError: 'SimpleQueue' object has no attribute '_poll' In-Reply-To: <1494183710.88.0.708414094068.issue30301@psf.upfronthosting.co.za> Message-ID: <1494460353.88.0.299150876945.issue30301@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: ?AttributeError: 'SimpleQueue' object has no attribute '_poll'? -> multiprocessing: AttributeError: 'SimpleQueue' object has no attribute '_poll' _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 20:09:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 00:09:41 +0000 Subject: [issue30300] asyncio.Controller In-Reply-To: <1494181497.37.0.0898291474199.issue30300@psf.upfronthosting.co.za> Message-ID: <1494461381.42.0.971414869335.issue30300@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm not sure that Controller is generic enough to be part of asyncio. I'm not sure about the cancellation of all pending tasks on stop(). Why not starting by putting this class in a library to mature its API? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 20:26:59 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 11 May 2017 00:26:59 +0000 Subject: [issue30300] asyncio.Controller In-Reply-To: <1494461381.42.0.971414869335.issue30300@psf.upfronthosting.co.za> Message-ID: <20170510202646.4e2510a7@subdivisions.wooz.org> Barry A. Warsaw added the comment: On May 11, 2017, at 12:09 AM, STINNER Victor wrote: >Why not starting by putting this class in a library to mature its API? It's already part of aiosmtpd although not with the small amount of generic-ness included here. It's been useful and stable. So this is just refactoring out the aiosmtpd-ness of it. It doesn't seem big enough to put into yet another separate library. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 20:35:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 00:35:31 +0000 Subject: [issue30097] Command-line option to suppress "from None" for debugging In-Reply-To: <1492553512.25.0.992335940269.issue30097@psf.upfronthosting.co.za> Message-ID: <1494462931.74.0.563040478454.issue30097@psf.upfronthosting.co.za> STINNER Victor added the comment: See also my old PEP 490 -- Chain exceptions at C level, more or less abandonned :-p ---------- nosy: +haypo, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 20:36:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 00:36:56 +0000 Subject: [issue30294] ./configure, pydebug and pymalloc In-Reply-To: <1494143883.23.0.254430026718.issue30294@psf.upfronthosting.co.za> Message-ID: <1494463016.49.0.330436987812.issue30294@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 20:39:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 00:39:22 +0000 Subject: [issue30287] cpython and Clang Static Analyzer In-Reply-To: <1494022401.59.0.120432906774.issue30287@psf.upfronthosting.co.za> Message-ID: <1494463162.77.0.648973818216.issue30287@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 20:40:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 00:40:03 +0000 Subject: [issue30159] gdb autoloading python-gdb.py In-Reply-To: <1493123460.02.0.558737612722.issue30159@psf.upfronthosting.co.za> Message-ID: <1494463203.98.0.980499615181.issue30159@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 20:42:32 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 00:42:32 +0000 Subject: [issue30334] [Windows] support.rmtree() should retry on WindowsError: [Error 32] The process cannot access the file because it is being used by another process In-Reply-To: <1494431411.13.0.126195064019.issue30334@psf.upfronthosting.co.za> Message-ID: <1494463352.59.0.559117399344.issue30334@psf.upfronthosting.co.za> STINNER Victor added the comment: My following backport fixed test_startfile on x86 Windows7 3.x, so I close the issue. New changeset 3837d9797c14c13d170256143c841d29645e772a by Victor Stinner in branch '2.7': bpo-15526: test_startfile changes the cwd (#1537) https://github.com/python/cpython/commit/3837d9797c14c13d170256143c841d29645e772a ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 20:43:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 00:43:00 +0000 Subject: [issue15526] test_startfile crash on Windows 7 AMD64 In-Reply-To: <1343827804.07.0.425515249327.issue15526@psf.upfronthosting.co.za> Message-ID: <1494463380.41.0.259814750022.issue15526@psf.upfronthosting.co.za> STINNER Victor added the comment: I backported the fix to Python 2.7 to fix bpo-30334. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 20:47:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 00:47:28 +0000 Subject: [issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7 In-Reply-To: <1494001389.01.0.0290337792937.issue30283@psf.upfronthosting.co.za> Message-ID: <1494463648.1.0.259562971566.issue30283@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, test_regrtest still fails on x86 Windows XP VS9.0 2.7. 0:16:29 [283/402/1] test_regrtest failed test test_regrtest failed -- multiple errors occurred; run in verbose mode for details ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 20:48:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 00:48:19 +0000 Subject: [issue30339] test_multiprocessing_main_handling: "RuntimeError: Timed out waiting for results" on x86 Windows7 3.x Message-ID: <1494463699.01.0.364437710045.issue30339@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/597/steps/test/logs/stdio 0:26:29 [156/405/1] test_multiprocessing_main_handling failed ... test_zipfile_compiled (test.test_multiprocessing_main_handling.ForkServerCmdLineTest) ... skipped "'forkserver' start method not available" test_basic_script (test.test_multiprocessing_main_handling.SpawnCmdLineTest) ... ok test_basic_script_no_suffix (test.test_multiprocessing_main_handling.SpawnCmdLineTest) ... FAIL test_directory (test.test_multiprocessing_main_handling.SpawnCmdLineTest) ... ok test_directory_compiled (test.test_multiprocessing_main_handling.SpawnCmdLineTest) ... ok test_ipython_workaround (test.test_multiprocessing_main_handling.SpawnCmdLineTest) ... ok ... ====================================================================== FAIL: test_basic_script_no_suffix (test.test_multiprocessing_main_handling.SpawnCmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_multiprocessing_main_handling.py", line 169, in test_basic_script_no_suffix self._check_script(script_name) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_multiprocessing_main_handling.py", line 157, in _check_script rc, out, err = assert_python_ok(*run_args, __isolated=False) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\script_helper.py", line 147, in assert_python_ok return _assert_python(True, *args, **env_vars) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\script_helper.py", line 133, in _assert_python err)) AssertionError: Process return code is 1 command line: ['D:\\cygwin\\home\\db3l\\buildarea\\3.x.bolen-windows7\\build\\PCbuild\\win32\\python_d.exe', '-X', 'faulthandler', '-E', 'd:\\temp\\tmp3iu335w1\\script', 'spawn'] stdout: --- --- stderr: --- Traceback (most recent call last): File "d:\temp\tmp3iu335w1\script", line 34, in raise RuntimeError("Timed out waiting for results") RuntimeError: Timed out waiting for results --- ---------------------------------------------------------------------- Ran 39 tests in 81.399s FAILED (failures=1, skipped=26) test test_multiprocessing_main_handling failed ---------- components: Tests, Windows messages: 293470 nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: test_multiprocessing_main_handling: "RuntimeError: Timed out waiting for results" on x86 Windows7 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 10 22:50:16 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Thu, 11 May 2017 02:50:16 +0000 Subject: [issue30230] Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard In-Reply-To: <1493735445.03.0.987403403044.issue30230@psf.upfronthosting.co.za> Message-ID: <1494471016.46.0.395643512893.issue30230@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: > he said, "I'm not sure if this was placed inside there due to some wild edge-case," As a new contributor, I'll always lean on the side of me not seeing something rather than confidently stating that something is definitely wrong. I'm new, the code-base is 20 years old and worked on by a dozen of experienced devs :-) > Does a "Not-A-Class" class which is not a subclass of itself (issubclass(C, C) returns False) makes any sense? I'm not sure. Apart from the performance impact, there's a behavioral discrepancy between isinstance and issubclass as you also stated. In isinstance, __instancecheck__ doesn't *always* get a chance to override the behavior. The `if type(inst) == Cls` [1] stops it before it gets a chance. In issubclass, __subclasscheck__ does override it: class Meta(type): def __instancecheck__(self, other): print("invoked") return False def __subclasscheck__(self, other): print("invoked") return False class Cls(metaclass=Meta): pass isinstance(Cls(), Cls) True issubclass(Cls, Cls) invoked False So, I guess the question might be re-framed to: Is it guaranteed that __instancecheck__ and __subclasscheck__ are *always* called? If yes: PyObject_IsInstance should be tweaked. If no: PyObject_IsSubclass should be tweaked. p.s Should I maybe move this to python-dev? [1]: https://github.com/python/cpython/blob/master/Objects/abstract.c#L2338 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 00:16:14 2017 From: report at bugs.python.org (wim glenn) Date: Thu, 11 May 2017 04:16:14 +0000 Subject: [issue29290] argparse breaks long lines on NO-BREAK SPACE In-Reply-To: <1484622521.42.0.0580919403747.issue29290@psf.upfronthosting.co.za> Message-ID: <1494476174.02.0.239781709708.issue29290@psf.upfronthosting.co.za> wim glenn added the comment: The test "test_help_non_breaking_spaces" from Zhang's commit fails on my platform (other 1563 tests in the module all pass). Interestingly, if running the entire test suite, it doesn't fail. It's only when executing the test_argparse.py module directly that causes the failure. I guess there is some mutable state, or the test doesn't entirely setup correctly. ---------- nosy: +wim.glenn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 01:18:55 2017 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 11 May 2017 05:18:55 +0000 Subject: [issue29290] argparse breaks long lines on NO-BREAK SPACE In-Reply-To: <1484622521.42.0.0580919403747.issue29290@psf.upfronthosting.co.za> Message-ID: <1494479935.64.0.17217743855.issue29290@psf.upfronthosting.co.za> Xiang Zhang added the comment: I can't reproduce the failure in anyway. :-( Could you do some investigation and give more info? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 03:38:51 2017 From: report at bugs.python.org (Louie Lu) Date: Thu, 11 May 2017 07:38:51 +0000 Subject: [issue15786] IDLE code completion window can hang or misbehave with mouse In-Reply-To: <1346027701.33.0.908436854594.issue15786@psf.upfronthosting.co.za> Message-ID: <1494488331.51.0.277400158262.issue15786@psf.upfronthosting.co.za> Louie Lu added the comment: Additional info for Windows platform: when creating autocompletewindow, it will bind "" to winconfig, this cause a problem, when showing up the acw, it will misbehavior calling multiple times about . The result is, tk will not able to response to Double-ButtonRelease. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 04:07:57 2017 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 11 May 2017 08:07:57 +0000 Subject: [issue30287] cpython and Clang Static Analyzer In-Reply-To: <1494022401.59.0.120432906774.issue30287@psf.upfronthosting.co.za> Message-ID: <1494490077.51.0.996602179482.issue30287@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I guess return -1 instead of bits=0 will silent both gcc and the static analyzer warning. That's a possibility, though we should also set an exception in that case (since returning an error value without setting an exception is also something that might be picked up by a CPython-oriented static analyser in the future). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 05:13:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 09:13:41 +0000 Subject: [issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7 In-Reply-To: <1494001389.01.0.0290337792937.issue30283@psf.upfronthosting.co.za> Message-ID: <1494494021.68.0.47580451518.issue30283@psf.upfronthosting.co.za> STINNER Victor added the comment: > Oh, test_regrtest still fails on x86 Windows XP VS9.0 2.7. PCbuild/rt.bat doesn't work on VS9.0 since VS9.0 creates python(_d).exe in PC/VS9.0/{amd64,x86}/, not in PCbuild/{amd64,x86}/. My new https://github.com/python/cpython/pull/1541 patch serie now starts with a fix for this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 05:20:53 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 May 2017 09:20:53 +0000 Subject: [issue30340] Optimize out non-capturing groups Message-ID: <1494494453.98.0.386630329077.issue30340@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Proposed patch makes the regular expression parser produce more optimal tree, mainly due to getting rid of non-capturing groups. This allows to apply an optimization that was forbidden before and makes the regular expression compiler producing more efficient code. For example following expressions are transformed in more optimal form: '(?:x|y)+' -> '[xy]+' '(?:ab)|(?:ac)' -> 'a[bc]' r'[a-z]|\d' -> r'[a-z\d]' This can speed up matching by 10-25 times. $ ./python -m timeit -s "import re; p = re.compile(r'(?:x|y)+'); s = 'x'*10000" "p.match(s)" Unpatched: 500 loops, best of 5: 865 usec per loop Patched: 5000 loops, best of 5: 84.5 usec per loop $ ./python -m timeit -s "import re; p = re.compile(r'(?:[a-z]|\d)+'); s = 'x'*10000" "p.match(s)" Unpatched: 100 loops, best of 5: 2.19 msec per loop Patched: 5000 loops, best of 5: 84.5 usec per loop ---------- assignee: serhiy.storchaka components: Library (Lib), Regular Expressions messages: 293477 nosy: ezio.melotti, mrabarnett, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Optimize out non-capturing groups type: performance versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 05:30:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 09:30:25 +0000 Subject: [issue25260] python -m test --coverage doesn't work on Windows In-Reply-To: <1443478802.75.0.02674996421.issue25260@psf.upfronthosting.co.za> Message-ID: <1494495025.49.0.232442266684.issue25260@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a5bb62436e25614276ac4b8e252a87f3fcc946cd by Victor Stinner in branch '2.7': [2.7] bpo-30283: regrtest: backport test_slow_interrupted() and test_coverage() (#1541) https://github.com/python/cpython/commit/a5bb62436e25614276ac4b8e252a87f3fcc946cd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 05:30:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 09:30:25 +0000 Subject: [issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7 In-Reply-To: <1494001389.01.0.0290337792937.issue30283@psf.upfronthosting.co.za> Message-ID: <1494495025.8.0.926151805834.issue30283@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a5bb62436e25614276ac4b8e252a87f3fcc946cd by Victor Stinner in branch '2.7': [2.7] bpo-30283: regrtest: backport test_slow_interrupted() and test_coverage() (#1541) https://github.com/python/cpython/commit/a5bb62436e25614276ac4b8e252a87f3fcc946cd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 05:31:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 09:31:46 +0000 Subject: [issue30313] Tests of Python 2.7 VS9.0 buildbots must be run with -uall -rwW options In-Reply-To: <1494338398.28.0.940820958867.issue30313@psf.upfronthosting.co.za> Message-ID: <1494495106.8.0.353002664214.issue30313@psf.upfronthosting.co.za> STINNER Victor added the comment: Another issue with Python built using VS 2008, test_regrtest has to check two tests in that case, see: http://bugs.python.org/issue30283#msg293476 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 05:34:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 May 2017 09:34:15 +0000 Subject: [issue30340] Optimize out non-capturing groups In-Reply-To: <1494494453.98.0.386630329077.issue30340@psf.upfronthosting.co.za> Message-ID: <1494495255.61.0.74740192935.issue30340@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: $ ./python -m timeit -s "import re; p = re.compile(r'[a-z]|[0-9]'); s = ' '*10000+'x'" "p.search(s)" Unpatched: 500 loops, best of 5: 732 usec per loop Patched: 1000 loops, best of 5: 279 usec per loop ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 05:39:56 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 May 2017 09:39:56 +0000 Subject: [issue30340] Optimize out non-capturing groups In-Reply-To: <1494494453.98.0.386630329077.issue30340@psf.upfronthosting.co.za> Message-ID: <1494495596.94.0.449977790183.issue30340@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1641 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 05:41:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 09:41:15 +0000 Subject: [issue25260] python -m test --coverage doesn't work on Windows In-Reply-To: <1443478802.75.0.02674996421.issue25260@psf.upfronthosting.co.za> Message-ID: <1494495675.73.0.00917246063621.issue25260@psf.upfronthosting.co.za> STINNER Victor added the comment: - @unittest.skipUnless(sysconfig.is_python_build(), - 'test.bat script is not installed') I had to remove this decorator from test_tools_buildbot_test() since sysconfig.is_python_build() is false on Python 2.7 built with VS 2008 my Windows VM, whereas I didn't install Python!? I don't know why. Moreover, the decorator was missing on test_pcbuild_rt(), likely a mistake in the backport from master. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 05:41:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 09:41:30 +0000 Subject: [issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7 In-Reply-To: <1494001389.01.0.0290337792937.issue30283@psf.upfronthosting.co.za> Message-ID: <1494495690.4.0.586110104231.issue30283@psf.upfronthosting.co.za> STINNER Victor added the comment: - @unittest.skipUnless(sysconfig.is_python_build(), - 'test.bat script is not installed') I had to remove this decorator from test_tools_buildbot_test() since sysconfig.is_python_build() is false on Python 2.7 built with VS 2008 my Windows VM, whereas I didn't install Python!? I don't know why. Moreover, the decorator was missing on test_pcbuild_rt(), likely a mistake in the backport from master. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 05:41:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 09:41:36 +0000 Subject: [issue25260] python -m test --coverage doesn't work on Windows In-Reply-To: <1443478802.75.0.02674996421.issue25260@psf.upfronthosting.co.za> Message-ID: <1494495696.88.0.0451108575204.issue25260@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- Removed message: http://bugs.python.org/msg293482 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 05:54:07 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 11 May 2017 09:54:07 +0000 Subject: [issue28787] Out of tree --with--dtrace builds fail with a traceback In-Reply-To: <1479982245.65.0.843842109576.issue28787@psf.upfronthosting.co.za> Message-ID: <1494496447.63.0.434386209541.issue28787@psf.upfronthosting.co.za> Changes by Charalampos Stratakis : ---------- pull_requests: +1642 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 06:00:26 2017 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 11 May 2017 10:00:26 +0000 Subject: [issue30341] Add an explaining comment in _PyTrash_thread_destroy_chain() Message-ID: <1494496826.51.0.0986403038499.issue30341@psf.upfronthosting.co.za> New submission from Xiang Zhang: Studying how trashcan works I get puzzled about why increasing trash_delete_nesting in _PyTrash_thread_destroy_chain. I asked Antoine privately (thought he was the author). Antoine told me the reason and suggested add a comment here to help understand. ---------- assignee: pitrou messages: 293484 nosy: pitrou, xiang.zhang priority: normal severity: normal stage: patch review status: open title: Add an explaining comment in _PyTrash_thread_destroy_chain() type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 06:01:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 10:01:02 +0000 Subject: [issue30342] [2.7] sysconfig.is_python_build() doesn't work if Python is built with VS 2008 Message-ID: <1494496862.21.0.272757843043.issue30342@psf.upfronthosting.co.za> New submission from STINNER Victor: When Python 2.7 is compiled by VS 2008 using PC/VS9.0/ solution, the executable is PC/VS9.0/{amd64,x86}/python(_d).exe. sysconfig.is_python_build() handles PC/VS7.1/ and PCbuild/ builds, but not PC/VS9.0/ builds. Attached PR fixes is_python_build() for VS 2008. ---------- components: Build, Library (Lib), Windows messages: 293485 nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: [2.7] sysconfig.is_python_build() doesn't work if Python is built with VS 2008 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 06:03:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 10:03:00 +0000 Subject: [issue30342] [2.7] sysconfig.is_python_build() doesn't work if Python is built with VS 2008 In-Reply-To: <1494496862.21.0.272757843043.issue30342@psf.upfronthosting.co.za> Message-ID: <1494496980.26.0.622089070554.issue30342@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-30313: Tests of Python 2.7 VS9.0 buildbots must be run with -uall -rwW options. The PR also contains a fix for test_regrtest, see: http://bugs.python.org/issue30283#msg293476 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 06:03:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 10:03:20 +0000 Subject: [issue30342] [2.7] sysconfig.is_python_build() doesn't work if Python is built with VS 2008 In-Reply-To: <1494496862.21.0.272757843043.issue30342@psf.upfronthosting.co.za> Message-ID: <1494497000.98.0.557438897947.issue30342@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1643 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 06:03:58 2017 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 11 May 2017 10:03:58 +0000 Subject: [issue30341] Add an explaining comment in _PyTrash_thread_destroy_chain() In-Reply-To: <1494496826.51.0.0986403038499.issue30341@psf.upfronthosting.co.za> Message-ID: <1494497038.05.0.900836546314.issue30341@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1644 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 07:13:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 11:13:20 +0000 Subject: [issue28787] Out of tree --with--dtrace builds fail with a traceback In-Reply-To: <1479982245.65.0.843842109576.issue28787@psf.upfronthosting.co.za> Message-ID: <1494501200.27.0.28636073968.issue28787@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a4465a5bd08f232cf097893006118c82975c3402 by Victor Stinner (stratakis) in branch '3.6': [3.6] bpo-28787: Fix out of tree --with-dtrace builds (GH-135) (#1543) https://github.com/python/cpython/commit/a4465a5bd08f232cf097893006118c82975c3402 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 07:13:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 11:13:53 +0000 Subject: [issue28787] Out of tree --with--dtrace builds fail with a traceback In-Reply-To: <1479982245.65.0.843842109576.issue28787@psf.upfronthosting.co.za> Message-ID: <1494501233.93.0.0604342337399.issue28787@psf.upfronthosting.co.za> STINNER Victor added the comment: Thank you Charalampos, I merged your fixes for branches 3.6 and master (3.7). ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 07:15:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 11:15:48 +0000 Subject: [issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7 In-Reply-To: <1494001389.01.0.0290337792937.issue30283@psf.upfronthosting.co.za> Message-ID: <1494501348.32.0.482452728768.issue30283@psf.upfronthosting.co.za> STINNER Victor added the comment: > I had to remove this decorator from test_tools_buildbot_test() since sysconfig.is_python_build() is false on Python 2.7 built with VS 2008 my Windows VM, whereas I didn't install Python!? I don't know why. I opened bpo-30342 for this bug. > Oh, test_regrtest still fails on x86 Windows XP VS9.0 2.7. With my third commit a5bb62436e25614276ac4b8e252a87f3fcc946cd, test_regrtest pass again on x86 Windows XP VS9.0 2.7 buildbot: http://buildbot.python.org/all/builders/x86%20Windows%20XP%20VS9.0%202.7/builds/146 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 07:41:23 2017 From: report at bugs.python.org (desbma) Date: Thu, 11 May 2017 11:41:23 +0000 Subject: [issue30219] webbrowser.open outputs xdg-open deprecation warning In-Reply-To: <1493642057.46.0.399695458413.issue30219@psf.upfronthosting.co.za> Message-ID: <1494502883.6.0.21265942425.issue30219@psf.upfronthosting.co.za> desbma added the comment: Why do you think this isn't a good idea? As a user, what am supposed to do with that warning: * about a program I have no idea I was calling (the webbrowser module abstraction is here so I don't have to think about it) * I have no control about it's invocation * the output comes asynchronously in my program and may be hard to link the the webbrowser.open call Also the specific example of this issue is a xdg-open deprecation warning, but it could be any other output that is hard for the user to take action on or understand where it's coming from. My understanding of the *current* code is that all graphical browsers are already started with their output tossed away (https://hg.python.org/cpython/file/tip/Lib/webbrowser.py#l196). It seems weird to keep it only for all the command line wrappers (xdg-open, gnome-open, etc.). Of course the TTY interactive browsers have a good reason to keep it, obviously. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 07:49:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 11:49:00 +0000 Subject: [issue30219] webbrowser.open outputs xdg-open deprecation warning In-Reply-To: <1493642057.46.0.399695458413.issue30219@psf.upfronthosting.co.za> Message-ID: <1494503340.16.0.174431676047.issue30219@psf.upfronthosting.co.za> STINNER Victor added the comment: > Why do you think this isn't a good idea? If the command fails, you simplify have no idea of what happened. For example, thanks to stdout/stderr, you noticed the warning. Without stdout/stderr, the warning should be hidden. webbrowser is already able to detect that GNOME is running and uses gvfs-open in that case. Maybe we should exchange these two blocks of code to prefer gvfs-open over xdg-open on GNOME? # use xdg-open if around if shutil.which("xdg-open"): register("xdg-open", None, BackgroundBrowser("xdg-open")) # The default GNOME3 browser if "GNOME_DESKTOP_SESSION_ID" in os.environ and shutil.which("gvfs-open"): register("gvfs-open", None, BackgroundBrowser("gvfs-open")) Do you get the warning if you use gvfs-open? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 08:18:41 2017 From: report at bugs.python.org (INADA Naoki) Date: Thu, 11 May 2017 12:18:41 +0000 Subject: [issue30048] If a task is canceled at the right moment, the cancellation is ignored In-Reply-To: <1491955884.31.0.0746508313156.issue30048@psf.upfronthosting.co.za> Message-ID: <1494505121.28.0.878550676862.issue30048@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 991adca012f5e106c2d4040ce619c696ba6f9c46 by INADA Naoki in branch 'master': bpo-30048: asyncio: fix Task.cancel() was ignored. (GH-1097) https://github.com/python/cpython/commit/991adca012f5e106c2d4040ce619c696ba6f9c46 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 08:24:58 2017 From: report at bugs.python.org (INADA Naoki) Date: Thu, 11 May 2017 12:24:58 +0000 Subject: [issue30048] If a task is canceled at the right moment, the cancellation is ignored In-Reply-To: <1491955884.31.0.0746508313156.issue30048@psf.upfronthosting.co.za> Message-ID: <1494505498.95.0.702826005309.issue30048@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +1645 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 08:37:18 2017 From: report at bugs.python.org (INADA Naoki) Date: Thu, 11 May 2017 12:37:18 +0000 Subject: [issue30048] If a task is canceled at the right moment, the cancellation is ignored In-Reply-To: <1491955884.31.0.0746508313156.issue30048@psf.upfronthosting.co.za> Message-ID: <1494506238.34.0.892993804694.issue30048@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +1646 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 08:56:44 2017 From: report at bugs.python.org (INADA Naoki) Date: Thu, 11 May 2017 12:56:44 +0000 Subject: [issue30048] If a task is canceled at the right moment, the cancellation is ignored In-Reply-To: <1491955884.31.0.0746508313156.issue30048@psf.upfronthosting.co.za> Message-ID: <1494507404.44.0.961840518904.issue30048@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 3dc7c52a9f4fb83be3e26e31e2c7cd9dc1cb41a2 by INADA Naoki in branch '3.6': bpo-30048: asyncio: fix Task.cancel() was ignored. (GH-1546) https://github.com/python/cpython/commit/3dc7c52a9f4fb83be3e26e31e2c7cd9dc1cb41a2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 09:49:03 2017 From: report at bugs.python.org (Arthur Gutman) Date: Thu, 11 May 2017 13:49:03 +0000 Subject: [issue27240] 'UnstructuredTokenList' object has no attribute '_fold_as_ew' In-Reply-To: <1465208759.2.0.0752415166741.issue27240@psf.upfronthosting.co.za> Message-ID: <1494510543.51.0.11428341078.issue27240@psf.upfronthosting.co.za> Changes by Arthur Gutman : ---------- nosy: +archibald _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 09:58:26 2017 From: report at bugs.python.org (Christopher Harrison) Date: Thu, 11 May 2017 13:58:26 +0000 Subject: [issue30343] Subclassed json.JSONEncoder does not respect default method for supported types Message-ID: <1494511106.37.0.544159404801.issue30343@psf.upfronthosting.co.za> New submission from Christopher Harrison: If you subclass `json.JSONEncoder` to enable serialisation of custom types beyond those supported, you are meant to transform values of said type into a serialisable version within an overridden `default` method. For example: class MyJSONEncoder(json.JSONEncoder): def default(self, o): if isinstance(o, MyType): return str(o) # Raise TypeError when we have a type we can't serialise super().default(o) This, however, won't work if your custom type is an instance of one of the supported types. This is because, in Lib/json/encoder.py, the `_iterencode` function (defined in `_make_iterencode`) type checks against supported types before it delegates to the `default` method. The reason this came up is because I wanted to serialise a named tuple into a JSON object, with keys corresponding to the named tuple's field names. Ignoring the merits (or otherwise) of this desired outcome, this can't work because a named tuple is still a tuple and thus the `default` method is never called. In Python 2.7, the `_iterencode` method was part of the `JSONEncoder` class, so you could override it in a subclass; even if doing so is somewhat brittle. In Python 3, this method has been moved out into the module namespace (tested in 3.6; looking through the repo, it looks like this change was made in Python 3.1), so it can't easily be monkey-patched without it affecting other things. I believe this to be a bug. It seems reasonable to subclass at least named tuples, dictionaries and lists in such a way that you'd want a different JSON serialisation to their defaults. ---------- components: Library (Lib) messages: 293494 nosy: Christopher Harrison priority: normal severity: normal status: open title: Subclassed json.JSONEncoder does not respect default method for supported types type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 10:32:58 2017 From: report at bugs.python.org (Sam Silberstein) Date: Thu, 11 May 2017 14:32:58 +0000 Subject: [issue30337] Vague wording of pkgutil.walk_packages parameter 'prefix' In-Reply-To: <1494449389.02.0.790150087603.issue30337@psf.upfronthosting.co.za> Message-ID: <1494513178.46.0.533940959497.issue30337@psf.upfronthosting.co.za> Changes by Sam Silberstein : ---------- components: +Library (Lib) -Documentation versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 10:35:17 2017 From: report at bugs.python.org (Sam Silberstein) Date: Thu, 11 May 2017 14:35:17 +0000 Subject: [issue30337] Vague wording of pkgutil.walk_packages parameter 'prefix' In-Reply-To: <1494449389.02.0.790150087603.issue30337@psf.upfronthosting.co.za> Message-ID: <1494513317.32.0.93359914948.issue30337@psf.upfronthosting.co.za> Sam Silberstein added the comment: Hi there! This is my first submission to the bug tracker, so I apologize if I'm missing some formatting here. I've found what's either vague documentation for the 'prefix' parameter of `pgkutil.walk_packages` or a bug. The method implies that it will only import submodules of the provided path, but if the prefix parameter is not filled, this method will import a module with the same name from outside the path -- so long as it exists in `sys.modules`. I'm unsure if this is due to the documentation not specifying that prefix should always be used when path is set, or if this is a bug (I can provide a fix if it's a bug). Steps to reproduce: Create a directory with a nested package with the same name as a package outside that directory, e.g.: ??? test1 ? ??? __init__.py ? ??? should_not_be_included.py ??? test2 ??? __init__.py ??? test1 ??? __init__.py ??? should_be_included.py `list(pkgutil.walk_packages(['test2']))` will contain 'should_not_be_included.py' instead of 'should_be_included.py'. Thank you! Sam Silberstein ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 10:36:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 14:36:47 +0000 Subject: [issue30344] test_multiprocessing.test_notify_all(): AssertionError: 6 != 5 on x86 Windows XP 2.7 Message-ID: <1494513407.28.0.645892004666.issue30344@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Windows%20XP%202.7/builds/150/steps/test/logs/stdio 0:19:29 [214/402/1] test_multiprocessing crashed -- running: test_mmap (43 sec) [0, 0.0] [76985 refs] test test_multiprocessing failed -- Traceback (most recent call last): File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\test_multiprocessing.py", line 844, in test_notify_all self.assertReturnsIfImplemented(6, get_value, woken) File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\test_multiprocessing.py", line 149, in assertReturnsIfImplemented return self.assertEqual(value, res) AssertionError: 6 != 5 Traceback (most recent call last): File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\runpy.py", line 72, in _run_code exec code in run_globals File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\regrtest.py", line 1882, in main_in_temp_cwd() File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\regrtest.py", line 1869, in main_in_temp_cwd main() File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\contextlib.py", line 35, in __exit__ self.gen.throw(type, value, traceback) File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\support\__init__.py", line 769, in temp_cwd rmtree(name) File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\support\__init__.py", line 293, in rmtree _rmtree(path) File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\support\__init__.py", line 249, in _rmtree _waitfor(lambda p: _force_run(p, os.rmdir, p), path) File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\support\__init__.py", line 202, in _waitfor func(pathname) File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\support\__init__.py", line 249, in _waitfor(lambda p: _force_run(p, os.rmdir, p), path) File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\support\__init__.py", line 197, in _force_run return func(*args) WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'd:\\cygwin\\home\\db3l\\buildarea\\2.7.bolen-windows\\build\\build\\test_python_2512' ---------- components: Tests, Windows keywords: buildbot messages: 293496 nosy: davin, haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: test_multiprocessing.test_notify_all(): AssertionError: 6 != 5 on x86 Windows XP 2.7 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 10:46:21 2017 From: report at bugs.python.org (asterite) Date: Thu, 11 May 2017 14:46:21 +0000 Subject: [issue30260] sock_dealloc() may call __repr__ when socket class is already collected by GC In-Reply-To: <1493829842.08.0.612214340964.issue30260@psf.upfronthosting.co.za> Message-ID: <1494513981.0.0.49126598267.issue30260@psf.upfronthosting.co.za> asterite added the comment: Sorry if I misunderstood how the bug tracker works, but why did you delete version 3.4 ? Python 3.4 is also affected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 11:19:39 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 May 2017 15:19:39 +0000 Subject: [issue30308] Add code coverage for argument in random.shuffle In-Reply-To: <1494278400.3.0.911074987674.issue30308@psf.upfronthosting.co.za> Message-ID: <1494515979.74.0.124009631407.issue30308@psf.upfronthosting.co.za> Raymond Hettinger added the comment: New changeset f111fd2e65ef7aefd4ebeadbb48e84d609bf3733 by Raymond Hettinger (csabella) in branch 'master': bpo-30308: Code coverage for argument in random.shuffle (#1504) https://github.com/python/cpython/commit/f111fd2e65ef7aefd4ebeadbb48e84d609bf3733 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 11:20:37 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 May 2017 15:20:37 +0000 Subject: [issue30308] Add code coverage for argument in random.shuffle In-Reply-To: <1494278400.3.0.911074987674.issue30308@psf.upfronthosting.co.za> Message-ID: <1494516037.9.0.238443582256.issue30308@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thank you for the patch. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 11:23:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 15:23:59 +0000 Subject: [issue30260] sock_dealloc() may call __repr__ when socket class is already collected by GC In-Reply-To: <1493829842.08.0.612214340964.issue30260@psf.upfronthosting.co.za> Message-ID: <1494516239.96.0.662451892617.issue30260@psf.upfronthosting.co.za> STINNER Victor added the comment: > Sorry if I misunderstood how the bug tracker works, but why did you delete version 3.4 ? Python 3.4 is also affected. Right, but Python 3.4 doesn't accept bug fixes anymore: https://docs.python.org/devguide/#status-of-python-branches ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 11:31:30 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 11 May 2017 15:31:30 +0000 Subject: [issue30340] Optimize out non-capturing groups In-Reply-To: <1494494453.98.0.386630329077.issue30340@psf.upfronthosting.co.za> Message-ID: <1494516690.13.0.422147980998.issue30340@psf.upfronthosting.co.za> Josh Rosenberg added the comment: The PR includes defining and using a _uniq function that is actually a no-op function (it doesn't uniquify, the first line returns the argument, so the rest is skipped). Was that supposed to be removed, or should it actually uniqify? ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 12:03:28 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 May 2017 16:03:28 +0000 Subject: [issue21261] Teach IDLE to Autocomplete dictionary keys In-Reply-To: <1397672472.64.0.119805531416.issue21261@psf.upfronthosting.co.za> Message-ID: <1494518608.31.0.011075873226.issue21261@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I think it would be unusual for tab completion to work on non-strings and would create a weird feel to the API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 12:16:32 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 16:16:32 +0000 Subject: [issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO Message-ID: <1494519392.85.0.668925519236.issue30345@psf.upfronthosting.co.za> New submission from STINNER Victor: cstratak reported the following test failure on Fedora 24 when building Python 3.6 with LTO + PGO: ====================================================================== FAIL: test_threads (test.test_gdb.PyBtTests) Verify that "py-bt" indicates threads that are waiting for the GIL ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.1/Lib/test/test_gdb.py", line 783, in test_threads cmds_after_breakpoint=['thread apply all py-bt']) File "/builddir/build/BUILD/Python-3.6.1/Lib/test/test_gdb.py", line 218, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception Va[95 chars]nd."] != [] First list contains 2 additional elements. First extra element 0: "Python Exception Variable 'func_obj' not found.: " + [] - ["Python Exception Variable 'func_obj' not found.: ", - "Error occurred in Python command: Variable 'func_obj' not found."] ---------------------------------------------------------------------- ---------- components: Build, Tests messages: 293503 nosy: haypo priority: normal severity: normal status: open title: test_gdb fails on Python 3.6 when built with LTO+PGO versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 12:24:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 May 2017 16:24:03 +0000 Subject: [issue30340] Optimize out non-capturing groups In-Reply-To: <1494494453.98.0.386630329077.issue30340@psf.upfronthosting.co.za> Message-ID: <1494519843.48.0.075051260804.issue30340@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Good catch Josh! This return was temporary added for debugging, the function should actually uniqify. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 12:26:03 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 11 May 2017 16:26:03 +0000 Subject: [issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO In-Reply-To: <1494519392.85.0.668925519236.issue30345@psf.upfronthosting.co.za> Message-ID: <1494519963.93.0.300440033814.issue30345@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Full build log ---------- nosy: +cstratak Added file: http://bugs.python.org/file46856/build.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 12:27:13 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 11 May 2017 16:27:13 +0000 Subject: [issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO In-Reply-To: <1494519392.85.0.668925519236.issue30345@psf.upfronthosting.co.za> Message-ID: <1494520033.95.0.0780117242849.issue30345@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: All the dependencies dragged. gdb is of version 7.11. The failures do not happen with gdb 7.12 (which exists in later Fedora releases). ---------- Added file: http://bugs.python.org/file46857/root.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 12:27:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 16:27:55 +0000 Subject: [issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO In-Reply-To: <1494519392.85.0.668925519236.issue30345@psf.upfronthosting.co.za> Message-ID: <1494520075.64.0.501296784055.issue30345@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1647 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 12:30:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 May 2017 16:30:28 +0000 Subject: [issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO In-Reply-To: <1494519392.85.0.668925519236.issue30345@psf.upfronthosting.co.za> Message-ID: <1494520228.64.0.871792845203.issue30345@psf.upfronthosting.co.za> STINNER Victor added the comment: I created https://github.com/python/cpython/pull/1549 to update test_gdb.py and python-gdb.py in Python 3.6. I don't know if it will fix the issus, but it shouldn't hurt :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 12:33:16 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 11 May 2017 16:33:16 +0000 Subject: [issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO In-Reply-To: <1494519392.85.0.668925519236.issue30345@psf.upfronthosting.co.za> Message-ID: <1494520396.67.0.849772790334.issue30345@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Note: test_gdb is skipped on later Fedora's actually (possibly due to gdb package no being dragged at the minimal buildroot) so the issue might still be there, so the gdb version might have no effect on that. Will investigate further. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 12:43:23 2017 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 11 May 2017 16:43:23 +0000 Subject: [issue30338] LC_ALL=en_US + io.open() => LookupError: (osx) In-Reply-To: <1494454938.72.0.336460677547.issue30338@psf.upfronthosting.co.za> Message-ID: <1494521003.33.0.590136896233.issue30338@psf.upfronthosting.co.za> Ronald Oussoren added the comment: On macOS 10.12: ronald$ LC_ALL=en_US python2.7 -c 'import locale; print(repr(locale.getpreferredencoding()))' '' ronald$ LC_ALL=en_US python3.6 -c 'import locale; print(repr(locale.getpreferredencoding()))' 'UTF-8' getpreferredencoding uses the CODESET path on macOS, with means the result above is explained by this session (python 2.7): >>> import locale >>> locale.setlocale(locale.LC_ALL, '') 'en_US' >>> locale.nl_langinfo(locale.CODESET) '' Note that _pyio uses locale.getpreferedencoding(), not locale.getpreferredencoding(False). The latter would use US-ASCII as the encoding: >>> import locale >>> locale.nl_langinfo(locale.CODESET) 'US-ASCII' I guess the empty string for the encoding is explained by the following shell session that looks at the locale information: $ LC_ALL=en_US.UTF-8 locale -ck LC_ALL | charmap charmap="UTF-8" $ LC_ALL=en_US locale -ck LC_ALL | grep charmap charmap= In python3 locale.getpreferredencoding (or rather, the same function in _bootlocale) was tweaked to deal with this problem: if not result and sys.platform == 'darwin': # nl_langinfo can return an empty string # when the setting has an invalid value. # Default to UTF-8 in that case because # UTF-8 is the default charset on OSX and # returning nothing will crash the # interpreter. result = 'UTF-8' Backporting this to 2.7 would IMHO be the best way to fix this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 13:30:54 2017 From: report at bugs.python.org (Brett Cannon) Date: Thu, 11 May 2017 17:30:54 +0000 Subject: [issue30327] Version may be out of date in travis.yml In-Reply-To: <1494396875.36.0.00921683522074.issue30327@psf.upfronthosting.co.za> Message-ID: <1494523854.46.0.670278127578.issue30327@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- pull_requests: +1648 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 13:32:13 2017 From: report at bugs.python.org (Brett Cannon) Date: Thu, 11 May 2017 17:32:13 +0000 Subject: [issue30327] Version may be out of date in travis.yml In-Reply-To: <1494396875.36.0.00921683522074.issue30327@psf.upfronthosting.co.za> Message-ID: <1494523933.54.0.632726731898.issue30327@psf.upfronthosting.co.za> Brett Cannon added the comment: I agree with Victor since that's why I set up the Travis file that way. :) Thanks to this issue, though, I have added a comment to .travis.yml to explain why the version is what it is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 13:32:54 2017 From: report at bugs.python.org (Brett Cannon) Date: Thu, 11 May 2017 17:32:54 +0000 Subject: [issue30327] Version may be out of date in travis.yml In-Reply-To: <1494396875.36.0.00921683522074.issue30327@psf.upfronthosting.co.za> Message-ID: <1494523974.85.0.151365496853.issue30327@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 13:33:01 2017 From: report at bugs.python.org (Matt Gilson) Date: Thu, 11 May 2017 17:33:01 +0000 Subject: [issue30346] Odd behavior when unpacking `itertools.groupby` Message-ID: <1494523981.5.0.726129882006.issue30346@psf.upfronthosting.co.za> New submission from Matt Gilson: There is some odd behavior when unpacking the groups from an itertools.groupby result. For example: from itertools import groupby from operator import itemgetter inputs = ((x > 5, x) for x in range(10)) (_, a), (_, b) = groupby(inputs, key=itemgetter(0)) print(list(a)) print(list(b)) On CPython, this results in: [] [(True, 9)] I would expect it to print out 2 empty lists since the second group would have to be consumed to make sure that there isn't another value yielded from groupby (If there was another value to yield, we'd get a ValueError since we couldn't unpack the correct number of items). This is the behavior that PyPy had prior to re-implementing to be consistent with CPython in https://bitbucket.org/pypy/pypy/commits/6093ff1a44e6b17f09db83aa80aea562a738c286 ---------- messages: 293511 nosy: Matt Gilson priority: normal severity: normal status: open title: Odd behavior when unpacking `itertools.groupby` type: behavior versions: Python 3.3, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 13:38:59 2017 From: report at bugs.python.org (Glyph Lefkowitz) Date: Thu, 11 May 2017 17:38:59 +0000 Subject: [issue22559] [backport] ssl.MemoryBIO In-Reply-To: <1412540756.02.0.793381062078.issue22559@psf.upfronthosting.co.za> Message-ID: <1494524339.75.0.268037418322.issue22559@psf.upfronthosting.co.za> Glyph Lefkowitz added the comment: For what it's worth, it would still be great if this could be merged. It could help a lot with 2/3 migrations of async code that uses Twisted and wants to adopt some asyncio parts. Right now the stdlib SSL module is de-facto useless in those scenarios and depending on pyOpenSSL is pretty much the only choice, and the lack of availability of a memory BIO on 2.x is the biggest blocker. ---------- nosy: +glyph _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 13:51:13 2017 From: report at bugs.python.org (Brett Cannon) Date: Thu, 11 May 2017 17:51:13 +0000 Subject: [issue30336] Pull Requests need more detail In-Reply-To: <1494439367.1.0.278303671769.issue30336@psf.upfronthosting.co.za> Message-ID: <1494525073.47.0.273069680255.issue30336@psf.upfronthosting.co.za> Brett Cannon added the comment: OK, since Victor has verified my thinking wasn't totally off-target, I'm going to close this. Thanks for the idea and taking the time for the PR, Jensen. If you do want to file issues or PRs against the devguide, the repo is at https://github.com/python/devguide. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 13:54:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 May 2017 17:54:37 +0000 Subject: [issue30346] Odd behavior when unpacking `itertools.groupby` In-Reply-To: <1494523981.5.0.726129882006.issue30346@psf.upfronthosting.co.za> Message-ID: <1494525277.38.0.57657575075.issue30346@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 14:42:37 2017 From: report at bugs.python.org (desbma) Date: Thu, 11 May 2017 18:42:37 +0000 Subject: [issue30219] webbrowser.open outputs xdg-open deprecation warning In-Reply-To: <1493642057.46.0.399695458413.issue30219@psf.upfronthosting.co.za> Message-ID: <1494528157.05.0.621958052001.issue30219@psf.upfronthosting.co.za> desbma added the comment: > For example, thanks to stdout/stderr, you noticed the warning. Without stdout/stderr, the warning should be hidden. That is true, but as a Python user, it don't need to see that warning, only the xdg-utils developers do. I would have never seen it, and it would never have been a problem because xdg-util would have been updated to call gio open (with the commit mentioned above) long before gvfs-open is completely removed. > Do you get the warning if you use gvfs-open? Of course, because gvfs-open is precisely the cause of the deprecation warning $ cat /usr/bin/gvfs-open #!/bin/sh replacement="gio open" help="gio help open" >&2 echo "This tool has been deprecated, use '$replacement' instead." >&2 echo "See '$help' for more info." >&2 echo if [ "$1" == "--help" ] || [ "$1" == "-h" ]; then exec $help "$@:2" else exec $replacement "$@" fi ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 15:59:53 2017 From: report at bugs.python.org (Geert Jansen) Date: Thu, 11 May 2017 19:59:53 +0000 Subject: [issue22559] [backport] ssl.MemoryBIO In-Reply-To: <1412540756.02.0.793381062078.issue22559@psf.upfronthosting.co.za> Message-ID: <1494532793.4.0.728131649665.issue22559@psf.upfronthosting.co.za> Geert Jansen added the comment: Glyph, if this is just for Twisted you could ship the "sslcompat" module that I'm shipping with Gruvi. It backports the async IO stuff and a few other pieces through an extension module. https://github.com/geertj/gruvi/blob/master/src/sslcompat.c and https://github.com/geertj/gruvi/blob/master/lib/gruvi/sslcompat.py But having this in the stdlib itself is much cleaner of course. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 16:35:23 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 11 May 2017 20:35:23 +0000 Subject: [issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO In-Reply-To: <1494519392.85.0.668925519236.issue30345@psf.upfronthosting.co.za> Message-ID: <1494534923.93.0.208173693187.issue30345@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: So the issue wasn't restricted to a specific gdb version or distro release, as due to some issues dependency issues the gdb binary wasn't pulled in the buildroot which makes test_gdb to get skipped. So I was able to reproduce it on my system by installing gdb (version 7.12.1), compiling python 3.6 from sources with --enable-optimizations and --with-lto flags enabled and running 'make test' Also applied the relevant PR however it didn't fix the issue. Attaching the full log of 'make test' ---------- Added file: http://bugs.python.org/file46858/pgo-lto-gdb-errors-build _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 17:10:21 2017 From: report at bugs.python.org (Armin Rigo) Date: Thu, 11 May 2017 21:10:21 +0000 Subject: [issue30347] itertools.groupby() can fail a C assert() Message-ID: <1494537021.49.0.31945650773.issue30347@psf.upfronthosting.co.za> New submission from Armin Rigo: This triggers an assert() failure on debug-mode Python (or a leak in release Python): from itertools import groupby def f(n): print("enter:", n) if n == 5: list(b) print("leave:", n) return n != 6 for (k, b) in groupby(range(10), f): print(list(b)) With current trunk we get: python: ./Modules/itertoolsmodule.c:303: _grouper_next: Assertion `gbo->currkey == NULL' failed. ---------- components: Interpreter Core messages: 293517 nosy: arigo priority: normal severity: normal status: open title: itertools.groupby() can fail a C assert() type: crash versions: Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 17:33:56 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 May 2017 21:33:56 +0000 Subject: [issue30347] itertools.groupby() can fail a C assert() In-Reply-To: <1494537021.49.0.31945650773.issue30347@psf.upfronthosting.co.za> Message-ID: <1494538436.1.0.890896517259.issue30347@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> rhettinger components: +Extension Modules -Interpreter Core nosy: +rhettinger, serhiy.storchaka stage: -> needs patch versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 18:16:55 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 11 May 2017 22:16:55 +0000 Subject: [issue30019] IDLE freezes when opening a file with astral characters In-Reply-To: <1491596146.33.0.970912299828.issue30019@psf.upfronthosting.co.za> Message-ID: <1494541015.77.0.731406517437.issue30019@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Eryk> I tried print(transurrogate(s)) from editor and it worked!, printing '? ?' (though not near as pretty as here in Firefox. I have previously thought of scanning strings before inserting into Text widgets and converting astral chars to \U000nnnnn form, with a color tag to distinguish such displays from the literal ten chars. This should work fine for read-only output to Shell but not easily in Editor. On Windows, I would just use transurrogate instead, and that would also work for loading files into the editor. I believe transurrogate could potentially solve pasting on Windows by intercepting <> events. Serhiy, are you aware of Eryk's astral char workaround for Windows? Could it be incorporated into _tkinter, where a string's kind is accessible? ---------- nosy: +serhiy.storchaka versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 18:19:57 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 May 2017 22:19:57 +0000 Subject: [issue30347] itertools.groupby() can fail a C assert() In-Reply-To: <1494537021.49.0.31945650773.issue30347@psf.upfronthosting.co.za> Message-ID: <1494541196.99.0.414602416802.issue30347@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Do you have a suggested fix? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 21:58:37 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 May 2017 01:58:37 +0000 Subject: [issue21261] Teach IDLE to Autocomplete dictionary keys In-Reply-To: <1397672472.64.0.119805531416.issue21261@psf.upfronthosting.co.za> Message-ID: <1494554317.18.0.729014831016.issue21261@psf.upfronthosting.co.za> Terry J. Reedy added the comment: IDLE currently completes global names, attributes after ., and filename segments after / or \ within a string. In the later two cases, a box will pop up automatically after a user selected time after typing . or /\ and nothing thereafter. The filename segments are not quoted in the list box. These completions work within subscripts. d[a pops up global name completion box d['/ pops up filename completion box Raymond proposes that IDLE complete 'dictionary [string] keys'. To properly code and test, we need a more complete specification. For instance, "a string key box should open after an opening quote that follows '[' that follows a dict expression". Any opening quote should work, just as for filename completion. This is similar "a calltip opens after a '(' that follows a callable expresssion". For calltips, the expression cannot contain a function call, because calls can take an indeterminant amount of time. If "expression.find('(') != -1", the calltip is aborted and the same should be true here. Also, calltips.get_entity(expression) should be reused to get the dict object. (test_calltips should but does not test that 'f()(' is ignored and get_entity not called. The same should be true for "f()['".) Nice (?) but not necessary: delayed auto-popup after typing "d[". This seems that it would be more difficult than the current auto popups. And see the following. This proposal conflicts with filename completion for subscripts. When one is accessing an existing value, one would want key completion. If one is assigning a value to a new filename key, one would want filename completion. The simplest solution I can think of is to not auto pop up key completion but to require before typing (/\) and waiting. Lastly, should the string keys be quoted in the box? | long key | | short key | or |'long key' | |'short key'| ? Selecting key objects by their representation is tempting, but it is conceptually different from completing names. Objects may have one canonical representation, but many possible representations. So clicking on a list (which currently does not work) or using movement keys is more sensible than typing chars that have to match one of many possibilities. String keys would have to be quoted. So I would only consider this as a separate issue, depending on a fix for clicks. It should only be accessed by immediately after '[', and I might want to disable selection by character matching. Even then, I would be dubious. I grepped idlelib for "\w\[". A majority of subscripts are names, handled by current name completion or not (if the names are local, which they often are). The rest are either list indexes and slices involving literal ints or string keys, which this proposal would handle for accessible dicts. I am pretty sure there are no keys other than names and strings. But the sparsity of use cases is my problem even with this proposal. Calltips are useful because there are many globally accessible callables, including builtins and imports. But other than class __dicts__, there are few globally accessible dicts, except perhaps in toy beginner code. Raymond, have I missed something? The idlelib grep had 763 hits and I believe more that half are for dicts. But they may all be locals or self attributes. I would love to be able, for instance, to type "local_dict['" and fill in 'background', but that will not work. ---------- stage: test needed -> patch review versions: +Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 21:58:55 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 May 2017 01:58:55 +0000 Subject: [issue21261] Teach IDLE to Autocomplete dictionary keys In-Reply-To: <1397672472.64.0.119805531416.issue21261@psf.upfronthosting.co.za> Message-ID: <1494554335.52.0.143192072446.issue21261@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 23:41:44 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 May 2017 03:41:44 +0000 Subject: [issue30346] Odd behavior when unpacking `itertools.groupby` In-Reply-To: <1494523981.5.0.726129882006.issue30346@psf.upfronthosting.co.za> Message-ID: <1494560504.02.0.629367407473.issue30346@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FYI, the CPython behavior matches the pure python implementation show in the docs: Python 3.6.1 (v3.6.1:69c0db5050, Mar 21 2017, 01:21:04) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "copyright", "credits" or "license()" for more information. >>> class groupby: # [k for k, g in groupby('AAAABBBCCDAABBB')] --> A B C D A B # [list(g) for k, g in groupby('AAAABBBCCD')] --> AAAA BBB CC D def __init__(self, iterable, key=None): if key is None: key = lambda x: x self.keyfunc = key self.it = iter(iterable) self.tgtkey = self.currkey = self.currvalue = object() def __iter__(self): return self def __next__(self): while self.currkey == self.tgtkey: self.currvalue = next(self.it) # Exit on StopIteration self.currkey = self.keyfunc(self.currvalue) self.tgtkey = self.currkey return (self.currkey, self._grouper(self.tgtkey)) def _grouper(self, tgtkey): while self.currkey == tgtkey: yield self.currvalue try: self.currvalue = next(self.it) except StopIteration: return self.currkey = self.keyfunc(self.currvalue) >>> from operator import itemgetter >>> inputs = ((x > 5, x) for x in range(10)) >>> (_, a), (_, b) = groupby(inputs, key=itemgetter(0)) >>> print(list(a)) [] >>> print(list(b)) [(True, 9)] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 11 23:42:01 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 May 2017 03:42:01 +0000 Subject: [issue30346] Odd behavior when unpacking `itertools.groupby` In-Reply-To: <1494523981.5.0.726129882006.issue30346@psf.upfronthosting.co.za> Message-ID: <1494560521.52.0.920133144742.issue30346@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 00:33:42 2017 From: report at bugs.python.org (Ben Finney) Date: Fri, 12 May 2017 04:33:42 +0000 Subject: [issue30181] Correct the parsing of a test case docstring. In-Reply-To: <1493261074.73.0.807341942876.issue30181@psf.upfronthosting.co.za> Message-ID: <1494563622.93.0.383954707981.issue30181@psf.upfronthosting.co.za> Ben Finney added the comment: Apparently there is some consternation about my bugs.python.org identity. This is Ben Finney of WSP Digital, in Melbourne, Australia. A GitHub account is wholly irrelevant to this account. A GitHub account is wholly irrelevant to accepting the PSF CLA. This bugs.python.org account `benf_wspdigital` does not mention a GitHub account, and that's the way I want to keep it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 00:39:05 2017 From: report at bugs.python.org (Ben Finney) Date: Fri, 12 May 2017 04:39:05 +0000 Subject: [issue30181] Correct the parsing of a test case docstring. In-Reply-To: <1493261074.73.0.807341942876.issue30181@psf.upfronthosting.co.za> Message-ID: <1494563945.8.0.819228530319.issue30181@psf.upfronthosting.co.za> Ben Finney added the comment: > No, your contribution will not be rejected by "you don't maintain the repo on GitHub", everyone can send the patch (PR) to python/cpython. I am glad to know that. I won't be maintaining a GitHub account because I disagree with the terms of service. > Ben, if you have any problem about how to get on with GitHub, I can help you [?] Thank you for the offer. My problem with how to get on with GitHub is I don't accept their terms of service :-) How do we proceed? Git is a *decentralised* VCS, it should not be a barrier that I make the contribution from a different repository host. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 01:34:42 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 12 May 2017 05:34:42 +0000 Subject: [issue30048] If a task is canceled at the right moment, the cancellation is ignored In-Reply-To: <1491955884.31.0.0746508313156.issue30048@psf.upfronthosting.co.za> Message-ID: <1494567282.2.0.500452738618.issue30048@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 5e94dedcddf5e09164bf20f18a3c701eeb96c71e by INADA Naoki in branch '3.5': bpo-30048: asyncio: fix Task.cancel() was ignored. (GH-1547) https://github.com/python/cpython/commit/5e94dedcddf5e09164bf20f18a3c701eeb96c71e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 01:37:59 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 12 May 2017 05:37:59 +0000 Subject: [issue30048] If a task is canceled at the right moment, the cancellation is ignored In-Reply-To: <1491955884.31.0.0746508313156.issue30048@psf.upfronthosting.co.za> Message-ID: <1494567479.18.0.0199674402564.issue30048@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 01:50:41 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 12 May 2017 05:50:41 +0000 Subject: [issue30181] Correct the parsing of a test case docstring. In-Reply-To: <1493261074.73.0.807341942876.issue30181@psf.upfronthosting.co.za> Message-ID: <1494568241.6.0.759379720645.issue30181@psf.upfronthosting.co.za> R. David Murray added the comment: Our tooling and workflow is indeed dependent on github. We should repurpose the current 'remote hg repo' to allow the entry of a non-github git repo, but someone will have to write that code. In the meantime, if you upload a patch generated from your branch here, someone else will create the github PR so we can get it processed. If you generate the patch using 'git show -v', the authorship information should get imported into the github PR that gets generated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 02:33:03 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 May 2017 06:33:03 +0000 Subject: [issue30346] Odd behavior when unpacking `itertools.groupby` In-Reply-To: <1494523981.5.0.726129882006.issue30346@psf.upfronthosting.co.za> Message-ID: <1494570783.92.0.149553050307.issue30346@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I suppose that when the input iterator is exhausted, we could poison the currkey to make the subordinate iterator ends as well: def __next__(self): while self.currkey == self.tgtkey: try: self.currvalue = next(self.it) except StopIteration: self.currkey = object() raise StopIteration from None self.currkey = self.keyfunc(self.currvalue) self.tgtkey = self.currkey return (self.currkey, self._grouper(self.tgtkey)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 03:05:27 2017 From: report at bugs.python.org (Brian May) Date: Fri, 12 May 2017 07:05:27 +0000 Subject: [issue30181] Correct the parsing of a test case docstring. In-Reply-To: <1493261074.73.0.807341942876.issue30181@psf.upfronthosting.co.za> Message-ID: <1494572727.7.0.559101103685.issue30181@psf.upfronthosting.co.za> Brian May added the comment: I have already created such a pull requests. It is bidirectionally linked to this ticket. However concerns have been raised that the automatic bot hasn't recognised that Ben Finney has signed the CLA. Hence it appears the pull request might be rejected. Sure there are currently problems with the pull request, and it fails the tests, however I am not going to spend any additional efforts fixing them unless this situation with the CLA can be resolved first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 03:12:23 2017 From: report at bugs.python.org (Ben Finney) Date: Fri, 12 May 2017 07:12:23 +0000 Subject: [issue30181] Correct the parsing of a test case docstring. In-Reply-To: <1493261074.73.0.807341942876.issue30181@psf.upfronthosting.co.za> Message-ID: <1494573143.08.0.432010603631.issue30181@psf.upfronthosting.co.za> Ben Finney added the comment: > if you upload a patch generated from your branch here, someone else will create the github PR so we can get it processed. The branch has several commits. I have generated the patches, and am now uploading them as a tarball. It may be easier to simply merge from the Git branch, https://rocketgit.com/user/benf_wspdigital/cpython/source/log/branch/wip,issue,issue30181_parse-docstring-using-pydoc ---------- Added file: http://bugs.python.org/file46859/issue30181-fix.cfc063a9.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 03:20:24 2017 From: report at bugs.python.org (Matthew Gilson) Date: Fri, 12 May 2017 07:20:24 +0000 Subject: [issue30346] Odd behavior when unpacking `itertools.groupby` In-Reply-To: <1494523981.5.0.726129882006.issue30346@psf.upfronthosting.co.za> Message-ID: <1494573624.14.0.91835268933.issue30346@psf.upfronthosting.co.za> Matthew Gilson added the comment: I think that works to solve the problem that I pointed out. In my stack overflow question (http://stackoverflow.com/a/43926058/748858) it has been pointed out that there are other opportunities for weirdness here. Specifically, if if I skip processing 2 groups and then I process a third group whose key is the same as the first: inputs = [(x > 5, x) for x in range(10)] inputs += [(False, 10), (True, 11)] g = groupby(inputs2 + [(True, 11)], key=itemgetter(0)) _, a = next(g) _, b = next(g) _, c = next(g) print(list(a)) print(list(b)) Both `a` and `b` should probably be empty at this point, but they aren't. What if you kept track of the last iterable group and just consumed it at whenever `next` is called? I think then you also need to keep track of whether or not the input iterable has been completely consumed, but that's not too bad either: _sentinel = object() class groupby: # [k for k, g in groupby('AAAABBBCCDAABBB')] --> A B C D A B # [list(g) for k, g in groupby('AAAABBBCCD')] --> AAAA BBB CC D def __init__(self, iterable, key=None): if key is None: key = lambda x: x self.keyfunc = key self.it = iter(iterable) self.last_group = self.currkey = self.currvalue = _sentinel self.empty = False def __iter__(self): return self def __next__(self): if self.last_group is not _sentinel: for _ in self.last_group: pass if self.empty: raise StopIteration if self.currvalue is _sentinel: try: self.currvalue = next(self.it) except StopIteration: self.empty = True raise self.currkey = self.keyfunc(self.currvalue) self.last_group = self._grouper(self.currkey, self.currvalue) return (self.currkey, self.last_group) def _grouper(self, tgtkey, currvalue): while self.currkey == tgtkey: yield self.currvalue try: self.currvalue = next(self.it) except StopIteration: self.empty = True return self.currkey = self.keyfunc(self.currvalue) I haven't tested this to make sure it passes the test suite -- I also don't know if this would have major performance implications or anything. If it did have severe performance implications, then it probably isn't worthwhile... ---------- nosy: +mgilson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 03:23:41 2017 From: report at bugs.python.org (Matthew Gilson) Date: Fri, 12 May 2017 07:23:41 +0000 Subject: [issue30346] Odd behavior when unpacking `itertools.groupby` In-Reply-To: <1494523981.5.0.726129882006.issue30346@psf.upfronthosting.co.za> Message-ID: <1494573821.3.0.0709101321516.issue30346@psf.upfronthosting.co.za> Matthew Gilson added the comment: Oops. You don't need to pass `self.currvalue` to `_grouper`. I didn't end up using it in there... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 03:55:56 2017 From: report at bugs.python.org (Louie Lu) Date: Fri, 12 May 2017 07:55:56 +0000 Subject: [issue30348] IDLE: Add fetch completions and get entity unittest Message-ID: <1494575756.78.0.347326025399.issue30348@psf.upfronthosting.co.za> New submission from Louie Lu: Due to #21261, add relative unittest to test_autocomplete.py ---------- assignee: terry.reedy components: IDLE messages: 293531 nosy: louielu, terry.reedy priority: normal severity: normal status: open title: IDLE: Add fetch completions and get entity unittest type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 03:58:32 2017 From: report at bugs.python.org (Louie Lu) Date: Fri, 12 May 2017 07:58:32 +0000 Subject: [issue30348] IDLE: Add fetch completions and get entity unittest In-Reply-To: <1494575756.78.0.347326025399.issue30348@psf.upfronthosting.co.za> Message-ID: <1494575912.85.0.740484748783.issue30348@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +1649 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 04:14:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 May 2017 08:14:13 +0000 Subject: [issue30349] Preparation for advanced set syntax in regular expressions Message-ID: <1494576853.44.0.660813121244.issue30349@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Currently the re module supports only simple sets. They can include literal characters, character ranges, some simple character classes and support the negation. The Unicode standard [1] defines set operations (union, intersection, difference and symmetric difference) and nested sets. Some regular expression engines implemented these features, for example the regex module supports all TR18 features except not-nested POSIX character classes. If replace the re module with the regex module or add support of these features in the re module and make this syntax enabled by default, this will break some code. It is very unlikely the the regular expression contains duplicated characters ('--', '||', '&&' or '~~'), but nested sets uses just '[', and non-escaped '[' is occurred in character sets in regular expressions (even the stdlib contains several occurrences). Proposed patch adds FutureWarnings emitted when possible breaking set construct ('--', '||', '&&', '~~' or '[') is occurred in a regular expression. We need one or two releases with a warning before changing syntax. The patch also makes re.escape() escaping '&' and '~' and fixes several regular expression in the stdlib. Alternatively the support of new set syntax could be enabled by special flag. I'm not sure that the support of set operations and nested sets is necessary. This complicates the syntax of regular expressions (which already is not simple). Currently set operations can be emulated with lookarounds: [set1||set2] -- (?:[set1]|[set2]) [set1&&set2] -- [set1](?<=[set2]) or (?=[set1])[set2] [set1--set2] -- [set1](? _______________________________________ From report at bugs.python.org Fri May 12 04:20:39 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 May 2017 08:20:39 +0000 Subject: [issue30349] Preparation for advanced set syntax in regular expressions In-Reply-To: <1494576853.44.0.660813121244.issue30349@psf.upfronthosting.co.za> Message-ID: <1494577239.52.0.533721141758.issue30349@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1650 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 05:18:30 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 May 2017 09:18:30 +0000 Subject: [issue30346] Odd behavior when unpacking `itertools.groupby` In-Reply-To: <1494523981.5.0.726129882006.issue30346@psf.upfronthosting.co.za> Message-ID: <1494580710.94.0.0385042664427.issue30346@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Does it make sense using a grouper after advancing the groupby iterator? Currently it is possible by accident: >>> from itertools import groupby, count >>> it = groupby(count(), lambda i: (i//10)%2) >>> _, even = next(it) >>> _, odd = next(it) >>> print(list(even)) [] >>> print(list(odd)) [10, 11, 12, 13, 14, 15, 16, 17, 18, 19] >>> print(list(even)) [20, 21, 22, 23, 24, 25, 26, 27, 28, 29] >>> print(list(odd)) [30, 31, 32, 33, 34, 35, 36, 37, 38, 39] >>> print(list(even)) [40, 41, 42, 43, 44, 45, 46, 47, 48, 49] But I think that it would be more consistent to implement one of following variant: 1. Invalidate groupers after creating a new grouper. There should be only one valid grouper related to the groupby object. Using of invalid grouper should raise either StopIteration or RuntimeError. >>> it = groupby(count(), lambda i: (i//10)%2) >>> _, even = next(it) >>> _, odd = next(it) >>> print(list(even)) [] >>> print(list(odd)) [10, 11, 12, 13, 14, 15, 16, 17, 18, 19] >>> print(list(even)) [] >>> print(list(odd)) [] or >>> it = groupby(count(), lambda i: (i//10)%2) >>> _, even = next(it) >>> _, odd = next(it) >>> print(list(even)) Traceback (most recent call last): File "", line 1, in RuntimeError >>> print(list(odd)) [10, 11, 12, 13, 14, 15, 16, 17, 18, 19] >>> print(list(even)) Traceback (most recent call last): File "", line 1, in RuntimeError >>> print(list(odd)) [] 2. Duplicate the source iterator using tee() when create a new grouper. All groupers can be used independently from the groupby object and other groupers. >>> it = groupby(range(100), lambda i: (i//10)%2) >>> _, even = next(it) >>> _, odd = next(it) >>> _ = list(it) # exhaust the source iterator >>> print(list(even)) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> print(list(odd)) [10, 11, 12, 13, 14, 15, 16, 17, 18, 19] >>> print(list(even)) [] >>> print(list(odd)) [] I think resolving this issue will also fix issue30347. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 05:28:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 May 2017 09:28:12 +0000 Subject: [issue6393] OS X: python3 from python-3.1.dmg crashes at startup In-Reply-To: <1246445517.38.0.373229118664.issue6393@psf.upfronthosting.co.za> Message-ID: <1494581292.35.0.894183363387.issue6393@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1651 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 05:29:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 May 2017 09:29:05 +0000 Subject: [issue30338] LC_ALL=en_US + io.open() => LookupError: (osx) In-Reply-To: <1494454938.72.0.336460677547.issue30338@psf.upfronthosting.co.za> Message-ID: <1494581345.53.0.980289217857.issue30338@psf.upfronthosting.co.za> STINNER Victor added the comment: I created a PR to backport bpo-6393 to Python 2.7: https://github.com/python/cpython/pull/1555 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 05:31:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 May 2017 09:31:10 +0000 Subject: [issue30342] [2.7] sysconfig.is_python_build() doesn't work if Python is built with VS 2008 In-Reply-To: <1494496862.21.0.272757843043.issue30342@psf.upfronthosting.co.za> Message-ID: <1494581470.27.0.761969921225.issue30342@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset f2e894cfd9b6f5d6aacc276476262d481203030c by Victor Stinner in branch '2.7': bpo-30342: Fix sysconfig.is_python_build() on VS9.0 (#1544) https://github.com/python/cpython/commit/f2e894cfd9b6f5d6aacc276476262d481203030c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 05:32:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 May 2017 09:32:48 +0000 Subject: [issue30350] devguide suggests to use VS 2008 to build Python 2.7, but VS 2008 is no more supported? Message-ID: <1494581567.83.0.310363881682.issue30350@psf.upfronthosting.co.za> New submission from STINNER Victor: Steve Dower wrote this comment on my PR https://github.com/python/cpython/pull/1544 : "Ah, I see. This is fine then - I have very little interest in doing much work to support the old build files (as they are explicitly unsupported)." Copy of my reply: "I have very little interest in doing much work to support the old build files (as they are explicitly unsupported)." Wait wait wait... I fail to follow progress on the Windows build system, so I rely on the devguide which I expect to be up to date, and the guide says: https://docs.python.org/devguide/setup.html#windows-compiling "Python 2.7 uses Microsoft Visual Studio 2008, which is most easily obtained through an MSDN subscription." I have a MSDN account, but after 30 min, I failed to get my MSDN number and I don't know my subscription is still valid or not (well, I guess that, it's expired). It took me 1 hour to find an old ISO of Visual Studio 2008, and not from microsoft.com :-( I didn't want to install VS 2008, but I just followed the devguide. ... Do you mean that VS 2010 must now be used and the devguide is just outdated? Moreover: we do have a buildbot using VS 2008. I'm now trying to fix all buildbots, so I had to fix issues on this VS 2008 buildbot too: http://bugs.python.org/issue30313 But I guess that it's ok to have a buildbot on a system not officially fully supported. ---------- assignee: docs at python components: Build, Documentation, Windows messages: 293536 nosy: docs at python, haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: devguide suggests to use VS 2008 to build Python 2.7, but VS 2008 is no more supported? versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 05:51:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 May 2017 09:51:40 +0000 Subject: [issue6393] OS X: python3 from python-3.1.dmg crashes at startup In-Reply-To: <1246445517.38.0.373229118664.issue6393@psf.upfronthosting.co.za> Message-ID: <1494582700.57.0.599488701473.issue6393@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 94a3694c3dda97e3bcb51264bf47d948c5424d84 by Victor Stinner in branch '2.7': bpo-6393: Fix locale.getprerredencoding() on macOS (#1555) https://github.com/python/cpython/commit/94a3694c3dda97e3bcb51264bf47d948c5424d84 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 05:53:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 May 2017 09:53:58 +0000 Subject: [issue30338] LC_ALL=en_US + io.open() => LookupError: (osx) In-Reply-To: <1494454938.72.0.336460677547.issue30338@psf.upfronthosting.co.za> Message-ID: <1494582838.79.0.202406522934.issue30338@psf.upfronthosting.co.za> STINNER Victor added the comment: > Note that _pyio uses locale.getpreferedencoding(), not locale.getpreferredencoding(False). Oh, it's a difference between Python 2.7 and Python 3. Python 3 calls setlocale(LC_CTYPE, "") at startup, so locale.getpreferredencoding(False) can be used in Python 3. Python 2.7 requires to call locale.getpreferredencoding() to get the encoding of the *user* locale. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 05:55:31 2017 From: report at bugs.python.org (Klamann) Date: Fri, 12 May 2017 09:55:31 +0000 Subject: [issue30323] concurrent.futures.Executor.map() consumes all memory when big generators are used In-Reply-To: <1494365822.25.0.431593996842.issue30323@psf.upfronthosting.co.za> Message-ID: <1494582931.29.0.123591829804.issue30323@psf.upfronthosting.co.za> Klamann added the comment: Yes, I was wrong in my assumption that simply replacing the list comprehension with a generator expression would fix the issue. Nevertheless, there is no need to load the *entire* generator into memory by converting it to a list. All we have to read are the first n elements, where n is the number of workers that are currently available. I've implemented an alternative solution that works for me, using wait() and notify() from threading.Condition, but I'm not quite sure if this would be the best solution for everyone. But I could post it here, if you're intrested. We should also consider that not strictly evaluating every iterable that is passed to the map() function might break existing code that implicitly relies on that fact that this is happening (although this is not a documented feature of the map function and was probably not the intended behaviour in the first place). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 06:12:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 May 2017 10:12:16 +0000 Subject: [issue30338] LC_ALL=en_US + io.open() => LookupError: (osx) In-Reply-To: <1494454938.72.0.336460677547.issue30338@psf.upfronthosting.co.za> Message-ID: <1494583936.61.0.0487774588566.issue30338@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks for your bug report Anthony Sottile! It's now fixed! My backport was merged. New changeset 94a3694c3dda97e3bcb51264bf47d948c5424d84 by Victor Stinner in branch '2.7': bpo-6393: Fix locale.getprerredencoding() on macOS (#1555) https://github.com/python/cpython/commit/94a3694c3dda97e3bcb51264bf47d948c5424d84 Before, without the fix: macbook:2.7 haypo$ LANG=en_US ./python.exe -c 'import io; print(io.open("setup.py").encoding)' Traceback (most recent call last): File "", line 1, in LookupError: unknown encoding: After, with the fix: macbook:2.7 haypo$ LANG=en_US ./python.exe -c 'import io; print(io.open("setup.py").encoding)' UTF-8 -- Python 3.7 is not affected: macbook:master haypo$ LANG=en_US ./python.exe -c 'import locale; print(locale.getpreferredencoding())' UTF-8 macbook:master haypo$ LANG=en_US ./python.exe -c 'import io; print(io.open("setup.py").encoding)' UTF-8 ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 06:13:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 May 2017 10:13:47 +0000 Subject: [issue30338] LC_ALL=en_US + io.open() => LookupError: (osx) In-Reply-To: <1494454938.72.0.336460677547.issue30338@psf.upfronthosting.co.za> Message-ID: <1494584027.75.0.992188286834.issue30338@psf.upfronthosting.co.za> STINNER Victor added the comment: The best "workaround" on Python 2.7 is to specify the encoding: replace io.open(filename) with io.open(filename, encoding="utf8"). It's always better to specify the encoding ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 06:30:41 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 12 May 2017 10:30:41 +0000 Subject: [issue30003] Remove hz codec In-Reply-To: <1491450137.17.0.519356226961.issue30003@psf.upfronthosting.co.za> Message-ID: <1494585041.52.0.0249639099601.issue30003@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1652 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 06:32:31 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 12 May 2017 10:32:31 +0000 Subject: [issue30003] Fix handling escape characters in HZ codec In-Reply-To: <1491450137.17.0.519356226961.issue30003@psf.upfronthosting.co.za> Message-ID: <1494585151.95.0.256501773697.issue30003@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- stage: -> patch review title: Remove hz codec -> Fix handling escape characters in HZ codec versions: +Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 07:22:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 May 2017 11:22:55 +0000 Subject: [issue30344] test_multiprocessing.test_notify_all(): AssertionError: 6 != 5 on x86 Windows XP 2.7 In-Reply-To: <1494513407.28.0.645892004666.issue30344@psf.upfronthosting.co.za> Message-ID: <1494588175.04.0.300576191979.issue30344@psf.upfronthosting.co.za> STINNER Victor added the comment: Also failed on: http://buildbot.python.org/all/builders/x86%20Windows%20XP%20VS9.0%202.7/builds/147/steps/test/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 07:29:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 May 2017 11:29:20 +0000 Subject: [issue30351] regrtest hangs on x86 Windows XP 2.7 Message-ID: <1494588560.82.0.408106199182.issue30351@psf.upfronthosting.co.za> New submission from STINNER Victor: The tests step was killed after a total of 55 min 54 sec, whereas it only took 38 min 40 sec on the previous build 150. regrtest was supposed to log "running: test_threading (xxx sec)" every 30 seconds, but it didn't!? I don't know if the main regrtest process was stuck, or the child process running test_threading was stuck? Or both? http://buildbot.python.org/all/builders/x86%20Windows%20XP%202.7/builds/151/steps/test/logs/stdio test_pty skipped -- No module named fcntl 0:35:45 [400/402] test_pep352 passed -- running: test_threading (448 sec) 0:35:47 [401/402] test_timeit passed -- running: test_threading (450 sec) command timed out: 1200 seconds without output running ['Tools\\buildbot\\test.bat', '-j2'], attempting to kill program finished with exit code 1 elapsedTime=3354.584000 ---------- messages: 293543 nosy: haypo priority: normal severity: normal status: open title: regrtest hangs on x86 Windows XP 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 07:33:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 May 2017 11:33:16 +0000 Subject: [issue30219] webbrowser.open outputs xdg-open deprecation warning In-Reply-To: <1494528157.05.0.621958052001.issue30219@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: 2017-05-11 20:42 GMT+02:00 desbma : > Of course, because gvfs-open is precisely the cause of the deprecation warning I don't understand something. Why do you consider that it's a Python bug, whereas xdg-open redirects to the deprecated gvfs-open tool? Why not reporting the bug to xdg-open? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 07:33:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 May 2017 11:33:40 +0000 Subject: [issue30342] [2.7] sysconfig.is_python_build() doesn't work if Python is built with VS 2008 In-Reply-To: <1494496862.21.0.272757843043.issue30342@psf.upfronthosting.co.za> Message-ID: <1494588820.31.0.397434202009.issue30342@psf.upfronthosting.co.za> STINNER Victor added the comment: I tested manually my change: it fixes the issue ;-) ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 07:55:09 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 May 2017 11:55:09 +0000 Subject: [issue30219] webbrowser.open outputs xdg-open deprecation warning In-Reply-To: <1493642057.46.0.399695458413.issue30219@psf.upfronthosting.co.za> Message-ID: <1494590109.17.0.0982948658198.issue30219@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This bug already is fixed in develop branch of xdg-open. But the version including that fix still is not released. There may be years until it be released and main distributives update xdg-open. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 08:18:04 2017 From: report at bugs.python.org (Edouard KLEIN) Date: Fri, 12 May 2017 12:18:04 +0000 Subject: [issue30352] The 'in' syntax should work with any object that implements __iter__ Message-ID: <1494591484.03.0.0293719381129.issue30352@psf.upfronthosting.co.za> New submission from Edouard KLEIN: In this StackOverflow question: http://stackoverflow.com/questions/43935187/how-come-an-object-that-implements-iter-is-not-recognized-as-iterable/43935360#43935360 the question of why an object that implements __iter__ through __getattr__ does not work with the "in" syntax is raised. The accepted answer is that the interpreter checks for __iter__ instead of just calling it. If that's the case, I think that: - Either the behaviour of the interpreter should be changed to accept any object that implements __iter__, regardless of how, - Or, if there is a technical reason why the interpreter can't change its behavior, the documentation https://docs.python.org/3/library/stdtypes.html#iterator-types should make it clear that __iter__ must be hard coded into the object. Here is the code of the object that arguably should be iterable but is not: class IterOrNotIter: def __init__(self): self.f = open('/tmp/toto.txt') def __getattr__(self, item): try: return self.__getattribute__(item) except AttributeError: return self.f.__getattribute__(item) IterOrNotIter().__iter__().__next__() # Works 'a' in IterOrNotIter() # Raises a TypeError ---------- components: Interpreter Core messages: 293547 nosy: Edouard KLEIN priority: normal severity: normal status: open title: The 'in' syntax should work with any object that implements __iter__ type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 09:29:36 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 12 May 2017 13:29:36 +0000 Subject: [issue30352] The 'in' syntax should work with any object that implements __iter__ In-Reply-To: <1494591484.03.0.0293719381129.issue30352@psf.upfronthosting.co.za> Message-ID: <1494595776.54.0.322509551547.issue30352@psf.upfronthosting.co.za> Steven D'Aprano added the comment: This is not a small change, and will need careful thought. The problem is that in Python 3 (and in Python 2 for new-style classes), dunder methods are only called by the interpreter if they are defined on the class itself, not on the instance. That's an optimization, and it does mean that (for example) automatic delegation doesn't work with dunder methods. But if we change this, we should change it for *all* dunder methods, not just __iter__. It would be a problem if we start "fixing" dunders piecemeal, one at a time. Either they should all work (like with classic classes) or none of them should. So this is potentially a big change. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 09:41:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 May 2017 13:41:26 +0000 Subject: [issue30347] itertools.groupby() can fail a C assert() In-Reply-To: <1494537021.49.0.31945650773.issue30347@psf.upfronthosting.co.za> Message-ID: <1494596486.93.0.29176717635.issue30347@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1653 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 09:46:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 May 2017 13:46:47 +0000 Subject: [issue30347] itertools.groupby() can fail a C assert() In-Reply-To: <1494537021.49.0.31945650773.issue30347@psf.upfronthosting.co.za> Message-ID: <1494596807.38.0.435020143586.issue30347@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 1557 implements the simplest fix -- remove the assert and use Py_XSETREF() instead of simple assignment. Since the resulting code in _grouper_next() is identical to the code in groupby_next(), it was shared between these two functions. ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 09:59:57 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 12 May 2017 13:59:57 +0000 Subject: [issue30352] The 'in' syntax should work with any object that implements __iter__ In-Reply-To: <1494591484.03.0.0293719381129.issue30352@psf.upfronthosting.co.za> Message-ID: <1494597597.52.0.378724888464.issue30352@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +rhettinger, xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 10:29:32 2017 From: report at bugs.python.org (Jeremy Kloth) Date: Fri, 12 May 2017 14:29:32 +0000 Subject: [issue30350] devguide suggests to use VS 2008 to build Python 2.7, but VS 2008 is no more supported? In-Reply-To: <1494581567.83.0.310363881682.issue30350@psf.upfronthosting.co.za> Message-ID: <1494599372.47.0.387644262444.issue30350@psf.upfronthosting.co.za> Jeremy Kloth added the comment: A few things... First to Victor's comments on the devguide. The following sentence after the one quoted states: "To use the build files in the PCbuild directory you will also need Visual Studio 2010" In short, you need *both* VS2008 and VS2010 to compile the "default" way. Secondly, to Steve's comment on the PC\VS9.0 build files. Normally Steve would be correct in stating that the PC\VS* directories are not maintained, however, in this case they are supported. It is explicitly stated as such in the devguide and PCbuild\readme.txt (https://github.com/python/cpython/blob/2.7/PCbuild/readme.txt). ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 10:39:13 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 12 May 2017 14:39:13 +0000 Subject: [issue30352] The 'in' syntax should work with any object that implements __iter__ In-Reply-To: <1494591484.03.0.0293719381129.issue30352@psf.upfronthosting.co.za> Message-ID: <1494599953.5.0.613299899169.issue30352@psf.upfronthosting.co.za> Steven D'Aprano added the comment: A further thought... looking at your example code, I believe that part of the __getattr__ is redundant. def __getattr__(self, item): try: return self.__getattribute__(item) except AttributeError: return self.f.__getattribute__(item) __getattr__ is only called if normal attribute lookup has already failed, so the call to self.__getattribute__ is unnecessary. If it would have succeeded, it would have already succeeded and __getattr__ won't have been called at all. For more discussion on how to do automatic delegation, you should look at Alex Martelli's recipe from the Python Cookbook: https://code.activestate.com/recipes/52295-automatic-delegation-as-an-alternative-to-inherita/ Also, its a bit... funny... to call dunder methods directly. (I'm deliberately not using the word "wrong".) They are implementation, not interface. I think your __getattr__ should be: def __getattr__(self, name): return getattr(self.f, name) It also looks nicer :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 11:44:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 May 2017 15:44:17 +0000 Subject: [issue30346] Odd behavior when unpacking `itertools.groupby` In-Reply-To: <1494523981.5.0.726129882006.issue30346@psf.upfronthosting.co.za> Message-ID: <1494603857.02.0.54060237817.issue30346@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a Python implementation of the idea #2: from itertools import tee def groupby(iterable, key=None): if key is None: key = lambda x: x def grouper(currvalue, it, tgtkey): yield currvalue for currvalue in it: if key(currvalue) != tgtkey: break yield currvalue it = iter(iterable) tgtkey = init = object() while True: try: currvalue = next(it) except StopIteration: return currkey = key(currvalue) if tgtkey is init or currkey != tgtkey: tgtkey = currkey it, it2 = tee(it) yield (currkey, grouper(currvalue, it2, tgtkey)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 11:50:05 2017 From: report at bugs.python.org (Christopher Harrison) Date: Fri, 12 May 2017 15:50:05 +0000 Subject: [issue30343] Subclassed json.JSONEncoder does not respect default method for supported types In-Reply-To: <1494511106.37.0.544159404801.issue30343@psf.upfronthosting.co.za> Message-ID: <1494604205.01.0.526144983958.issue30343@psf.upfronthosting.co.za> Changes by Christopher Harrison : ---------- pull_requests: +1654 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 11:50:55 2017 From: report at bugs.python.org (Christopher Harrison) Date: Fri, 12 May 2017 15:50:55 +0000 Subject: [issue30343] Subclassed json.JSONEncoder does not respect default method for supported types In-Reply-To: <1494511106.37.0.544159404801.issue30343@psf.upfronthosting.co.za> Message-ID: <1494604255.85.0.0711919634588.issue30343@psf.upfronthosting.co.za> Christopher Harrison added the comment: I have written a proof-of-concept implementation and submitted a pull request. See the PR for details: https://github.com/python/cpython/pull/1558 (My CLA is pending; submitted around 2017-05-12T10:30:00Z+0100) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 12:17:46 2017 From: report at bugs.python.org (Bernhard M. Wiedemann) Date: Fri, 12 May 2017 16:17:46 +0000 Subject: [issue30276] import hashlib makes many programs slow In-Reply-To: <1493954623.26.0.714784938457.issue30276@psf.upfronthosting.co.za> Message-ID: <1494605866.4.0.366008104616.issue30276@psf.upfronthosting.co.za> Bernhard M. Wiedemann added the comment: Tracking this in https://bugzilla.opensuse.org/show_bug.cgi?id=1038906 now. It turned out to be a problem with (our?) openssl-1.0.2 which Debian stable does not have yet and Debian/9 (stretch) has openssl-1.1.0 without this problem The nicest python-based reproducer so far is time python -S -c '' ; time python -S -c 'import _hashlib' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 12:19:48 2017 From: report at bugs.python.org (Erik Bray) Date: Fri, 12 May 2017 16:19:48 +0000 Subject: [issue30353] ctypes: pass by value for structs broken on Cygwin/MinGW 64-bit Message-ID: <1494605988.92.0.550577143248.issue30353@psf.upfronthosting.co.za> New submission from Erik Bray: The test ctypes.test.test_structures.StructureTestCase.test_pass_by_value fails on 64-bit Cygwin and MinGW using the system libffi with: ====================================================================== FAIL: test_pass_by_value (ctypes.test.test_structures.StructureTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/embray/src/python/cpython/Lib/ctypes/test/test_structures.py", line 416, in test_pass_by_value self.assertEqual(s.first, 0xdeadbeef) AssertionError: 195948557 != 3735928559 It seems that libffi does not handle passing structs by value properly on those platforms as I explained here: https://github.com/libffi/libffi/issues/305 The upstream bug hasn't been confirmed yet by the libffi developers so I could be wrong, but I think this is fairly clearly broken there. I have a PR forthcoming to work around the issue. ---------- components: ctypes messages: 293556 nosy: erik.bray priority: normal severity: normal status: open title: ctypes: pass by value for structs broken on Cygwin/MinGW 64-bit type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 12:23:52 2017 From: report at bugs.python.org (Andrew Nester) Date: Fri, 12 May 2017 16:23:52 +0000 Subject: [issue29863] Add a COMPACT constant to the json module In-Reply-To: <1490049199.07.0.61664177999.issue29863@psf.upfronthosting.co.za> Message-ID: <1494606232.07.0.929696181163.issue29863@psf.upfronthosting.co.za> Andrew Nester added the comment: any conclusion on this? looks like it's a bit stuck ---------- nosy: +andrewnester _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 12:24:44 2017 From: report at bugs.python.org (Andrew Nester) Date: Fri, 12 May 2017 16:24:44 +0000 Subject: [issue29553] Argparser does not display closing parentheses in nested mutex groups In-Reply-To: <1487084393.73.0.392893421751.issue29553@psf.upfronthosting.co.za> Message-ID: <1494606284.47.0.157698424823.issue29553@psf.upfronthosting.co.za> Andrew Nester added the comment: so any feedback on this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 12:26:00 2017 From: report at bugs.python.org (Andrew Nester) Date: Fri, 12 May 2017 16:26:00 +0000 Subject: [issue29573] NamedTemporaryFile with delete=True should not fail if file already deleted In-Reply-To: <1487193679.14.0.35599130933.issue29573@psf.upfronthosting.co.za> Message-ID: <1494606360.68.0.188753907053.issue29573@psf.upfronthosting.co.za> Andrew Nester added the comment: any conclusion on this? looks like it's a bit stuck ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 12:27:46 2017 From: report at bugs.python.org (Erik Bray) Date: Fri, 12 May 2017 16:27:46 +0000 Subject: [issue30353] ctypes: pass by value for structs broken on Cygwin/MinGW 64-bit In-Reply-To: <1494605988.92.0.550577143248.issue30353@psf.upfronthosting.co.za> Message-ID: <1494606466.26.0.701552710322.issue30353@psf.upfronthosting.co.za> Changes by Erik Bray : ---------- pull_requests: +1656 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 12:40:59 2017 From: report at bugs.python.org (Zachary Ware) Date: Fri, 12 May 2017 16:40:59 +0000 Subject: [issue30350] devguide suggests to use VS 2008 to build Python 2.7, but VS 2008 is no more supported? In-Reply-To: <1494581567.83.0.310363881682.issue30350@psf.upfronthosting.co.za> Message-ID: <1494607259.59.0.559879119499.issue30350@psf.upfronthosting.co.za> Zachary Ware added the comment: Jeremy is correct. To further clarify, *all* 2.7 Windows builders *are* using VS 2008's compiler toolchain, but they're using VS 2015's MSBuild with VS 2010's description of 2008's compiler toolchain to build the projects described in PCbuild/. It's a mess, but it works and makes things much easier to customize. The two specific VS9.0 builders are using VS 2008 directly via the PC/VS9.0 build files, but ideally the output from both methods should be exactly the same. As Jeremy pointed out, the PC/VS9.0 files are still explicitly supported, and those two builders were set up to make sure they're not broken. Anything older than PC/VS9.0 is explicitly *un*supported, and I would have no problem with just removing them (and any support for them in sysconfig). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 13:23:04 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 12 May 2017 17:23:04 +0000 Subject: [issue30181] Correct the parsing of a test case docstring. In-Reply-To: <1493261074.73.0.807341942876.issue30181@psf.upfronthosting.co.za> Message-ID: <1494609784.49.0.771898152486.issue30181@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, yes, that's a bug in our workflow we'll need to fix. The CLA signed on the bug tracker is the ultimate authority, so we need some way to manually bypass the bot for cases like this. A committer should be able to bypass the problem and get the patch pushed, once it is approved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 13:28:10 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 12 May 2017 17:28:10 +0000 Subject: [issue29573] NamedTemporaryFile with delete=True should not fail if file already deleted In-Reply-To: <1487193679.14.0.35599130933.issue29573@psf.upfronthosting.co.za> Message-ID: <1494610090.84.0.781118821282.issue29573@psf.upfronthosting.co.za> R. David Murray added the comment: I think we are leaning strongly toward making no change here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 14:42:55 2017 From: report at bugs.python.org (Grzegorz Grzywacz) Date: Fri, 12 May 2017 18:42:55 +0000 Subject: [issue27144] concurrent.futures.as_completed() memory inefficiency In-Reply-To: <1464441935.81.0.0559700033116.issue27144@psf.upfronthosting.co.za> Message-ID: <1494614575.04.0.744135725274.issue27144@psf.upfronthosting.co.za> Changes by Grzegorz Grzywacz : ---------- pull_requests: +1658 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 14:46:28 2017 From: report at bugs.python.org (Grzegorz Grzywacz) Date: Fri, 12 May 2017 18:46:28 +0000 Subject: [issue27144] concurrent.futures.as_completed() memory inefficiency In-Reply-To: <1464441935.81.0.0559700033116.issue27144@psf.upfronthosting.co.za> Message-ID: <1494614788.39.0.583532177319.issue27144@psf.upfronthosting.co.za> Grzegorz Grzywacz added the comment: > We just ran into the exact same issue here in Google using a ThreadPoolExecutor.map call Looks like map got simillar issue. I created GitHub PR with map fixed. > Concurrent package was added in 3.2. How backport it 2.7? There is official, unofficial 2.7 backport. Git: https://github.com/agronholm/pythonfutures Pip: futures Ubuntu package: python-concurrent.futures ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 15:27:16 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 May 2017 19:27:16 +0000 Subject: [issue29863] Add a COMPACT constant to the json module In-Reply-To: <1490049199.07.0.61664177999.issue29863@psf.upfronthosting.co.za> Message-ID: <1494617236.63.0.193866422456.issue29863@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Having mulled this over for a while, I'm disinclined to go forward with this proposal. On the one hand, it is a relatively small change, so it doesn't affect the overall complexity much. However, API design principles suggest that this isn't the right thing to do. Good APIs tend to steer users towards correct design. I'm concerned that adding a COMPACT constant will suggest to users that compacting separators in the output is something they should be doing. Instead, it is a distracting micro-optimization that rarely saves much space but comes at a cost of readability (it is no fun to have to read JSON without spaces). For other kinds of code generation, minification is normally a post-processing step rather than something incorporated into the generator itself. When we care about the size of JSON, we really want people to use compression rather than feebly editing-out a few spaces. The main reason to have the *separators* argument is to factor-out hardwired behavior. It wasn't really about binary choices: normal-vs-thin, readable-vs-smushed. Lastly, I don't really like having two-ways-to-do-it. We already have something that works, so should have we should have a preference for documenting what we have rather than leaning towards continuous slow sprawl with new options that aren't backwards compatible (creating yet another cross-version maintenance issue). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 15:38:26 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 May 2017 19:38:26 +0000 Subject: [issue30346] Odd behavior when unpacking `itertools.groupby` In-Reply-To: <1494523981.5.0.726129882006.issue30346@psf.upfronthosting.co.za> Message-ID: <1494617906.53.0.122482854803.issue30346@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I have no interest in #2. Itertools are all about *not* storing data in memory unless that is an intrinsic requirement for the operation (tee() and cycle() for example). Also, I would like any changes to be minimal and have the lowest possible risk of breaking code. The groupby() tool is about 13 years old and has served its users well. These little corner cases we're working on now don't seem to correspond to how users actually use groupby or how it was intended to be used (either eat the sub-iterator right away before advancing the outer iterator or ignore it entirely). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 15:40:13 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 12 May 2017 19:40:13 +0000 Subject: [issue30354] Change data model documentation to zero-argument super() Message-ID: <1494618013.81.0.516656587156.issue30354@psf.upfronthosting.co.za> New submission from Cheryl Sabella: Update data model documentaion to reflect the zero-argument form of super(). ---------- assignee: docs at python components: Documentation messages: 293566 nosy: csabella, docs at python priority: normal severity: normal status: open title: Change data model documentation to zero-argument super() type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 15:43:53 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 12 May 2017 19:43:53 +0000 Subject: [issue30354] Change data model documentation to zero-argument super() In-Reply-To: <1494618013.81.0.516656587156.issue30354@psf.upfronthosting.co.za> Message-ID: <1494618233.56.0.0292156981685.issue30354@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +1659 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 15:45:31 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 May 2017 19:45:31 +0000 Subject: [issue29863] Add a COMPACT constant to the json module In-Reply-To: <1490049199.07.0.61664177999.issue29863@psf.upfronthosting.co.za> Message-ID: <1494618331.25.0.535028134899.issue29863@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Note also that using separators=COMPACT doesn't guarantee the most compact output. As Inada mentioned ensure_ascii=False may make JSON more compact. And you shouldn't use non-default indent! I don't understand effort spent for this issue. Even if add json.COMPACT you could use it only with 3.7+. And adding a named constant in your program is just one line! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 16:01:59 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 May 2017 20:01:59 +0000 Subject: [issue30346] Odd behavior when unpacking `itertools.groupby` In-Reply-To: <1494523981.5.0.726129882006.issue30346@psf.upfronthosting.co.za> Message-ID: <1494619319.22.0.715065524607.issue30346@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I agree and prefer #1. This will save users from incorrect using and us from reports about odd behavior. The implementation is simple. The groupby object generates an unique identifier when creates a new grouper. This may be a sequential integer, just object(), or the grouper object itself (but the latter case creates a reference loop). The grouper object saves the parent's identifier when created and compare the owned reference with the current parent's identifier before every use (in __next__ and __reduce__). If they don't match, the grouper object is not valid. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 16:31:16 2017 From: report at bugs.python.org (desbma) Date: Fri, 12 May 2017 20:31:16 +0000 Subject: [issue30219] webbrowser.open outputs xdg-open deprecation warning In-Reply-To: <1493642057.46.0.399695458413.issue30219@psf.upfronthosting.co.za> Message-ID: <1494621076.11.0.551006614319.issue30219@psf.upfronthosting.co.za> desbma added the comment: The only issue with Python itself is that the output of a subprocess call hidden behind a high level abstraction is thrown into the user's face in an unexpected way. This just does not seem to be the right thing to do to me. The deprecation warning of xdg-open/gvfs-open is just a particular example that shows this problem. The "what if the output is actually useful?" argument does not hold IMHO, because the all the other browser invocations in the webbrowser module (except the TTY browsers of course) are properly silenced. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 16:48:23 2017 From: report at bugs.python.org (Chet Nichols III) Date: Fri, 12 May 2017 20:48:23 +0000 Subject: [issue18233] SSLSocket.getpeercertchain() In-Reply-To: <1371415195.44.0.636993698614.issue18233@psf.upfronthosting.co.za> Message-ID: <1494622103.51.0.595702988156.issue18233@psf.upfronthosting.co.za> Chet Nichols III added the comment: Is this dead at this point? Just stumbled upon it, and I'm hopeful that maybe there's still a chance, since it's still `open`. :) ---------- nosy: +chet _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 16:55:32 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 May 2017 20:55:32 +0000 Subject: [issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib In-Reply-To: <1494162484.35.0.941296488498.issue30296@psf.upfronthosting.co.za> Message-ID: <1494622532.34.0.5529155145.issue30296@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As I said on review, I want idlelib changes either not made or in a separate patch that can be backported as is. Partial backport/cherry-picks are a major nuisance. I don't know if anything else should be treated similarly. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 17:01:20 2017 From: report at bugs.python.org (Zachary Ware) Date: Fri, 12 May 2017 21:01:20 +0000 Subject: [issue11681] -b option undocumented In-Reply-To: <1301100825.87.0.69977993755.issue11681@psf.upfronthosting.co.za> Message-ID: <1494622880.58.0.579757904475.issue11681@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- pull_requests: +1660 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 17:20:48 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 May 2017 21:20:48 +0000 Subject: [issue30310] tkFont.py assumes that all font families are encoded as ascii in Python 2.7 In-Reply-To: <1494279736.5.0.821030807704.issue30310@psf.upfronthosting.co.za> Message-ID: <1494624048.17.0.246583557274.issue30310@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Marc, In the future please copy and paste such text interactions instead of posting an image. A 'crash' on Windows is when one gets the Windows' Error messagebox 'You application has stopped working.' Since the exception comes from trying to encode non-ascii unicode to bytes, I would expect the condition in the fix to be + if isinstance(v, unicode): + options.append(v.encode('utf8')) instead of the str/decode version in your patch. If v is already a string (of ascii bytes), I think it should just be appended as is. Anyway, Serhiy can decide what to do. ---------- nosy: +serhiy.storchaka, terry.reedy stage: -> patch review type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 17:26:00 2017 From: report at bugs.python.org (Yann Grisel) Date: Fri, 12 May 2017 21:26:00 +0000 Subject: [issue30355] Unicode symbols crash lib2to3.parse Message-ID: <1494624360.33.0.637905256361.issue30355@psf.upfronthosting.co.za> New submission from Yann Grisel: The code formatter YAPF relies on lib2to3 to parse the code before formatting it. The function "classify" from "lib2to3/pgen2/parse.py" returns a ParseError when encountering unicode variable names (like ?), which it should not. ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 293573 nosy: Yann Grisel priority: normal severity: normal status: open title: Unicode symbols crash lib2to3.parse versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 17:29:53 2017 From: report at bugs.python.org (Matthew Gilson) Date: Fri, 12 May 2017 21:29:53 +0000 Subject: [issue30346] Odd behavior when unpacking `itertools.groupby` In-Reply-To: <1494523981.5.0.726129882006.issue30346@psf.upfronthosting.co.za> Message-ID: <1494624593.76.0.348397452814.issue30346@psf.upfronthosting.co.za> Matthew Gilson added the comment: Tracking which group the grouper _should_ be on using an incrementing integer seems to work pretty well. In additional to the tests in `test_itertools.py`, I've gotten the following tests to pass: class TestGroupBy(unittest.TestCase): def test_unpacking(self): iterable = 'AAAAABBBBB' (_, a), (_, b) = groupby(iterable) self.assertEqual(list(a), []) self.assertEqual(list(b), []) def test_weird_iterating(self): g = groupby('AAAABBBBAAAAABBBBB') _, a = next(g) _, b = next(g) _, aa = next(g) self.assertEqual(list(a), []) self.assertEqual(list(b), []) self.assertEqual(list(aa), list('AAAAA')) If I was to submit this as a PR, 1. where would I want to add these tests? 2. should I update the documentation for the "equivalent" python version to match exactly? ---------- keywords: +patch Added file: http://bugs.python.org/file46860/groupby-fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 17:39:51 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 May 2017 21:39:51 +0000 Subject: [issue30312] Small correction in set code sample In-Reply-To: <1494319647.07.0.625979333092.issue30312@psf.upfronthosting.co.za> Message-ID: <1494625191.34.0.455758132387.issue30312@psf.upfronthosting.co.za> Terry J. Reedy added the comment: English 'or' remains ambiguous, and often exclusive, even without 'either'. Hence jokes like Parent: "Cake or pie?" Smart kid: "Both!" I agree with replacing 'either' with 'or both'. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 17:41:31 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 May 2017 21:41:31 +0000 Subject: [issue30352] The 'in' syntax should work with any object that implements __iter__ In-Reply-To: <1494591484.03.0.0293719381129.issue30352@psf.upfronthosting.co.za> Message-ID: <1494625291.98.0.247803176173.issue30352@psf.upfronthosting.co.za> Raymond Hettinger added the comment: -1 on this proposal. We haven't really seen a need for this in practice. And such as change would be likely create unforeseen consequences to existing code. The proposal is at odds with the existing design. Python internals work by checking for whether a given slot is filled-out. Trying to make these lookups transparent to __getattr__ calls would be tricky at best (we can't know what __getattr__ does without calling it) and definitely not fast. Even if it could be done easily, I would still prefer the current design which requires explicit delegation of magic methods by proxy objects. FWIW, me made the same decision for super() objects ( https://docs.python.org/3/library/functions.html#super ): """ Note that super() is implemented as part of the binding process for explicit dotted attribute lookups such as super().__getitem__(name). It does so by implementing its own __getattribute__() method for searching classes in a predictable order that supports cooperative multiple inheritance. Accordingly, super() is undefined for implicit lookups using statements or operators such as super()[name]. """ For the reasons listed above and those listed by Steven, I'm marking this as closed/rejected. Thank you for the suggestion, but we need to decline. ---------- assignee: -> rhettinger resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 17:43:23 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 May 2017 21:43:23 +0000 Subject: [issue30312] Small correction in set code sample In-Reply-To: <1494319647.07.0.625979333092.issue30312@psf.upfronthosting.co.za> Message-ID: <1494625403.03.0.960678117179.issue30312@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 17:45:01 2017 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 May 2017 21:45:01 +0000 Subject: [issue18233] SSLSocket.getpeercertchain() In-Reply-To: <1371415195.44.0.636993698614.issue18233@psf.upfronthosting.co.za> Message-ID: <1494625501.4.0.128868968575.issue18233@psf.upfronthosting.co.za> Christian Heimes added the comment: The ticket is dead for a very good reason. Past me was not clever enough and didn't know about the difference between the cert chain sent by the peer and the actual trust chain. The peer's cert chain is not trustworthy and must *only* be used to build the actual trust chain. X.509 chain trust chain construction is a tricky business. Although I thought that peer cert chain is a useful piece of information, it is also dangerous. It's simply not trustworthy. In virtually all cases you want to know the chain of certificates that leads from a local trust anchor to the end-entity cert. In most cases it just happens to be the same (excluding root CA). But that's not reliable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 17:51:45 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 May 2017 21:51:45 +0000 Subject: [issue30346] Odd behavior when unpacking `itertools.groupby` In-Reply-To: <1494523981.5.0.726129882006.issue30346@psf.upfronthosting.co.za> Message-ID: <1494625905.57.0.228933064026.issue30346@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > If I was to submit this as a PR, ... Please don't jump to writing code yet. We need to decide what should be done first. I'm not really excited about making a change at all. No users seem to have ever been affected by this. The CPython code matches what it is documented to do (by the pure python code in the documentation). In a way, it is just an obscure implementation artifact. If we do make a small change, I would like it to be 3.7 only. No need to risk breaking existing code for something that technically isn't even a bug (because it matches the documentation). As the title suggests, it is more of an oddity than anything else. ---------- versions: +Python 3.7 -Python 3.3, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 17:56:04 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 May 2017 21:56:04 +0000 Subject: [issue30347] itertools.groupby() can fail a C assert() In-Reply-To: <1494537021.49.0.31945650773.issue30347@psf.upfronthosting.co.za> Message-ID: <1494626164.43.0.0415644086625.issue30347@psf.upfronthosting.co.za> Raymond Hettinger added the comment: At first glance, the suggested PR looks fine. Unless there is a rush, I would like to hold-off spend more time thinking about Issue 30346 before moving forward with this one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 18:07:08 2017 From: report at bugs.python.org (Dustin Oprea) Date: Fri, 12 May 2017 22:07:08 +0000 Subject: [issue18233] SSLSocket.getpeercertchain() In-Reply-To: Message-ID: Dustin Oprea added the comment: Thanks for expounding on this, Christian. Assuming your assertions are correct, this makes perfect sense. Can anyone listening close this? On May 12, 2017 17:45, "Christian Heimes" wrote: Christian Heimes added the comment: The ticket is dead for a very good reason. Past me was not clever enough and didn't know about the difference between the cert chain sent by the peer and the actual trust chain. The peer's cert chain is not trustworthy and must *only* be used to build the actual trust chain. X.509 chain trust chain construction is a tricky business. Although I thought that peer cert chain is a useful piece of information, it is also dangerous. It's simply not trustworthy. In virtually all cases you want to know the chain of certificates that leads from a local trust anchor to the end-entity cert. In most cases it just happens to be the same (excluding root CA). But that's not reliable. ---------- _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 18:11:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 May 2017 22:11:50 +0000 Subject: [issue30350] devguide suggests to use VS 2008 to build Python 2.7, but VS 2008 is no more supported? In-Reply-To: <1494607259.59.0.559879119499.issue30350@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Anyway, I fixed some issues specific to VS9.0 recently, so things should be a little bit better now :-) For me, the last annoying issue is bpo-30313: re-run failed tests in verbose mode. I will try to implement proposed solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 18:21:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 May 2017 22:21:53 +0000 Subject: [issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO In-Reply-To: <1494519392.85.0.668925519236.issue30345@psf.upfronthosting.co.za> Message-ID: <1494627713.44.0.460074940783.issue30345@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d05f7fdf6cf77724bd3064fb5a0846ef5cfe0c88 by Victor Stinner in branch '3.6': [3.6] bpo-30345: Update test_gdb.py and python-gdb.py from master (#1549) https://github.com/python/cpython/commit/d05f7fdf6cf77724bd3064fb5a0846ef5cfe0c88 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 18:21:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 May 2017 22:21:53 +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: <1494627713.64.0.892056142075.issue29259@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d05f7fdf6cf77724bd3064fb5a0846ef5cfe0c88 by Victor Stinner in branch '3.6': [3.6] bpo-30345: Update test_gdb.py and python-gdb.py from master (#1549) https://github.com/python/cpython/commit/d05f7fdf6cf77724bd3064fb5a0846ef5cfe0c88 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 18:21:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 May 2017 22:21:53 +0000 Subject: [issue29367] python-gdb: display wrapper_call() In-Reply-To: <1485336576.45.0.391174330106.issue29367@psf.upfronthosting.co.za> Message-ID: <1494627713.82.0.475084408099.issue29367@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d05f7fdf6cf77724bd3064fb5a0846ef5cfe0c88 by Victor Stinner in branch '3.6': [3.6] bpo-30345: Update test_gdb.py and python-gdb.py from master (#1549) https://github.com/python/cpython/commit/d05f7fdf6cf77724bd3064fb5a0846ef5cfe0c88 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 18:30:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 May 2017 22:30:23 +0000 Subject: [issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x Message-ID: <1494628223.7.0.0775389696939.issue30356@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/601/steps/test/logs/stdio ====================================================================== FAIL: test_mymanager_context (test.test_multiprocessing_spawn.WithManagerTestMyManager) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 2232, in test_mymanager_context self.assertEqual(manager._process.exitcode, 0) AssertionError: -15 != 0 ---------------------------------------------------------------------- Ran 277 tests in 667.577s FAILED (failures=1, skipped=24) test test_multiprocessing_spawn failed ---------- components: Tests, Windows messages: 293585 nosy: davin, haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 18:35:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 May 2017 22:35:04 +0000 Subject: [issue30357] test_thread.test_save_exception_state_on_error(): Unhandled exception in thread: AMD64 Debian root 2.7 Message-ID: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Debian%20root%202.7/builds/154/steps/test/logs/stdio 0:04:59 [312/402/1] test_thread failed Traceback (most recent call last): File "/root/buildarea/2.7.angelico-debian-amd64/build/Lib/test/test_thread.py", line 133, in task raise SyntaxError SyntaxError: None test test_thread failed -- Traceback (most recent call last): File "/root/buildarea/2.7.angelico-debian-amd64/build/Lib/test/test_thread.py", line 150, in test_save_exception_state_on_error self.assertIn("Traceback", stderr.getvalue()) AssertionError: 'Traceback' not found in 'Unhandled exception in thread started by \n' ---------- components: Tests messages: 293586 nosy: haypo priority: normal severity: normal status: open title: test_thread.test_save_exception_state_on_error(): Unhandled exception in thread: AMD64 Debian root 2.7 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 18:36:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 May 2017 22:36:30 +0000 Subject: [issue30315] test_ftplib.TestTLS_FTPClass: "[Errno 54] Connection reset by peer" on "AMD64 FreeBSD CURRENT Debug 3.x" buildbot In-Reply-To: <1494344869.6.0.553746122368.issue30315@psf.upfronthosting.co.za> Message-ID: <1494628590.56.0.959861157418.issue30315@psf.upfronthosting.co.za> STINNER Victor added the comment: Another error on AMD64 FreeBSD CURRENT Non-Debug 2.7: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%202.7/builds/92/steps/test/logs/stdio 0:04:23 [171/402/1] test_urllib2net failed test test_urllib2net failed -- Traceback (most recent call last): File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/test/test_urllib2net.py", line 166, in test_fileno res = opener.open(req) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/urllib2.py", line 429, in open response = self._open(req, data) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/urllib2.py", line 447, in _open '_open', req) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/urllib2.py", line 407, in _call_chain result = func(*args) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/urllib2.py", line 1228, in http_open return self.do_open(httplib.HTTPConnection, req) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/urllib2.py", line 1201, in do_open r = h.getresponse(buffering=True) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/httplib.py", line 1121, in getresponse response.begin() File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/httplib.py", line 438, in begin version, status, reason = self._read_status() File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/httplib.py", line 394, in _read_status line = self.fp.readline(_MAXLINE + 1) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/socket.py", line 480, in readline data = self._sock.recv(self._rbufsize) error: [Errno 54] Connection reset by peer ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 18:39:25 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 May 2017 22:39:25 +0000 Subject: [issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib In-Reply-To: <1494162484.35.0.941296488498.issue30296@psf.upfronthosting.co.za> Message-ID: <1494628765.44.0.293373185663.issue30296@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Yes, please do keep any proposed idlelib changes separate. Also, I don't any of these to be backported (it is stylistic and not about bugs). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 18:41:56 2017 From: report at bugs.python.org (Marc Culler) Date: Fri, 12 May 2017 22:41:56 +0000 Subject: [issue30310] tkFont.py assumes that all font families are encoded as ascii in Python 2.7 In-Reply-To: <1494279736.5.0.821030807704.issue30310@psf.upfronthosting.co.za> Message-ID: <1494628916.29.0.143962831956.issue30310@psf.upfronthosting.co.za> Marc Culler added the comment: The name of a Tk font family is a byte sequence obtained from the operating system. But, this being Python 2.7, there is no distinction between the str type and the bytes type. The byte sequence is definitely not ascii encoded on a Japanese Windows system. It is a utf8-encoded byte string. This is why I called v.decode('utf8') in my patch. Note that this bug does not occur with Python 3.6. Terry, I understand that text is better and I hope I never have to resort to an image again. Since I don't speak Japanese myself, even setting up a Japanese Windows VM for testing was pretty challenging for me. I was able to take a screenshot without having to translate any Japanese menus, so I took that shortcut. Sorry about that. This report was indeed triggered by a real "crash" in your sense. It occurred in a GUI application bundled with pyinstaller. Any unhandled exception in a pyinstaller app results in termination of the process and posts a Windows error message box saying 'Failed to execute script XXX'. For the report, however, I was isolating the underlying unhandled exception in Font.copy() that had caused the real crash of the GUI application. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 18:52:05 2017 From: report at bugs.python.org (Chet Nichols III) Date: Fri, 12 May 2017 22:52:05 +0000 Subject: [issue18233] SSLSocket.getpeercertchain() In-Reply-To: <1371415195.44.0.636993698614.issue18233@psf.upfronthosting.co.za> Message-ID: <1494629525.51.0.901023098796.issue18233@psf.upfronthosting.co.za> Chet Nichols III added the comment: Oh yeah, definitely not trustworthy at all. In my case, I am not processing the peer chain to actually verify trust, but I am still interested in inspecting the chain. Dangerous or not, and regardless of what almost all people should *actually* be doing, SSL_get_peer_cert_chain exists for a reason, just like SSL_get_peer_certificate exists for a reason. If Python includes a standard SSL library, it should be transparent in the interface it offers, for the mere reason that the library becomes more powerful. If the overall consensus is that the library should protect most people against common pitfalls and security mistakes, then I guess that's the route to continue on. However, I would be disappointed that we would be blacklisting the exposure of underlying library features based on the mere belief that people don't understand them enough! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 19:21:28 2017 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 May 2017 23:21:28 +0000 Subject: [issue30291] Allow windows launcher to specify bit lengths with & without minor version In-Reply-To: <1494064652.52.0.930357680293.issue30291@psf.upfronthosting.co.za> Message-ID: <1494631288.92.0.857341603364.issue30291@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 870f6a11dd3b2d5455f7057ce0d9c2cd31acc2f2 by Steve Dower (Steve (Gadget) Barnes) in branch 'master': bpo-30291 Changes to launcher so as to allow py -3-32, -2.7-64, 3.10, etc. https://github.com/python/cpython/commit/870f6a11dd3b2d5455f7057ce0d9c2cd31acc2f2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 20:58:34 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 13 May 2017 00:58:34 +0000 Subject: [issue30358] Profile documentation - include sort argument for runctx Message-ID: <1494637114.77.0.635635941945.issue30358@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- assignee: docs at python components: Documentation nosy: csabella, docs at python priority: normal severity: normal status: open title: Profile documentation - include sort argument for runctx type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 21:00:25 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 13 May 2017 01:00:25 +0000 Subject: [issue30358] Profile documentation - include sort argument for runctx Message-ID: <1494637225.77.0.408050476987.issue30358@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +1661 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 22:48:47 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Sat, 13 May 2017 02:48:47 +0000 Subject: [issue30359] A standard convention for annotating a function as returning an (async) context manager? Message-ID: <1494643727.56.0.6539898445.issue30359@psf.upfronthosting.co.za> New submission from Nathaniel Smith: sphinxcontrib-trio [1] does a few things; one of them is to enhance sphinx's autodoc support by trying to sniff out the types of functions so that it can automatically determine that something is, say, a generator, or an async classmethod. This runs into problems when it comes to context managers, for two reasons. One reason is pretty obvious: the sniffing logic would like to be able to tell by looking at a function that it should be used as a context manager, so that it can document it as such, but there's no reliable way to do this. The other reason is more subtle: the sniffing code has to walk the .__wrapped__ chain in order to detect things like async classmethods, but when it walks the chain for a @contextmanager function, it finds the underlying generator, and ends up thinking that this function should be documented as returning an iterator, which is just wrong. If we can detect context managers, we can know to ignore any Obviously this is always going to be a heuristic process; there's no 100% reliable way to tell what arbitrary wrappers are doing. But the heuristic works pretty well... it's just that right now the method of detecting context manager functions is pretty disgusting: https://github.com/python-trio/sphinxcontrib-trio/blob/2d9e65187dc7a08863b68a78bdee4fb051f0b99e/sphinxcontrib_trio/__init__.py#L80-L90 https://github.com/python-trio/sphinxcontrib-trio/blob/2d9e65187dc7a08863b68a78bdee4fb051f0b99e/sphinxcontrib_trio/__init__.py#L241-L246 So it would be really nice if contextlib.contextmanager somehow marked its functions because: - then I could (eventually) use that marker instead of making assumptions about contextmanager's internals and messing with code objects - then we could (immediately) point to how the standard library does it as a standard for other projects to follow, instead of using this weird sphinxcontrib-trio-specific __returns_contextmanager__ thing that I just made up. I don't really care what the marker is, though I suppose __returns_contextmanager__ = True is as good as anything and has the advantage of a massive installed base (2 projects). [1] http://sphinxcontrib-trio.readthedocs.io/ ---------- components: Library (Lib) messages: 293592 nosy: ncoghlan, njs, yselivanov priority: normal severity: normal status: open title: A standard convention for annotating a function as returning an (async) context manager? versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 12 23:14:18 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 13 May 2017 03:14:18 +0000 Subject: [issue30359] A standard convention for annotating a function as returning an (async) context manager? In-Reply-To: <1494643727.56.0.6539898445.issue30359@psf.upfronthosting.co.za> Message-ID: <1494645258.72.0.491453457854.issue30359@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 01:24:44 2017 From: report at bugs.python.org (Louie Lu) Date: Sat, 13 May 2017 05:24:44 +0000 Subject: [issue30113] Allow helper functions to wrap sys.setprofile In-Reply-To: <1492680992.58.0.5244415067.issue30113@psf.upfronthosting.co.za> Message-ID: <1494653084.32.0.790733427012.issue30113@psf.upfronthosting.co.za> Louie Lu added the comment: PR-1212 Add an explicit test for dispatch_return's assertion, could @benjaminp, @tiran or @giampaolo help to review this? Thanks! ---------- nosy: +benjamin.peterson, christian.heimes, giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 01:24:46 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 May 2017 05:24:46 +0000 Subject: [issue30310] tkFont.py assumes that all font families are encoded as ascii in Python 2.7 In-Reply-To: <1494279736.5.0.821030807704.issue30310@psf.upfronthosting.co.za> Message-ID: <1494653086.75.0.043621683205.issue30310@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since the source of the unicode font family is Tkinter, I think it is better not encode it in Python, but pass it as unicode and allow Tkinter to convert a unicode to a Tcl value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 01:29:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 May 2017 05:29:36 +0000 Subject: [issue30310] tkFont.py assumes that all font families are encoded as ascii in Python 2.7 In-Reply-To: <1494279736.5.0.821030807704.issue30310@psf.upfronthosting.co.za> Message-ID: <1494653376.12.0.355852369767.issue30310@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1662 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 01:36:16 2017 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 13 May 2017 05:36:16 +0000 Subject: [issue30341] Add an explaining comment in _PyTrash_thread_destroy_chain() In-Reply-To: <1494496826.51.0.0986403038499.issue30341@psf.upfronthosting.co.za> Message-ID: <1494653776.94.0.494861667713.issue30341@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset a66f9c6bb134561a24374f10e8c35417d356ce14 by Xiang Zhang in branch 'master': bpo-30341: Improve _PyTrash_thread_destroy_chain() a little bit (#1545) https://github.com/python/cpython/commit/a66f9c6bb134561a24374f10e8c35417d356ce14 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 01:37:37 2017 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 13 May 2017 05:37:37 +0000 Subject: [issue30341] Add an explaining comment in _PyTrash_thread_destroy_chain() In-Reply-To: <1494496826.51.0.0986403038499.issue30341@psf.upfronthosting.co.za> Message-ID: <1494653857.14.0.852282962804.issue30341@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 01:51:03 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 13 May 2017 05:51:03 +0000 Subject: [issue30359] A standard convention for annotating a function as returning an (async) context manager? In-Reply-To: <1494643727.56.0.6539898445.issue30359@psf.upfronthosting.co.za> Message-ID: <1494654663.2.0.762500941023.issue30359@psf.upfronthosting.co.za> Nick Coghlan added the comment: Given that we have contextlib.AbstractContextManager now, perhaps it should just set "f.__annotations__['return'] = AbstractContextManager"? (assuming no other return annotation is already set) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 02:02:55 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 May 2017 06:02:55 +0000 Subject: [issue30310] tkFont.py assumes that all font families are encoded as ascii in Python 2.7 In-Reply-To: <1494279736.5.0.821030807704.issue30310@psf.upfronthosting.co.za> Message-ID: <1494655375.08.0.90281559941.issue30310@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Test needed. import Tkinter as tk import tkFont as tkf root = tk.Tk() font = tkf.Font(root, size=20, family=u"MS \u30b4\u30b7\u30c3\u30af") reproduces the failure in Marc's example. File "C:\Programs\Python27\lib\lib-tk\tkFont.py", line 74, in __init__ font = self._set(options) File "C:\Programs\Python27\lib\lib-tk\tkFont.py", line 51, in _set options.append(str(v)) UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-6: ordinal not in range(128) After patching my installed 2.7.13, the code runs without exception and font is created, with the unrecognized family replaced by Ariel. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 02:13:30 2017 From: report at bugs.python.org (Louie Lu) Date: Sat, 13 May 2017 06:13:30 +0000 Subject: [issue15786] IDLE code completion window can hang or misbehave with mouse In-Reply-To: <1346027701.33.0.908436854594.issue15786@psf.upfronthosting.co.za> Message-ID: <1494656010.88.0.475833059953.issue15786@psf.upfronthosting.co.za> Louie Lu added the comment: Terry, the latest PR fix the problem both on Linux / MacOS and Windows, please help to review and test if there is any problem on different platform, thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 02:51:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 May 2017 06:51:03 +0000 Subject: [issue30346] Odd behavior when unpacking `itertools.groupby` In-Reply-To: <1494523981.5.0.726129882006.issue30346@psf.upfronthosting.co.za> Message-ID: <1494658263.75.0.0826597988692.issue30346@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1663 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 02:51:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 May 2017 06:51:38 +0000 Subject: [issue30346] Odd behavior when unpacking `itertools.groupby` In-Reply-To: <1494523981.5.0.726129882006.issue30346@psf.upfronthosting.co.za> Message-ID: <1494658298.65.0.708674938615.issue30346@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1664 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 02:54:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 May 2017 06:54:21 +0000 Subject: [issue30346] Odd behavior when unpacking `itertools.groupby` In-Reply-To: <1494523981.5.0.726129882006.issue30346@psf.upfronthosting.co.za> Message-ID: <1494658461.08.0.597152407005.issue30346@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 1568 and PR 1569 are two subvariants of #1. PR 1568 makes an inner iterator invalid and raising RuntimeError when used. PR 1569 makes an inner iterator exhausted. ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 03:49:43 2017 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 13 May 2017 07:49:43 +0000 Subject: [issue30353] ctypes: pass by value for structs broken on Cygwin/MinGW 64-bit In-Reply-To: <1494605988.92.0.550577143248.issue30353@psf.upfronthosting.co.za> Message-ID: <1494661783.25.0.172048732428.issue30353@psf.upfronthosting.co.za> Xiang Zhang added the comment: Looks same as #29804. ---------- nosy: +vinay.sajip, xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 03:59:44 2017 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 13 May 2017 07:59:44 +0000 Subject: [issue30355] Unicode symbols crash lib2to3.parse In-Reply-To: <1494624360.33.0.637905256361.issue30355@psf.upfronthosting.co.za> Message-ID: <1494662384.13.0.317873608944.issue30355@psf.upfronthosting.co.za> Xiang Zhang added the comment: Why? Unicode identifiers are not allowed in 2.x. I don't think lib2to3 is able or responsible to parse invalid syntax source codes. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 04:31:07 2017 From: report at bugs.python.org (Sophist) Date: Sat, 13 May 2017 08:31:07 +0000 Subject: [issue16283] ctypes.util.find_library does not find all DLLs anymore In-Reply-To: <1350636778.52.0.107234052838.issue16283@psf.upfronthosting.co.za> Message-ID: <1494664267.35.0.975359314611.issue16283@psf.upfronthosting.co.za> Sophist added the comment: Finding it impossible for PIP to install discid. Tracked it down to this issue i.e. os.path.isfile('C:\Windows\system32\discid.dll') == False when the dll exists. Some other dlls in that directory result in True and some in False. I cannot see any significant difference in security permissions that might cause this - only difference is security permissions for some are inherited and some are not inherited. I get this on both Python 3.6.1 32-bit and 2.7.13 32-bit on Win 10 Pro 64-bit Anniversary Edition 1607. I use ESET Smart Security 9 as AV. ---------- nosy: +Sophist _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 04:32:10 2017 From: report at bugs.python.org (Sophist) Date: Sat, 13 May 2017 08:32:10 +0000 Subject: [issue16283] ctypes.util.find_library does not find all DLLs anymore In-Reply-To: <1350636778.52.0.107234052838.issue16283@psf.upfronthosting.co.za> Message-ID: <1494664330.98.0.134287819529.issue16283@psf.upfronthosting.co.za> Changes by Sophist : ---------- versions: +Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 04:32:34 2017 From: report at bugs.python.org (Sophist) Date: Sat, 13 May 2017 08:32:34 +0000 Subject: [issue16283] ctypes.util.find_library does not find all DLLs anymore In-Reply-To: <1350636778.52.0.107234052838.issue16283@psf.upfronthosting.co.za> Message-ID: <1494664354.87.0.77221666753.issue16283@psf.upfronthosting.co.za> Changes by Sophist : ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 04:32:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 May 2017 08:32:41 +0000 Subject: [issue29196] Remove old-deprecated plistlib features In-Reply-To: <1483807940.54.0.471253591392.issue29196@psf.upfronthosting.co.za> Message-ID: <1494664361.9.0.278042772153.issue29196@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What are your thoughts about this Ronald? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 04:34:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 May 2017 08:34:17 +0000 Subject: [issue29104] Left bracket remains in format string result when '\' preceeds it In-Reply-To: <1483012585.51.0.342717701316.issue29104@psf.upfronthosting.co.za> Message-ID: <1494664457.98.0.90055634216.issue29104@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Eric? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 04:36:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 May 2017 08:36:34 +0000 Subject: [issue28974] Make default __format__ be equivalent to __str__ In-Reply-To: <1481752330.56.0.847513688639.issue28974@psf.upfronthosting.co.za> Message-ID: <1494664594.64.0.538656764339.issue28974@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What are your thoughts about this Eric? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 05:00:18 2017 From: report at bugs.python.org (Sophist) Date: Sat, 13 May 2017 09:00:18 +0000 Subject: [issue16283] ctypes.util.find_library does not find all DLLs anymore In-Reply-To: <1350636778.52.0.107234052838.issue16283@psf.upfronthosting.co.za> Message-ID: <1494666018.07.0.947846283059.issue16283@psf.upfronthosting.co.za> Sophist added the comment: http://stackoverflow.com/questions/23125857/python-os-path-exists-cant-locate-the-file-however-the-file-indeed-exsits gave me an explanation: That when running 32-bit apps on Win 64 C:\Windows\SysWOW64 is mapped to C:\Windows\system32. Copying the missing DLL to SysWOW64 made it work. NOTE: Original report was for 64-bit on 64-bit, so this is not necessarily an explanation of the original issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 05:08:03 2017 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 13 May 2017 09:08:03 +0000 Subject: [issue28974] Make default __format__ be equivalent to __str__ In-Reply-To: <1481752330.56.0.847513688639.issue28974@psf.upfronthosting.co.za> Message-ID: <1494666483.18.0.708208814927.issue28974@psf.upfronthosting.co.za> Eric V. Smith added the comment: I'm okay with this change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 05:08:40 2017 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 13 May 2017 09:08:40 +0000 Subject: [issue29104] Left bracket remains in format string result when '\' preceeds it In-Reply-To: <1483012585.51.0.342717701316.issue29104@psf.upfronthosting.co.za> Message-ID: <1494666520.9.0.727048733696.issue29104@psf.upfronthosting.co.za> Eric V. Smith added the comment: This is on my list of things to review at PyCon, when I should finally have some free time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 05:40:54 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 May 2017 09:40:54 +0000 Subject: [issue28974] Make default __format__ be equivalent to __str__ In-Reply-To: <1481752330.56.0.847513688639.issue28974@psf.upfronthosting.co.za> Message-ID: <1494668454.97.0.641955800172.issue28974@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 7e19dbc92ec06a987eaae72f7cdfd32006aa4960 by Serhiy Storchaka in branch 'master': bpo-28974: `object.__format__(x, '')` is now equivalent to `str(x)` (#506) https://github.com/python/cpython/commit/7e19dbc92ec06a987eaae72f7cdfd32006aa4960 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 05:41:23 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 May 2017 09:41:23 +0000 Subject: [issue28974] Make default __format__ be equivalent to __str__ In-Reply-To: <1481752330.56.0.847513688639.issue28974@psf.upfronthosting.co.za> Message-ID: <1494668483.45.0.601425352185.issue28974@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 06:12:25 2017 From: report at bugs.python.org (Steve Barnes) Date: Sat, 13 May 2017 10:12:25 +0000 Subject: [issue30291] Allow windows launcher to specify bit lengths with & without minor version In-Reply-To: <1494064652.52.0.930357680293.issue30291@psf.upfronthosting.co.za> Message-ID: <1494670345.34.0.0789115905175.issue30291@psf.upfronthosting.co.za> Steve Barnes added the comment: Closing as committed in https://github.com/python/cpython/commit/870f6a11dd3b2d5455f7057ce0d9c2cd31acc2f2 ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 07:18:47 2017 From: report at bugs.python.org (Kubilay Kocak) Date: Sat, 13 May 2017 11:18:47 +0000 Subject: [issue30280] Warning -- threading._dangling was modified by test_asyncio on FreeBSD 9 and 10 In-Reply-To: <1493975315.11.0.159651594974.issue30280@psf.upfronthosting.co.za> Message-ID: <1494674327.9.0.0139038424111.issue30280@psf.upfronthosting.co.za> Changes by Kubilay Kocak : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 07:30:09 2017 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 13 May 2017 11:30:09 +0000 Subject: [issue16283] ctypes.util.find_library does not find all DLLs anymore In-Reply-To: <1350636778.52.0.107234052838.issue16283@psf.upfronthosting.co.za> Message-ID: <1494675009.2.0.826999226436.issue16283@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 07:45:44 2017 From: report at bugs.python.org (Eryk Sun) Date: Sat, 13 May 2017 11:45:44 +0000 Subject: [issue16283] ctypes.util.find_library does not find all DLLs anymore In-Reply-To: <1350636778.52.0.107234052838.issue16283@psf.upfronthosting.co.za> Message-ID: <1494675944.08.0.365234455764.issue16283@psf.upfronthosting.co.za> Changes by Eryk Sun : ---------- resolution: -> out of date stage: -> resolved status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 07:46:05 2017 From: report at bugs.python.org (Eryk Sun) Date: Sat, 13 May 2017 11:46:05 +0000 Subject: [issue16283] ctypes.util.find_library does not find all DLLs anymore In-Reply-To: <1350636778.52.0.107234052838.issue16283@psf.upfronthosting.co.za> Message-ID: <1494675965.79.0.411710548668.issue16283@psf.upfronthosting.co.za> Changes by Eryk Sun : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 09:36:42 2017 From: report at bugs.python.org (Evan Andrews) Date: Sat, 13 May 2017 13:36:42 +0000 Subject: [issue28595] shlex.shlex should not augment wordchars In-Reply-To: <1478166136.94.0.995190174918.issue28595@psf.upfronthosting.co.za> Message-ID: <1494682602.53.0.270585214681.issue28595@psf.upfronthosting.co.za> Evan Andrews added the comment: Do I need to create a pull request for this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 10:30:22 2017 From: report at bugs.python.org (Zachary Ware) Date: Sat, 13 May 2017 14:30:22 +0000 Subject: [issue11681] -b option undocumented In-Reply-To: <1301100825.87.0.69977993755.issue11681@psf.upfronthosting.co.za> Message-ID: <1494685822.88.0.84920097418.issue11681@psf.upfronthosting.co.za> Zachary Ware added the comment: New changeset f6c6d1e2304a06efdf65c60c3e1c6bbe1f192fd0 by Zachary Ware in branch '2.7': bpo-11681: Document the `-b` and `-bb` options (GH-1562) https://github.com/python/cpython/commit/f6c6d1e2304a06efdf65c60c3e1c6bbe1f192fd0 ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 10:46:56 2017 From: report at bugs.python.org (Zachary Ware) Date: Sat, 13 May 2017 14:46:56 +0000 Subject: [issue11681] -b option undocumented In-Reply-To: <1301100825.87.0.69977993755.issue11681@psf.upfronthosting.co.za> Message-ID: <1494686816.68.0.33362747235.issue11681@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks for the patch, Greg! I implemented Nick's suggestions and merged it. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 10:58:04 2017 From: report at bugs.python.org (=?utf-8?q?Niklas_Hamb=C3=BCchen?=) Date: Sat, 13 May 2017 14:58:04 +0000 Subject: [issue2936] ctypes.util.find_library() doesn't consult LD_LIBRARY_PATH In-Reply-To: <1211398520.2.0.251558881651.issue2936@psf.upfronthosting.co.za> Message-ID: <1494687484.13.0.982352601621.issue2936@psf.upfronthosting.co.za> Niklas Hamb?chen added the comment: For people who pass by, this issue has been taken on again in: https://bugs.python.org/issue9998 ---------- nosy: +nh2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 11:19:56 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Sat, 13 May 2017 15:19:56 +0000 Subject: [issue30178] Indent methods and attributes of MimeTypes class In-Reply-To: <1493226814.74.0.770717289652.issue30178@psf.upfronthosting.co.za> Message-ID: <1494688796.74.0.469231800114.issue30178@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: bump ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 12:25:07 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Sat, 13 May 2017 16:25:07 +0000 Subject: [issue29950] Rename SlotWrapperType to WrapperDescriptorType In-Reply-To: <1490913155.68.0.921075997719.issue29950@psf.upfronthosting.co.za> Message-ID: <1494692707.22.0.894297900966.issue29950@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 12:32:41 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 13 May 2017 16:32:41 +0000 Subject: [issue30178] Indent methods and attributes of MimeTypes class In-Reply-To: <1493226814.74.0.770717289652.issue30178@psf.upfronthosting.co.za> Message-ID: <1494693161.42.0.275786617166.issue30178@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: -> patch review versions: +Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 12:34:30 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 13 May 2017 16:34:30 +0000 Subject: [issue30178] Indent methods and attributes of MimeTypes class In-Reply-To: <1493226814.74.0.770717289652.issue30178@psf.upfronthosting.co.za> Message-ID: <1494693270.08.0.258940960724.issue30178@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset c71168090df435c1eb8c03005b11df764cd7ebd6 by Mariatta (Jim Fasarakis-Hilliard) in branch 'master': bpo-30178: Indent methods and attributes of MimeType class (GH-1306) https://github.com/python/cpython/commit/c71168090df435c1eb8c03005b11df764cd7ebd6 ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 12:34:57 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 13 May 2017 16:34:57 +0000 Subject: [issue30178] Indent methods and attributes of MimeTypes class In-Reply-To: <1493226814.74.0.770717289652.issue30178@psf.upfronthosting.co.za> Message-ID: <1494693297.8.0.17561688394.issue30178@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: patch review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 12:42:41 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 13 May 2017 16:42:41 +0000 Subject: [issue30178] Indent methods and attributes of MimeTypes class In-Reply-To: <1493226814.74.0.770717289652.issue30178@psf.upfronthosting.co.za> Message-ID: <1494693761.01.0.529696737677.issue30178@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +1665 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 12:45:15 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 13 May 2017 16:45:15 +0000 Subject: [issue30178] Indent methods and attributes of MimeTypes class In-Reply-To: <1493226814.74.0.770717289652.issue30178@psf.upfronthosting.co.za> Message-ID: <1494693915.98.0.0975280162021.issue30178@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +1666 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 12:49:29 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 13 May 2017 16:49:29 +0000 Subject: [issue30178] Indent methods and attributes of MimeTypes class In-Reply-To: <1493226814.74.0.770717289652.issue30178@psf.upfronthosting.co.za> Message-ID: <1494694169.12.0.973433598398.issue30178@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +1667 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 12:56:38 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 May 2017 16:56:38 +0000 Subject: [issue29196] Remove old-deprecated plistlib features In-Reply-To: <1483807940.54.0.471253591392.issue29196@psf.upfronthosting.co.za> Message-ID: <1494694598.63.0.41938473085.issue29196@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Ronald, I'm curious about why was the attribute access capability was ever deprecated. That capability seemed nice to have. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 12:58:46 2017 From: report at bugs.python.org (Aviv Palivoda) Date: Sat, 13 May 2017 16:58:46 +0000 Subject: [issue30262] Don't expose sqlite3 Cache and Statement In-Reply-To: <1493841130.42.0.625787216583.issue30262@psf.upfronthosting.co.za> Message-ID: <1494694726.66.0.525672444581.issue30262@psf.upfronthosting.co.za> Changes by Aviv Palivoda : ---------- pull_requests: +1668 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 12:59:10 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 13 May 2017 16:59:10 +0000 Subject: [issue30178] Indent methods and attributes of MimeTypes class In-Reply-To: <1493226814.74.0.770717289652.issue30178@psf.upfronthosting.co.za> Message-ID: <1494694750.18.0.824760553552.issue30178@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 600c5ad53c0112d48581c48f986ea04676a28c44 by Mariatta in branch 'master': bpo-30178: Add Jim Fasarakis-Hilliard to Misc/ACKS (GH-1572) https://github.com/python/cpython/commit/600c5ad53c0112d48581c48f986ea04676a28c44 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 13:01:30 2017 From: report at bugs.python.org (Aviv Palivoda) Date: Sat, 13 May 2017 17:01:30 +0000 Subject: [issue30262] Don't expose sqlite3 Cache and Statement In-Reply-To: <1493841130.42.0.625787216583.issue30262@psf.upfronthosting.co.za> Message-ID: <1494694890.69.0.497883781155.issue30262@psf.upfronthosting.co.za> Aviv Palivoda added the comment: I opened a separate PR for the deprecation of the Cache and Statement. > I would think you could replace those entries with calls to wrapper functions that issue the deprecation and then call the real function. I made wrapper deprecation classes that issue the deprecation. I am not sure if there is a easier way... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 13:19:40 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 May 2017 17:19:40 +0000 Subject: [issue29570] Windows Buildbot 2.7 is broken In-Reply-To: <1487177676.07.0.331471484641.issue29570@psf.upfronthosting.co.za> Message-ID: <1494695980.12.0.397287683859.issue29570@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: test_bug_1727780 failure looks related to newlines conversion. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 13:39:11 2017 From: report at bugs.python.org (Tim Peters) Date: Sat, 13 May 2017 17:39:11 +0000 Subject: [issue30346] Odd behavior when unpacking `itertools.groupby` In-Reply-To: <1494523981.5.0.726129882006.issue30346@psf.upfronthosting.co.za> Message-ID: <1494697151.24.0.625339909771.issue30346@psf.upfronthosting.co.za> Tim Peters added the comment: Users certainly have been fooled by this, although "unpacking" is a red herring. I've been burned by it, and I've seen StackOverflow puzzles related to the same thing. I think this is the heart of it: given a finite iterable I, it usually makes no semantic difference whether a program does: for thing in I: or for thing in list(I): But when `I` is obtained from `groupby()`, `thing` contains an iterator that shares state with `I` itself, so they're not at all the same. It's surprising just because it's so uncommon. "unpacking" is one special case of this. I'd like to see an attempt to invoke a sub-iterator raise an exception if the primary iterator has moved beyond it. The behavior in that case now is undefined, utterly accidental, and useful only for surprising people ;-) Nobody _intends_ to do this, unless they have no idea how `groupby()` is meant to be used. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 13:54:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 May 2017 17:54:50 +0000 Subject: [issue29196] Remove old-deprecated plistlib features In-Reply-To: <1483807940.54.0.471253591392.issue29196@psf.upfronthosting.co.za> Message-ID: <1494698090.84.0.400496022288.issue29196@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The deprecation was added in 368c0b22f8e43709afbbc3805f55ceffed127212. The comment added in 4c3d054d3d3fa693e4eff4574ab8e98772bd66cd said that Dict was kept for compatibility with Python 2.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 14:46:13 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 13 May 2017 18:46:13 +0000 Subject: [issue30178] Indent methods and attributes of MimeTypes class In-Reply-To: <1493226814.74.0.770717289652.issue30178@psf.upfronthosting.co.za> Message-ID: <1494701173.81.0.3677770811.issue30178@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Jim, are you up for preparing the backport to 2.7? I came across a conflict while doing so with cherry_picker.py, and don't have the bandwidth to resolve it for now. Otherwise, I'll look into the 2.7 backport after PyCon. Thanks :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 15:49:20 2017 From: report at bugs.python.org (Brett Cannon) Date: Sat, 13 May 2017 19:49:20 +0000 Subject: [issue29863] Add a COMPACT constant to the json module In-Reply-To: <1490049199.07.0.61664177999.issue29863@psf.upfronthosting.co.za> Message-ID: <1494704960.82.0.712490133014.issue29863@psf.upfronthosting.co.za> Brett Cannon added the comment: Obviously Bob can re-open this if he disagrees with the general sentiment against this idea, but since I doubt he will disagree I'm going to save him some effort and close this issue. Thanks to Andrew for taking the time to writing the PR and being patient while we discussed this. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 18:28:30 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 May 2017 22:28:30 +0000 Subject: [issue29196] Remove old-deprecated plistlib features In-Reply-To: <1483807940.54.0.471253591392.issue29196@psf.upfronthosting.co.za> Message-ID: <1494714510.5.0.0349554733092.issue29196@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Too bad the checkin message didn't say why the feature was deprecated. That said, if anyone cared, they would have spoken-up by now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 18:39:36 2017 From: report at bugs.python.org (David K. Hess) Date: Sat, 13 May 2017 22:39:36 +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: <1494715176.03.0.499792216014.issue4963@psf.upfronthosting.co.za> David K. Hess added the comment: Ok, I followed @r.david.murray's advice and decided to take a shot at this. First, I noticed that I couldn't reproduce the non-deterministic behavior that I reported above on the latest code (i.e. pre-3.7). After doing some research it appears this was the sequence of events: 1) Pre-3.3, hashing was stable and this wasn't a problem. 2) Hash randomization became the default in version 3.3 and this non-determinism showed up. 3) A new dict implementation was introduced in 3.6 and key orders became stable between runs and this non-determinism was gone. However, as the notes on the new dict implementation indicate, this ordering should not be relied upon. I also looked at some other issues: * 6626 - The patch here basically rewrote the module. I agreed with the last comment on that issue that it probably doesn't need that. * 24527 - Related to the .init() problems discussed here in r.david.murray's excellent analysis of the init behavior. * 1043134 - Where the preferred extension issue was addressed via a proposed new map. My approach with this patch is to address the init problem, the non-determinism and the preferred extension issue. For the init, I made two changes: 1) I added new references to the initial values of the maps so they could be retained between init() calls. I also modified MimeTypes.__init__ to refer to these. 2) I modified the init() function to check the files argument as r.david.murray suggested. If it is supplied, then the existing database is used and the files are added to it. If it is not supplied, then the module reinitializes from scratch. I'll update the documentation to reflect this if the commit passes muster. For the non-determinism and preferred extension, I changed the two extension type maps to be OrderedDicts. I then sorted the entries to the OrderedDict constructor by mime type and then placed the preferred extension as the first extension to be processed. This guarantees that it will be the extension returned for guess_type. The OrderedDict also guarantees that guess_all_extensions will always build and return the same value. The commit can be reviewed here: https://github.com/davidkhess/cpython/commit/ecabb1cb57e7e066a693653f485f2f687dcc7f6b I'll open a PR if and when this approach gets enough positive feedback. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 19:00:05 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Sat, 13 May 2017 23:00:05 +0000 Subject: [issue30323] concurrent.futures.Executor.map() consumes all memory when big generators are used In-Reply-To: <1494365822.25.0.431593996842.issue30323@psf.upfronthosting.co.za> Message-ID: <1494716405.08.0.7611045382.issue30323@psf.upfronthosting.co.za> Josh Rosenberg added the comment: This is a strict duplicate of #29842, for which I've had a PR outstanding for a couple months now. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 21:29:51 2017 From: report at bugs.python.org (David K. Hess) Date: Sun, 14 May 2017 01:29:51 +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: <1494725391.5.0.617598366983.issue4963@psf.upfronthosting.co.za> David K. Hess added the comment: Pushed more commits so here's a branch compare: https://github.com/python/cpython/compare/master...davidkhess:fix-issue-4963 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 13 22:57:06 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 May 2017 02:57:06 +0000 Subject: [issue29570] Windows Buildbot 2.7 is broken In-Reply-To: <1487177676.07.0.331471484641.issue29570@psf.upfronthosting.co.za> Message-ID: <1494730626.41.0.811287308739.issue29570@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh I forgot to cmose this old issue. It was fixed in the meanwhile. @Serhiy: if you saw a bug recently, please open a new issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 00:05:40 2017 From: report at bugs.python.org (brent saner) Date: Sun, 14 May 2017 04:05:40 +0000 Subject: [issue30360] getpass.getpass() does not except stdin from an Expect script Message-ID: <1494734740.65.0.654665602133.issue30360@psf.upfronthosting.co.za> New submission from brent saner: This is reproducible on both 2.7.13 and 3.6.1. Please refer to the attached files for demonstration. It seems that when I spawn a python script using getpass.getpass() from expect (http://expect.sourceforge.net/ - I'm using version 5.45), the input is not passed. Further, it seems interactive control is handed over to the shell- however, it doesn't actually pass anything to the python script that was spawned, forcing one to break out of the expect process itself. Obviously, the proofs attached require the expect binary to be installed. To test, simply mark "poc.exp" as executable and execute it (assuming poc.py is in the same directory. If not, you'll need to edit line 4 of poc.exp). ---------- components: Library (Lib) files: expect-getpass.poc.tar messages: 293630 nosy: brent saner priority: normal severity: normal status: open title: getpass.getpass() does not except stdin from an Expect script Added file: http://bugs.python.org/file46861/expect-getpass.poc.tar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 00:15:59 2017 From: report at bugs.python.org (brent saner) Date: Sun, 14 May 2017 04:15:59 +0000 Subject: [issue30360] getpass.getpass() does not except stdin from an Expect script In-Reply-To: <1494734740.65.0.654665602133.issue30360@psf.upfronthosting.co.za> Message-ID: <1494735359.59.0.180716526081.issue30360@psf.upfronthosting.co.za> brent saner added the comment: NOTE: the example scripts given are for py3k, obviously. these should work (or rather, "not work") for 2. of course, you'll also have to mark the poc.py as executable as well for both. ---------- Added file: http://bugs.python.org/file46862/expect-getpass2.poc.tar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 01:16:09 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 May 2017 05:16:09 +0000 Subject: [issue29570] Windows Buildbot 2.7 is broken In-Reply-To: <1487177676.07.0.331471484641.issue29570@psf.upfronthosting.co.za> Message-ID: <1494738969.84.0.872441134012.issue29570@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It doesn't look fixed. I found this issue because I got a report about buildbot failure from buildbot at python.org yesterday. http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%202.7/builds/81/steps/test/logs/stdio test_random is failed when read *.pck files. They are marked as binary in .gitattributes, but this is not enough. Seems the attribute "binary" only means that text diff is not used. For disabling newlines translations "eol=lf" should be used. ---------- resolution: fixed -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 01:32:35 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 May 2017 05:32:35 +0000 Subject: [issue30340] Optimize out non-capturing groups In-Reply-To: <1494494453.98.0.386630329077.issue30340@psf.upfronthosting.co.za> Message-ID: <1494739955.63.0.336826614955.issue30340@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 821a9d146bc04a1bc1a9807962990a1f59d692b8 by Serhiy Storchaka in branch 'master': bpo-30340: Enhanced regular expressions optimization. (#1542) https://github.com/python/cpython/commit/821a9d146bc04a1bc1a9807962990a1f59d692b8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 01:46:41 2017 From: report at bugs.python.org (Berker Peksag) Date: Sun, 14 May 2017 05:46:41 +0000 Subject: [issue29898] PYTHONLEGACYWINDOWSIOENCODING isn't implemented In-Reply-To: <1490394843.09.0.467635996133.issue29898@psf.upfronthosting.co.za> Message-ID: <1494740801.23.0.75404698708.issue29898@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- pull_requests: +1669 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 01:59:40 2017 From: report at bugs.python.org (Berker Peksag) Date: Sun, 14 May 2017 05:59:40 +0000 Subject: [issue29877] compileall hangs when accessing urandom even if number of workers is 1 In-Reply-To: <1490162236.47.0.103711647228.issue29877@psf.upfronthosting.co.za> Message-ID: <1494741580.98.0.882436144355.issue29877@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +Claudiu.Popa, brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 02:05:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 May 2017 06:05:15 +0000 Subject: [issue30299] Display the bytecode when compiled a regular expression in debug mode In-Reply-To: <1494170858.78.0.223872265764.issue30299@psf.upfronthosting.co.za> Message-ID: <1494741915.81.0.345600768991.issue30299@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 4ab6abfca4d6e444cca04821b24701cde6993f4e by Serhiy Storchaka in branch 'master': bpo-30299: Display a bytecode when compile a regex in debug mode. (#1491) https://github.com/python/cpython/commit/4ab6abfca4d6e444cca04821b24701cde6993f4e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 02:33:07 2017 From: report at bugs.python.org (Berker Peksag) Date: Sun, 14 May 2017 06:33:07 +0000 Subject: [issue29895] Distutils blows up with an incorrect pypirc, should be caught In-Reply-To: <1490365473.69.0.662081207985.issue29895@psf.upfronthosting.co.za> Message-ID: <1494743587.22.0.567006973243.issue29895@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report, Tommy. I think the configparser exception is pretty descriptive here. You had a .pypirc file like the following: [distutils] index-servers = pypi global [pypi] username:spam password:eggs You passed -r global and you got: Traceback (most recent call last): ... ConfigParser.NoSectionError: No section: 'global' Which says you don't have a section named 'global' in your .pypirc. There are three options here: a) do nothing b) catch configparser.NoSectionError and raise a distutils exception with better wording. Since we don't have DistutilsConfigError, I'm not sure which one is more appropriate here. c) ignore configparser.NoSectionError if server name cannot be found in sections in PyPIRCCommand._read_pypirc(). IMO this is the worst option. Here is a test case to demonstrate the problem described at the SO question. ---------- keywords: +patch nosy: +berker.peksag versions: +Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file46863/issue29895_test.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 02:52:15 2017 From: report at bugs.python.org (Berker Peksag) Date: Sun, 14 May 2017 06:52:15 +0000 Subject: [issue30358] Profile documentation - include sort argument for runctx Message-ID: <1494744735.45.0.395374110281.issue30358@psf.upfronthosting.co.za> New submission from Berker Peksag: For future reference, this was also reported by Chris Cummins on docs at p.o at https://mail.python.org/pipermail/docs/2017-May/031420.html ---------- nosy: +berker.peksag stage: -> patch review versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 02:54:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 May 2017 06:54:04 +0000 Subject: [issue30299] Display the bytecode when compiled a regular expression in debug mode In-Reply-To: <1494170858.78.0.223872265764.issue30299@psf.upfronthosting.co.za> Message-ID: <1494744844.29.0.850716670948.issue30299@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 02:54:30 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 May 2017 06:54:30 +0000 Subject: [issue30340] Optimize out non-capturing groups In-Reply-To: <1494494453.98.0.386630329077.issue30340@psf.upfronthosting.co.za> Message-ID: <1494744870.19.0.504199335974.issue30340@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 03:02:40 2017 From: report at bugs.python.org (Berker Peksag) Date: Sun, 14 May 2017 07:02:40 +0000 Subject: [issue30358] Profile documentation - include sort argument for runctx In-Reply-To: <1494744735.45.0.395374110281.issue30358@psf.upfronthosting.co.za> Message-ID: <1494745360.98.0.357937042128.issue30358@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 99776296230ddd8429ebad2d07854b8c27ea10ab by Berker Peksag (csabella) in branch 'master': bpo-30358: Document sort argument of profile.runctx() (GH-1566) https://github.com/python/cpython/commit/99776296230ddd8429ebad2d07854b8c27ea10ab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 03:03:08 2017 From: report at bugs.python.org (Berker Peksag) Date: Sun, 14 May 2017 07:03:08 +0000 Subject: [issue30358] Profile documentation - include sort argument for runctx In-Reply-To: <1494744735.45.0.395374110281.issue30358@psf.upfronthosting.co.za> Message-ID: <1494745388.21.0.168159195768.issue30358@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: patch review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 04:36:33 2017 From: report at bugs.python.org (Steve Barnes) Date: Sun, 14 May 2017 08:36:33 +0000 Subject: [issue28686] py.exe ignored PATH when using python3 shebang In-Reply-To: <1479110844.15.0.911795795866.issue28686@psf.upfronthosting.co.za> Message-ID: <1494750993.44.0.0616180473289.issue28686@psf.upfronthosting.co.za> Steve Barnes added the comment: If the user is operating in a virtual environment they are ring fenced and, presumably, don't wish any other versions of python to be used, (regardless of the SheBang in the files). Since we don't AFAIK have any possibility of mixed virtual environments ignoring SheBangs should meet the basic requirements of operating inside of a venv. How about a simple, but brutal approach, of if VIRTUAL_ENV is set in the current environment then always use the virtual environment python and launch with the -x option (ignore first line). This is the equivalent of using a version specifier as well as having a SheBang. This way the wrong python for the script might be executed but that is the responsibility of the person who set up the venv. ---------- nosy: +Steve Barnes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 05:08:39 2017 From: report at bugs.python.org (Mihai Borobocea) Date: Sun, 14 May 2017 09:08:39 +0000 Subject: [issue30361] Docs example: converting mixed types to floating point Message-ID: <1494752919.15.0.561616045601.issue30361@psf.upfronthosting.co.za> New submission from Mihai Borobocea: Section 3.1.1 in the Docs states: "operators with mixed type operands convert the integer operand to floating point" https://docs.python.org/3/tutorial/introduction.html But gives an example using the division operator: >>> 3 * 3.75 / 1.5 7.5 >>> 7.0 / 2 3.5 In Python 3, division always returns a float, e.g. when all operands are integers: >>> 3 * 3 / 1 9.0 >>> 7 / 2 3.5 To illustrate that "operators with mixed type operands convert the integer operand to floating point" the example should not use division. For example: >>> 3 * 3.75 - 1 10.25 >>> 7.0 + 2 9.0 ---------- assignee: docs at python components: Documentation messages: 293641 nosy: MihaiHimself, docs at python priority: normal severity: normal status: open title: Docs example: converting mixed types to floating point versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 05:13:17 2017 From: report at bugs.python.org (Steve Barnes) Date: Sun, 14 May 2017 09:13:17 +0000 Subject: [issue30362] Launcher add list and list with paths options Message-ID: <1494753197.17.0.253655325044.issue30362@psf.upfronthosting.co.za> New submission from Steve Barnes: Currently the launcher will give an error message if a matching python is not found when using the -x.y-bits notation on the command line however the user has to know which python(s) they have available. When some pythons have been installed all user and some specific user only the individual user may well not know which pythons they have available. I would like to suggest adding to the command line -l and -L options for list and Long list options. Each option would populate the installed_pythons list and then -l print the list of usable -x.y-bits options currently available. -L print the list with the paths of the executable files. In either case the launcher should terminate after printing the list. This would be useful for deciding which python(s) to test with and for producing a list to be able to deploy critical updates to all installed pythons. ---------- components: Windows messages: 293642 nosy: Steve Barnes, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Launcher add list and list with paths options type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 05:56:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 May 2017 09:56:15 +0000 Subject: [issue30357] test_thread.test_save_exception_state_on_error(): Unhandled exception in thread: AMD64 Debian root 2.7 In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1494755775.36.0.836849126518.issue30357@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I just encountered with this failure. It is random, I can reproduce it only when run test_thread repeatedly in parallel with running other tests (maybe needed high load factor). $ ./python -m test -uall -F test_thread test_thread test_thread test_thread Run tests sequentially 0:00:00 [ 1] test_thread 0:00:00 [ 2] test_thread Traceback (most recent call last): File "/home/serhiy/py/cpython2.7/Lib/test/test_thread.py", line 133, in task raise SyntaxError SyntaxError: None test test_thread failed -- Traceback (most recent call last): File "/home/serhiy/py/cpython2.7/Lib/test/test_thread.py", line 150, in test_save_exception_state_on_error self.assertIn("Traceback", stderr.getvalue()) AssertionError: 'Traceback' not found in 'Unhandled exception in thread started by \n' 1 test OK. 1 test failed: test_thread Total duration: 432 ms Tests result: FAILURE [50664 refs] ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 06:53:17 2017 From: report at bugs.python.org (=?utf-8?q?Micha=C5=82_Bultrowicz?=) Date: Sun, 14 May 2017 10:53:17 +0000 Subject: [issue26467] Add async magic method support to unittest.mock.Mock In-Reply-To: <1456872706.59.0.97059255221.issue26467@psf.upfronthosting.co.za> Message-ID: <1494759197.1.0.164809758519.issue26467@psf.upfronthosting.co.za> Micha? Bultrowicz added the comment: I guess that it's worth noting that the same problem is being talked about in an issue on the asynctest library: https://github.com/Martiusweb/asynctest/issues/29 ---------- nosy: +butla _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 08:16:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 May 2017 12:16:10 +0000 Subject: [issue30363] Backport warnings in the re module to 2.7 Message-ID: <1494764170.53.0.794863715798.issue30363@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The life of 2.7 is so long that our common practice of releasing one or two versions with warnings before removing a feature or changing the behavior in incompatible way doesn't work. People that will start porting to Python 3 in 2020 will be surprised. Proposed patch backports warnings in the re module to 2.7 in py3k mode. Some of these warnings already are converted to errors, but the most important warnings are warnings about changing semantic. '\u' and '\U' have different meaning in 3.3+ (see issue3665). re.split() with potentially empty pattern now emits FutureWarning and will change the behavior in future versions (see issue22818). Warnings about inline flags occurred not at the start of the regular expression (see issue22493 and issue30298) was not backported. Adding them requires changing the fnmatch module, non-trivially changing distutils, and likely will break third-party libraries. Warnings are emitted only when Python is ran with the -3 option, and it is easy to fix regular expressions. ---------- components: Extension Modules, Library (Lib), Regular Expressions messages: 293645 nosy: benjamin.peterson, ezio.melotti, mrabarnett, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Backport warnings in the re module to 2.7 type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 08:22:53 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 May 2017 12:22:53 +0000 Subject: [issue30363] Backport warnings in the re module to 2.7 In-Reply-To: <1494764170.53.0.794863715798.issue30363@psf.upfronthosting.co.za> Message-ID: <1494764573.27.0.497818135719.issue30363@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1670 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 09:11:22 2017 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 14 May 2017 13:11:22 +0000 Subject: [issue28595] shlex.shlex should not augment wordchars In-Reply-To: <1478166136.94.0.995190174918.issue28595@psf.upfronthosting.co.za> Message-ID: <1494767482.92.0.0804704945172.issue28595@psf.upfronthosting.co.za> Vinay Sajip added the comment: > Do I need to create a pull request for this? Yes, creating a PR is part of the current workflow since we moved to GitHub. Though that's not the reason why it's not been progressed - on my part, at least, it's due to not having had time to think through the implications of this change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 09:26:46 2017 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 14 May 2017 13:26:46 +0000 Subject: [issue28686] py.exe ignored PATH when using python3 shebang In-Reply-To: <1479110844.15.0.911795795866.issue28686@psf.upfronthosting.co.za> Message-ID: <1494768406.86.0.159507876686.issue28686@psf.upfronthosting.co.za> Vinay Sajip added the comment: > If the user is operating in a virtual environment they are ring fenced and, presumably, don't wish any other versions of python to be used I'm not sure that's true. I have a number of tools which rely on specific libraries and so I have created venvs for them. I then link the different tool executable scripts from e.g. ~/.virtualenvs/foo_env/bin to ~/bin. Each script, because its shebang references the interpreter in its venv, runs with the correct Python version and libraries available in that venv. Once set up, these scripts are treated by me as "black boxes" in the course of my normal workflow. When I happen to activate some other venv in the course of my development work, I don't want all these tool scripts to stop working because they try to use the interpreter and libraries installed in that venv, rather than the venv that they live in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 09:45:04 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 14 May 2017 13:45:04 +0000 Subject: [issue30361] Docs example: converting mixed types to floating point In-Reply-To: <1494752919.15.0.561616045601.issue30361@psf.upfronthosting.co.za> Message-ID: <1494769504.46.0.49914734975.issue30361@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- assignee: docs at python -> Mariatta nosy: +Mariatta priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 09:58:22 2017 From: report at bugs.python.org (Steve Barnes) Date: Sun, 14 May 2017 13:58:22 +0000 Subject: [issue30362] Launcher add list and list with paths options In-Reply-To: <1494753197.17.0.253655325044.issue30362@psf.upfronthosting.co.za> Message-ID: <1494770302.62.0.67954628486.issue30362@psf.upfronthosting.co.za> Changes by Steve Barnes : ---------- pull_requests: +1671 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 10:40:54 2017 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 14 May 2017 14:40:54 +0000 Subject: [issue30364] Outdated function attribute to disable address sanitizer Message-ID: <1494772854.72.0.607120887618.issue30364@psf.upfronthosting.co.za> New submission from Xiang Zhang: In obmalloc, __attribute__((no_address_safety_analysis)) is used to disable address sanitizer. But this attribute is now deprecated in both clang and GCC. Related links: https://clang.llvm.org/docs/AddressSanitizer.html#disabling-instrumentation-with-attribute-no-sanitize-address https://gcc.gnu.org/onlinedocs/gcc-4.8.1/gcc/Function-Attributes.html ---------- messages: 293648 nosy: xiang.zhang priority: normal severity: normal status: open title: Outdated function attribute to disable address sanitizer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 10:59:36 2017 From: report at bugs.python.org (Berker Peksag) Date: Sun, 14 May 2017 14:59:36 +0000 Subject: [issue30358] Profile documentation - include sort argument for runctx In-Reply-To: <1494744735.45.0.395374110281.issue30358@psf.upfronthosting.co.za> Message-ID: <1494773976.71.0.969494371203.issue30358@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- pull_requests: +1672 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 11:00:52 2017 From: report at bugs.python.org (Berker Peksag) Date: Sun, 14 May 2017 15:00:52 +0000 Subject: [issue30358] Profile documentation - include sort argument for runctx In-Reply-To: <1494744735.45.0.395374110281.issue30358@psf.upfronthosting.co.za> Message-ID: <1494774052.85.0.49262958718.issue30358@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- pull_requests: +1673 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 11:14:37 2017 From: report at bugs.python.org (brent saner) Date: Sun, 14 May 2017 15:14:37 +0000 Subject: [issue30360] getpass.getpass() does not except stdin from an Expect script In-Reply-To: <1494734740.65.0.654665602133.issue30360@psf.upfronthosting.co.za> Message-ID: <1494774877.88.0.0264965262295.issue30360@psf.upfronthosting.co.za> brent saner added the comment: i have found a workaround- it seems that if i add a "sleep 2" in the expect script before and after the getpass() entry prompt points, it works. which doesn't make sense to me, considering the getpass() prompt seems to take just as long as the other prompts to render, but who knows. i'm not sure if this is an invalid bug or not, i'd welcome ideas as to which it'd be. if invalid, feel free to close. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 11:30:50 2017 From: report at bugs.python.org (Berker Peksag) Date: Sun, 14 May 2017 15:30:50 +0000 Subject: [issue30358] Profile documentation - include sort argument for runctx In-Reply-To: <1494744735.45.0.395374110281.issue30358@psf.upfronthosting.co.za> Message-ID: <1494775850.7.0.566435308887.issue30358@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 61b6e5cf929a80bb44500fb1a212facf66d7f45c by Berker Peksag in branch '3.6': bpo-30358: Document sort argument of profile.runctx() (GH-1566) https://github.com/python/cpython/commit/61b6e5cf929a80bb44500fb1a212facf66d7f45c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 11:31:34 2017 From: report at bugs.python.org (Berker Peksag) Date: Sun, 14 May 2017 15:31:34 +0000 Subject: [issue30358] Profile documentation - include sort argument for runctx In-Reply-To: <1494744735.45.0.395374110281.issue30358@psf.upfronthosting.co.za> Message-ID: <1494775894.87.0.534305959283.issue30358@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset f3291eeb90da2ddb37efea30dfc9406983b0f681 by Berker Peksag in branch '3.5': bpo-30358: Document sort argument of profile.runctx() (GH-1566) https://github.com/python/cpython/commit/f3291eeb90da2ddb37efea30dfc9406983b0f681 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 11:31:58 2017 From: report at bugs.python.org (Berker Peksag) Date: Sun, 14 May 2017 15:31:58 +0000 Subject: [issue30358] Profile documentation - include sort argument for runctx In-Reply-To: <1494744735.45.0.395374110281.issue30358@psf.upfronthosting.co.za> Message-ID: <1494775918.66.0.25780486251.issue30358@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 11:38:54 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 May 2017 15:38:54 +0000 Subject: [issue30365] Backport warnings in ElementTree/cElementTree modules and fix bugs Message-ID: <1494776334.02.0.442424547765.issue30365@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Proposed patch add warnings in ElementTree and cElementTree modules (backports issue29204) when run Python with the -3 option and fixes several bugs in the etree package and its tests: The deprecation warning about the doctype() method was emitted when use xml.etree.ElementTree.XMLParser. Now it emitted only when use a subclass of XMLParser with defined doctype() method, as intended. In the test_bug_200708_close test an EchoTarget instance was incorrectly passed to XMLParser() as the html argument and silently ignored. Now it is passed as the target argument. Tests no longer failed when use the -m option for running only selected test methods. Checking warnings now is more specific, warnings are expected only when use deprecated features. ---------- components: Extension Modules, Library (Lib), XML messages: 293652 nosy: benjamin.peterson, eli.bendersky, scoder, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Backport warnings in ElementTree/cElementTree modules and fix bugs type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 11:44:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 May 2017 15:44:28 +0000 Subject: [issue30365] Backport warnings in ElementTree/cElementTree modules and fix bugs In-Reply-To: <1494776334.02.0.442424547765.issue30365@psf.upfronthosting.co.za> Message-ID: <1494776668.27.0.430030874075.issue30365@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1674 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 11:59:15 2017 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 14 May 2017 15:59:15 +0000 Subject: [issue30365] Backport warnings in ElementTree/cElementTree modules and fix bugs In-Reply-To: <1494776334.02.0.442424547765.issue30365@psf.upfronthosting.co.za> Message-ID: <1494777555.58.0.840491614584.issue30365@psf.upfronthosting.co.za> Stefan Behnel added the comment: Looks good to me (didn't test it). Note that getchildren() is not deprecated in lxml because it's actually the fastest way to build a list of the children. It's faster than list(element) because it avoids the Python (C-level) iteration overhead. However, that probably wouldn't be substantial enough to merit adding it if it wasn't there already. I'm ok with deprecating the method in ET. It's redundant there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 12:29:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 May 2017 16:29:33 +0000 Subject: [issue30365] Backport warnings in ElementTree/cElementTree modules and fix bugs In-Reply-To: <1494776334.02.0.442424547765.issue30365@psf.upfronthosting.co.za> Message-ID: <1494779373.84.0.057618843568.issue30365@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: getchildren() and getiterator() were deprecated in Python implementation for years (since updating to ElementTree 1.3 in Python 2.7 and 3.2). And they are documented as deprecated. Just C implementation didn't emit warnings. It may be too late to add unconditional deprecation warnings, but we can add them as Py3k warnings. I'm going to remove these deprecated methods in 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 13:06:02 2017 From: report at bugs.python.org (Paul Moore) Date: Sun, 14 May 2017 17:06:02 +0000 Subject: [issue28686] py.exe ignored PATH when using python3 shebang In-Reply-To: <1479110844.15.0.911795795866.issue28686@psf.upfronthosting.co.za> Message-ID: <1494781562.7.0.129174032746.issue28686@psf.upfronthosting.co.za> Paul Moore added the comment: > Since we don't AFAIK have any possibility of mixed virtual environments ignoring SheBangs should meet the basic requirements of operating inside of a venv. If you want a script to use the current environment, then #!/usr/bin/env python does that. There's no need for special-casing a virtual environment. In addition, the current behaviour mirrors the Unix behaviour, which is intentional (and beneficial). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 13:46:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 May 2017 17:46:42 +0000 Subject: [issue30366] Backport tests for test.support to 2.7 Message-ID: <1494784002.11.0.332998677492.issue30366@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Proposed patch backports tests for test.support to 2.7. test_support.py is an old name of test.support, so the test is renamed to test_test_support.py. The patch also backports few useful functions in test.support for which tests are written. ---------- assignee: serhiy.storchaka components: Tests messages: 293656 nosy: ezio.melotti, haypo, michael.foord, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Backport tests for test.support to 2.7 type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 13:51:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 May 2017 17:51:37 +0000 Subject: [issue30366] Backport tests for test.support to 2.7 In-Reply-To: <1494784002.11.0.332998677492.issue30366@psf.upfronthosting.co.za> Message-ID: <1494784297.9.0.146237930703.issue30366@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Also backported new functions temp_dir() and python_is_optimized(). temp_cwd() now accepts None as a name (means using tempfile.mkdtemp). check_syntax_error() now accepts arguments lineno and offset. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 13:56:05 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 May 2017 17:56:05 +0000 Subject: [issue30366] Backport tests for test.support to 2.7 In-Reply-To: <1494784002.11.0.332998677492.issue30366@psf.upfronthosting.co.za> Message-ID: <1494784565.42.0.876088880413.issue30366@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1675 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 14:26:09 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Sun, 14 May 2017 18:26:09 +0000 Subject: [issue30360] getpass.getpass() does not accept stdin from an Expect script In-Reply-To: <1494734740.65.0.654665602133.issue30360@psf.upfronthosting.co.za> Message-ID: <1494786369.8.0.665709569293.issue30360@psf.upfronthosting.co.za> Changes by Josh Rosenberg : ---------- title: getpass.getpass() does not except stdin from an Expect script -> getpass.getpass() does not accept stdin from an Expect script _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 14:53:35 2017 From: report at bugs.python.org (Zachary Ware) Date: Sun, 14 May 2017 18:53:35 +0000 Subject: [issue29570] Windows Buildbot 2.7 is broken In-Reply-To: <1487177676.07.0.331471484641.issue29570@psf.upfronthosting.co.za> Message-ID: <1494788015.89.0.15256169609.issue29570@psf.upfronthosting.co.za> Zachary Ware added the comment: Jeremy, have you recreated your checkouts since .gitattributes was committed? ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 16:49:48 2017 From: report at bugs.python.org (Zachary Ware) Date: Sun, 14 May 2017 20:49:48 +0000 Subject: [issue29763] test_site failing on AppVeyor In-Reply-To: <1489009179.7.0.320606146583.issue29763@psf.upfronthosting.co.za> Message-ID: <1494794988.37.0.580940717018.issue29763@psf.upfronthosting.co.za> Zachary Ware added the comment: New changeset d48214f22c84f3d949457c854e263074994b6fa2 by Zachary Ware in branch 'master': bpo-29763: Clean up _pth tests (GH-954) https://github.com/python/cpython/commit/d48214f22c84f3d949457c854e263074994b6fa2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 17:20:47 2017 From: report at bugs.python.org (Ulrich Petri) Date: Sun, 14 May 2017 21:20:47 +0000 Subject: [issue12782] Multiple context expressions do not support parentheses for continuation across lines In-Reply-To: <1313719817.79.0.828403712604.issue12782@psf.upfronthosting.co.za> Message-ID: <1494796847.5.0.0105603704053.issue12782@psf.upfronthosting.co.za> Ulrich Petri added the comment: So this would basically be: with ExitStack() as stack: cm1 = stack.enter_context(a_long_name.with_a_long_method()) cm2 = stack.enter_context(another_long_variable.with_a_long_method()) Seems like a very non-obvious and inelegant solution... ---------- nosy: +ulope _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 17:24:08 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 14 May 2017 21:24:08 +0000 Subject: [issue30332] Errors that aren't actually defined are purple in the IDLE In-Reply-To: <1494428440.67.0.636373927078.issue30332@psf.upfronthosting.co.za> Message-ID: <1494797048.37.0.534881566849.issue30332@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- type: -> behavior versions: +Python 3.6, Python 3.7 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 19:57:24 2017 From: report at bugs.python.org (Grzegorz Grzywacz) Date: Sun, 14 May 2017 23:57:24 +0000 Subject: [issue30357] test_thread.test_save_exception_state_on_error(): Unhandled exception in thread: AMD64 Debian root 2.7 In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1494806244.6.0.457178329736.issue30357@psf.upfronthosting.co.za> Changes by Grzegorz Grzywacz : ---------- pull_requests: +1676 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 19:57:36 2017 From: report at bugs.python.org (Grzegorz Grzywacz) Date: Sun, 14 May 2017 23:57:36 +0000 Subject: [issue30357] test_thread.test_save_exception_state_on_error(): Unhandled exception in thread: AMD64 Debian root 2.7 In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1494806256.8.0.406551178875.issue30357@psf.upfronthosting.co.za> Grzegorz Grzywacz added the comment: Problem is with test test_thread.ThreadRunningTests.test_save_exception_state_on_error when other tests leave threads runnig. test_save_exception_state_on_error relay on thread._get_count(), if this value decrease test assume thread is finished with is not always correct (other threads finish - started by different test). Fix is to make sure each test wait for all threads to finsh. ---------- nosy: +grzgrzgrz3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 20:21:52 2017 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 15 May 2017 00:21:52 +0000 Subject: [issue29570] Windows Buildbot 2.7 is broken In-Reply-To: <1487177676.07.0.331471484641.issue29570@psf.upfronthosting.co.za> Message-ID: <1494807712.78.0.541083512754.issue29570@psf.upfronthosting.co.za> Jeremy Kloth added the comment: All builders have been reset and pass, with the exception of the VS9 one which is a different problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 21:45:21 2017 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 15 May 2017 01:45:21 +0000 Subject: [issue30350] devguide suggests to use VS 2008 to build Python 2.7, but VS 2008 is no more supported? In-Reply-To: <1494581567.83.0.310363881682.issue30350@psf.upfronthosting.co.za> Message-ID: <1494812721.5.0.127645076075.issue30350@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Now that my buildbot is back online, there is one unresolved issue pertaining to using VS9.0 only for building. That is building without Perl. It was a supported feature prior to backporting the MSBuild toolchain. With recent OpenSSL releases, without Perl is no longer functional. I have a changeset that restores this ability, but would like to know if that change was intentional, or just missed due to not having any buildbots covering VS9.0-only builds. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 22:55:39 2017 From: report at bugs.python.org (Nan Zhang) Date: Mon, 15 May 2017 02:55:39 +0000 Subject: =?utf-8?q?=5Bissue30367=5D_Cannot_build_CPython3=2E6_with_module_?= =?utf-8?q?=E2=80=9Ctestcapimodule=E2=80=9D_statically?= Message-ID: <1494816939.58.0.996227470169.issue30367@psf.upfronthosting.co.za> New submission from Nan Zhang: up vote 0 down vote favorite I am trying to build CPython3.6 from GitHub statically with the Documentation below: https://wiki.python.org/moin/BuildStatically Changed *shared* to *static* And only uncommented the module "testcapimodule" in Modules/Setup file: _testcapi _testcapimodule.c # Python C API test module And ran with 'make LINKFORSHARED=" "' However I got errors that: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -I. -I./Include -DPy_BUILD_CORE -c ./Modules/_testcapimodule.c -o Modules/_testcapimodule.o ./Modules/_testcapimodule.c: In function ?test_datetime_capi?: ./Modules/_testcapimodule.c:2191:9: error: ?PyDateTimeAPI? undeclared (first use in this function) if (PyDateTimeAPI) { ^ ./Modules/_testcapimodule.c:2191:9: note: each undeclared identifier is reported only once for each function it appears in ./Modules/_testcapimodule.c:2203:5: error: ?PyDateTime_IMPORT? undeclared (first use in this function) PyDateTime_IMPORT; ^ ./Modules/_testcapimodule.c:2208:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ make: *** [Modules/_testcapimodule.o] Error 1 But when I build Cpython3.6 with *shared*, it can succeed. ---------- components: Build messages: 293664 nosy: Nan Zhang priority: normal severity: normal status: open title: Cannot build CPython3.6 with module ?testcapimodule? statically type: compile error versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 23:42:02 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 15 May 2017 03:42:02 +0000 Subject: [issue30354] Change data model documentation to zero-argument super() In-Reply-To: <1494618013.81.0.516656587156.issue30354@psf.upfronthosting.co.za> Message-ID: <1494819722.55.0.729241919753.issue30354@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 12b1c180986fc744331b8f30d3d2f49a0fdb43dd by Nick Coghlan (csabella) in branch 'master': bpo-30354: Update data model documentation for super() (GH-1561) https://github.com/python/cpython/commit/12b1c180986fc744331b8f30d3d2f49a0fdb43dd ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 23:46:50 2017 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 May 2017 03:46:50 +0000 Subject: [issue29570] Windows Buildbot 2.7 is broken In-Reply-To: <1487177676.07.0.331471484641.issue29570@psf.upfronthosting.co.za> Message-ID: <1494820010.47.0.99915585999.issue29570@psf.upfronthosting.co.za> Zachary Ware added the comment: Thank you Jeremy, we'll call this one closed now. We should open a new issue about the VS9.0 builder failure, which as you say is entirely unrelated. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 23:50:26 2017 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 May 2017 03:50:26 +0000 Subject: [issue30350] devguide suggests to use VS 2008 to build Python 2.7, but VS 2008 is no more supported? In-Reply-To: <1494581567.83.0.310363881682.issue30350@psf.upfronthosting.co.za> Message-ID: <1494820226.33.0.157756309286.issue30350@psf.upfronthosting.co.za> Zachary Ware added the comment: > I have a changeset that restores this ability, but would like to know if > that change was intentional, or just missed due to not having any buildbots > covering VS9.0-only builds. It was intentional; it was more effort than I wanted to put in to get newer OpenSSL to work with both the new build scripts and the old method, so I figured installing Perl wasn't the worst thing in the world for those who wanted to use the VS9.0 files. If your patch isn't too big or invasive, I'd be fine with applying it, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 23:53:53 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 15 May 2017 03:53:53 +0000 Subject: [issue30224] remove outdated checks in struct In-Reply-To: <1493710505.85.0.8689936336.issue30224@psf.upfronthosting.co.za> Message-ID: <1494820433.62.0.352662300749.issue30224@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 96f502856796f9310fed7161dc540201a4afc1ee by Xiang Zhang in branch 'master': bpo-30224: remove outdated checks in struct (#1374) https://github.com/python/cpython/commit/96f502856796f9310fed7161dc540201a4afc1ee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 23:54:57 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 15 May 2017 03:54:57 +0000 Subject: [issue30224] remove outdated checks in struct In-Reply-To: <1493710505.85.0.8689936336.issue30224@psf.upfronthosting.co.za> Message-ID: <1494820497.15.0.959755311468.issue30224@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 14 23:56:42 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 15 May 2017 03:56:42 +0000 Subject: [issue30110] test_asyncio reports reference leak In-Reply-To: <1492671260.02.0.938274219318.issue30110@psf.upfronthosting.co.za> Message-ID: <1494820602.62.0.869123873129.issue30110@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 7c278a5eeb656c2b48a85bbd761ce165f1751bb6 by Xiang Zhang in branch 'master': bpo-30110: fix resource leak in test_asyncio.test_events (#1413) https://github.com/python/cpython/commit/7c278a5eeb656c2b48a85bbd761ce165f1751bb6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 00:02:32 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 15 May 2017 04:02:32 +0000 Subject: [issue30110] test_asyncio reports reference leak In-Reply-To: <1492671260.02.0.938274219318.issue30110@psf.upfronthosting.co.za> Message-ID: <1494820952.37.0.136578623773.issue30110@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1677 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 00:02:48 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 15 May 2017 04:02:48 +0000 Subject: [issue30110] test_asyncio reports reference leak In-Reply-To: <1492671260.02.0.938274219318.issue30110@psf.upfronthosting.co.za> Message-ID: <1494820968.99.0.195922793055.issue30110@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1678 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 00:04:28 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 15 May 2017 04:04:28 +0000 Subject: [issue30242] resolve undefined behaviour in struct In-Reply-To: <1493785853.95.0.0519827037008.issue30242@psf.upfronthosting.co.za> Message-ID: <1494821068.15.0.275897715571.issue30242@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 981096f98b9c131594b0ac85ad01b63cbd11aa0a by Xiang Zhang in branch 'master': bpo-30242: resolve some undefined behaviours in struct (#1418) https://github.com/python/cpython/commit/981096f98b9c131594b0ac85ad01b63cbd11aa0a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 00:06:47 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 15 May 2017 04:06:47 +0000 Subject: [issue30242] resolve undefined behaviour in struct In-Reply-To: <1493785853.95.0.0519827037008.issue30242@psf.upfronthosting.co.za> Message-ID: <1494821207.9.0.784695945721.issue30242@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1679 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 00:07:50 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 15 May 2017 04:07:50 +0000 Subject: [issue30242] resolve undefined behaviour in struct In-Reply-To: <1493785853.95.0.0519827037008.issue30242@psf.upfronthosting.co.za> Message-ID: <1494821270.53.0.443535721439.issue30242@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1680 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 00:10:36 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 15 May 2017 04:10:36 +0000 Subject: [issue30242] resolve undefined behaviour in struct In-Reply-To: <1493785853.95.0.0519827037008.issue30242@psf.upfronthosting.co.za> Message-ID: <1494821436.65.0.940929551383.issue30242@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1681 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 00:33:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 May 2017 04:33:43 +0000 Subject: [issue29570] Windows Buildbot 2.7 is broken In-Reply-To: <1487177676.07.0.331471484641.issue29570@psf.upfronthosting.co.za> Message-ID: <1494822823.94.0.854955446345.issue29570@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Jeremy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 01:17:03 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 15 May 2017 05:17:03 +0000 Subject: [issue30110] test_asyncio reports reference leak In-Reply-To: <1492671260.02.0.938274219318.issue30110@psf.upfronthosting.co.za> Message-ID: <1494825423.76.0.411453367832.issue30110@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 0ce1f7e02d4102e8a459d1855d689c8e4613a327 by Xiang Zhang in branch '3.6': bpo-30110: fix resource leak in test_asyncio.test_events (#1413) (#1584) https://github.com/python/cpython/commit/0ce1f7e02d4102e8a459d1855d689c8e4613a327 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 01:17:16 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 15 May 2017 05:17:16 +0000 Subject: [issue30110] test_asyncio reports reference leak In-Reply-To: <1492671260.02.0.938274219318.issue30110@psf.upfronthosting.co.za> Message-ID: <1494825435.99.0.154773022553.issue30110@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 51ab4ada8fc99c24d434a533693375169c097006 by Xiang Zhang in branch '3.5': bpo-30110: fix resource leak in test_asyncio.test_events (#1413) (#1585) https://github.com/python/cpython/commit/51ab4ada8fc99c24d434a533693375169c097006 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 01:17:30 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 15 May 2017 05:17:30 +0000 Subject: [issue30242] resolve undefined behaviour in struct In-Reply-To: <1493785853.95.0.0519827037008.issue30242@psf.upfronthosting.co.za> Message-ID: <1494825450.69.0.851533069321.issue30242@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset aad1caf55f7fadb00ee097a1465bece4e128d8ef by Xiang Zhang in branch '3.6': bpo-30242: resolve some undefined behaviours in struct (#1418) (#1586) https://github.com/python/cpython/commit/aad1caf55f7fadb00ee097a1465bece4e128d8ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 01:17:43 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 15 May 2017 05:17:43 +0000 Subject: [issue30242] resolve undefined behaviour in struct In-Reply-To: <1493785853.95.0.0519827037008.issue30242@psf.upfronthosting.co.za> Message-ID: <1494825463.96.0.807277280476.issue30242@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset dd2a09cf98845b1460f0e049ad0ffeeb5c6c6476 by Xiang Zhang in branch '3.5': bpo-30242: resolve some undefined behaviours in struct (#1418) (#1587) https://github.com/python/cpython/commit/dd2a09cf98845b1460f0e049ad0ffeeb5c6c6476 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 01:17:56 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 15 May 2017 05:17:56 +0000 Subject: [issue30242] resolve undefined behaviour in struct In-Reply-To: <1493785853.95.0.0519827037008.issue30242@psf.upfronthosting.co.za> Message-ID: <1494825476.32.0.117849364877.issue30242@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 982a17e02d99dcf6e4dff93110cff5ecc59247f5 by Xiang Zhang in branch '2.7': bpo-30242: resolve some undefined behaviours in struct (#1418) (#1588) https://github.com/python/cpython/commit/982a17e02d99dcf6e4dff93110cff5ecc59247f5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 01:19:22 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 15 May 2017 05:19:22 +0000 Subject: [issue30110] test_asyncio reports reference leak In-Reply-To: <1492671260.02.0.938274219318.issue30110@psf.upfronthosting.co.za> Message-ID: <1494825562.77.0.139988713299.issue30110@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 01:19:43 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 15 May 2017 05:19:43 +0000 Subject: [issue30242] resolve undefined behaviour in struct In-Reply-To: <1493785853.95.0.0519827037008.issue30242@psf.upfronthosting.co.za> Message-ID: <1494825583.4.0.625727903003.issue30242@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 01:24:58 2017 From: report at bugs.python.org (Max) Date: Mon, 15 May 2017 05:24:58 +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: <1494825898.08.0.434363250193.issue29842@psf.upfronthosting.co.za> Max added the comment: I'm also concerned about this (undocumented) inconsistency between map and Executor.map. I think you would want to make your PR limited to `ThreadPoolExecutor`. The `ProcessPoolExecutor` already does everything you want with its `chunksize` paramater, and adding `prefetch` to it will jeopardize the optimization for which `chunksize` is intended. Actually, I was even thinking whether it might be worth merging `chunksize` and `prefetch` arguments. The semantics of the two arguments is similar but not identical. Specifically, for `ProcessPoolExecutor`, there is pretty clear pressure to increase the value of `chunksize` to reduce amortized IPC costs; there is no IPC with threads, so the pressure to increase `prefetch` is much more situational (e.g., in the busy pool example I give below). For `ThreadPoolExecutor`, I prefer your implementation over the current one, but I want to point out that it is not strictly better, in the sense that *with default arguments*, there are situations where the current implementation behaves better. In many cases your implementation behaves much better. If the input is too large, it prevents out of memory condition. In addition, if the pool is not busy when `map` is called, your implementation will also be faster, since it will submit the first input for processing earlier. 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. The implementation you propose will (by default) only prefetch a small number of input items. Then when the pool becomes available, it will quickly run out of prefetched input, and so it will be less efficient than the current implementation. This is especially unfortunate since the entire time the pool was busy, `Executor.map` is just blocking the main thread so it's literally doing nothing useful. Of course, the client can tweak `prefetch` argument to achieve better performance. Still, I wanted to make sure this issue is considered before the new implementation is adopted. >From the performance perspective, an even more efficient implementation would be one that uses three background threads: - one to prefetch items from the input - one to sends items to the workers for processing - one to yield results as they become available It has a disadvantage of being slightly more complex, so I don't know if it really belongs in the standard library. Its advantage is that it will waste less time: it fetches inputs without pause, it submits them for processing without pause, and it makes results available to the client as soon as they are processed. (I have implemented and tried this approach, but not in productioon.) But even this implementation requires tuning. In the case with the busy pool that I described above, one would want to prefetch as much input as possible, but that may cause too much memory consumption and also possibly waste computation resources (if the most of input produced proves to be unneeded in the end). ---------- nosy: +max _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 02:04:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 May 2017 06:04:34 +0000 Subject: [issue30357] test_thread.test_save_exception_state_on_error(): Unhandled exception in thread: AMD64 Debian root 2.7 In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1494828274.35.0.30239253363.issue30357@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The solution in PR 1583 looks unsafe to me. If some threads hang the loop `while self.thread_count != thread._count()` will never finished. If some dangling threads created in other tests or by regrtest itself are finished during running the test_thread test, that loop will never finished too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 02:31:56 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 15 May 2017 06:31:56 +0000 Subject: [issue26143] Ensure that IDLE's stdlib imports are from the stdlib In-Reply-To: <1453089950.28.0.356846327087.issue26143@psf.upfronthosting.co.za> Message-ID: <1494829916.06.0.832731681025.issue26143@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thank you for making a start on code for this issue. After thinking about this a few hours, here is what I currently think. I don't want a tiny module for one function. I would like a module with objects common to the idle and user processes, in particular things needed by both pyshell and run modules. This would include things now imported into pyshell from run. (These were initially imported in the other direction, but switching sped up run startup.) I would like to refactor and include the near duplicate warning functions. The imports of io, linecache, and maybe warnings in the new module would come after the new function is called in the module. At least initially, I would not include anything dependent on another IDLE module. Possible names: runutil, runcom, runshell, ??? (and test_...). Call the new function fix_path (nearly everything in idlelib is private already). Add "def unfix_path(): if [path[0] != '': . It is possible that we will need to return and pass back what, if anything, is removed. I am not sure yet. When one runs 'python /file.py', sys.path[0] is , not ''. So one can start idlelib with, for instance, "python /idle.py" and sys.path[0] will be . It slows imports slightly and could be removed (and never re-added). I need to check for other instances of sys.path[0] != '' and additions. Here is one. Add "print(sys.path, file=sys.__stdout__)" to run.py and run it and the result in Shell is ['C:\\Programs\\Python36\\lib\\idlelib', 'C:\\Programs\\Python36\\Lib\\idlelib', 'C:\\Programs\\Python36\\python36.zip', ... If I start IDLE from the console, path (in console) starts with '' instead of idledir x 2. It appears twice because of the tkinter input. The original sys.path is the same in both processes. If I then run a file with 'print sys.path', user-process sys.path begins with filedir, consoledir. I am not quite how '' is replaced by consoledir, but the presence of consoledir is wrong (explained elsewhere). If I start from the icon, output never appears. The result needs to be saved and displayed otherwise, such as in a tkinter messagebox. If I then run the same file, path (displayed in Shell) begins with just the file directory. More experiments are needed, such as starting from Explorer [Edit with IDLE]. We will need some repeated on Linux and MAC In run.py, would "unfix()" be needed after imports? I think not when running a file, because pyshell.ModifiedInterpreter.prepend_syspath and MI.run_command together prepend usercodedir to sys.path. I believe this is true when running a startup file. So we only need to be concerned about restoring '' (or anything else deleted) sometime before running user code from the shell. Within run, all but one of the delayed non-main imports are either duplicates that can be removed or can be moved to the top, where they will surely run before sys.path is augmented. The un-movable delayed pydoc import is in the handle method of run.MyHandler(RPCHandler(socketserver.BaseRequestHandler)) and is called in the base .__init__. This must happen *before* run_command sends the rpc request to modify sys.path. So it should be safe if we do not previously unfix sys.path. My conclusion: We may sometimes need to restore something so imports in Shell work the same as in Python REPL. The last possibility is in run.main just before 'while 1:'. Importing in the IDLE process and pyshell are messy. As a temporary partial fix, we could unfix() after the top imports in pyshell, or after the top imports in pyshell.main, or at the bottom of pyshell.main just before entering the loop. But if there are any further delayed non-idlelib imports, the IDLE process remains vulnerable to shadow files. But I don't yet know if this is possible. As with run, do we need to explicitly unfix in pyshell? In normal mode, no user code runs in the idle process. So unfix is not needed. With -n set, I think unfix is still not needed for user files, as MI.run_command runs the same userdir prepend in self.locals, where user code is exec'ed. Indeed, in order to protect all IDLE imports (in the IDLE process), sys.path should be left reduced *except while running user code in the IDLE process, in -n mode*. The irreducible problem for -n is that once user code *is* run, the fact that IDLE simulates python -i and the fact that -n means no Shell restart, the directory cannot be removed. If there is a conflict, we cannot help it. The oddity of -n mode is that one can run additional files from other directories and make sys.path grow indefinitely. Thus files can interfere with each other as well as with IDLE. In python, one can run dir1/file1.py with -i and 'exec(open(dir2/file2.py).read)', and so on, but exec does not prepend dir2 to sys.path. What about the pyshell.main section "# process sys.argv and sys.path"? I think the sys.path parts are wrong, at least for protecting IDLE imports, and should be removed. for i in range(len(sys.path)): sys.path[i] = os.path.abspath(sys.path[i]) Everything is already absolute except for '' and changing the '' added by python to abspath('') == getcwd() seems wrong. It makes the IDLE shell unnecessarily different from the Python REPL. If I run path-a> python -i path-b/tem.py I cannot import files in path-a. The same should be true if I run path-a> python -m idlelib and then edit and run path-b/tem.py. elif args: enable_edit = True pathx = [] for filename in args: pathx.append(os.path.dirname(filename)) for dir in pathx: dir = os.path.abspath(dir) if not dir in sys.path: sys.path.insert(0, dir) These insertions should only happen in -n mode and will happen if and when run, not before being opened to be edited (which could even fail). else: dir = os.getcwd() if dir not in sys.path: sys.path.insert(0, dir) With '' changed (wrongly) to getcwd, this will usually do nothing. If I run 'python', sys.path start with '', not os.getcwd. If I os.chdir(newdir), then '' refers to newdir, not the startig dir. However, in -n mode Conclusion: delete the above and add if not use_subprocess (and other conditions?): sys.path.insert(0, '') at the last possible moment, just before ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 02:49:44 2017 From: report at bugs.python.org (Louie Lu) Date: Mon, 15 May 2017 06:49:44 +0000 Subject: [issue28889] IDLE needs the ability to pass in command-line arguments In-Reply-To: <1481050946.76.0.826535117808.issue28889@psf.upfronthosting.co.za> Message-ID: <1494830984.73.0.820111045016.issue28889@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +1682 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 02:51:35 2017 From: report at bugs.python.org (Louie Lu) Date: Mon, 15 May 2017 06:51:35 +0000 Subject: [issue28889] IDLE needs the ability to pass in command-line arguments In-Reply-To: <1481050946.76.0.826535117808.issue28889@psf.upfronthosting.co.za> Message-ID: <1494831095.54.0.0740281072268.issue28889@psf.upfronthosting.co.za> Louie Lu added the comment: This PR will add the short-key to F7, when using editor. It will prompt up a dialog and user can input the command-line arguments then run the code. ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 02:53:04 2017 From: report at bugs.python.org (Ben Finney) Date: Mon, 15 May 2017 06:53:04 +0000 Subject: [issue30181] Correct the parsing of a test case docstring. In-Reply-To: <1493261074.73.0.807341942876.issue30181@psf.upfronthosting.co.za> Message-ID: <1494831184.54.0.790300778141.issue30181@psf.upfronthosting.co.za> Ben Finney added the comment: > I have already created such a pull requests. It is bidirectionally linked to this ticket. I hope the PSF can start accepting contributions without that laundering, but until then: thank you for taking that on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 03:16:06 2017 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 15 May 2017 07:16:06 +0000 Subject: [issue29196] Remove old-deprecated plistlib features In-Reply-To: <1483807940.54.0.471253591392.issue29196@psf.upfronthosting.co.za> Message-ID: <1494832566.24.0.866559301183.issue29196@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I don't know why the feature was deprecated, is was deprecated a long time ago by Just. I agree that the feature is convenient at times, but it is also different from how dicts are generally used. BTW. I'm in favour of removing the feature, not having this deprecated feature makes the library easier to understand and maintain. P.S. plistlib was not introduced in 2.6, but in 2.3. In 2.3 it was part of the MacOS library (Lib/plat-mac) and in 2.6 it was migrated to the regular stdlib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 04:13:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 08:13:13 +0000 Subject: [issue30280] Warning -- threading._dangling was modified by test_asyncio on FreeBSD 9 and 10 In-Reply-To: <1493975315.11.0.159651594974.issue30280@psf.upfronthosting.co.za> Message-ID: <1494835993.42.0.847887930466.issue30280@psf.upfronthosting.co.za> STINNER Victor added the comment: Xiang Zhang just fixed a bug to release resources in test_asyncio: bpo-30110, commit 981096f98b9c131594b0ac85ad01b63cbd11aa0a. No idea if it's enough to fix the warning. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 04:17:20 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 15 May 2017 08:17:20 +0000 Subject: [issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib In-Reply-To: <1494162484.35.0.941296488498.issue30296@psf.upfronthosting.co.za> Message-ID: <1494836240.97.0.0409931161876.issue30296@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Serhiy, the latest version of this PR looks okay to me. Do you care to veto any of the remaining suggested changes? ---------- assignee: rhettinger -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 04:20:07 2017 From: report at bugs.python.org (Erik Bray) Date: Mon, 15 May 2017 08:20:07 +0000 Subject: [issue30353] ctypes: pass by value for structs broken on Cygwin/MinGW 64-bit In-Reply-To: <1494605988.92.0.550577143248.issue30353@psf.upfronthosting.co.za> Message-ID: <1494836407.75.0.0301319163745.issue30353@psf.upfronthosting.co.za> Erik Bray added the comment: Thanks for pointing that out. Indeed it's the same symptom, but slightly different cause. libffi has different implementations of its calling routines for different architectures/platforms depending on the machine architecture and calling conventions used. So this case is probably buggy for the arm64 implementation as well, as in #29804. Off the top of my head I don't know a reliable way to check for this case, but this fix would work around the arm64 issue as well if I could check for that architecture easily at compile time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 04:40:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 08:40:58 +0000 Subject: [issue30350] devguide suggests to use VS 2008 to build Python 2.7, but VS 2008 is no more supported? In-Reply-To: <1494581567.83.0.310363881682.issue30350@psf.upfronthosting.co.za> Message-ID: <1494837658.53.0.17257487552.issue30350@psf.upfronthosting.co.za> STINNER Victor added the comment: "To further clarify, *all* 2.7 Windows builders *are* using VS 2008's compiler toolchain, but they're using VS 2015's MSBuild with VS 2010's description of 2008's compiler toolchain to build the projects described in PCbuild/." Wait? Why not suggesting to use this recent VS 2015 if it's supported? It's a pain to try to install VS 2008 in 2017: it disappeared from microsoft.com, at least the Express edition. Moreover, it becomes more and more clear that VS 2008 has a worse support than the PCbuild directory. So why not updating the devguide to suggest first to use the PCbuild directory using VS 2010 or newer? Are the latest VS version able to use PCbuild of Python 2.7? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 04:46:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 08:46:08 +0000 Subject: [issue30368] [2.7] OpenSSL compilation fails on AMD64 Windows7 SP1 VS9.0 2.7 Message-ID: <1494837968.88.0.738073393346.issue30368@psf.upfronthosting.co.za> New submission from STINNER Victor: See http://bugs.python.org/issue30350#msg293663 http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%20VS9.0%202.7/builds/83/steps/compile/logs/stdio Build started: Project: _ssl, Configuration: Debug|x64 ... No Perl installation was found. Existing Makefiles are used. ... IOError: [Errno 2] No such file or directory: 'crypto\\buildinf_amd64.h' ---------- assignee: christian.heimes components: Build, SSL, Windows messages: 293687 nosy: christian.heimes, haypo, jkloth, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: [2.7] OpenSSL compilation fails on AMD64 Windows7 SP1 VS9.0 2.7 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 04:47:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 08:47:25 +0000 Subject: [issue29570] Windows Buildbot 2.7 is broken In-Reply-To: <1487177676.07.0.331471484641.issue29570@psf.upfronthosting.co.za> Message-ID: <1494838045.32.0.264208901618.issue29570@psf.upfronthosting.co.za> STINNER Victor added the comment: Yeah, thank you Jeremy! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 04:48:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 08:48:02 +0000 Subject: [issue30350] devguide suggests to use VS 2008 to build Python 2.7, but VS 2008 is no more supported? In-Reply-To: <1494581567.83.0.310363881682.issue30350@psf.upfronthosting.co.za> Message-ID: <1494838082.71.0.279549683131.issue30350@psf.upfronthosting.co.za> STINNER Victor added the comment: > Now that my buildbot is back online, there is one unresolved issue pertaining to using VS9.0 only for building. That is building without Perl. It was a supported feature prior to backporting the MSBuild toolchain. With recent OpenSSL releases, without Perl is no longer functional. I opened bpo-30368 to track this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 04:50:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 08:50:42 +0000 Subject: [issue26122] Isolated mode doesn't ignore PYTHONHASHSEED In-Reply-To: <1452862094.75.0.964095204421.issue26122@psf.upfronthosting.co.za> Message-ID: <1494838242.22.0.746016408068.issue26122@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 04:56:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 08:56:50 +0000 Subject: [issue30351] regrtest hangs on x86 Windows XP 2.7 In-Reply-To: <1494588560.82.0.408106199182.issue30351@psf.upfronthosting.co.za> Message-ID: <1494838610.0.0.104378492809.issue30351@psf.upfronthosting.co.za> STINNER Victor added the comment: Similar issue on x86 Tiger 2.7? http://buildbot.python.org/all/builders/x86%20Tiger%202.7/builds/151/steps/test/logs/stdio 0:24:55 [371/402] test_pep277 passed -- running: test_xpickle (613 sec) 0:24:56 [372/402] test_shlex passed -- running: test_xpickle (615 sec) 0:25:03 [373/402] test_random passed -- running: test_xpickle (621 sec) command timed out: 1200 seconds without output running ['make', 'buildbottest', 'TESTOPTS=-j2', 'TESTPYTHONOPTS=', 'TESTTIMEOUT=900'], attempting to kill process killed by signal 9 program finished with exit code -1 elapsedTime=2707.762029 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 04:59:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 May 2017 08:59:38 +0000 Subject: [issue30366] Backport tests for test.support to 2.7 In-Reply-To: <1494784002.11.0.332998677492.issue30366@psf.upfronthosting.co.za> Message-ID: <1494838778.87.0.588930218467.issue30366@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset eb66897e875eecd78bcb9a330a819bca6e09e7a2 by Serhiy Storchaka in branch '2.7': [2.7] bpo-30366: Backport tests for test.support. (#1582) https://github.com/python/cpython/commit/eb66897e875eecd78bcb9a330a819bca6e09e7a2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 05:00:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 May 2017 09:00:38 +0000 Subject: [issue30366] Backport tests for test.support to 2.7 In-Reply-To: <1494784002.11.0.332998677492.issue30366@psf.upfronthosting.co.za> Message-ID: <1494838838.67.0.943367058623.issue30366@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 05:01:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 09:01:23 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1494838883.64.0.450997998816.issue9850@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 89a1c93f046f9726310f8362227be7b8e50eea22 by Victor Stinner in branch 'master': bpo-9850: Deprecate the macpath module (#1540) https://github.com/python/cpython/commit/89a1c93f046f9726310f8362227be7b8e50eea22 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 05:02:06 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 09:02:06 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1494838926.04.0.449575647187.issue9850@psf.upfronthosting.co.za> STINNER Victor added the comment: > Bump, any update on what to do with this issue? I just deprecated the macpath module in Python 3.7. It will be removed from Python 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 05:04:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 May 2017 09:04:50 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1494839090.51.0.521802338512.issue9850@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You can use test.support.import_module(deprecated=True) for importing deprecated module in tests. ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 05:11:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 May 2017 09:11:34 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1494839494.72.0.0619298005272.issue9850@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And please add a Misc/NEWS entry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 05:19:57 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Mon, 15 May 2017 09:19:57 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1494839997.45.0.97295768558.issue9850@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: Great! Also, as Mariatta mentioned in a previous message, shouldn't an entry in PEP-4 be made? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 05:27:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 09:27:34 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1494840454.91.0.677045499401.issue9850@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1683 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 05:38:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 09:38:45 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1494841125.11.0.402202641024.issue9850@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy Storchaka: "And please add a Misc/NEWS entry." I created https://github.com/python/cpython/pull/1590 Serhiy: "You can use test.support.import_module(deprecated=True) for importing deprecated module in tests." I looked at this function, but I don't want to skip the test if the module cannot be imported. Jim Fasarakis-Hilliard: "Great! Also, as Mariatta mentioned in a previous message, shouldn't an entry in PEP-4 be made?" I created https://github.com/python/peps/pull/257 I didn't know the PEP 4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 05:39:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 09:39:12 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1494841152.93.0.804863867004.issue9850@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d812eb731d886065bdd9bc94a3f0e5dfdcd671a4 by Victor Stinner in branch 'master': bpo-9850: Document macpath deprecation in Misc/NEWS (#1590) https://github.com/python/cpython/commit/d812eb731d886065bdd9bc94a3f0e5dfdcd671a4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 05:44:44 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 09:44:44 +0000 Subject: [issue30329] test_imaplib.test_login_cram_md5(): OSError: [WinError 10022] An invalid argument was supplied on AMD64 Windows8.1 Non-Debug 3.6 In-Reply-To: <1494419208.12.0.00943199066561.issue30329@psf.upfronthosting.co.za> Message-ID: <1494841484.94.0.596166072124.issue30329@psf.upfronthosting.co.za> STINNER Victor added the comment: The error code is documented: https://msdn.microsoft.com/en-us/library/windows/desktop/ms740481(v=vs.85).aspx WSAEINVAL: The how parameter is not valid, or is not consistent with the socket type. For example, SD_SEND is used with a UNI_RECV socket type. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 05:53:54 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 May 2017 09:53:54 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1494842034.53.0.962454158341.issue9850@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I looked at this function, but I don't want to skip the test if the module cannot be imported. You can pass required_on=('',). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 05:54:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 09:54:15 +0000 Subject: [issue30369] test_thread crashed with SIGBUS on AMD64 FreeBSD 10.x Shared 3.6 Message-ID: <1494842055.33.0.428896000784.issue30369@psf.upfronthosting.co.za> New submission from STINNER Victor: SIGBUS on the second gc.collect() call of support.gc_collect() in test_thread. http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.6/builds/136/steps/test/logs/stdio 0:07:35 [330/405] test_thread crashed -- running: test_datetime (106 sec) Fatal Python error: Bus error Current thread 0x0000000802372800 (most recent call first): Thread 0x0000000802006400 (most recent call first): File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/support/__init__.py", line 1511 in gc_collect gc.collect() if is_jython: time.sleep(0.1) gc.collect() <~~~~ HERE gc.collect() File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/save_env.py", line 271 in __exit__ support.gc_collect() # Some resources use weak references File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/runtest.py", line 168 in runtest_inner File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/runtest.py", line 119 in runtest File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/runtest_mp.py", line 71 in run_tests_slave File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 475 in _main File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 468 in main File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 532 in main File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/regrtest.py", line 46 in _main File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/regrtest.py", line 50 in File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/runpy.py", line 85 in _run_code File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/runpy.py", line 193 in _run_module_as_main Traceback (most recent call last): File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/__main__.py", line 2, in main() File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 532, in main Regrtest().main(tests=tests, **kwargs) File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 468, in main self._main(tests, kwargs) File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 490, in _main self.run_tests() File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 416, in run_tests run_tests_multiprocess(self) File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/runtest_mp.py", line 221, in run_tests_multiprocess raise Exception(msg) Exception: Child error on test_thread: Exit code -10 *** Error code 1 ---------- components: Tests messages: 293701 nosy: haypo priority: normal severity: normal status: open title: test_thread crashed with SIGBUS on AMD64 FreeBSD 10.x Shared 3.6 type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 06:21:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 May 2017 10:21:33 +0000 Subject: [issue29196] Remove old-deprecated plistlib features In-Reply-To: <1483807940.54.0.471253591392.issue29196@psf.upfronthosting.co.za> Message-ID: <1494843693.86.0.85896775687.issue29196@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset edef358ed6d05f927bf1636cc5a920a9d868b131 by Serhiy Storchaka in branch 'master': bpo-29196: Removed old-deprecated classes Plist, Dict and _InternalDict (#488) https://github.com/python/cpython/commit/edef358ed6d05f927bf1636cc5a920a9d868b131 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 06:32:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 10:32:11 +0000 Subject: [issue30344] test_multiprocessing.test_notify_all(): AssertionError: 6 != 5 on x86 Windows XP 2.7 In-Reply-To: <1494513407.28.0.645892004666.issue30344@psf.upfronthosting.co.za> Message-ID: <1494844331.34.0.349217640197.issue30344@psf.upfronthosting.co.za> STINNER Victor added the comment: New fail on x86 Windows XP VS9.0 2.7: http://buildbot.python.org/all/builders/x86%20Windows%20XP%20VS9.0%202.7/builds/153/steps/test/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 06:36:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 10:36:49 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1494844609.24.0.481897561092.issue9850@psf.upfronthosting.co.za> STINNER Victor added the comment: >> I looked at this function, but I don't want to skip the test if the module cannot be imported. > > You can pass required_on=('',). ('',) looks mysterious to me. I prefer my current code. If you consider that an helper is required, I would prefer a more explicit option on import_module(), like always_raise=True or something like that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 06:39:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 May 2017 10:39:33 +0000 Subject: [issue29196] Remove old-deprecated plistlib features In-Reply-To: <1483807940.54.0.471253591392.issue29196@psf.upfronthosting.co.za> Message-ID: <1494844773.57.0.481292992158.issue29196@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If the capability of the former plistlib.Dict class is useful, it would be better to provide it for general use in modules collections or types. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 06:40:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 May 2017 10:40:34 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1494844834.59.0.463269505073.issue9850@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: No, the current code LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 06:42:23 2017 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 15 May 2017 10:42:23 +0000 Subject: [issue30350] devguide suggests to use VS 2008 to build Python 2.7, but VS 2008 is no more supported? In-Reply-To: <1494581567.83.0.310363881682.issue30350@psf.upfronthosting.co.za> Message-ID: <1494844943.39.0.169516455986.issue30350@psf.upfronthosting.co.za> Jeremy Kloth added the comment: > Wait? Why not suggesting to use this recent VS 2015 if it's > supported? In theory it is supported, yes. However, it is not compatible with previous C runtimes. Meaning things like memory allocation (malloc) and file pointers (FILE *) wouldn't play nice in extensions compiled against the 2008 toolchain (everything on PyPI). > It's a pain to try to install VS 2008 in 2017: it disappeared from > microsoft.com, at least the Express edition. I believe that is why Microsoft released the Visual C++ Compiler for Python 2.7 (https://www.microsoft.com/en-us/download/details.aspx?id=44266) although, if memory serves, there is some issue with the 64-bit toolchain. > Moreover, it becomes more and more clear that VS 2008 has a worse > support than the PCbuild directory. I guess that is why this bug report exists ;) Seriously, though, that is why we recently added the VS9.0 builders. > So why not updating the devguide to suggest first to use the > PCbuild directory using VS 2010 or newer? Are the latest VS > version able to use PCbuild of Python 2.7? See above. You can, but then your built Python is incompatible with the world. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 08:05:27 2017 From: report at bugs.python.org (Max) Date: Mon, 15 May 2017 12:05:27 +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: <1494849927.28.0.030624705189.issue29842@psf.upfronthosting.co.za> Max added the comment: Correction: this PR is useful for `ProcessPoolExecutor` as well. I thought `chunksize` parameter handles infinite generators already, but I was wrong. And, as long as the number of items prefetched is a multiple of `chunksize`, there are no issues with the chunksize optimization either. And a minor correction: when listing the advantages of this PR, I should have said: "In addition, if the pool is not busy when `map` is called, your implementation will also be more responsive, since it will yield the first result earlier." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 09:05:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 13:05:46 +0000 Subject: [issue30350] devguide suggests to use VS 2008 to build Python 2.7, but VS 2008 is no more supported? In-Reply-To: <1494844943.39.0.169516455986.issue30350@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > I believe that is why Microsoft released the Visual C++ Compiler for Python 2.7 (https://www.microsoft.com/en-us/download/details.aspx?id=44266) although, if memory serves, there is some issue with the 64-bit toolchain. Oh, I recall an announcement about that, but I don't see the link on the devguide. It should be added. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 09:14:11 2017 From: report at bugs.python.org (Eryk Sun) Date: Mon, 15 May 2017 13:14:11 +0000 Subject: [issue30350] devguide suggests to use VS 2008 to build Python 2.7, but VS 2008 is no more supported? In-Reply-To: <1494581567.83.0.310363881682.issue30350@psf.upfronthosting.co.za> Message-ID: <1494854051.39.0.844829094074.issue30350@psf.upfronthosting.co.za> Eryk Sun added the comment: >> It's a pain to try to install VS 2008 in 2017: it disappeared from >> microsoft.com, at least the Express edition. > I believe that is why Microsoft released the Visual C++ Compiler for > Python 2.7 > (https://www.microsoft.com/en-us/download/details.aspx?id=44266) > although, if memory serves, there is some issue with the 64-bit > toolchain. That release is intended for building extension modules. Is it possible to configure it for building CPython? ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 10:26:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 14:26:30 +0000 Subject: [issue11790] transient failure in test_multiprocessing.WithProcessesTestCondition In-Reply-To: <1302131075.81.0.79285380131.issue11790@psf.upfronthosting.co.za> Message-ID: <1494858390.97.0.530466036917.issue11790@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1684 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 10:27:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 14:27:03 +0000 Subject: [issue30344] test_multiprocessing.test_notify_all(): AssertionError: 6 != 5 on x86 Windows XP 2.7 In-Reply-To: <1494513407.28.0.645892004666.issue30344@psf.upfronthosting.co.za> Message-ID: <1494858423.37.0.0941368296555.issue30344@psf.upfronthosting.co.za> STINNER Victor added the comment: I created https://github.com/python/cpython/pull/1591 : backport bpo-11790 to 2.7. ---------- pull_requests: +1685 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 10:43:44 2017 From: report at bugs.python.org (Taylor Newton) Date: Mon, 15 May 2017 14:43:44 +0000 Subject: [issue30370] IPython 5.3.0 debug mode breakpoint issue Message-ID: <1494859423.96.0.57016925586.issue30370@psf.upfronthosting.co.za> New submission from Taylor Newton: Hi Python Team, I recently upgraded Python to version 2.7.8 (from 2.6.6) and IPython to version 5.3.0. I noticed that when using the magic command (%run -d) in IPython, subsequent runs of a program seem to fail with a "KeyError", apparently due to the debugger's failure to clear breakpoints from previous runs of the program. I attached a sample of output from one such failed run, where a breakpoint that had been set at line 56 in a previous call caused the program to crash, though in the current call, only one breakpoint at line 70 is requested. For the time being, I've downgraded to IPython version 4.2.0, which seems to work as expected. Cheers, Taylor ---------- files: ipython_error messages: 293712 nosy: Taylor Newton priority: normal severity: normal status: open title: IPython 5.3.0 debug mode breakpoint issue type: crash versions: Python 2.7 Added file: http://bugs.python.org/file46864/ipython_error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 11:19:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 15:19:17 +0000 Subject: [issue30357] test_thread.test_save_exception_state_on_error(): Unhandled exception in thread: AMD64 Debian root 2.7 In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1494861557.11.0.137335130047.issue30357@psf.upfronthosting.co.za> STINNER Victor added the comment: Using 5 terminals to run 5 tests in parallel. I'm unable to reproduce the bug if I only run the test alone: ./python -m test -uall -F -m test_save_exception_state_on_error test_thread But I'm able to reproduce the bug if I run the full test_thread.py: ./python -m test -uall -F test_thread So I'm now more confident that grzgrzgrz3's patch can fix the issue. test_thread uses the low-level thread.start_new_thread() function to spawn threads, but pthread_join() is not used to wait for the thread exit. So multiple test_thread tests can "leak" threads which can have random effect on following tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 11:30:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 15:30:23 +0000 Subject: [issue30357] test_thread.test_save_exception_state_on_error(): Unhandled exception in thread: AMD64 Debian root 2.7 In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1494862223.98.0.62782816302.issue30357@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1686 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 11:32:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 15:32:16 +0000 Subject: [issue11790] transient failure in test_multiprocessing.WithProcessesTestCondition In-Reply-To: <1302131075.81.0.79285380131.issue11790@psf.upfronthosting.co.za> Message-ID: <1494862336.78.0.410495704364.issue11790@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 9d1983be503012e750f49d31b569f3fe4554c628 by Victor Stinner in branch '2.7': bpo-11790: Fix sporadic failures in test_multiprocessing.WithProcessesTestCondition. (#1591) https://github.com/python/cpython/commit/9d1983be503012e750f49d31b569f3fe4554c628 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 11:33:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 15:33:31 +0000 Subject: [issue30344] test_multiprocessing.test_notify_all(): AssertionError: 6 != 5 on x86 Windows XP 2.7 In-Reply-To: <1494513407.28.0.645892004666.issue30344@psf.upfronthosting.co.za> Message-ID: <1494862411.1.0.491297152763.issue30344@psf.upfronthosting.co.za> STINNER Victor added the comment: I pushed my backport. Since the bug occurs randomly, I consider that it's now fixed and I close the issue. I may reopen if the bug reappears. New changeset 9d1983be503012e750f49d31b569f3fe4554c628 by Victor Stinner in branch '2.7': bpo-11790: Fix sporadic failures in test_multiprocessing.WithProcessesTestCondition. (#1591) https://github.com/python/cpython/commit/9d1983be503012e750f49d31b569f3fe4554c628 ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 11:33:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 15:33:48 +0000 Subject: [issue30329] test_imaplib.test_login_cram_md5(): OSError: [WinError 10022] An invalid argument was supplied on AMD64 Windows8.1 Non-Debug 3.6 In-Reply-To: <1494419208.12.0.00943199066561.issue30329@psf.upfronthosting.co.za> Message-ID: <1494862428.1.0.0504840343637.issue30329@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 83a2c2879839da2e10037f5e4af1bd1dafbf1a52 by Victor Stinner in branch 'master': bpo-30329: Catch Windows error 10022 on shutdown() (#1538) https://github.com/python/cpython/commit/83a2c2879839da2e10037f5e4af1bd1dafbf1a52 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 11:48:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 15:48:38 +0000 Subject: [issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x In-Reply-To: <1494628223.7.0.0775389696939.issue30356@psf.upfronthosting.co.za> Message-ID: <1494863318.76.0.122731545758.issue30356@psf.upfronthosting.co.za> STINNER Victor added the comment: > manager._process.exitcode == -15 -15 is -signal.SIGTERM and comes from Popen.wait() of multiprocessing.popen_spawn_win32. res = _winapi.WaitForSingleObject(int(self._handle), msecs) if res == _winapi.WAIT_OBJECT_0: code = _winapi.GetExitCodeProcess(self._handle) if code == TERMINATE: code = -signal.SIGTERM The process exited and its exit code is 0x10000 (TERMINATE). I understand that Popen.terminate() of multiprocessing.popen_spawn_win32 was called. BaseManager.start() registers a finalizer: _finalize_manager(). This method sends a "shutdown" message to the process and then gives 1.0 second to the process to complete. If the process doesn't complete in 1 second, .terminate() is called. 1 second is kind of arbitrary: it depends on the system load. We should give more time to the manager to complete, or accept -signal.SIGTERM as a "valid" exit code. I see different options: * Shutdown the manager in test_multiprocessing and give more time to the manager to complete * Make the timeout configurable * Allow -signal.SIGTERM exit code in test_mymanager_context() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 11:53:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 15:53:08 +0000 Subject: [issue30339] test_multiprocessing_main_handling: "RuntimeError: Timed out waiting for results" on x86 Windows7 3.x In-Reply-To: <1494463699.01.0.364437710045.issue30339@psf.upfronthosting.co.za> Message-ID: <1494863588.15.0.43726482388.issue30339@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1687 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 11:55:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 15:55:34 +0000 Subject: [issue30357] test_thread.test_save_exception_state_on_error(): Unhandled exception in thread: AMD64 Debian root 2.7 In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1494863734.41.0.825718853671.issue30357@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 79ef7f8e88a4972c4aecf95cfc5cd934f1861e08 by Victor Stinner in branch 'master': bpo-30357: test_thread now uses threading_cleanup() (#1592) https://github.com/python/cpython/commit/79ef7f8e88a4972c4aecf95cfc5cd934f1861e08 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 12:09:45 2017 From: report at bugs.python.org (Berker Peksag) Date: Mon, 15 May 2017 16:09:45 +0000 Subject: [issue30370] IPython 5.3.0 debug mode breakpoint issue In-Reply-To: <1494859423.96.0.57016925586.issue30370@psf.upfronthosting.co.za> Message-ID: <1494864585.16.0.182212768589.issue30370@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report, but IPython is not part of the Python standard library. Since downgrading IPython to 4.2.0 solved your problem, I'd suggest to report this to IPython developers. ---------- nosy: +berker.peksag resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 12:14:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 16:14:45 +0000 Subject: [issue30339] test_multiprocessing_main_handling: "RuntimeError: Timed out waiting for results" on x86 Windows7 3.x In-Reply-To: <1494463699.01.0.364437710045.issue30339@psf.upfronthosting.co.za> Message-ID: <1494864885.37.0.0764626161284.issue30339@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 7d6320ba47a229543acc0af6a64bc4e414932273 by Victor Stinner in branch 'master': bpo-30339: test_multiprocessing_main_handling timeout (#1593) https://github.com/python/cpython/commit/7d6320ba47a229543acc0af6a64bc4e414932273 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 12:17:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 16:17:12 +0000 Subject: [issue30371] test_long_lines() fails randomly on AMD64 Windows7 SP1 3.x Message-ID: <1494865032.78.0.389289612669.issue30371@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/436/steps/test/logs/stdio ====================================================================== FAIL: test_long_lines (test.test_email.test_email.TestFeedParsers) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_email\test_email.py", line 3526, in test_long_lines self.assertEqual(m.get_payload(), 'x'*M*N) AssertionError: 'xxxx[17103482 chars]xxxxxzxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[2896464 chars]xxxx' != 'xxxx[17103482 chars]xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[2896464 chars]xxxx' Notice the "z" in "...xxxxxz...". ---------- components: Tests messages: 293721 nosy: barry, haypo, r.david.murray priority: normal severity: normal status: open title: test_long_lines() fails randomly on AMD64 Windows7 SP1 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 12:20:38 2017 From: report at bugs.python.org (Malcolm Smith) Date: Mon, 15 May 2017 16:20:38 +0000 Subject: [issue30372] Status of __builtins__ is not totally clear Message-ID: <1494865238.41.0.458723699483.issue30372@psf.upfronthosting.co.za> New submission from Malcolm Smith: https://docs.python.org/3.6/reference/executionmodel.html#builtins-and-restricted-execution describes the various things you can do with __builtins__, but then says "Users should not touch __builtins__; it is strictly an implementation detail." If this is so, the entire section should be marked "CPython implementation detail", not just that last paragraph. Elsewhere, https://docs.python.org/3.6/reference/import.html#replacing-the-standard-import-system suggests that the __import__ function could be replaced "at the module level to only alter the behaviour of import statements within that module". Is there any way of doing this other than manipulating the module's __builtins__? If not, this is encouraging the programmer to rely on a CPython implementation detail without marking it as such. ---------- assignee: docs at python components: Documentation messages: 293722 nosy: Malcolm Smith, docs at python priority: normal severity: normal status: open title: Status of __builtins__ is not totally clear versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 12:36:03 2017 From: report at bugs.python.org (Matthew Cowles) Date: Mon, 15 May 2017 16:36:03 +0000 Subject: [issue26143] Ensure that IDLE's stdlib imports are from the stdlib In-Reply-To: <1453089950.28.0.356846327087.issue26143@psf.upfronthosting.co.za> Message-ID: <1494866163.13.0.391939309415.issue26143@psf.upfronthosting.co.za> Matthew Cowles added the comment: I'm very willing to believe that I'm missing something critical here, but wouldn't it be satisfactory to just move "" from the beginning to the end of sys.path in IDLE? I can imagine that it might cause a few problems for users, but it is simple and the problems would be easy to explain. IDLE is commonly used by beginners and over at python-help I would not relish the prospect of saying, "With IDLE, the import rules change on account of various conditions...." I don't think that would be much better than the current state. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 13:01:27 2017 From: report at bugs.python.org (Grzegorz Grzywacz) Date: Mon, 15 May 2017 17:01:27 +0000 Subject: [issue30357] test_thread.test_save_exception_state_on_error(): Unhandled exception in thread: AMD64 Debian root 2.7 In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1494867687.97.0.962304124578.issue30357@psf.upfronthosting.co.za> Grzegorz Grzywacz added the comment: I think this do not solve this issue yet. There is still posibillity that different tests/testrunners spawn threads and 'fool' testcase. I think we should not relay on `thread._count` value where it's possible. For master branch `thread._set_sentinel()` can be used. For 2.7 i don't know simple solution. I would like to know your opinion it is worth changing? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 13:08:32 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 15 May 2017 17:08:32 +0000 Subject: [issue30362] Launcher add list and list with paths options In-Reply-To: <1494753197.17.0.253655325044.issue30362@psf.upfronthosting.co.za> Message-ID: <1494868112.52.0.136936328328.issue30362@psf.upfronthosting.co.za> Steve Dower added the comment: The problem with taking more command line options is that we prevent real Python from ever using those options (or we end up with obscure rules like the "-3" one). Perhaps you'd be interested in using/contributing to my pep514tools project: https://github.com/zooba/pep514tools ? Because it doesn't have to imitate python.exe, it can have its own command line options, and I'd be totally happy for the __main__.py to be filled out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 13:33:23 2017 From: report at bugs.python.org (Jakub Wilk) Date: Mon, 15 May 2017 17:33:23 +0000 Subject: [issue30373] Incomplete description of re.LOCALE Message-ID: <1494869603.65.0.652150578672.issue30373@psf.upfronthosting.co.za> New submission from Jakub Wilk: reads: "Make \w, \W, \b, \B, \s and \S dependent on the current locale." But this is not the only thing this flag does. When combined with re.IGNORECASE, it also makes case-insesitive matching locale-dependent. ---------- assignee: docs at python components: Documentation messages: 293726 nosy: docs at python, jwilk priority: normal severity: normal status: open title: Incomplete description of re.LOCALE _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 13:48:25 2017 From: report at bugs.python.org (neeverett) Date: Mon, 15 May 2017 17:48:25 +0000 Subject: [issue30374] Make win_add2path.py take effect without having to log off Message-ID: <1494870505.18.0.0357720836897.issue30374@psf.upfronthosting.co.za> New submission from neeverett: I was trying to add Python to Windows PATH and found this tool. But after I ran it and restarted the Command Prompt, nothing seemed to be changed: Command Prompt still didn't recognize Python codes. Finally I got it done by manually setting the environment variables in Windows System Properties. Then I tried to figure out what was wrong with this script and found that it does not take effect until a reboot or log off. It's not mentioned in the content or output of the script, making it puzzling. The cause of this inconvenience is that though the script changes the env vars, applications don't refer to the new values automatically. It is explained in a Microsoft KB article(http://support.microsoft.com/kb/104011) -- "However, note that modifications to the environment variables do not result in immediate change. For example, if you start another Command Prompt after making the changes, the environment variables will reflect the previous (not the current) values. The changes do not take effect until you log off and then log back on." The article also provided a method to refresh the environment variables immediately -- "To effect these changes without having to log off, broadcast a WM_SETTINGCHANGE message to all windows in the system, so that any interested applications (such as Windows Explorer, Program Manager, Task Manager, Control Panel, and so forth) can perform an update." I am going to create a PR which implements it by using ctypes.windll.user32.SendMessageTimeoutW() to broadcast the WM_SETTINGCHANGE message. ---------- components: Demos and Tools, Windows, ctypes messages: 293727 nosy: neeverett, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Make win_add2path.py take effect without having to log off type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 13:52:09 2017 From: report at bugs.python.org (neeverett) Date: Mon, 15 May 2017 17:52:09 +0000 Subject: [issue30374] Make win_add2path.py take effect without having to log off In-Reply-To: <1494870505.18.0.0357720836897.issue30374@psf.upfronthosting.co.za> Message-ID: <1494870729.0.0.57388732723.issue30374@psf.upfronthosting.co.za> Changes by neeverett : ---------- pull_requests: +1688 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 14:29:52 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 15 May 2017 18:29:52 +0000 Subject: [issue26143] Ensure that IDLE's stdlib imports are from the stdlib In-Reply-To: <1453089950.28.0.356846327087.issue26143@psf.upfronthosting.co.za> Message-ID: <1494872992.7.0.487196187004.issue26143@psf.upfronthosting.co.za> Terry J. Reedy added the comment: What I want from this issue , from a user perspective, is a) for IDLE to run without stumbling over user files, and b) for user code to see the same sys.path when executing under IDLE as when executed directly with the same cpython binary in the same mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 14:43:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 May 2017 18:43:03 +0000 Subject: [issue30373] Incomplete description of re.LOCALE In-Reply-To: <1494869603.65.0.652150578672.issue30373@psf.upfronthosting.co.za> Message-ID: <1494873783.46.0.125322089257.issue30373@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This looks similar to issue24896. Closing this issue as a duplicate since it is makes large sense to merge these two documentation changes. ---------- nosy: +serhiy.storchaka resolution: -> fixed stage: -> resolved status: open -> closed superseder: -> It is undocumented that re.UNICODE affects re.IGNORECASE _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 14:48:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 May 2017 18:48:04 +0000 Subject: [issue24896] It is undocumented that re.UNICODE and re.LOCALE affect re.IGNORECASE In-Reply-To: <1439987891.31.0.547960058443.issue24896@psf.upfronthosting.co.za> Message-ID: <1494874084.09.0.827115965029.issue24896@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: As was reported in issue30373 there is the same issue with re.LOCALE. This documentation issue should be easy for everyone who is fluent in English and familiar with the re module. ---------- keywords: +easy nosy: +serhiy.storchaka title: It is undocumented that re.UNICODE affects re.IGNORECASE -> It is undocumented that re.UNICODE and re.LOCALE affect re.IGNORECASE _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 14:51:23 2017 From: report at bugs.python.org (Jakub Wilk) Date: Mon, 15 May 2017 18:51:23 +0000 Subject: [issue24896] It is undocumented that re.UNICODE and re.LOCALE affect re.IGNORECASE In-Reply-To: <1439987891.31.0.547960058443.issue24896@psf.upfronthosting.co.za> Message-ID: <1494874283.82.0.392889774104.issue24896@psf.upfronthosting.co.za> Changes by Jakub Wilk : ---------- nosy: +jwilk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 15:00:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 19:00:02 +0000 Subject: [issue30357] test_thread.test_save_exception_state_on_error(): Unhandled exception in thread: AMD64 Debian root 2.7 In-Reply-To: <1494867687.97.0.962304124578.issue30357@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: There is still posibillity that different tests/testrunners spawn threads and 'fool' testcase. If you run multiple test files in parallel, each test runner process runs a single test at the same time: test methods are run sequentially to prevent side effects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 15:01:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 May 2017 19:01:09 +0000 Subject: [issue30357] test_thread.test_save_exception_state_on_error(): Unhandled exception in thread: AMD64 Debian root 2.7 In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1494874869.87.0.514660958858.issue30357@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 6924ed55c9807d69757e03bbe1caeec1104efacb by Victor Stinner (grzgrzgrz3) in branch '2.7': bpo-30357 each test in test_thread waits until all spawned threads finish (#1583) https://github.com/python/cpython/commit/6924ed55c9807d69757e03bbe1caeec1104efacb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 15:32:46 2017 From: report at bugs.python.org (Eryk Sun) Date: Mon, 15 May 2017 19:32:46 +0000 Subject: [issue30374] Make win_add2path.py take effect without having to log off In-Reply-To: <1494870505.18.0.0357720836897.issue30374@psf.upfronthosting.co.za> Message-ID: <1494876766.95.0.937987242115.issue30374@psf.upfronthosting.co.za> Eryk Sun added the comment: Are people actually using this script? Maybe it should simply be removed. I see a few problems with it [1]: * A default value of "%PATH%" is wrong. That causes the system PATH to be concatenated with itself. * For the user scripts directory, replacing appdata with "%APPDATA%" causes os.path.isdir to always fail. * REG_EXPAND_SZ should only be used when '%' occurs 2 or more times. Otherwise use REG_SZ. An existing REG_SZ type should be preserved, if the value doesn't have two or more '%' characters, because the user may be reusing PATH in a REG_EXPAND_SZ variable. (The environment gets created in 2 passes -- actually 4 passes if we consider that system values are loaded before user values. REG_SZ values get loaded first, and then REG_EXPAND_SZ values are loaded and expanded. The latter may depend on REG_SZ values, and also system values in the user case, but should never depend on other REG_EXPAND_SZ values since the enumeration order of the registry key is undefined. In practice a key is enumerated in definition order, not the alphabetic order displayed in regedit.) * It doesn't broadcast a WM_SETTINGCHANGE message, so it needlessly forces the user to log off and back on in order to use the modified PATH. [1]: https://mail.python.org/pipermail/python-list/2016-February/703344.html ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 15:45:51 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 15 May 2017 19:45:51 +0000 Subject: [issue30350] devguide suggests to use VS 2008 to build Python 2.7, but VS 2008 is no more supported? In-Reply-To: <1494581567.83.0.310363881682.issue30350@psf.upfronthosting.co.za> Message-ID: <1494877551.36.0.16554798022.issue30350@psf.upfronthosting.co.za> Steve Dower added the comment: > That release is intended for building extension modules. Is it possible to configure it for building CPython It's intended for extension modules, but should be usable for building CPython itself if someone wants to take the time to update the Python 2.7 build system to use it. (Also, there's nothing wrong with the 64-bit toolset in this installer - that was the Windows SDK version of the compilers.) The main reason you can't use it is because our build system is MSBuild based and the compiler package does not register with MSBuild (it doesn't provide a Platform Toolset). It would be possible to write one that would work, though I don't know exactly how to do it - I believe ICC and clang both provide the required files though, so it may be relatively easy to add the toolset files into our source repo and make it work. There are likely some other reasons that the build will fail, but those can likely be worked around within the source repository. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 15:47:42 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 15 May 2017 19:47:42 +0000 Subject: [issue30368] [2.7] OpenSSL compilation fails on AMD64 Windows7 SP1 VS9.0 2.7 In-Reply-To: <1494837968.88.0.738073393346.issue30368@psf.upfronthosting.co.za> Message-ID: <1494877662.46.0.201764168855.issue30368@psf.upfronthosting.co.za> Steve Dower added the comment: Perl should not be required - we should be checking these files in to our clone on svn.p.o for use when building. (Perl is only required by whoever creates the source tree, normally Zach.) Perhaps it got missed in the latest update? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 15:47:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 May 2017 19:47:50 +0000 Subject: [issue30375] Correct stacklevel of warnings when compile regular expressions Message-ID: <1494877670.21.0.548090172972.issue30375@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: When compile a regular expression with groups or conditionals emitted warnings point on lines in the re module implementation rather than the line in user code. >>> import re >>> re.compile('x(?i)') __main__:1: DeprecationWarning: Flags not at the start of the expression x(?i) re.compile('x(?i)', re.IGNORECASE) >>> re.compile('(x(?i))') /home/serhiy/py/cpython/Lib/re.py:281: DeprecationWarning: Flags not at the start of the expression (x(?i)) p = sre_compile.compile(pattern, flags) re.compile('(x(?i))', re.IGNORECASE) >>> re.compile('((x(?i)))') /home/serhiy/py/cpython/Lib/sre_parse.py:889: DeprecationWarning: Flags not at the start of the expression ((x(?i))) p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, False) re.compile('((x(?i)))', re.IGNORECASE) Proposed patch fixes this: >>> import re >>> re.compile('x(?i)') __main__:1: DeprecationWarning: Flags not at the start of the expression x(?i) re.compile('x(?i)', re.IGNORECASE) >>> re.compile('(x(?i))') __main__:1: DeprecationWarning: Flags not at the start of the expression (x(?i)) re.compile('(x(?i))', re.IGNORECASE) >>> re.compile('((x(?i)))') __main__:1: DeprecationWarning: Flags not at the start of the expression ((x(?i))) re.compile('((x(?i)))', re.IGNORECASE) ---------- assignee: serhiy.storchaka components: Library (Lib), Regular Expressions messages: 293736 nosy: ezio.melotti, mrabarnett, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Correct stacklevel of warnings when compile regular expressions type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 15:50:16 2017 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 May 2017 19:50:16 +0000 Subject: [issue30368] [2.7] OpenSSL compilation fails on AMD64 Windows7 SP1 VS9.0 2.7 In-Reply-To: <1494837968.88.0.738073393346.issue30368@psf.upfronthosting.co.za> Message-ID: <1494877816.64.0.044568328045.issue30368@psf.upfronthosting.co.za> Zachary Ware added the comment: Perl is not required when using the PCbuild/ build files on any branch. It is currently required to use the PC/VS9.0 build files, at least for 64-bit builds, because I was not able to make it work (and not break the new system) in the time I had to get it done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 15:52:09 2017 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 15 May 2017 19:52:09 +0000 Subject: [issue30371] test_long_lines() fails randomly on AMD64 Windows7 SP1 3.x In-Reply-To: <1494865032.78.0.389289612669.issue30371@psf.upfronthosting.co.za> Message-ID: <1494877929.83.0.602733952308.issue30371@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 15:55:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 May 2017 19:55:58 +0000 Subject: [issue30375] Correct stacklevel of warnings when compile regular expressions In-Reply-To: <1494877670.21.0.548090172972.issue30375@psf.upfronthosting.co.za> Message-ID: <1494878158.23.0.127094081895.issue30375@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1689 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 16:21:24 2017 From: report at bugs.python.org (neeverett) Date: Mon, 15 May 2017 20:21:24 +0000 Subject: [issue30374] Make win_add2path.py take effect without having to log off In-Reply-To: <1494870505.18.0.0357720836897.issue30374@psf.upfronthosting.co.za> Message-ID: <1494879684.1.0.164881678771.issue30374@psf.upfronthosting.co.za> neeverett added the comment: I didn't noticed that there are other problems with this script. So maybe it needs a complete rewrite instead. But I doubt if it should be simply deleted. Actually I think there is a litte problem with the installer: "add Python to PATH" is not selected by default when installing. I don't know if there's a reason for this. But beginners like me tend to install Python under the default configs therefore it is possible that they later find Python is not in the system PATH. Under this condition it is at least more convenient than manually setting the env vars. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 16:42:40 2017 From: report at bugs.python.org (Paul Moore) Date: Mon, 15 May 2017 20:42:40 +0000 Subject: [issue30374] Make win_add2path.py take effect without having to log off In-Reply-To: <1494870505.18.0.0357720836897.issue30374@psf.upfronthosting.co.za> Message-ID: <1494880960.36.0.266844179065.issue30374@psf.upfronthosting.co.za> Paul Moore added the comment: The reasons for not adding Python to PATH by default are complex. We've tried both ways and neither is 100% satisfactory. The default install is a per-user install. If we added Python to PATH, then as a user setting it would come *after* the system part of PATH. If that includes python (for example, an older version of Python), then you think you have added Python to PATH but you still get the old version. We can't add the user python to the system PATH, as it may not be accessible to other users. We don't make an all-users Python the default because users would then not be able to "pip install" modules without using an elevated prompt. So an all-users install should be left as a choice for a system admin who understands the implications. Long story short, it's complicated and there's no really perfect solution. The easiest answer is to say that you should be using the "py" launcher to start Python anyway. That *is* available in PATH and will pick up your default configured Python. With that, you don't need to add anything to PATH. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 17:16:05 2017 From: report at bugs.python.org (Ryan Jarvis) Date: Mon, 15 May 2017 21:16:05 +0000 Subject: [issue30376] Curses documentation refers to incorrect type Message-ID: <1494882965.33.0.779610991751.issue30376@psf.upfronthosting.co.za> New submission from Ryan Jarvis: Currently the Python curses documentation refers to `WindowObject` multiple times in the documentation. The actual type signature is `_curses.curses window`. WindowObject does not exist. Seen at 16.11.1. Textbox objects and curses.initscr() for both Python2 and Python3 documentation. https://docs.python.org/3/library/curses.html https://docs.python.org/2/library/curses.html There is no type information available the curses window object in the documentation. ---------- assignee: docs at python components: Documentation messages: 293740 nosy: Ryan Jarvis, docs at python priority: normal severity: normal status: open title: Curses documentation refers to incorrect type versions: 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 Mon May 15 17:52:12 2017 From: report at bugs.python.org (Matthew Cowles) Date: Mon, 15 May 2017 21:52:12 +0000 Subject: [issue26143] Ensure that IDLE's stdlib imports are from the stdlib In-Reply-To: <1453089950.28.0.356846327087.issue26143@psf.upfronthosting.co.za> Message-ID: <1494885132.59.0.0934738497941.issue26143@psf.upfronthosting.co.za> Matthew Cowles added the comment: > a) for IDLE to run without stumbling over user files > b) for user code to see the same sys.path when executing under IDLE as when > executed directly with the same cpython binary in the same mode. If you can achieve that, no one will be more impressed than I am. I would take the easy way out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 18:34:34 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 15 May 2017 22:34:34 +0000 Subject: [issue30353] ctypes: pass by value for structs broken on Cygwin/MinGW 64-bit In-Reply-To: <1494605988.92.0.550577143248.issue30353@psf.upfronthosting.co.za> Message-ID: <1494887674.48.0.403802226852.issue30353@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: A 'defined(__aarch64__)' can be used for the arm64 arch. I will add it to your patch and test it on an arm64 machine to see if the test passes. ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 18:47:16 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 15 May 2017 22:47:16 +0000 Subject: [issue30353] ctypes: pass by value for structs broken on Cygwin/MinGW 64-bit In-Reply-To: <1494605988.92.0.550577143248.issue30353@psf.upfronthosting.co.za> Message-ID: <1494888436.18.0.45658260153.issue30353@psf.upfronthosting.co.za> Changes by Charalampos Stratakis : ---------- nosy: +ishcherb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 21:24:56 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 May 2017 01:24:56 +0000 Subject: [issue30211] Bdb: add docstrings In-Reply-To: <1493495660.85.0.350046044168.issue30211@psf.upfronthosting.co.za> Message-ID: <1494897896.63.0.265558107729.issue30211@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In the entry at https://docs.python.org/3/library/bdb.html#bdb.Bdb.canonic, ", stripped of surrounding angle brackets" is wrong, and should be replaced by ". 'Filenames' with angle brackets, such as "", generated in interactive mode, are returned unchanged" >>> 1/0 Traceback (most recent call last): File "", line 1, in ZeroDivisionError: division by zero (IDLE generates "", when n is statement number, starting with 0.) This and any other doc errors we find should be corrected in this issue, but perhaps in a separate PR that can be backported separately. ---------- assignee: docs at python -> terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 21:26:27 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 May 2017 01:26:27 +0000 Subject: [issue30211] Bdb: add docstrings In-Reply-To: <1493495660.85.0.350046044168.issue30211@psf.upfronthosting.co.za> Message-ID: <1494897987.53.0.708947869601.issue30211@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As I just posted to core-mentorship, my attempt to push to the PR failed. Did you leave the 'allow pushes' box checked when you created the PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 23:25:45 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 16 May 2017 03:25:45 +0000 Subject: [issue24339] iso6937 encoding missing In-Reply-To: <1433078403.47.0.568019085367.issue24339@psf.upfronthosting.co.za> Message-ID: <1494905145.1.0.394949565636.issue24339@psf.upfronthosting.co.za> Xiang Zhang added the comment: Would you mind converting this patch to a Github PR John? ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 23:29:13 2017 From: report at bugs.python.org (Michael Cuthbert) Date: Tue, 16 May 2017 03:29:13 +0000 Subject: [issue26904] Difflib quick_ratio() could use Counter() In-Reply-To: <1462163353.47.0.300392305122.issue26904@psf.upfronthosting.co.za> Message-ID: <1494905353.36.0.681400773082.issue26904@psf.upfronthosting.co.za> Michael Cuthbert added the comment: Poking to see if there's still interest in getting this into 3.7. Thanks! ---------- versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 15 23:30:57 2017 From: report at bugs.python.org (Michael Cuthbert) Date: Tue, 16 May 2017 03:30:57 +0000 Subject: [issue17446] doctest test finder doesnt find line numbers of properties In-Reply-To: <1363536507.07.0.43500928967.issue17446@psf.upfronthosting.co.za> Message-ID: <1494905457.18.0.226326539021.issue17446@psf.upfronthosting.co.za> Michael Cuthbert added the comment: just poking to see if this patch is worth trying to get into 3.7 ---------- versions: +Python 3.7 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 00:48:18 2017 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 16 May 2017 04:48:18 +0000 Subject: [issue29651] Inconsistent/undocumented urlsplit/urlparse behavior on invalid inputs In-Reply-To: <1488051927.22.0.367579438822.issue29651@psf.upfronthosting.co.za> Message-ID: <1494910098.43.0.392693606633.issue29651@psf.upfronthosting.co.za> Senthil Kumaran added the comment: New changeset f6e863d868a621594df2a8abe072b5d4766e7137 by Senthil Kumaran (Howie Benefiel) in branch 'master': bpo-29651 - Cover edge case of square brackets in urllib docs (#1128) https://github.com/python/cpython/commit/f6e863d868a621594df2a8abe072b5d4766e7137 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 01:01:30 2017 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 16 May 2017 05:01:30 +0000 Subject: [issue29651] Inconsistent/undocumented urlsplit/urlparse behavior on invalid inputs In-Reply-To: <1488051927.22.0.367579438822.issue29651@psf.upfronthosting.co.za> Message-ID: <1494910890.54.0.801868190773.issue29651@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- pull_requests: +1690 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 01:09:39 2017 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 16 May 2017 05:09:39 +0000 Subject: [issue29651] Inconsistent/undocumented urlsplit/urlparse behavior on invalid inputs In-Reply-To: <1488051927.22.0.367579438822.issue29651@psf.upfronthosting.co.za> Message-ID: <1494911379.67.0.872266948611.issue29651@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- pull_requests: +1691 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 01:38:12 2017 From: report at bugs.python.org (Steve Barnes) Date: Tue, 16 May 2017 05:38:12 +0000 Subject: [issue30362] Launcher add list and list with paths options In-Reply-To: <1494753197.17.0.253655325044.issue30362@psf.upfronthosting.co.za> Message-ID: <1494913092.31.0.156770771134.issue30362@psf.upfronthosting.co.za> Steve Barnes added the comment: @steve.dower I did check and none of the currently supported pythons us -l or -L and have implemented it with -list and -long-list but I do appreciate your point that someone might come up with a use for all of these flags in a future version of python. How about dropping the short flags, (-l & -L), and making the long flags more launcher specific, i.e. --launcher-list and --launcher-list-paths spring to mind. I really do think that this change would be really useful, e.g. in the short form to generate a list of installed targets that might all need a specific library updated or to create one venv for each installed target, the long version has already helped me out spotting where a python that I was not expecting had been added to the registry. I'll also take a look over on pep514tools to see if there is anything I can do to help there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 01:41:05 2017 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 16 May 2017 05:41:05 +0000 Subject: [issue29651] Inconsistent/undocumented urlsplit/urlparse behavior on invalid inputs In-Reply-To: <1488051927.22.0.367579438822.issue29651@psf.upfronthosting.co.za> Message-ID: <1494913265.59.0.0801139537306.issue29651@psf.upfronthosting.co.za> Senthil Kumaran added the comment: New changeset 72e5aa1ef812358b3b113e784e7365fec13dfd69 by Senthil Kumaran in branch '3.5': bpo-29651 - Cover edge case of square brackets in urllib docs (#1128) (#1597) https://github.com/python/cpython/commit/72e5aa1ef812358b3b113e784e7365fec13dfd69 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 01:41:10 2017 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 16 May 2017 05:41:10 +0000 Subject: [issue29651] Inconsistent/undocumented urlsplit/urlparse behavior on invalid inputs In-Reply-To: <1488051927.22.0.367579438822.issue29651@psf.upfronthosting.co.za> Message-ID: <1494913270.12.0.260187145399.issue29651@psf.upfronthosting.co.za> Senthil Kumaran added the comment: New changeset 75b8a54bcad70806d9dcbbe20786f4d9092ab39c by Senthil Kumaran in branch '3.6': bpo-29651 - Cover edge case of square brackets in urllib docs (#1128) (#1596) https://github.com/python/cpython/commit/75b8a54bcad70806d9dcbbe20786f4d9092ab39c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 01:50:15 2017 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 16 May 2017 05:50:15 +0000 Subject: [issue29651] Inconsistent/undocumented urlsplit/urlparse behavior on invalid inputs In-Reply-To: <1488051927.22.0.367579438822.issue29651@psf.upfronthosting.co.za> Message-ID: <1494913814.99.0.877300977888.issue29651@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 02:35:27 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 May 2017 06:35:27 +0000 Subject: [issue30211] Bdb: add docstrings In-Reply-To: <1493495660.85.0.350046044168.issue30211@psf.upfronthosting.co.za> Message-ID: <1494916527.18.0.496999442015.issue30211@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The bdb class or __init__ docstring needs to document the data members with a short explanation. Some of the args need better explanation. Some of this I may fill in *after* reviewing the proposed tests, when I understand the code better. Reviewing pdb and IDLE's Idb and Debugger (my real interest here) will help. is_skipped_module is public, by its name, but is not in the doc. break_here: " If the breakpoint is a temporary one, this method deletes it." maybe (if flag from effective is True) The first comment and the code that follows do not seem to match. IDLE does not set breakpoints for functions, so I cannot test the behavior here with its debugger. set_break doc says filename should be canonic, but function then calls canonic. So canonic not needed. If it is, result is self.fncache[canonic_filename] = self.fncache[canonic_filename]. But I will leave suggestion as is for now. get_stack: return 'size of the higher part': If higher part does not stop as self.botframe (which might be None?), the size is of the lower part. I need to review frame and tb objects pin down this docstring. I just pushed my changes. Please review for typos and anything you think is a new error. Otherwise, I think this is about good enough to merge. ---------- stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 03:51:13 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 16 May 2017 07:51:13 +0000 Subject: [issue30301] multiprocessing: AttributeError: 'SimpleQueue' object has no attribute '_poll' In-Reply-To: <1494183710.88.0.708414094068.issue30301@psf.upfronthosting.co.za> Message-ID: <1494921073.34.0.807342882627.issue30301@psf.upfronthosting.co.za> Xiang Zhang added the comment: Related commit is bdb1cf1ca56db25b33fb15dd91eef2cc32cd8973. A simple reproduce snippet: import multiprocessing as mp def foo(q): q.put('hello') assert not q.empty() if __name__ == '__main__': mp.set_start_method('spawn') q = mp.SimpleQueue() p = mp.Process(target=foo, args=(q,)) p.start() print(q.get()) p.join() ---------- nosy: +xiang.zhang stage: -> patch review type: crash -> behavior versions: +Python 3.5, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 04:06:05 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 16 May 2017 08:06:05 +0000 Subject: [issue30301] multiprocessing: AttributeError: 'SimpleQueue' object has no attribute '_poll' In-Reply-To: <1494183710.88.0.708414094068.issue30301@psf.upfronthosting.co.za> Message-ID: <1494921965.96.0.190562613493.issue30301@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1692 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 04:48:18 2017 From: report at bugs.python.org (neeverett) Date: Tue, 16 May 2017 08:48:18 +0000 Subject: [issue30374] Make win_add2path.py take effect without having to log off In-Reply-To: <1494870505.18.0.0357720836897.issue30374@psf.upfronthosting.co.za> Message-ID: <1494924498.2.0.467219156017.issue30374@psf.upfronthosting.co.za> neeverett added the comment: I think the original author adds the relative path "%APPDATA%..." with the intention to keep it effective even when the set path of APPDATA changes. However that compulsively changes the type of PATH var to REG_EXPAND_SZ. It is reasonable that the type of PATH var should not be changed. So I think when the type is REG_SZ, not adding the %APPDATA% path and instead adding the absolute path of it should be a good idea. I just modified my PR and fixed it this way, along with other problems that Eryk Sun mentioned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 05:32:15 2017 From: report at bugs.python.org (Klamann) Date: Tue, 16 May 2017 09:32:15 +0000 Subject: [issue30323] concurrent.futures.Executor.map() consumes all memory when big generators are used In-Reply-To: <1494365822.25.0.431593996842.issue30323@psf.upfronthosting.co.za> Message-ID: <1494927135.14.0.653767074335.issue30323@psf.upfronthosting.co.za> Klamann added the comment: Thanks for pointing this out. *closed* ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 05:34:03 2017 From: report at bugs.python.org (Klamann) Date: Tue, 16 May 2017 09:34:03 +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: <1494927243.44.0.0396722795031.issue29842@psf.upfronthosting.co.za> Changes by Klamann : ---------- nosy: +Klamann _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 05:36:49 2017 From: report at bugs.python.org (Berker Peksag) Date: Tue, 16 May 2017 09:36:49 +0000 Subject: [issue29898] PYTHONLEGACYWINDOWSIOENCODING isn't implemented In-Reply-To: <1490394843.09.0.467635996133.issue29898@psf.upfronthosting.co.za> Message-ID: <1494927409.26.0.0263165276019.issue29898@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 87fa8a780e9045a26c735f085c07bba4b2d0be60 by Berker Peksag in branch 'master': bpo-29898: Fix incorrect env variable name (GH-1576) https://github.com/python/cpython/commit/87fa8a780e9045a26c735f085c07bba4b2d0be60 ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 05:37:09 2017 From: report at bugs.python.org (Berker Peksag) Date: Tue, 16 May 2017 09:37:09 +0000 Subject: [issue29898] PYTHONLEGACYWINDOWSIOENCODING isn't implemented In-Reply-To: <1490394843.09.0.467635996133.issue29898@psf.upfronthosting.co.za> Message-ID: <1494927429.3.0.0959360948988.issue29898@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: test needed -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 05:38:41 2017 From: report at bugs.python.org (Berker Peksag) Date: Tue, 16 May 2017 09:38:41 +0000 Subject: [issue30323] concurrent.futures.Executor.map() consumes all memory when big generators are used In-Reply-To: <1494365822.25.0.431593996842.issue30323@psf.upfronthosting.co.za> Message-ID: <1494927521.02.0.79622943117.issue30323@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- components: +Library (Lib) superseder: -> Make Executor.map work with infinite/large inputs correctly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 06:39:28 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 16 May 2017 10:39:28 +0000 Subject: [issue23667] IDLE to provide option for making trailing whitespace visible In-Reply-To: <1426376584.28.0.267295855034.issue23667@psf.upfronthosting.co.za> Message-ID: <1494931168.91.0.516742675406.issue23667@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +1693 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 06:41:27 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 16 May 2017 10:41:27 +0000 Subject: [issue23667] IDLE to provide option for making trailing whitespace visible In-Reply-To: <1426376584.28.0.267295855034.issue23667@psf.upfronthosting.co.za> Message-ID: <1494931287.52.0.892813396369.issue23667@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +1694 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 06:42:44 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 16 May 2017 10:42:44 +0000 Subject: [issue23667] IDLE to provide option for making trailing whitespace visible In-Reply-To: <1426376584.28.0.267295855034.issue23667@psf.upfronthosting.co.za> Message-ID: <1494931364.33.0.272115558264.issue23667@psf.upfronthosting.co.za> Louie Lu added the comment: PR 1602 add trailing whitespace highlight, which using color from error. PR 1603 add TrimExtension to provide auto trim while saving the file. ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 08:16:18 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 May 2017 12:16:18 +0000 Subject: [issue30375] Correct stacklevel of warnings when compile regular expressions In-Reply-To: <1494877670.21.0.548090172972.issue30375@psf.upfronthosting.co.za> Message-ID: <1494936978.97.0.214939290812.issue30375@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c7ac7280c321b3c1679fe5f657a6be0f86adf173 by Serhiy Storchaka in branch 'master': bpo-30375: Correct the stacklevel of regex compiling warnings. (#1595) https://github.com/python/cpython/commit/c7ac7280c321b3c1679fe5f657a6be0f86adf173 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 08:38:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 May 2017 12:38:47 +0000 Subject: [issue30375] Correct stacklevel of warnings when compile regular expressions In-Reply-To: <1494877670.21.0.548090172972.issue30375@psf.upfronthosting.co.za> Message-ID: <1494938327.79.0.842336039464.issue30375@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1695 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 08:43:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 May 2017 12:43:24 +0000 Subject: [issue30375] Correct stacklevel of warnings when compile regular expressions In-Reply-To: <1494877670.21.0.548090172972.issue30375@psf.upfronthosting.co.za> Message-ID: <1494938604.51.0.420337439442.issue30375@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1696 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 08:46:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 May 2017 12:46:03 +0000 Subject: [issue30375] Correct stacklevel of warnings when compile regular expressions In-Reply-To: <1494877670.21.0.548090172972.issue30375@psf.upfronthosting.co.za> Message-ID: <1494938763.0.0.659285491927.issue30375@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 08:59:21 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 16 May 2017 12:59:21 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1494939561.98.0.153650750258.issue29710@psf.upfronthosting.co.za> Nick Coghlan added the comment: I think the simplest fix to make the docs "not wrong" would be to just delete the part in parentheses. Beyond that, I'm not quite sure how to concisely describe the actual behaviour, but I think the mention of "2's complement" isn't especially helpful in its current form, since we don't give a clear sense of how the translation from an arbitrary length integer to a suitable 2's complement form is handled. For `~n`, the most concise explanation is the arithmetic equivalent: it is always implemented as `-(n+1)` Similarly, for `x << n` and `x >> n`, they're now exactly equivalent to `x * 2 ** n` and `x // 2 ** n` without any overflow checking or internal representation qualification (as even in Python 2.x, left-shift will automatically promote to a long when needed) For `x | y` and `x & y`, things are a little more subtle, since that's where the internal 2's complement representation comes into play, but you can't just write out the formal definition of 2's complement at the Python level and get the same answer as is given by the binary operators: >>> -5 & 5 1 >>> -5 | 5 -1 >>> (~-5 + 1) & 5 # Effectively '5 & 5' 5 >>> (~-5 + 1) | 5 # Effectively '5 | 5' 5 >>> -5 | (~5+1) # Effectively '-5 & -5' -5 >>> -5 & (~5+1) # Effectively '-5 | -5' -5 The problem here is that the sign bits of the operands matter a great deal, since they affect the sign expansion in the conversion to the 2's complement form, but that detail gets lost if the conversion is done prior to the bitwise binary operator invocation. One way to get the same results as the interpreter level algorithms is to use a 2's complement bit length of `1 + max(x.bit_length(), y.bit_length()`, so the equivalent operations become: >>> bin(0b1011 & 0b0101) # -5 & 5 -> 1 in 4 bit 2's complement '0b1' >>> bin(0b1011 | 0b0101) # -5 | 5 -> -1 in 4 bit 2's complement '0b1111' So perhaps a helpful change to make would be to move the note about negative numbers to a numbered footnote in the table, and state that the bitwise binary operations are semantically equivalent to calculations using two's complement in a bit-width of `1 + max(x.bit_length(), y.bit_length()`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 09:08:09 2017 From: report at bugs.python.org (Albert-Jan Nijburg) Date: Tue, 16 May 2017 13:08:09 +0000 Subject: [issue30377] Unnecessary complexity in tokenize.py around handling of comments and newlines Message-ID: <1494940089.25.0.512912878732.issue30377@psf.upfronthosting.co.za> New submission from Albert-Jan Nijburg: While porting tokenize.py to javascript I stumbled upon this. The bit of code that checks if it's a newline or a comment, checks for comment twice. These can be split up, this way the code is a bit more readable. https://github.com/python/cpython/blob/master/Lib/tokenize.py#L560 It's not broken, it's just a bit more complex then it has to be. ---------- components: Library (Lib) messages: 293760 nosy: Albert-Jan Nijburg, meador.inge priority: normal severity: normal status: open title: Unnecessary complexity in tokenize.py around handling of comments and newlines type: enhancement versions: 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 Tue May 16 09:14:27 2017 From: report at bugs.python.org (mahboubi) Date: Tue, 16 May 2017 13:14:27 +0000 Subject: [issue30195] writing non-ascii characters in xml file using python code embedded in C In-Reply-To: <1493374492.88.0.89710812833.issue30195@psf.upfronthosting.co.za> Message-ID: <1494940467.85.0.866497038731.issue30195@psf.upfronthosting.co.za> mahboubi added the comment: problem solved, It's not related to embedding python in C, Ijust had to use mystring.decode('utf-8') instead of unicode(mystring,"utf-8") ---------- stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 09:21:15 2017 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 May 2017 13:21:15 +0000 Subject: [issue30377] Unnecessary complexity in tokenize.py around handling of comments and newlines In-Reply-To: <1494940089.25.0.512912878732.issue30377@psf.upfronthosting.co.za> Message-ID: <1494940875.7.0.403384600186.issue30377@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +1697 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 09:22:11 2017 From: report at bugs.python.org (Pranav Deshpande) Date: Tue, 16 May 2017 13:22:11 +0000 Subject: [issue18299] Change script_helper to use universal_newlines=True in _assert_python In-Reply-To: <1372163490.54.0.858843080501.issue18299@psf.upfronthosting.co.za> Message-ID: <1494940931.34.0.430631000148.issue18299@psf.upfronthosting.co.za> Pranav Deshpande added the comment: Hello, I would like to work on this issue. Could you guide me on so as how to proceed with this? ---------- nosy: +Pranav Deshpande _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 09:31:09 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 16 May 2017 13:31:09 +0000 Subject: [issue30211] Bdb: add docstrings In-Reply-To: <1493495660.85.0.350046044168.issue30211@psf.upfronthosting.co.za> Message-ID: <1494941469.28.0.56529061138.issue30211@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Thank you. I had some questions that I put on the commit. You're right about it saying it must be in canonic form and then it calls canonic. I figured someone added the call later to prevent an error, but didn't change the warning, but I didn't know if I should change it. I added a comment about get_stack on github. I know I'm missing something here, but I had trouble documenting that because it didn't look like it was doing what the doc said. I'm not at my regular computer this week, so I can't add any changes until Saturday. I'll do the is_skipped_module doc then. Thank you for the edits on the other docstrings. They make a lot more sense now. Although I still don't like the user_* ones. I hadn't changed them from the original before, but it feels like they should say something else, like what's expected of them. The test example within bdb.py helped me understand what can be done with them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 10:23:19 2017 From: report at bugs.python.org (Calvin Cheng) Date: Tue, 16 May 2017 14:23:19 +0000 Subject: [issue30378] SysLogHandler does not support IPv6 destinations Message-ID: <1494944599.91.0.527371158049.issue30378@psf.upfronthosting.co.za> New submission from Calvin Cheng: The attached test script works fine with IPv4 syslog: $ python test_syslog.py 192.168.1.4 (no errors reported) When running the attached script with python 3.5.2 on Ubuntu 16.04, received the following error: $ python3 test_syslog.py ::1 --- Logging error --- Traceback (most recent call last): File "/usr/lib/python3.5/logging/handlers.py", line 908, in emit self.socket.sendto(msg, self.address) socket.gaierror: [Errno -9] Address family for hostname not supported Call stack: File "test_syslog.py", line 16, in logging.info("Test Syslog with IPv6") Message: 'Test Syslog with IPv6' Arguments: () Similar error in python 2.7.10: $ python test_syslog.py ::1 Traceback (most recent call last): File "/usr/lib/python2.7/logging/handlers.py", line 864, in emit self.socket.sendto(msg, self.address) gaierror: [Errno -9] Address family for hostname not supported Logged from file test_syslog.py, line 16 ---------- components: Library (Lib) files: test_syslog.py messages: 293764 nosy: Calvin Cheng priority: normal severity: normal status: open title: SysLogHandler does not support IPv6 destinations type: behavior versions: Python 3.5 Added file: http://bugs.python.org/file46865/test_syslog.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 10:58:51 2017 From: report at bugs.python.org (John Schaefer) Date: Tue, 16 May 2017 14:58:51 +0000 Subject: [issue30379] multiprocessing Array create for ctypes.c_char, TypeError unless 1 char string arg used Message-ID: <1494946731.18.0.80959187038.issue30379@psf.upfronthosting.co.za> New submission from John Schaefer: When creating a multiprocessing Array equivalent for unsigned chars, eg from a numpy.uint8 array, the first argument: typecode_or_type must be specified as a one character string, if a typecode is used the method raises a TypeError. >>> import numpy as np, multiprocessing as mp, ctypes >>> arr = np.array(range(10), dtype=np.uint8) >>> arr array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype=uint8) >>> mp.Array("B", arr) >> mp.Array(ctypes.c_char, arr) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.7/multiprocessing/__init__.py", line 260, in Array return Array(typecode_or_type, size_or_initializer, **kwds) File "/usr/lib/python2.7/multiprocessing/sharedctypes.py", line 120, in Array obj = RawArray(typecode_or_type, size_or_initializer) File "/usr/lib/python2.7/multiprocessing/sharedctypes.py", line 94, in RawArray result.__init__(*size_or_initializer) TypeError: one character string expected This contrasts with behavior exhibited with other types: >>> farr = np.array(range(10), dtype=np.float) >>> mp.Array(ctypes.c_double, farr) _______________________________________ From report at bugs.python.org Tue May 16 11:08:57 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 16 May 2017 15:08:57 +0000 Subject: [issue30195] writing non-ascii characters in xml file using python code embedded in C In-Reply-To: <1493374492.88.0.89710812833.issue30195@psf.upfronthosting.co.za> Message-ID: <1494947337.41.0.150803999039.issue30195@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 11:11:15 2017 From: report at bugs.python.org (Davin Potts) Date: Tue, 16 May 2017 15:11:15 +0000 Subject: [issue30379] multiprocessing Array create for ctypes.c_char, TypeError unless 1 char string arg used In-Reply-To: <1494946731.18.0.80959187038.issue30379@psf.upfronthosting.co.za> Message-ID: <1494947475.05.0.0866837368256.issue30379@psf.upfronthosting.co.za> Davin Potts added the comment: Maybe I missed your point but why would you not want to do this instead? >>> mp.Array(ctypes.c_int8, arr) > ---------- nosy: +davin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 11:12:15 2017 From: report at bugs.python.org (Davin Potts) Date: Tue, 16 May 2017 15:12:15 +0000 Subject: [issue30379] multiprocessing Array create for ctypes.c_char, TypeError unless 1 char string arg used In-Reply-To: <1494946731.18.0.80959187038.issue30379@psf.upfronthosting.co.za> Message-ID: <1494947535.72.0.253219150748.issue30379@psf.upfronthosting.co.za> Davin Potts added the comment: Perhaps I should've used ctypes.c_uint8 in that example/question instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 11:16:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 May 2017 15:16:29 +0000 Subject: [issue30375] Correct stacklevel of warnings when compile regular expressions In-Reply-To: <1494877670.21.0.548090172972.issue30375@psf.upfronthosting.co.za> Message-ID: <1494947789.07.0.990615072494.issue30375@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 73fb45df0487144765808c5d25914c67232d83fe by Serhiy Storchaka in branch '3.6': [3.6] bpo-30375: Correct the stacklevel of regex compiling warnings. (GH-1595) (#1604) https://github.com/python/cpython/commit/73fb45df0487144765808c5d25914c67232d83fe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 11:16:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 May 2017 15:16:55 +0000 Subject: [issue30375] Correct stacklevel of warnings when compile regular expressions In-Reply-To: <1494877670.21.0.548090172972.issue30375@psf.upfronthosting.co.za> Message-ID: <1494947815.59.0.578569410576.issue30375@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 24b5ed230df65f6a1f9d8dd0c4409377576113d9 by Serhiy Storchaka in branch '3.5': [3.5] bpo-30375: Correct the stacklevel of regex compiling warnings. (GH-1595) (#1605) https://github.com/python/cpython/commit/24b5ed230df65f6a1f9d8dd0c4409377576113d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 11:44:07 2017 From: report at bugs.python.org (Albert-Jan Nijburg) Date: Tue, 16 May 2017 15:44:07 +0000 Subject: [issue25324] Importing tokenize modifies token In-Reply-To: <1444145798.79.0.176080140328.issue25324@psf.upfronthosting.co.za> Message-ID: <1494949447.83.0.312532579896.issue25324@psf.upfronthosting.co.za> Changes by Albert-Jan Nijburg : ---------- pull_requests: +1699 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 12:08:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 May 2017 16:08:10 +0000 Subject: [issue30377] Unnecessary complexity in tokenize.py around handling of comments and newlines In-Reply-To: <1494940089.25.0.512912878732.issue30377@psf.upfronthosting.co.za> Message-ID: <1494950890.91.0.705066310762.issue30377@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The code is correct, it just can be made cleaner. No need to backport the change to other versions. The line "if line[pos] in '#\r\n':" looks a kind of optimization. In common case (not a newline and not a comment) there is only one check. The expression "(NL, COMMENT)[line[pos] == '#']" is redundant of course, it can be replaced by just "NL". Note that now the line that yields yield TokenInfo(NL, ...) is almost the same for comments and newlines. If rename nl_pos to pos the same line can be used in both cases. ---------- nosy: +serhiy.storchaka versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 12:08:31 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 May 2017 16:08:31 +0000 Subject: [issue30377] Unnecessary complexity in tokenize.py around handling of comments and newlines In-Reply-To: <1494940089.25.0.512912878732.issue30377@psf.upfronthosting.co.za> Message-ID: <1494950911.82.0.346336875381.issue30377@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 12:19:28 2017 From: report at bugs.python.org (Berker Peksag) Date: Tue, 16 May 2017 16:19:28 +0000 Subject: [issue29898] PYTHONLEGACYWINDOWSIOENCODING isn't implemented In-Reply-To: <1490394843.09.0.467635996133.issue29898@psf.upfronthosting.co.za> Message-ID: <1494951568.93.0.687556912047.issue29898@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- pull_requests: +1700 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 12:20:34 2017 From: report at bugs.python.org (Iryna Shcherbina) Date: Tue, 16 May 2017 16:20:34 +0000 Subject: [issue30353] ctypes: pass by value for structs broken on Cygwin/MinGW 64-bit In-Reply-To: <1494605988.92.0.550577143248.issue30353@psf.upfronthosting.co.za> Message-ID: <1494951634.75.0.520490335507.issue30353@psf.upfronthosting.co.za> Iryna Shcherbina added the comment: I have added `defined(__aarch64__)` check to the if statement and tested the patch on arm64. The test passed. So could you please also add the check for `defined(__aarch64__)` to the pull request so that it fixes #29804 as well? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 12:27:06 2017 From: report at bugs.python.org (Albert-Jan Nijburg) Date: Tue, 16 May 2017 16:27:06 +0000 Subject: [issue30377] Unnecessary complexity in tokenize.py around handling of comments and newlines In-Reply-To: <1494940089.25.0.512912878732.issue30377@psf.upfronthosting.co.za> Message-ID: <1494952026.14.0.91551124057.issue30377@psf.upfronthosting.co.za> Albert-Jan Nijburg added the comment: Oh yes you're right! I've updated the code on github. Even cleaner this way :). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 12:28:00 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 16 May 2017 16:28:00 +0000 Subject: [issue30372] Status of __builtins__ is not totally clear In-Reply-To: <1494865238.41.0.458723699483.issue30372@psf.upfronthosting.co.za> Message-ID: <1494952080.96.0.359592456989.issue30372@psf.upfronthosting.co.za> Brett Cannon added the comment: You're correct that both are CPython implementation details and could be more clearly marked as such. (In case anyone is curious, the code to look up __import__() can be found at https://github.com/python/cpython/blob/c7ac7280c321b3c1679fe5f657a6be0f86adf173/Python/ceval.c#L4991 .) ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 12:44:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 May 2017 16:44:43 +0000 Subject: [issue30301] multiprocessing: AttributeError: 'SimpleQueue' object has no attribute '_poll' In-Reply-To: <1494183710.88.0.708414094068.issue30301@psf.upfronthosting.co.za> Message-ID: <1494953083.72.0.505735545589.issue30301@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. But can you convert the reproducer to a test? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 13:20:14 2017 From: report at bugs.python.org (Calvin Cheng) Date: Tue, 16 May 2017 17:20:14 +0000 Subject: [issue30378] SysLogHandler does not support IPv6 destinations In-Reply-To: <1494944599.91.0.527371158049.issue30378@psf.upfronthosting.co.za> Message-ID: <1494955214.9.0.125834126374.issue30378@psf.upfronthosting.co.za> Changes by Calvin Cheng : ---------- nosy: +Calvin Cheng -calcheng _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 13:20:46 2017 From: report at bugs.python.org (Calvin Cheng) Date: Tue, 16 May 2017 17:20:46 +0000 Subject: [issue30378] SysLogHandler does not support IPv6 destinations In-Reply-To: <1494944599.91.0.527371158049.issue30378@psf.upfronthosting.co.za> Message-ID: <1494955246.47.0.198752308527.issue30378@psf.upfronthosting.co.za> Changes by Calvin Cheng : ---------- nosy: +calcheng -Calvin Cheng _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 13:29:33 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 16 May 2017 17:29:33 +0000 Subject: [issue30380] Sphinx 1.6.1 raising new warnings in docs build Message-ID: <1494955773.64.0.780886638634.issue30380@psf.upfronthosting.co.za> New submission from Brett Cannon: The Travis file uses `make venv` which does `python3 -m pip install --upgrade sphinx` which is pulling in Sphinx 1.6.1 which was released today (under Python 2.7 the pip call is direct instead of using `make venv`). The problem is that Sphinx 1.6.1 adds some new warnings that then is flagging the docs build as failing. To fix this we should probably stop calling `make venv` in .travis.yml and instead explicitly install Sphinx 1.5.6 for the docs build. Once Travis is green again a separate PR can be done to update `master` to build cleanly under Sphinx 1.6.1. ---------- assignee: docs at python components: Documentation messages: 293775 nosy: brett.cannon, docs at python priority: critical severity: normal status: open title: Sphinx 1.6.1 raising new warnings in docs build versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 13:30:24 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 16 May 2017 17:30:24 +0000 Subject: [issue30380] Sphinx 1.6.1 raising new warnings in docs build In-Reply-To: <1494955773.64.0.780886638634.issue30380@psf.upfronthosting.co.za> Message-ID: <1494955824.35.0.552251972738.issue30380@psf.upfronthosting.co.za> Brett Cannon added the comment: Technically it's probably best to do `python3 -m pip install sphinx~=1.5.6` so bugfix releases are picked up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 13:54:29 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 16 May 2017 17:54:29 +0000 Subject: [issue30380] Sphinx 1.6.1 raising new warnings in docs build In-Reply-To: <1494955773.64.0.780886638634.issue30380@psf.upfronthosting.co.za> Message-ID: <1494957269.18.0.408966180482.issue30380@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +1701 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 14:14:07 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 May 2017 18:14:07 +0000 Subject: [issue23667] IDLE to provide option for making trailing whitespace visible In-Reply-To: <1426376584.28.0.267295855034.issue23667@psf.upfronthosting.co.za> Message-ID: <1494958447.44.0.10376695375.issue23667@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: needs patch -> patch review versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 14:18:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 May 2017 18:18:08 +0000 Subject: [issue30380] Sphinx 1.6.1 raising new warnings in docs build In-Reply-To: <1494955773.64.0.780886638634.issue30380@psf.upfronthosting.co.za> Message-ID: <1494958688.21.0.513524888526.issue30380@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1702 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 14:20:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 May 2017 18:20:15 +0000 Subject: [issue30380] Sphinx 1.6.1 raising new warnings in docs build In-Reply-To: <1494955773.64.0.780886638634.issue30380@psf.upfronthosting.co.za> Message-ID: <1494958815.25.0.186499925799.issue30380@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 1613 tries to fix a warning by using explicit footnote numbering. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 14:53:15 2017 From: report at bugs.python.org (joernheissler) Date: Tue, 16 May 2017 18:53:15 +0000 Subject: [issue18233] SSLSocket.getpeercertchain() In-Reply-To: <1371415195.44.0.636993698614.issue18233@psf.upfronthosting.co.za> Message-ID: <1494960795.1.0.0679825431828.issue18233@psf.upfronthosting.co.za> joernheissler added the comment: Hi, I'd like to see this feature too. My use case is a monitoring script to check the life time of the server certificate, including the chain. I would prefer to have a wrapper around SSL_get_peer_cert_chain. I understand that this is *not* a verified chain. That's okay. openssl-1.1 added a new function SSL_get0_verified_chain which may be safer for most applications. Is there any real difference to X509_STORE_CTX_get1_chain? If you're worried about people misusing these functions, add a warning in the docs and point them to "get_peer_verified_chain"? ---------- nosy: +joernheissler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 16:18:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 May 2017 20:18:12 +0000 Subject: [issue30380] Sphinx 1.6.1 raising new warnings in docs build In-Reply-To: <1494955773.64.0.780886638634.issue30380@psf.upfronthosting.co.za> Message-ID: <1494965892.08.0.763446232908.issue30380@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset d97b7dc94b19063f0589d401bdc4aaadc7030762 by Serhiy Storchaka in branch 'master': bpo-30380: Fix Sphinx 1.6.1 warnings. (#1613) https://github.com/python/cpython/commit/d97b7dc94b19063f0589d401bdc4aaadc7030762 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 16:24:31 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 May 2017 20:24:31 +0000 Subject: [issue30380] Sphinx 1.6.1 raising new warnings in docs build In-Reply-To: <1494955773.64.0.780886638634.issue30380@psf.upfronthosting.co.za> Message-ID: <1494966271.3.0.226635705567.issue30380@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1703 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 16:28:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 May 2017 20:28:37 +0000 Subject: [issue30380] Sphinx 1.6.1 raising new warnings in docs build In-Reply-To: <1494955773.64.0.780886638634.issue30380@psf.upfronthosting.co.za> Message-ID: <1494966517.28.0.341262364782.issue30380@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1704 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 16:34:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 May 2017 20:34:33 +0000 Subject: [issue30380] Sphinx 1.6.1 raising new warnings in docs build In-Reply-To: <1494955773.64.0.780886638634.issue30380@psf.upfronthosting.co.za> Message-ID: <1494966873.64.0.136811923245.issue30380@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1705 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 16:37:35 2017 From: report at bugs.python.org (Kirk Sayre) Date: Tue, 16 May 2017 20:37:35 +0000 Subject: [issue24960] Can't use lib2to3 with embeddable zip file. In-Reply-To: <1440869782.83.0.207113001402.issue24960@psf.upfronthosting.co.za> Message-ID: <1494967055.56.0.702404073459.issue24960@psf.upfronthosting.co.za> Kirk Sayre added the comment: I've been fighting with this issue today trying to import networkx in the embedded Python shipped with IDA-Pro. I have implemented a local fix to pgen.py that allows networkx to import and be used in IDAPython scripts. I added a check to see if a .zip archive appears in the path of the file loaded in the constructor and if so I use the zipfile package to open the archived file rather than the standard file open() function. I've uploaded the modified pgen.py in case any one is interested. ---------- nosy: +kirk.d.sayre versions: +Python 2.7 -Python 3.5 Added file: http://bugs.python.org/file46866/pgen.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 16:46:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 20:46:38 +0000 Subject: [issue30368] [2.7] OpenSSL compilation fails on AMD64 Windows7 SP1 VS9.0 2.7 In-Reply-To: <1494837968.88.0.738073393346.issue30368@psf.upfronthosting.co.za> Message-ID: <1494967598.19.0.77526439315.issue30368@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't really care if Jeremy installs Perl on the buildbot or if someone succeed to fix the dependency on the svn repository. I only care of seeing a green buildbot ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 16:48:10 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 May 2017 20:48:10 +0000 Subject: [issue30211] Bdb: add docstrings In-Reply-To: <1493495660.85.0.350046044168.issue30211@psf.upfronthosting.co.za> Message-ID: <1494967690.98.0.218107801842.issue30211@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I plan to merge when I can. Possible future improvements for bdb.py. 1. Bdb attributes. 2. Say what user_xyz functions might do. Anything better than 'Intervene in debugging process.'? 3. Clarify what get_stack does. Improvement for bdb.rst (optional for this issue). 1. Add is_skipped_module 2. Fix overt errors we are sure of, noted above * canonic: <> not stripped * break_here: temps *may* be deleted * get_stack: length may or may not be what says. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 16:48:28 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 16 May 2017 20:48:28 +0000 Subject: [issue30380] Sphinx 1.6.1 raising new warnings in docs build In-Reply-To: <1494955773.64.0.780886638634.issue30380@psf.upfronthosting.co.za> Message-ID: <1494967708.57.0.494822773171.issue30380@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset fca224f117d25bdfec1bf7160b67438c4fcf6dee by Brett Cannon (Mariatta) in branch 'master': bpo-30380: Pin the version of Sphinx used to build the documentation (GH-1612) https://github.com/python/cpython/commit/fca224f117d25bdfec1bf7160b67438c4fcf6dee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 16:49:24 2017 From: report at bugs.python.org (Zachary Ware) Date: Tue, 16 May 2017 20:49:24 +0000 Subject: [issue30368] [2.7] OpenSSL compilation fails on AMD64 Windows7 SP1 VS9.0 2.7 In-Reply-To: <1494837968.88.0.738073393346.issue30368@psf.upfronthosting.co.za> Message-ID: <1494967764.73.0.935229985153.issue30368@psf.upfronthosting.co.za> Zachary Ware added the comment: The simple fix from my point of view is for Jeremy to install Perl :). But since he also mentioned having a patch ready in bpo-30350, I'd like to see it before declaring that installing Perl is what should be done. ---------- assignee: christian.heimes -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 16:49:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 20:49:57 +0000 Subject: [issue9850] obsolete macpath module dangerously broken and should be removed In-Reply-To: <1284441709.03.0.73507598284.issue9850@psf.upfronthosting.co.za> Message-ID: <1494967797.54.0.954119087916.issue9850@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, I don't see any open task anymore, so I close this issue. The macpath may or may not be removed in Python 3.8, so not before 2018-01-29. IMHO it's ok to remove the module, macpath was used for MacOS 9, but all macOS users are now running macOS X. Otherwise, you can simply use an older Python version (like the future Python 3.7 ;-)). We can discuss the effective macpath removal later, when master will become Python 3.8. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:01:49 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 16 May 2017 21:01:49 +0000 Subject: [issue30380] Sphinx 1.6.1 raising new warnings in docs build In-Reply-To: <1494955773.64.0.780886638634.issue30380@psf.upfronthosting.co.za> Message-ID: <1494968509.38.0.836740125965.issue30380@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- pull_requests: +1706 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:02:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 21:02:54 +0000 Subject: [issue25324] Importing tokenize modifies token In-Reply-To: <1444145798.79.0.176080140328.issue25324@psf.upfronthosting.co.za> Message-ID: <1494968574.68.0.617507108233.issue25324@psf.upfronthosting.co.za> STINNER Victor added the comment: > I would fix this by making tokenize.tok_name a copy. It looks like this behaviour dates back to 1997 (see revision 1efc4273fdb7). token.tok_name is part of the Python public API: https://docs.python.org/dev/library/token.html#token.tok_name whereas tokenize.tok_name isn't documented. So I dislike having two disconnected mappings. I prefer to add tokenize tokens directly in Lib/token.py, and then get COMMENT, NL and ENCODING using tok_name.index(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:05:42 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 16 May 2017 21:05:42 +0000 Subject: [issue30380] Sphinx 1.6.1 raising new warnings in docs build In-Reply-To: <1494955773.64.0.780886638634.issue30380@psf.upfronthosting.co.za> Message-ID: <1494968742.08.0.0855347098448.issue30380@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- pull_requests: +1707 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:06:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 21:06:23 +0000 Subject: [issue25324] Importing tokenize modifies token In-Reply-To: <1444145798.79.0.176080140328.issue25324@psf.upfronthosting.co.za> Message-ID: <1494968783.7.0.950950797025.issue25324@psf.upfronthosting.co.za> STINNER Victor added the comment: Extract of Lib/lib2to3/pgen2/driver.py: if type in (tokenize.COMMENT, tokenize.NL): ... if debug: self.logger.debug("%s %r (prefix=%r)", token.tok_name[type], value, prefix) The code uses tokenize.COMMENT and look for this constant into token.tok_name. If token.tok_name doesn't contain COMMENT anymore, it breaks lib2to3, no? At least the debug mode which might not be covered by test_lib2to3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:09:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 May 2017 21:09:25 +0000 Subject: [issue30380] Sphinx 1.6.1 raising new warnings in docs build In-Reply-To: <1494955773.64.0.780886638634.issue30380@psf.upfronthosting.co.za> Message-ID: <1494968965.82.0.817942014485.issue30380@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 8fc1ff51adb52c80f6bf78393413c72543bae3e1 by Serhiy Storchaka in branch '3.6': [3.6] bpo-30380: Fix Sphinx 1.6.1 warnings. (GH-1613) (#1614) https://github.com/python/cpython/commit/8fc1ff51adb52c80f6bf78393413c72543bae3e1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:09:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 21:09:26 +0000 Subject: [issue25324] Importing tokenize modifies token In-Reply-To: <1444145798.79.0.176080140328.issue25324@psf.upfronthosting.co.za> Message-ID: <1494968966.72.0.705937345545.issue25324@psf.upfronthosting.co.za> STINNER Victor added the comment: Another example from Tools/i18n/pygettext.py, TokenEater:: def __call__(self, ttype, tstring, stup, etup, line): # dispatch ## import token ## print >> sys.stderr, 'ttype:', token.tok_name[ttype], \ ## 'tstring:', tstring self.__state(ttype, tstring, stup[0]) ... eater.set_filename(filename) try: tokens = tokenize.tokenize(fp.readline) for _token in tokens: eater(*_token) Another example using token.tok_name with token types coming from tokenize. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:12:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 21:12:13 +0000 Subject: [issue30038] Race condition in how trip_signal writes to wakeup fd In-Reply-To: <1491901883.05.0.966298195873.issue30038@psf.upfronthosting.co.za> Message-ID: <1494969133.85.0.561794879613.issue30038@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 4ae01496971624c75080431806ed1c08e00f22c7 by Victor Stinner (Nathaniel J. Smith) in branch 'master': bpo-30038: fix race condition in signal delivery + wakeup fd (#1082) https://github.com/python/cpython/commit/4ae01496971624c75080431806ed1c08e00f22c7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:15:52 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 16 May 2017 21:15:52 +0000 Subject: [issue30380] Sphinx 1.6.1 raising new warnings in docs build In-Reply-To: <1494955773.64.0.780886638634.issue30380@psf.upfronthosting.co.za> Message-ID: <1494969352.94.0.508524690072.issue30380@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- pull_requests: +1708 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:16:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 21:16:50 +0000 Subject: [issue30038] Race condition in how trip_signal writes to wakeup fd In-Reply-To: <1491901883.05.0.966298195873.issue30038@psf.upfronthosting.co.za> Message-ID: <1494969410.7.0.44300287543.issue30038@psf.upfronthosting.co.za> STINNER Victor added the comment: While I suggest you to *not* use an event loop (wakeup fd pipe/socket handle with select) and signal.signal(), you are true that there is a race condition if you use select() with signal.signal() so I merged your change. Do you consider that it's worth it to backport the change to 3.5 and 3.6? Python 2.7 is not affected, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:20:14 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 21:20:14 +0000 Subject: [issue18299] Change script_helper to use universal_newlines=True in _assert_python In-Reply-To: <1372163490.54.0.858843080501.issue18299@psf.upfronthosting.co.za> Message-ID: <1494969614.53.0.643625948907.issue18299@psf.upfronthosting.co.za> STINNER Victor added the comment: I really hate script_helper API: keyword arguments are only used to pass environment variables, so the function uses hackish parameteres like __cleanenv=True... I would prefer to pass keywords unchanged to Popen() to be able to use universal_newlines=True for example. Since we have +10k tests, I suggest to not touch the existing API but add yet another API: a new function in support/script_helper.py. What do you think? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:24:31 2017 From: report at bugs.python.org (Albert-Jan Nijburg) Date: Tue, 16 May 2017 21:24:31 +0000 Subject: [issue25324] Importing tokenize modifies token In-Reply-To: <1444145798.79.0.176080140328.issue25324@psf.upfronthosting.co.za> Message-ID: <1494969871.78.0.448359439899.issue25324@psf.upfronthosting.co.za> Albert-Jan Nijburg added the comment: > I prefer to add tokenize tokens directly in Lib/token.py, and then get COMMENT, NL and ENCODING using tok_name.index(). That would make more sense from a breaking change perspective, but we would step on the toes of anyone adding `COMMENT`, `NL`, or `ENCODING` to `token.h` because `token.py` is generated from that. It would also make much more sense to have them as fields on `token` if they are in `tok_name` in `token`. ---------- nosy: +Albert-Jan Nijburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:25:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 21:25:39 +0000 Subject: [issue18299] Change script_helper to use universal_newlines=True in _assert_python In-Reply-To: <1372163490.54.0.858843080501.issue18299@psf.upfronthosting.co.za> Message-ID: <1494969939.54.0.0751433582497.issue18299@psf.upfronthosting.co.za> STINNER Victor added the comment: > Even if there turn out to be a few uses where having bytes is required, it would probably be worth catering to the common case and making those exceptional cases use Popen directly. (Or alternatively provide assert_python_xxx_binary helpers.) I would prefer the opposite: *always* use script_helper rather than Popen() directly in tests. We have to check why some tests use directly Popen? I know that in test_faulthandler for example, I chose to use directly Popen because script_helper always enable faulthandler, there is no option to disable this behaviour, and as I wrote in my previous comment, it's a pain to extend the API (I don't want to use yet another __xxx custom keyword). Maybe we need differently API levels in script helper, the lowest level would return a Popen object but add -I, -E and/or -X faulthandler. By the way, I'm using more and more functions like the one I added to Lib/test/eintrdata/eintr_tester.py: @contextlib.contextmanager def kill_on_error(proc): """Context manager killing the subprocess if a Python exception is raised.""" with proc: try: yield proc except: proc.kill() raise Such helper should also be moved to script_helper. For examle, in my perf project I have these two helper functions: @contextlib.contextmanager def popen_killer(proc): try: yield except: # Close pipes if proc.stdin: proc.stdin.close() if proc.stdout: proc.stdout.close() if proc.stderr: proc.stderr.close() try: proc.kill() except OSError: # process already terminated pass proc.wait() raise def popen_communicate(proc): with popen_killer(proc): return proc.communicate() Or maybe we should add back these features directly into the subprocess module? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:28:23 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 16 May 2017 21:28:23 +0000 Subject: [issue30380] Sphinx 1.6.1 raising new warnings in docs build In-Reply-To: <1494955773.64.0.780886638634.issue30380@psf.upfronthosting.co.za> Message-ID: <1494970103.47.0.357330097639.issue30380@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset 5e2016dce92d66e6e1fb25e6ce39031d8c7d5412 by Brett Cannon in branch '3.6': bpo-30380: Pin the version of Sphinx used to build the docs (GH-1612) (GH-1617) https://github.com/python/cpython/commit/5e2016dce92d66e6e1fb25e6ce39031d8c7d5412 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:29:09 2017 From: report at bugs.python.org (Albert-Jan Nijburg) Date: Tue, 16 May 2017 21:29:09 +0000 Subject: [issue25324] Importing tokenize modifies token In-Reply-To: <1444145798.79.0.176080140328.issue25324@psf.upfronthosting.co.za> Message-ID: <1494970149.92.0.0129081492652.issue25324@psf.upfronthosting.co.za> Albert-Jan Nijburg added the comment: lib2to3 appears to have it's own token.py as well with NL and COMMENT withtout ENCODING... Lib/lib2to3/pgen2/token.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:29:44 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 16 May 2017 21:29:44 +0000 Subject: [issue30380] Sphinx 1.6.1 raising new warnings in docs build In-Reply-To: <1494955773.64.0.780886638634.issue30380@psf.upfronthosting.co.za> Message-ID: <1494970184.28.0.378680802758.issue30380@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset 083f13e34c0b9f9ed4ed64fed3989d4af97843b3 by Brett Cannon (Serhiy Storchaka) in branch '3.5': [3.5] bpo-30380: Fix Sphinx 1.6.1 warnings. (GH-1613) (GH-1615) https://github.com/python/cpython/commit/083f13e34c0b9f9ed4ed64fed3989d4af97843b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:31:42 2017 From: report at bugs.python.org (Berker Peksag) Date: Tue, 16 May 2017 21:31:42 +0000 Subject: [issue29898] PYTHONLEGACYWINDOWSIOENCODING isn't implemented In-Reply-To: <1490394843.09.0.467635996133.issue29898@psf.upfronthosting.co.za> Message-ID: <1494970302.16.0.538190459549.issue29898@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 0d267041c40a3ab655676b885c0ba35ed9685848 by Berker Peksag in branch '3.6': bpo-29898: Fix incorrect env variable name (GH-1576) https://github.com/python/cpython/commit/0d267041c40a3ab655676b885c0ba35ed9685848 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:32:02 2017 From: report at bugs.python.org (Berker Peksag) Date: Tue, 16 May 2017 21:32:02 +0000 Subject: [issue29898] PYTHONLEGACYWINDOWSIOENCODING isn't implemented In-Reply-To: <1490394843.09.0.467635996133.issue29898@psf.upfronthosting.co.za> Message-ID: <1494970322.49.0.671767994169.issue29898@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:34:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 21:34:09 +0000 Subject: [issue25324] Importing tokenize modifies token In-Reply-To: <1494970149.92.0.0129081492652.issue25324@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > lib2to3 appears to have it's own token.py as well with NL and COMMENT withtout ENCODING... Oh you are right: Lib/lib2to3/pgen2/driver.py uses Lib/lib2to3/pgen2/token.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:40:35 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 16 May 2017 21:40:35 +0000 Subject: [issue30380] Sphinx 1.6.1 raising new warnings in docs build In-Reply-To: <1494955773.64.0.780886638634.issue30380@psf.upfronthosting.co.za> Message-ID: <1494970835.15.0.61868856514.issue30380@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset 77606957e71ce477d2c5569718f0fc36f05c6f59 by Brett Cannon in branch '3.5': bpo-30380: Pin the version of Sphinx used to build the documentation (GH-1612) (GH-1618) https://github.com/python/cpython/commit/77606957e71ce477d2c5569718f0fc36f05c6f59 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:41:02 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 16 May 2017 21:41:02 +0000 Subject: [issue30380] Sphinx 1.6.1 raising new warnings in docs build In-Reply-To: <1494955773.64.0.780886638634.issue30380@psf.upfronthosting.co.za> Message-ID: <1494970862.75.0.433260708448.issue30380@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset 97eb2a7d77011605e8fc49e754cd371ead4366bc by Brett Cannon in branch '2.7': [2.7] bpo-30380: Pin the version of Sphinx used to build the docs (GH-1612) (GH-1619) https://github.com/python/cpython/commit/97eb2a7d77011605e8fc49e754cd371ead4366bc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:46:52 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 16 May 2017 21:46:52 +0000 Subject: [issue30380] Sphinx 1.6.1 raising new warnings in docs build In-Reply-To: <1494955773.64.0.780886638634.issue30380@psf.upfronthosting.co.za> Message-ID: <1494971212.33.0.649082494228.issue30380@psf.upfronthosting.co.za> Brett Cannon added the comment: All branches should be green again. Serhiy has a PR out to fix 2.7 for Sphinx 1.6.1, but it isn't passing yet so that branch is pinned to 1.5.6 until then. I will leave this issue open for Serhiy to close once his 2.7 PR is merged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:50:16 2017 From: report at bugs.python.org (Dima Pasechnik) Date: Tue, 16 May 2017 21:50:16 +0000 Subject: [issue29137] Fix fpectl-induced ABI breakage In-Reply-To: <1483402510.43.0.646850547969.issue29137@psf.upfronthosting.co.za> Message-ID: <1494971416.92.0.813993915899.issue29137@psf.upfronthosting.co.za> Dima Pasechnik added the comment: While fpectl might be a bit rusty, this is a priceless tool in debugging situations, where one needs to identify components that do something wrong to FPU, see e.g. https://github.com/numpy/numpy/issues/9007 and the related https://trac.sagemath.org/ticket/22799 As long as there is no equivalent, it's too early to discuss getting rid of it, IMHO. ---------- nosy: +Dima Pasechnik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:57:49 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 May 2017 21:57:49 +0000 Subject: [issue30181] Correct the parsing of a test case docstring. In-Reply-To: <1494831184.54.0.790300778141.issue30181@psf.upfronthosting.co.za> Message-ID: <20170516215746.951051310017@webabinitio.net> R. David Murray added the comment: It's not the PSF, it's the dev team, and it is "just" a matter of tooling. Which means help improving the tooling is welcome :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 17:59:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 21:59:23 +0000 Subject: [issue30371] test_long_lines() fails randomly on AMD64 Windows7 SP1 3.x In-Reply-To: <1494865032.78.0.389289612669.issue30371@psf.upfronthosting.co.za> Message-ID: <1494971963.95.0.427170528556.issue30371@psf.upfronthosting.co.za> STINNER Victor added the comment: New fail, same buildbot: ====================================================================== FAIL: test_long_lines (test.test_email.test_email.TestFeedParsers) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_email\test_email.py", line 3534, in test_long_lines self.assertEqual(m.items(), [('a', ''), ('b', 'x'*M*N)]) AssertionError: Lists differ: [('a'[1845894 chars]xxxxxzxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[18154072 chars]xx')] != [('a'[1845894 chars]xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[18154072 chars]xx')] First differing element 1: ('b',[1845882 chars]xxxxxzxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[18154071 chars]xxx') ('b',[1845882 chars]xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[18154071 chars]xxx') [('a', ''), ('b', Don't click on http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/439/steps/test/logs/stdio : the log contains lines of 2 MB which make my Firefox super slow :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 18:05:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 22:05:17 +0000 Subject: [issue30329] test_imaplib.test_login_cram_md5(): OSError: [WinError 10022] An invalid argument was supplied on AMD64 Windows8.1 Non-Debug 3.6 In-Reply-To: <1494419208.12.0.00943199066561.issue30329@psf.upfronthosting.co.za> Message-ID: <1494972317.99.0.112532437233.issue30329@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1709 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 18:06:41 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Tue, 16 May 2017 22:06:41 +0000 Subject: [issue29137] Fix fpectl-induced ABI breakage In-Reply-To: <1483402510.43.0.646850547969.issue29137@psf.upfronthosting.co.za> Message-ID: <1494972401.91.0.651191976853.issue29137@psf.upfronthosting.co.za> Nathaniel Smith added the comment: @Dima: are you volunteering to fix and maintain it? I can see why it's useful to have some way to get at the fpu flags, but I don't see how fpectl specifically helps with that issue, and fpectl has always been broken on x86-64. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 18:06:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 22:06:45 +0000 Subject: [issue30329] test_imaplib.test_login_cram_md5(): OSError: [WinError 10022] An invalid argument was supplied on AMD64 Windows8.1 Non-Debug 3.6 In-Reply-To: <1494419208.12.0.00943199066561.issue30329@psf.upfronthosting.co.za> Message-ID: <1494972405.43.0.0676292193985.issue30329@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1710 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 18:07:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 22:07:50 +0000 Subject: [issue30329] poplib and imaplib should catch "OSError: [WinError 10022] An invalid argument was supplied" on shutdown In-Reply-To: <1494419208.12.0.00943199066561.issue30329@psf.upfronthosting.co.za> Message-ID: <1494972470.93.0.371754927871.issue30329@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- components: +Library (Lib) title: test_imaplib.test_login_cram_md5(): OSError: [WinError 10022] An invalid argument was supplied on AMD64 Windows8.1 Non-Debug 3.6 -> poplib and imaplib should catch "OSError: [WinError 10022] An invalid argument was supplied" on shutdown versions: +Python 3.5, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 18:15:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 22:15:24 +0000 Subject: [issue30339] test_multiprocessing_main_handling: "RuntimeError: Timed out waiting for results" on x86 Windows7 3.x In-Reply-To: <1494463699.01.0.364437710045.issue30339@psf.upfronthosting.co.za> Message-ID: <1494972924.54.0.305513770148.issue30339@psf.upfronthosting.co.za> STINNER Victor added the comment: > New changeset 7d6320ba47a229543acc0af6a64bc4e414932273 by Victor Stinner in branch 'master': > bpo-30339: test_multiprocessing_main_handling timeout (#1593) > https://github.com/python/cpython/commit/7d6320ba47a229543acc0af6a64bc4e414932273 Sadly, a new build failed at commit fca224f117d25bdfec1bf7160b67438c4fcf6dee, so with the new timeout of 60 seconds: http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/619/steps/test/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 18:18:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 22:18:35 +0000 Subject: [issue30381] test_smtpnet.test_connect_using_sslcontext_verified() randomly failed with "smtplib.SMTPServerDisconnected: Connection unexpectedly closed" on AMD64 FreeBSD CURRENT Debug 3.x Message-ID: <1494973115.13.0.770450788292.issue30381@psf.upfronthosting.co.za> New submission from STINNER Victor: See also bpo-30331 (test_poplib) and bpo-30328 (test_ssl): other connection reset on the FreeBSD buildbots. http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%203.x/builds/272/steps/test/logs/stdio 0:15:55 load avg: 1.77 [387/405/1] test_smtpnet failed -- running: test_subprocess (62 sec) test_connect (test.test_smtpnet.SmtpSSLTest) ... ok test_connect_default_port (test.test_smtpnet.SmtpSSLTest) ... ok test_connect_using_sslcontext (test.test_smtpnet.SmtpSSLTest) ... ok test_connect_using_sslcontext_verified (test.test_smtpnet.SmtpSSLTest) ... ERROR test_connect_starttls (test.test_smtpnet.SmtpTest) ... ok ====================================================================== ERROR: test_connect_using_sslcontext_verified (test.test_smtpnet.SmtpSSLTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_smtpnet.py", line 77, in test_connect_using_sslcontext_verified server = smtplib.SMTP_SSL(self.testServer, self.remotePort, context=context) File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/smtplib.py", line 1029, in __init__ source_address) File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/smtplib.py", line 251, in __init__ (code, msg) = self.connect(host, port) File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/smtplib.py", line 337, in connect (code, msg) = self.getreply() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/smtplib.py", line 393, in getreply raise SMTPServerDisconnected("Connection unexpectedly closed") smtplib.SMTPServerDisconnected: Connection unexpectedly closed ---------------------------------------------------------------------- Ran 5 tests in 7.470s FAILED (errors=1) test test_smtpnet failed ---------- assignee: christian.heimes components: SSL, Tests keywords: buildbot messages: 293808 nosy: christian.heimes, haypo, koobs priority: normal severity: normal status: open title: test_smtpnet.test_connect_using_sslcontext_verified() randomly failed with "smtplib.SMTPServerDisconnected: Connection unexpectedly closed" on AMD64 FreeBSD CURRENT Debug 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 18:21:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 22:21:12 +0000 Subject: [issue30333] test_multiprocessing_forkserver: poll() failed on AMD64 FreeBSD CURRENT Non-Debug 3.5 In-Reply-To: <1494429873.7.0.669335220252.issue30333@psf.upfronthosting.co.za> Message-ID: <1494973272.31.0.265794679447.issue30333@psf.upfronthosting.co.za> STINNER Victor added the comment: Other test_multiprocessing_forkserver errors on AMD64 FreeBSD CURRENT Non-Debug 3.6. http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%203.6/builds/150/steps/test/logs/stdio (...) test_import (test.test_multiprocessing_forkserver._TestImportStar) ... ok Dangling threads: {} ====================================================================== FAIL: test_active_children (test.test_multiprocessing_forkserver.WithProcessesTestProcess) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.6.koobs-freebsd-current.nondebug/build/Lib/test/_test_multiprocessing.py", line 345, in test_active_children self.assertIn(p, self.active_children()) AssertionError: not found in [] ====================================================================== FAIL: test_notify (test.test_multiprocessing_forkserver.WithThreadsTestCondition) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.6.koobs-freebsd-current.nondebug/build/Lib/test/_test_multiprocessing.py", line 886, in test_notify self.assertReturnsIfImplemented(1, get_value, woken) File "/usr/home/buildbot/python/3.6.koobs-freebsd-current.nondebug/build/Lib/test/_test_multiprocessing.py", line 165, in assertReturnsIfImplemented return self.assertEqual(value, res) AssertionError: 1 != 0 ---------------------------------------------------------------------- Ran 277 tests in 92.148s FAILED (failures=2, skipped=16) Warning -- threading._dangling was modified by test_multiprocessing_forkserver Before: <_weakrefset.WeakSet object at 0x805771518> After: <_weakrefset.WeakSet object at 0x8009c6cf8> test test_multiprocessing_forkserver failed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 18:21:49 2017 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 16 May 2017 22:21:49 +0000 Subject: [issue30371] test_long_lines() fails randomly on AMD64 Windows7 SP1 3.x In-Reply-To: <1494865032.78.0.389289612669.issue30371@psf.upfronthosting.co.za> Message-ID: <1494973309.22.0.494806820875.issue30371@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Watch this space, but I'm pretty sure that it is (was) bad memory. It passes memtest86+ but I had issues with these kits in other machines. I swapped out the stick I believe that had the stuck bit. Unfortunately, it is a wait and see solution, as they do pass memtest86+, just not the Python test suite ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 18:26:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 22:26:00 +0000 Subject: [issue30371] test_long_lines() fails randomly on AMD64 Windows7 SP1 3.x In-Reply-To: <1494865032.78.0.389289612669.issue30371@psf.upfronthosting.co.za> Message-ID: <1494973560.2.0.621164516837.issue30371@psf.upfronthosting.co.za> STINNER Victor added the comment: > Watch this space, but I'm pretty sure that it is (was) bad memory. It's really strange that only one very specific Python test fails if it's a bad memory issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 18:26:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 May 2017 22:26:50 +0000 Subject: [issue30380] Sphinx 1.6.1 raising new warnings in docs build In-Reply-To: <1494955773.64.0.780886638634.issue30380@psf.upfronthosting.co.za> Message-ID: <1494973610.89.0.108991157059.issue30380@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b8b9f95f660d00ce9bd11bd9de429176858be3c5 by Serhiy Storchaka in branch '2.7': [2.7] bpo-30380: Fix Sphinx 1.6.1 warnings. (GH-1613) (#1616) https://github.com/python/cpython/commit/b8b9f95f660d00ce9bd11bd9de429176858be3c5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 18:28:04 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 May 2017 22:28:04 +0000 Subject: [issue30211] Bdb: add docstrings In-Reply-To: <1493495660.85.0.350046044168.issue30211@psf.upfronthosting.co.za> Message-ID: <1494973684.62.0.513755762383.issue30211@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 0774e79b93cc494b3a957d538c7c112e289973c0 by terryjreedy (csabella) in branch 'master': bpo-30211: bdb: add docstrings (#1350) https://github.com/python/cpython/commit/0774e79b93cc494b3a957d538c7c112e289973c0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 18:29:43 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 22:29:43 +0000 Subject: [issue30329] poplib and imaplib should catch "OSError: [WinError 10022] An invalid argument was supplied" on shutdown In-Reply-To: <1494419208.12.0.00943199066561.issue30329@psf.upfronthosting.co.za> Message-ID: <1494973783.82.0.297221651197.issue30329@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset aaa053652556aa4e59cb68f3983a09ced1d1fe2a by Victor Stinner in branch '3.6': bpo-30329: Catch Windows error 10022 on shutdown() (#1538) (#1620) https://github.com/python/cpython/commit/aaa053652556aa4e59cb68f3983a09ced1d1fe2a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 18:33:21 2017 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 16 May 2017 22:33:21 +0000 Subject: [issue30371] test_long_lines() fails randomly on AMD64 Windows7 SP1 3.x In-Reply-To: <1494865032.78.0.389289612669.issue30371@psf.upfronthosting.co.za> Message-ID: <1494974001.49.0.600976437334.issue30371@psf.upfronthosting.co.za> Jeremy Kloth added the comment: My thinking is that in normal running, the in-use memory is below the bad bit. It is due to that test using such a large chunk of memory that it pushes the data into the bad area. I would wager that if largemem tests were run, the would error as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 18:36:07 2017 From: report at bugs.python.org (Dima Pasechnik) Date: Tue, 16 May 2017 22:36:07 +0000 Subject: [issue29137] Fix fpectl-induced ABI breakage In-Reply-To: <1483402510.43.0.646850547969.issue29137@psf.upfronthosting.co.za> Message-ID: <1494974167.05.0.825537173126.issue29137@psf.upfronthosting.co.za> Dima Pasechnik added the comment: @njs: Fixing this entails switching over from ieeefp to fenv, right? Looks doable, although not trivial. It might potentially be useful for various numerics, IMHO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 18:44:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 22:44:23 +0000 Subject: [issue30371] test_long_lines() fails randomly on AMD64 Windows7 SP1 3.x In-Reply-To: <1494865032.78.0.389289612669.issue30371@psf.upfronthosting.co.za> Message-ID: <1494974663.96.0.815245132227.issue30371@psf.upfronthosting.co.za> STINNER Victor added the comment: If you are sure that your memory has issues, don't test it, just change it. I had memory issues once but memtest86 was quick to prove memory errors in my case. I changed the memory for free since it was still under the warranty. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 19:02:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 23:02:37 +0000 Subject: [issue30329] poplib and imaplib should catch "OSError: [WinError 10022] An invalid argument was supplied" on shutdown In-Reply-To: <1494419208.12.0.00943199066561.issue30329@psf.upfronthosting.co.za> Message-ID: <1494975757.8.0.92991695295.issue30329@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset c9ba45d1b71d86321e5422e8a2cbe6e52aaba6f4 by Victor Stinner in branch '3.5': bpo-30329: Catch Windows error 10022 on shutdown() (#1538) (#1621) https://github.com/python/cpython/commit/c9ba45d1b71d86321e5422e8a2cbe6e52aaba6f4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 19:12:06 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Tue, 16 May 2017 23:12:06 +0000 Subject: [issue29137] Fix fpectl-induced ABI breakage In-Reply-To: <1483402510.43.0.646850547969.issue29137@psf.upfronthosting.co.za> Message-ID: <1494976326.97.0.133810020824.issue29137@psf.upfronthosting.co.za> Nathaniel Smith added the comment: Also fixing the abi issues that started this, and probably making an argument for why it makes sense for all of cpython's built-in float operations to check the fpu flags, and to do so using a weird longjmp-based mechanism that only some platforms support. The fact that it's disabled by default and has been broken for a decade+ without anyone noticing might be working against you here... You might get the impression that I think this is a bad idea. I do :-). But I am genuinely trying to helpful; I'm sure people would be willing to listen to an argument, and if you want to make one then those are the sorts of issues you're likely to need some answer for. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 19:15:22 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Tue, 16 May 2017 23:15:22 +0000 Subject: [issue29137] Fix fpectl-induced ABI breakage In-Reply-To: <1483402510.43.0.646850547969.issue29137@psf.upfronthosting.co.za> Message-ID: <1494976522.86.0.463124688289.issue29137@psf.upfronthosting.co.za> Nathaniel Smith added the comment: Another option you might want to consider is proposing to add a proper fpu control flag setting/checking API to the math module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 19:21:51 2017 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 16 May 2017 23:21:51 +0000 Subject: [issue30371] test_long_lines() fails randomly on AMD64 Windows7 SP1 3.x In-Reply-To: <1494865032.78.0.389289612669.issue30371@psf.upfronthosting.co.za> Message-ID: <1494976911.97.0.0428051795792.issue30371@psf.upfronthosting.co.za> Jeremy Kloth added the comment: That's the real problem, I'm not *sure* it's the memory, but it does have the symptoms. And that is why my buildbot was down earlier, I was attempting to determine the bad stick and replace it. I'm just hoping I changed the right one. That is why I brought up the testing (they both pass memtest). So far so good, no test_email issues after the change, but only 2 runs in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 19:38:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 23:38:36 +0000 Subject: [issue30382] test_stdin_broken_pipe() of test_asyncio failed randomly on AMD64 FreeBSD CURRENT Non-Debug 3.x Message-ID: <1494977916.79.0.707715566505.issue30382@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%203.x/builds/279/steps/test/logs/stdio ====================================================================== FAIL: test_stdin_broken_pipe (test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/Lib/test/test_asyncio/test_subprocess.py", line 213, in test_stdin_broken_pipe self.loop.run_until_complete, coro) AssertionError: (, ) not raised by run_until_complete ---------------------------------------------------------------------- ---------- components: Tests, asyncio messages: 293822 nosy: haypo, yselivanov priority: normal severity: normal status: open title: test_stdin_broken_pipe() of test_asyncio failed randomly on AMD64 FreeBSD CURRENT Non-Debug 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 19:43:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 23:43:30 +0000 Subject: [issue30357] test_thread.test_save_exception_state_on_error(): Unhandled exception in thread: AMD64 Debian root 2.7 In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1494978210.5.0.382122367751.issue30357@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1711 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 19:44:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 23:44:42 +0000 Subject: [issue30357] test_thread.test_save_exception_state_on_error(): Unhandled exception in thread: AMD64 Debian root 2.7 In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1494978282.49.0.943063984689.issue30357@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1712 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 19:45:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 May 2017 23:45:56 +0000 Subject: [issue30357] test_thread should clean threads after each test In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1494978356.84.0.249312239981.issue30357@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_thread.test_save_exception_state_on_error(): Unhandled exception in thread: AMD64 Debian root 2.7 -> test_thread should clean threads after each test _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 20:00:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 00:00:46 +0000 Subject: [issue30371] test_long_lines() fails randomly on AMD64 Windows7 SP1 3.x In-Reply-To: <1494865032.78.0.389289612669.issue30371@psf.upfronthosting.co.za> Message-ID: <1494979246.85.0.763378994184.issue30371@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-20118: test_linetoolong() of test_imaplib is skipped "temporarily" on Python 2.7 since 2014 :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 20:05:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 00:05:07 +0000 Subject: [issue30328] test_ssl.test_connect_with_context(): ConnectionResetError on AMD64 FreeBSD 9.x 3.6 In-Reply-To: <1494419046.55.0.785376173684.issue30328@psf.upfronthosting.co.za> Message-ID: <1494979507.31.0.737263291391.issue30328@psf.upfronthosting.co.za> STINNER Victor added the comment: SimpleBackgroundTests uses a server running in a different thread, so running locally. The port is binded by support.bind_port(socket, "127.0.0.1"). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 20:10:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 00:10:03 +0000 Subject: [issue30357] test_thread should clean threads after each test In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1494979803.43.0.924959030446.issue30357@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: -1712 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 20:12:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 00:12:28 +0000 Subject: [issue30357] test_thread should clean threads after each test In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1494979948.82.0.396017323302.issue30357@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1712 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 20:12:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 00:12:40 +0000 Subject: [issue30357] test_thread should clean threads after each test In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1494979960.84.0.147363994259.issue30357@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: -1712 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 20:13:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 00:13:03 +0000 Subject: [issue30357] test_thread should clean threads after each test In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1494979983.53.0.650027394684.issue30357@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1712 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 20:14:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 00:14:25 +0000 Subject: [issue30357] test_thread should clean threads after each test In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1494980065.7.0.724970256395.issue30357@psf.upfronthosting.co.za> STINNER Victor added the comment: Backported to 3.5 (aeb644714d37fb974e3acdf7daef031461e1283f) and 3.6 (6b5b85aecf4db796a05582202a6c875b36eae516). I now close the issue, I consider that the change should fix the randomly failing test. If the failure comes back, I will reopen the issue. Thank you very much Grzegorz Grzywacz for your first contribution! ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 20:16:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 00:16:30 +0000 Subject: [issue30329] poplib and imaplib should catch "OSError: [WinError 10022] An invalid argument was supplied" on shutdown In-Reply-To: <1494419208.12.0.00943199066561.issue30329@psf.upfronthosting.co.za> Message-ID: <1494980190.31.0.498575579431.issue30329@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1713 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 20:18:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 00:18:54 +0000 Subject: [issue30325] Buildbot: send email notifications to buildbot-status@ In-Reply-To: <1494373028.15.0.894136349212.issue30325@psf.upfronthosting.co.za> Message-ID: <1494980334.35.0.817073671433.issue30325@psf.upfronthosting.co.za> STINNER Victor added the comment: Email notifications is now working properly, I close the issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 20:21:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 00:21:53 +0000 Subject: [issue30383] [3.5] Backport regrtest features from master to Python 3.5 Message-ID: <1494980513.83.0.0798353664416.issue30383@psf.upfronthosting.co.za> New submission from STINNER Victor: bpo-30283 backported regrtest features from master to Python 2.7. I now propose to do the same for Python 3.5, as suggested by Serhiy Storshaka. ---------- components: Tests messages: 293827 nosy: haypo priority: normal severity: normal status: open title: [3.5] Backport regrtest features from master to Python 3.5 versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 20:22:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 00:22:51 +0000 Subject: [issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7 In-Reply-To: <1494001389.01.0.0290337792937.issue30283@psf.upfronthosting.co.za> Message-ID: <1494980571.59.0.836026923531.issue30283@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 2.7 now has a nice test_regrtest and its regrtest now has many new features backported from master. test_regrtest pass on all 2.7 buildbots, I close the issue. I created bpo-30383 to backport regrtest enhancements to Python 3.5. ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 20:25:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 00:25:28 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1494980728.58.0.404549879274.issue30273@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1714 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 20:25:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 00:25:29 +0000 Subject: [issue15366] venv assumes header files in sys._home + '/Include' In-Reply-To: <1342438211.61.0.183367325622.issue15366@psf.upfronthosting.co.za> Message-ID: <1494980729.0.0.89712849103.issue15366@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1715 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 20:26:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 00:26:07 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1494980767.69.0.983956352333.issue30273@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1716 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 20:26:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 00:26:07 +0000 Subject: [issue15366] venv assumes header files in sys._home + '/Include' In-Reply-To: <1342438211.61.0.183367325622.issue15366@psf.upfronthosting.co.za> Message-ID: <1494980767.8.0.929892807376.issue15366@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1717 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 20:27:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 00:27:05 +0000 Subject: [issue30258] [2.7] regrtest: handle child process crash In-Reply-To: <1493821528.82.0.0272255783657.issue30258@psf.upfronthosting.co.za> Message-ID: <1494980825.55.0.545916509601.issue30258@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 2.7 now has test_regrtest and test_regrtest pass on all 2.7 buildbots, so I close the issue. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 20:38:32 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 00:38:32 +0000 Subject: [issue30329] poplib and imaplib should catch "OSError: [WinError 10022] An invalid argument was supplied" on shutdown In-Reply-To: <1494419208.12.0.00943199066561.issue30329@psf.upfronthosting.co.za> Message-ID: <1494981512.53.0.666030723086.issue30329@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 800e4b7ad6b6f86c17408429852dfb47493d366e by Victor Stinner in branch '2.7': bpo-30329: Catch Windows error 10022 on shutdown() (#1538) (#1624) https://github.com/python/cpython/commit/800e4b7ad6b6f86c17408429852dfb47493d366e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 20:43:10 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 17 May 2017 00:43:10 +0000 Subject: [issue30211] Bdb: add docstrings In-Reply-To: <1493495660.85.0.350046044168.issue30211@psf.upfronthosting.co.za> Message-ID: <1494981790.83.0.594950395454.issue30211@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I still need to push a News Entry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 20:58:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 00:58:04 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1494982684.9.0.81806711616.issue30273@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 460945f22acd288e660b432b288d9d81655572bf by Victor Stinner in branch '3.6': bpo-30273: update distutils.sysconfig for venv's created from Python (#1515) (#1625) https://github.com/python/cpython/commit/460945f22acd288e660b432b288d9d81655572bf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 20:58:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 00:58:05 +0000 Subject: [issue15366] venv assumes header files in sys._home + '/Include' In-Reply-To: <1342438211.61.0.183367325622.issue15366@psf.upfronthosting.co.za> Message-ID: <1494982685.1.0.213774483243.issue15366@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 460945f22acd288e660b432b288d9d81655572bf by Victor Stinner in branch '3.6': bpo-30273: update distutils.sysconfig for venv's created from Python (#1515) (#1625) https://github.com/python/cpython/commit/460945f22acd288e660b432b288d9d81655572bf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 20:59:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 00:59:26 +0000 Subject: [issue30273] The coverage job is broken: distutils build_ext fails on None In-Reply-To: <1493931065.16.0.071760952021.issue30273@psf.upfronthosting.co.za> Message-ID: <1494982766.33.0.388737109934.issue30273@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset f01c0ec9fe571e8afd50d2f5180db3c0d7b613af by Victor Stinner in branch '3.5': bpo-30273: update distutils.sysconfig for venv's created from Python (#1515) (#1626) https://github.com/python/cpython/commit/f01c0ec9fe571e8afd50d2f5180db3c0d7b613af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 20:59:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 00:59:26 +0000 Subject: [issue15366] venv assumes header files in sys._home + '/Include' In-Reply-To: <1342438211.61.0.183367325622.issue15366@psf.upfronthosting.co.za> Message-ID: <1494982766.43.0.188143949996.issue15366@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset f01c0ec9fe571e8afd50d2f5180db3c0d7b613af by Victor Stinner in branch '3.5': bpo-30273: update distutils.sysconfig for venv's created from Python (#1515) (#1626) https://github.com/python/cpython/commit/f01c0ec9fe571e8afd50d2f5180db3c0d7b613af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 16 22:50:44 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 17 May 2017 02:50:44 +0000 Subject: [issue19417] Bdb: add a unittest file (test.test_bdb) In-Reply-To: <1382896308.72.0.45441786626.issue19417@psf.upfronthosting.co.za> Message-ID: <1494989444.39.0.783577393429.issue19417@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Wondering if it might make sense to use Mock in this patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 00:03:35 2017 From: report at bugs.python.org (Aaron Meurer) Date: Wed, 17 May 2017 04:03:35 +0000 Subject: [issue30384] traceback.TracebackException.format shouldn't format_exc_only() when __traceback__ is None Message-ID: <1494993815.34.0.567809017687.issue30384@psf.upfronthosting.co.za> New submission from Aaron Meurer: I'm trying to completely hide an exception from the traceback module. From reading the source, it?looks like the only way to do this is to set __traceback__ to None (I can also set __suppress_context__ to True, but that only works if I have another exception higher up in the context chain). However, this still prints the traceback itself, and the line for SyntaxErrors. Consider the attached test.py. It outputs ValueError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "test.py", line 8, in raise TypeError TypeError File "", line 1 a b ^ SyntaxError: unexpected EOF while parsing During handling of the above exception, another exception occurred: Traceback (most recent call last): File "test.py", line 19, in raise TypeError TypeError I suppose it should also not print the "During handling of the above exception, another exception occurred:" part. ---------- components: Library (Lib) files: test.py messages: 293837 nosy: Aaron.Meurer priority: normal severity: normal status: open title: traceback.TracebackException.format shouldn't format_exc_only() when __traceback__ is None Added file: http://bugs.python.org/file46867/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 00:20:46 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 17 May 2017 04:20:46 +0000 Subject: [issue30301] multiprocessing: AttributeError: 'SimpleQueue' object has no attribute '_poll' In-Reply-To: <1494183710.88.0.708414094068.issue30301@psf.upfronthosting.co.za> Message-ID: <1494994846.1.0.969239931637.issue30301@psf.upfronthosting.co.za> Xiang Zhang added the comment: Thanks for your reply Serhiy. Test added. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 01:43:27 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Wed, 17 May 2017 05:43:27 +0000 Subject: [issue30038] Race condition in how trip_signal writes to wakeup fd In-Reply-To: <1491901883.05.0.966298195873.issue30038@psf.upfronthosting.co.za> Message-ID: <1494999807.92.0.395145161894.issue30038@psf.upfronthosting.co.za> Nathaniel Smith added the comment: > While I suggest you to *not* use an event loop (wakeup fd pipe/socket handle with select) and signal.signal(), you are true that there is a race condition if you use select() with signal.signal() so I merged your change. Unfortunately this is the only 100% reliable way to do signal handling with an event loop so I guess you are unlikely to convince any of the projects that use it this way to change their minds :-) > Do you consider that it's worth it to backport the change to 3.5 and 3.6? I guess it'd be nice? At least for 3.6? I just had yet another random PR fail its tests due to this bug -- it's turning out to be quite difficult to make my tests reliable :-/. (BTW do you happen to know any tricks to force CPython to do an immediate PyErr_CheckSignals on Windows?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 01:55:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 May 2017 05:55:43 +0000 Subject: [issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7 In-Reply-To: <1494001389.01.0.0290337792937.issue30283@psf.upfronthosting.co.za> Message-ID: <1495000543.76.0.985318882912.issue30283@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could you add a Misc/NEWS entry about backported regrtest features? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 02:04:20 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 May 2017 06:04:20 +0000 Subject: [issue30377] Unnecessary complexity in tokenize.py around handling of comments and newlines In-Reply-To: <1494940089.25.0.512912878732.issue30377@psf.upfronthosting.co.za> Message-ID: <1495001060.88.0.832991359431.issue30377@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is simple change, and I would write the same code, but just for the case could you please sign CLA? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 02:06:08 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Wed, 17 May 2017 06:06:08 +0000 Subject: [issue30038] Race condition in how trip_signal writes to wakeup fd In-Reply-To: <1491901883.05.0.966298195873.issue30038@psf.upfronthosting.co.za> Message-ID: <1495001168.57.0.267007484932.issue30038@psf.upfronthosting.co.za> Nathaniel Smith added the comment: > (BTW do you happen to know any tricks to force CPython to do an immediate PyErr_CheckSignals on Windows?) Never mind on this... it looks like calling repr() on any object is sufficient. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 02:16:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 May 2017 06:16:17 +0000 Subject: [issue30380] Sphinx 1.6.1 raising new warnings in docs build In-Reply-To: <1494955773.64.0.780886638634.issue30380@psf.upfronthosting.co.za> Message-ID: <1495001777.51.0.351783752987.issue30380@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There was other warnings, mostly false positive, but there were also the real documentation bugs. Sphinx now converts quotes to Unicode variants at earlier stage (this is good thing, because converting them at late stage, in HTML, not always worked), and rules in susp-ignored.csv containing '"' no longer worked. Now warnings in 2.7 are fixed and Sphinx can be pinned to 1.6.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 02:23:52 2017 From: report at bugs.python.org (Albert-Jan Nijburg) Date: Wed, 17 May 2017 06:23:52 +0000 Subject: [issue30377] Unnecessary complexity in tokenize.py around handling of comments and newlines In-Reply-To: <1494940089.25.0.512912878732.issue30377@psf.upfronthosting.co.za> Message-ID: <1495002232.51.0.726328925975.issue30377@psf.upfronthosting.co.za> Albert-Jan Nijburg added the comment: I did yesterday, should be coming through today right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 02:35:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 May 2017 06:35:25 +0000 Subject: [issue30377] Unnecessary complexity in tokenize.py around handling of comments and newlines In-Reply-To: <1494940089.25.0.512912878732.issue30377@psf.upfronthosting.co.za> Message-ID: <1495002925.52.0.822788828576.issue30377@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Don't worry, CLA is accepted manually, and this takes some time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 03:08:14 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 May 2017 07:08:14 +0000 Subject: [issue30365] Backport warnings in ElementTree/cElementTree modules and fix bugs In-Reply-To: <1494776334.02.0.442424547765.issue30365@psf.upfronthosting.co.za> Message-ID: <1495004894.09.0.149280294308.issue30365@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 09b52471f39ba280d836b945d47719c697af0b45 by Serhiy Storchaka in branch '2.7': bpo-30365: Backport warnings and fix bugs in ElementTree. (#1581) https://github.com/python/cpython/commit/09b52471f39ba280d836b945d47719c697af0b45 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 03:09:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 May 2017 07:09:16 +0000 Subject: [issue30365] Backport warnings in ElementTree/cElementTree modules and fix bugs In-Reply-To: <1494776334.02.0.442424547765.issue30365@psf.upfronthosting.co.za> Message-ID: <1495004956.71.0.651876776789.issue30365@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 03:14:18 2017 From: report at bugs.python.org (Martin Teichmann) Date: Wed, 17 May 2017 07:14:18 +0000 Subject: [issue30306] release arguments of contextmanager In-Reply-To: <1494252281.4.0.796080303271.issue30306@psf.upfronthosting.co.za> Message-ID: <1495005258.34.0.0175798344004.issue30306@psf.upfronthosting.co.za> Martin Teichmann added the comment: Hi, so where do we go from here? I could write the proposed allow_recreation flag, but IMHO this adds only dead code, as it is of no need at all. I don't think code gets more clear by adding dead code... I opted for one line more of comment, I think that helps much more. Plus the additional tests I wrote in the PR I think it would be good in the Python core. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 04:55:37 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 17 May 2017 08:55:37 +0000 Subject: [issue23267] multiprocessing pool.py doesn't close inqueue and outqueue pipes on termination In-Reply-To: <1421588019.18.0.707676170756.issue23267@psf.upfronthosting.co.za> Message-ID: <1495011337.58.0.450093586349.issue23267@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 06:47:43 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 17 May 2017 10:47:43 +0000 Subject: [issue30306] release arguments of contextmanager In-Reply-To: <1494252281.4.0.796080303271.issue30306@psf.upfronthosting.co.za> Message-ID: <1495018063.18.0.10568591592.issue30306@psf.upfronthosting.co.za> Nick Coghlan added the comment: Re-reading my previous comment, I now realise it wasn't particularly clear. To be more explicit, I agree with Serhiy that since the internals of how @contextmanager works are a private API, it makes sense to switch to a two-class design that doesn't rely on the _recreate_cm() mechanism at all, and instead relies on overriding `__call__()` for the decorator use case. At runtime, the end result is pretty similar to your current implementation, but the split into two classes more clearly separates the base "use a generator as a context manager" functionality from the "implicitly wrap a generator around a functional call" feature. It makes sense to do that, since the current self.__class__ based design stems from the time when I was considering making this a public API (and hence needed to account for inheritance), and I didn't go back and review it for possible refactoring opportunities when I decided not to do that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 06:57:08 2017 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 17 May 2017 10:57:08 +0000 Subject: [issue18299] Change script_helper to use universal_newlines=True in _assert_python In-Reply-To: <1372163490.54.0.858843080501.issue18299@psf.upfronthosting.co.za> Message-ID: <1495018628.49.0.185638252563.issue18299@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 08:40:55 2017 From: report at bugs.python.org (Gunnar Aastrand Grimnes) Date: Wed, 17 May 2017 12:40:55 +0000 Subject: [issue30385] Segfault on OSX with 3.6.1 Message-ID: <1495024855.04.0.697140063474.issue30385@psf.upfronthosting.co.za> New submission from Gunnar Aastrand Grimnes: This script, using requests and multiprocessing, will segfault on MacOS 16.4.0 with python 3.6.1. In 3.6.0 it runs fine. The program is reduced from a much larger program, some weird things need to be present to trigger the crash. For instance the unused tornado imports on the top. Crash log: Process: Python [1510] Path: /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python Identifier: Python Version: 3.6.1 (3.6.1) Code Type: X86-64 (Native) Parent Process: Python [1509] Responsible: Python [1510] User ID: 501 Date/Time: 2017-05-17 14:23:47.307 +0200 OS Version: Mac OS X 10.12.3 (16D32) Report Version: 12 Anonymous UUID: DB16C70B-F979-86B6-864C-0AC84B0E6402 Sleep/Wake UUID: 03D0B108-E764-4834-A88D-7919CAF9B786 Time Awake Since Boot: 630 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.os.log Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x000000010b692832 Exception Note: EXC_CORPSE_NOTIFY Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [0] VM Regions Near 0x10b692832: VM_ALLOCATE 000000010b652000-000000010b692000 [ 256K] rw-/rwx SM=COW --> shared memory 000000010b6e3000-000000010b6eb000 [ 32K] r--/rw- SM=SHM Application Specific Information: crashed on child side of fork pre-exec Thread 0 Crashed:: Dispatch queue: com.apple.os.log 0 libsystem_trace.dylib 0x00007fffab4bb622 _os_log_cmp_key + 4 1 libsystem_c.dylib 0x00007fffab324144 rb_tree_find_node + 58 2 libsystem_trace.dylib 0x00007fffab4bbb5a __os_log_create_block_invoke + 30 3 libdispatch.dylib 0x00007fffab2460b8 _dispatch_client_callout + 8 4 libdispatch.dylib 0x00007fffab246cf2 _dispatch_barrier_sync_f_invoke + 83 5 libsystem_trace.dylib 0x00007fffab4bb8ac os_log_create + 590 6 com.apple.SystemConfiguration 0x00007fff9c8faafa __SCDynamicStoreCheckRetryAndHandleError + 167 7 com.apple.SystemConfiguration 0x00007fff9c8f9e12 SCDynamicStoreCopyValue + 189 8 com.apple.SystemConfiguration 0x00007fff9c8fe6fb SCDynamicStoreCopyProxiesWithOptions + 560 9 _scproxy.cpython-36m-darwin.so 0x000000010b536911 get_proxy_settings + 24 10 org.python.python 0x000000010a464081 _PyCFunction_FastCallDict + 526 11 org.python.python 0x000000010a4c87d7 call_function + 489 12 org.python.python 0x000000010a4c15ca _PyEval_EvalFrameDefault + 5000 13 org.python.python 0x000000010a4c992e _PyFunction_FastCall + 121 14 org.python.python 0x000000010a4c87ae call_function + 448 15 org.python.python 0x000000010a4c15ca _PyEval_EvalFrameDefault + 5000 16 org.python.python 0x000000010a4c992e _PyFunction_FastCall + 121 17 org.python.python 0x000000010a4c87ae call_function + 448 18 org.python.python 0x000000010a4c15ca _PyEval_EvalFrameDefault + 5000 19 org.python.python 0x000000010a4c992e _PyFunction_FastCall + 121 20 org.python.python 0x000000010a4c87ae call_function + 448 21 org.python.python 0x000000010a4c15ca _PyEval_EvalFrameDefault + 5000 22 org.python.python 0x000000010a4c992e _PyFunction_FastCall + 121 23 org.python.python 0x000000010a4c87ae call_function + 448 24 org.python.python 0x000000010a4c15ca _PyEval_EvalFrameDefault + 5000 25 org.python.python 0x000000010a4c992e _PyFunction_FastCall + 121 26 org.python.python 0x000000010a4c87ae call_function + 448 27 org.python.python 0x000000010a4c15ca _PyEval_EvalFrameDefault + 5000 28 org.python.python 0x000000010a4c8fa7 _PyEval_EvalCodeWithName + 1829 29 org.python.python 0x000000010a4c985e _PyFunction_FastCallDict + 444 30 org.python.python 0x000000010a42c4d9 _PyObject_FastCallDict + 196 31 org.python.python 0x000000010a42c5fc _PyObject_Call_Prepend + 156 32 org.python.python 0x000000010a42c35a PyObject_Call + 101 33 org.python.python 0x000000010a4c1825 _PyEval_EvalFrameDefault + 5603 34 org.python.python 0x000000010a4c8fa7 _PyEval_EvalCodeWithName + 1829 35 org.python.python 0x000000010a4c0207 PyEval_EvalCodeEx + 52 36 org.python.python 0x000000010a44c493 function_call + 338 37 org.python.python 0x000000010a42c35a PyObject_Call + 101 38 org.python.python 0x000000010a4c1825 _PyEval_EvalFrameDefault + 5603 39 org.python.python 0x000000010a4c8fa7 _PyEval_EvalCodeWithName + 1829 40 org.python.python 0x000000010a4c9693 fast_function + 227 41 org.python.python 0x000000010a4c87ae call_function + 448 42 org.python.python 0x000000010a4c15ca _PyEval_EvalFrameDefault + 5000 43 org.python.python 0x000000010a4c8fa7 _PyEval_EvalCodeWithName + 1829 44 org.python.python 0x000000010a4c0207 PyEval_EvalCodeEx + 52 45 org.python.python 0x000000010a44c493 function_call + 338 46 org.python.python 0x000000010a42c35a PyObject_Call + 101 47 org.python.python 0x000000010a4c1825 _PyEval_EvalFrameDefault + 5603 48 org.python.python 0x000000010a4c8fa7 _PyEval_EvalCodeWithName + 1829 49 org.python.python 0x000000010a4c0207 PyEval_EvalCodeEx + 52 50 org.python.python 0x000000010a44c493 function_call + 338 51 org.python.python 0x000000010a42c35a PyObject_Call + 101 52 org.python.python 0x000000010a4c1825 _PyEval_EvalFrameDefault + 5603 53 org.python.python 0x000000010a4c992e _PyFunction_FastCall + 121 54 org.python.python 0x000000010a4c87ae call_function + 448 55 org.python.python 0x000000010a4c15ca _PyEval_EvalFrameDefault + 5000 56 org.python.python 0x000000010a4c992e _PyFunction_FastCall + 121 57 org.python.python 0x000000010a4c87ae call_function + 448 58 org.python.python 0x000000010a4c15ca _PyEval_EvalFrameDefault + 5000 59 org.python.python 0x000000010a4c992e _PyFunction_FastCall + 121 60 org.python.python 0x000000010a4c87ae call_function + 448 61 org.python.python 0x000000010a4c15ca _PyEval_EvalFrameDefault + 5000 62 org.python.python 0x000000010a4c992e _PyFunction_FastCall + 121 63 org.python.python 0x000000010a42c4d9 _PyObject_FastCallDict + 196 64 org.python.python 0x000000010a42c5fc _PyObject_Call_Prepend + 156 65 org.python.python 0x000000010a42c35a PyObject_Call + 101 66 org.python.python 0x000000010a477052 slot_tp_init + 57 67 org.python.python 0x000000010a474072 type_call + 184 68 org.python.python 0x000000010a42c4a4 _PyObject_FastCallDict + 143 69 org.python.python 0x000000010a4c87a7 call_function + 441 70 org.python.python 0x000000010a4c15ca _PyEval_EvalFrameDefault + 5000 71 org.python.python 0x000000010a4c992e _PyFunction_FastCall + 121 72 org.python.python 0x000000010a4c87ae call_function + 448 73 org.python.python 0x000000010a4c15ca _PyEval_EvalFrameDefault + 5000 74 org.python.python 0x000000010a4c992e _PyFunction_FastCall + 121 75 org.python.python 0x000000010a4c87ae call_function + 448 76 org.python.python 0x000000010a4c15ca _PyEval_EvalFrameDefault + 5000 77 org.python.python 0x000000010a4c992e _PyFunction_FastCall + 121 78 org.python.python 0x000000010a4c87ae call_function + 448 79 org.python.python 0x000000010a4c15ca _PyEval_EvalFrameDefault + 5000 80 org.python.python 0x000000010a4c8fa7 _PyEval_EvalCodeWithName + 1829 81 org.python.python 0x000000010a4c985e _PyFunction_FastCallDict + 444 82 org.python.python 0x000000010a42c4d9 _PyObject_FastCallDict + 196 83 org.python.python 0x000000010a42c5fc _PyObject_Call_Prepend + 156 84 org.python.python 0x000000010a42c35a PyObject_Call + 101 85 org.python.python 0x000000010a477052 slot_tp_init + 57 86 org.python.python 0x000000010a474072 type_call + 184 87 org.python.python 0x000000010a42c4a4 _PyObject_FastCallDict + 143 88 org.python.python 0x000000010a42c84a _PyObject_FastCallKeywords + 97 89 org.python.python 0x000000010a4c87a7 call_function + 441 90 org.python.python 0x000000010a4c1665 _PyEval_EvalFrameDefault + 5155 91 org.python.python 0x000000010a4c8fa7 _PyEval_EvalCodeWithName + 1829 92 org.python.python 0x000000010a4c9693 fast_function + 227 93 org.python.python 0x000000010a4c87ae call_function + 448 94 org.python.python 0x000000010a4c15ca _PyEval_EvalFrameDefault + 5000 95 org.python.python 0x000000010a4c992e _PyFunction_FastCall + 121 96 org.python.python 0x000000010a4c87ae call_function + 448 97 org.python.python 0x000000010a4c15ca _PyEval_EvalFrameDefault + 5000 98 org.python.python 0x000000010a4c8fa7 _PyEval_EvalCodeWithName + 1829 99 org.python.python 0x000000010a4c01cd PyEval_EvalCode + 43 100 org.python.python 0x000000010a4e7896 run_mod + 54 101 org.python.python 0x000000010a4e7b76 PyRun_FileExFlags + 180 102 org.python.python 0x000000010a4e7103 PyRun_SimpleFileExFlags + 280 103 org.python.python 0x000000010a4fad40 Py_Main + 3268 104 org.python.python 0x000000010a41fe1d 0x10a41e000 + 7709 105 libdyld.dylib 0x00007fffab27c255 start + 1 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x00007fff557dddf0 rbx: 0x00007fb62371bda0 rcx: 0x0030000000000203 rdx: 0x00007fff557dde20 rdi: 0x000000010b692830 rsi: 0x00007fb62371bda0 rbp: 0x00007fff557ddd90 rsp: 0x00007fff557ddd58 r8: 0x0000000000000001 r9: 0x0000000000000048 r10: 0x00000000ffffffff r11: 0xffffffffb8e7ea1f r12: 0x00007fffb40ccf58 r13: 0x00007fffab4bb61e r14: 0x00007fff557dde20 r15: 0x00007fb62371bdb0 rip: 0x00007fffab4bb622 rfl: 0x0000000000010206 cr2: 0x000000010b692832 Logical CPU: 1 Error Code: 0x00000004 Trap Number: 14 Binary Images: 0x10a41e000 - 0x10a41ffff +org.python.python (3.6.1 - 3.6.1) /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python 0x10a422000 - 0x10a589ff7 +org.python.python (3.6.1, [c] 2001-2017 Python Software Foundation. - 3.6.1) /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/Python 0x10a93b000 - 0x10a93cfff +_heapq.cpython-36m-darwin.so (0) <54F82A35-6CF9-32FF-A3F3-AF86FA224275> /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_heapq.cpython-36m-darwin.so 0x10aa41000 - 0x10aa42fff +_posixsubprocess.cpython-36m-darwin.so (0) <01E6D41B-7379-35E6-92EC-2CC21B6F5A33> /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_posixsubprocess.cpython-36m-darwin.so 0x10aa45000 - 0x10aa48fff +select.cpython-36m-darwin.so (0) /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/select.cpython-36m-darwin.so 0x10aa4d000 - 0x10aa52ff7 +math.cpython-36m-darwin.so (0) <33E7F994-B390-3BE1-8198-AFCC28BC0322> /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/math.cpython-36m-darwin.so 0x10aa58000 - 0x10aa5bffb +_struct.cpython-36m-darwin.so (0) <87BA4ABD-DA9A-383D-9660-4F49EC6DF92C> /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_struct.cpython-36m-darwin.so 0x10aa62000 - 0x10aa62fff +_opcode.cpython-36m-darwin.so (0) <88828C22-AAD7-367B-918F-A3AAF268CCBD> /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_opcode.cpython-36m-darwin.so 0x10aa65000 - 0x10aa65ff3 +speedups.cpython-36m-darwin.so (0) /usr/local/lib/python3.6/site-packages/tornado/speedups.cpython-36m-darwin.so 0x10aa69000 - 0x10aaa6267 dyld (421.2) <947FC440-80F9-32F7-A773-6FC418FE1AB7> /usr/lib/dyld 0x10abbd000 - 0x10abc5ff7 +_socket.cpython-36m-darwin.so (0) <4FE83626-F2BC-3C85-B74C-15073CBE43E8> /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_socket.cpython-36m-darwin.so 0x10ac0f000 - 0x10ac1affb +_pickle.cpython-36m-darwin.so (0) <6A4A025A-358B-3E21-B00F-1BBF3BE92CC5> /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_pickle.cpython-36m-darwin.so 0x10ac24000 - 0x10ac29fff +_json.cpython-36m-darwin.so (0) <5B388CD6-08FA-35FA-A82C-6B980D43F185> /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_json.cpython-36m-darwin.so 0x10ac2d000 - 0x10ac32ffb +array.cpython-36m-darwin.so (0) <58EFC65F-637E-351D-83CF-6BBE1ACC4837> /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/array.cpython-36m-darwin.so 0x10ac39000 - 0x10ac3cfff +zlib.cpython-36m-darwin.so (0) <20F84555-58E4-3CF3-AF2B-53BED04E60C7> /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/zlib.cpython-36m-darwin.so 0x10ad41000 - 0x10ad4bff7 +_datetime.cpython-36m-darwin.so (0) <3F1F8FFB-CEA0-3C66-9D4F-F3BC5B60F725> /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_datetime.cpython-36m-darwin.so 0x10ad93000 - 0x10ad9eff7 +_curses.cpython-36m-darwin.so (0) <0E85C94E-7E3F-3AC9-B332-8E373482FF9B> /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_curses.cpython-36m-darwin.so 0x10ae26000 - 0x10ae27fff +_bz2.cpython-36m-darwin.so (0) /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_bz2.cpython-36m-darwin.so 0x10ae2b000 - 0x10ae2eff7 +_lzma.cpython-36m-darwin.so (0) <08D5A079-150F-31D1-AF9D-34C7CA1810FF> /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_lzma.cpython-36m-darwin.so 0x10ae33000 - 0x10ae4fff3 +liblzma.5.dylib (0) /usr/local/opt/xz/lib/liblzma.5.dylib 0x10ae55000 - 0x10ae56fff +grp.cpython-36m-darwin.so (0) /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/grp.cpython-36m-darwin.so 0x10ae99000 - 0x10ae9cfff +_hashlib.cpython-36m-darwin.so (0) <3CF81ECB-BFF3-30DD-B7F4-E791ACDE01F3> /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_hashlib.cpython-36m-darwin.so 0x10aea0000 - 0x10aedfff7 +libssl.1.0.0.dylib (0) <79FF0E4D-0C49-3BC1-8885-6BFD213C1C3E> /usr/local/opt/openssl/lib/libssl.1.0.0.dylib 0x10aefc000 - 0x10b06eaf7 +libcrypto.1.0.0.dylib (0) <323A70A1-8F5C-3541-9570-B46743A8CD31> /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib 0x10b0e6000 - 0x10b0ebff7 +_blake2.cpython-36m-darwin.so (0) /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_blake2.cpython-36m-darwin.so 0x10b0ef000 - 0x10b0fefff +_sha3.cpython-36m-darwin.so (0) /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_sha3.cpython-36m-darwin.so 0x10b103000 - 0x10b103fff +_bisect.cpython-36m-darwin.so (0) <4D8C624C-2E17-3CE4-854E-F2EB89A4F5AB> /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_bisect.cpython-36m-darwin.so 0x10b106000 - 0x10b107ffb +_random.cpython-36m-darwin.so (0) <38A84988-801D-338A-8E8F-A733F038154B> /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_random.cpython-36m-darwin.so 0x10b10a000 - 0x10b10bffb +_multiprocessing.cpython-36m-darwin.so (0) <0801ABBF-9400-3D44-99F5-18BC272C7AFF> /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_multiprocessing.cpython-36m-darwin.so 0x10b10e000 - 0x10b10ffff +fcntl.cpython-36m-darwin.so (0) /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/fcntl.cpython-36m-darwin.so 0x10b193000 - 0x10b197fff +_asyncio.cpython-36m-darwin.so (0) /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_asyncio.cpython-36m-darwin.so 0x10b25f000 - 0x10b26bfff +_ssl.cpython-36m-darwin.so (0) /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_ssl.cpython-36m-darwin.so 0x10b278000 - 0x10b27bff7 +binascii.cpython-36m-darwin.so (0) /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/binascii.cpython-36m-darwin.so 0x10b450000 - 0x10b45fff7 +_ctypes.cpython-36m-darwin.so (0) /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_ctypes.cpython-36m-darwin.so 0x10b4aa000 - 0x10b4b1ff7 +libuuid.dylib (0) <13A6DC18-3265-3CA7-8848-2F4A16F6333A> /usr/local/lib/libuuid.dylib 0x10b535000 - 0x10b536fff +_scproxy.cpython-36m-darwin.so (0) /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_scproxy.cpython-36m-darwin.so 0x10b579000 - 0x10b64dff3 +unicodedata.cpython-36m-darwin.so (0) /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/unicodedata.cpython-36m-darwin.so 0x7fff95ca7000 - 0x7fff96141fff com.apple.CoreFoundation (6.9 - 1348.28) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x7fff97c89000 - 0x7fff97d1eff7 com.apple.framework.IOKit (2.0.2 - 1324.30.13) <163BE7FA-B29A-348F-8B5F-E301F2E8C964> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff9c1ad000 - 0x7fff9c4ccfff com.apple.security (7.0 - 57740.31.2) /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fff9c8f7000 - 0x7fff9c968ff7 com.apple.SystemConfiguration (1.14 - 1.14) /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration 0x7fffa9a9a000 - 0x7fffa9a9bff3 libDiagnosticMessagesClient.dylib (102) <422911A4-E273-3E88-BFC4-DF6470E48242> /usr/lib/libDiagnosticMessagesClient.dylib 0x7fffa9cd3000 - 0x7fffa9cd3fff libOpenScriptingUtil.dylib (172) /usr/lib/libOpenScriptingUtil.dylib 0x7fffa9cd9000 - 0x7fffa9cdaff3 libSystem.B.dylib (1238) <9CB018AF-54E9-300F-82BE-81FE553C9154> /usr/lib/libSystem.B.dylib 0x7fffa9df2000 - 0x7fffa9df2ff3 libauto.dylib (187) <5BBF6A00-CC76-389D-84E7-CA88EDADE683> /usr/lib/libauto.dylib 0x7fffa9df3000 - 0x7fffa9e03ff3 libbsm.0.dylib (34) <20084796-B04D-3B35-A003-EA11459557A9> /usr/lib/libbsm.0.dylib 0x7fffa9e04000 - 0x7fffa9e12ff7 libbz2.1.0.dylib (38) <6FD3B63F-0F86-3A25-BD5B-E243F58792C9> /usr/lib/libbz2.1.0.dylib 0x7fffa9e13000 - 0x7fffa9e69ff7 libc++.1.dylib (307.4) /usr/lib/libc++.1.dylib 0x7fffa9e6a000 - 0x7fffa9e94fff libc++abi.dylib (307.2) <1CEF8ABB-7E6D-3C2F-8E0A-E7884478DD23> /usr/lib/libc++abi.dylib 0x7fffa9ebc000 - 0x7fffa9ebcff7 libcoretls.dylib (121.31.1) /usr/lib/libcoretls.dylib 0x7fffa9ebd000 - 0x7fffa9ebeff3 libcoretls_cfhelpers.dylib (121.31.1) <6F37C5AD-7999-3D31-A52F-7AEED935F32D> /usr/lib/libcoretls_cfhelpers.dylib 0x7fffaa2c9000 - 0x7fffaa2c9fff libenergytrace.dylib (15) /usr/lib/libenergytrace.dylib 0x7fffaa3d2000 - 0x7fffaa5f7ffb libicucore.A.dylib (57149.0.1) <6B5FDA93-AA88-318F-9608-C2A33D602EC7> /usr/lib/libicucore.A.dylib 0x7fffaa5ff000 - 0x7fffaa618ffb liblzma.5.dylib (10) <44BD0279-99DD-36B5-8A6E-C11432E2098D> /usr/lib/liblzma.5.dylib 0x7fffaa8d8000 - 0x7fffaa909ffb libncurses.5.4.dylib (51.30.1) /usr/lib/libncurses.5.4.dylib 0x7fffaa90a000 - 0x7fffaa983ff7 libnetwork.dylib (856.30.16) <66C6E4D6-B39C-3309-80C1-CBBE170DDD51> /usr/lib/libnetwork.dylib 0x7fffaa984000 - 0x7fffaad54d97 libobjc.A.dylib (706) /usr/lib/libobjc.A.dylib 0x7fffaad57000 - 0x7fffaad5bfff libpam.2.dylib (21.30.1) <71EB0D88-DE84-3C8D-A2C5-58AA282BC5BC> /usr/lib/libpam.2.dylib 0x7fffaad5c000 - 0x7fffaad8cff7 libpcap.A.dylib (67) <450DB888-2C0C-3085-A5F1-69324DFE902C> /usr/lib/libpcap.A.dylib 0x7fffaae16000 - 0x7fffaaf5efe3 libsqlite3.dylib (253) /usr/lib/libsqlite3.dylib 0x7fffab053000 - 0x7fffab060fff libxar.1.dylib (357) <58BFB84B-66FE-3299-AA3D-BBA178ADEE39> /usr/lib/libxar.1.dylib 0x7fffab064000 - 0x7fffab153ffb libxml2.2.dylib (30.11) /usr/lib/libxml2.2.dylib 0x7fffab17e000 - 0x7fffab18fff3 libz.1.dylib (67) <46E3FFA2-4328-327A-8D34-A03E20BFFB8E> /usr/lib/libz.1.dylib 0x7fffab19e000 - 0x7fffab1a2ff7 libcache.dylib (79) <0C8092D3-600F-3ADD-A036-F225B6CDCA43> /usr/lib/system/libcache.dylib 0x7fffab1a3000 - 0x7fffab1aeff7 libcommonCrypto.dylib (60092.30.2) /usr/lib/system/libcommonCrypto.dylib 0x7fffab1af000 - 0x7fffab1b6fff libcompiler_rt.dylib (62) /usr/lib/system/libcompiler_rt.dylib 0x7fffab1b7000 - 0x7fffab1bffff libcopyfile.dylib (138) <64E285D9-5485-333B-AEE7-8B0C8FB9275F> /usr/lib/system/libcopyfile.dylib 0x7fffab1c0000 - 0x7fffab243fdf libcorecrypto.dylib (442.30.20) <2074B932-FD79-30A9-8E90-AF25C49F2AF1> /usr/lib/system/libcorecrypto.dylib 0x7fffab244000 - 0x7fffab276fff libdispatch.dylib (703.30.5) /usr/lib/system/libdispatch.dylib 0x7fffab277000 - 0x7fffab27cff3 libdyld.dylib (421.2) <6F506653-FFF6-3DB8-84F1-109AE3C52F32> /usr/lib/system/libdyld.dylib 0x7fffab27d000 - 0x7fffab27dffb libkeymgr.dylib (28) <1A318923-1200-3B06-B432-5007D82F195D> /usr/lib/system/libkeymgr.dylib 0x7fffab27e000 - 0x7fffab28affb libkxld.dylib (3789.41.3) <87550136-9353-348B-9CD9-C342B48C5AAF> /usr/lib/system/libkxld.dylib 0x7fffab28b000 - 0x7fffab28bfff liblaunch.dylib (972.30.7) <15FACC21-079A-3BDF-9AFB-4253EFDEB587> /usr/lib/system/liblaunch.dylib 0x7fffab28c000 - 0x7fffab291fff libmacho.dylib (894) /usr/lib/system/libmacho.dylib 0x7fffab292000 - 0x7fffab294ff3 libquarantine.dylib (85) /usr/lib/system/libquarantine.dylib 0x7fffab295000 - 0x7fffab296ffb libremovefile.dylib (45) /usr/lib/system/libremovefile.dylib 0x7fffab297000 - 0x7fffab2afff7 libsystem_asl.dylib (349.30.2) /usr/lib/system/libsystem_asl.dylib 0x7fffab2b0000 - 0x7fffab2b0ff7 libsystem_blocks.dylib (67) /usr/lib/system/libsystem_blocks.dylib 0x7fffab2b1000 - 0x7fffab33efef libsystem_c.dylib (1158.30.7) <2F881962-03CB-3B9D-A782-D98C1BBA4E3D> /usr/lib/system/libsystem_c.dylib 0x7fffab33f000 - 0x7fffab342ffb libsystem_configuration.dylib (888.30.2) <4FE3983C-E4ED-3939-A578-03AD29C99788> /usr/lib/system/libsystem_configuration.dylib 0x7fffab343000 - 0x7fffab346fff libsystem_coreservices.dylib (41.4) <1A572B9E-0C47-320F-8C64-7990D0A5FB5A> /usr/lib/system/libsystem_coreservices.dylib 0x7fffab347000 - 0x7fffab35fff3 libsystem_coretls.dylib (121.31.1) <4676F06D-274D-31BE-B61C-4D7A4AEF4858> /usr/lib/system/libsystem_coretls.dylib 0x7fffab360000 - 0x7fffab366fff libsystem_dnssd.dylib (765.30.11) /usr/lib/system/libsystem_dnssd.dylib 0x7fffab367000 - 0x7fffab390ff7 libsystem_info.dylib (503.30.1) <9ED9121C-F111-3FAD-BC2F-C95DEE1C9362> /usr/lib/system/libsystem_info.dylib 0x7fffab391000 - 0x7fffab3b3ff7 libsystem_kernel.dylib (3789.41.3) /usr/lib/system/libsystem_kernel.dylib 0x7fffab3b4000 - 0x7fffab3fbfe7 libsystem_m.dylib (3121.4) <266DB92B-A86F-3691-80FB-1B26AD73CFF3> /usr/lib/system/libsystem_m.dylib 0x7fffab3fc000 - 0x7fffab41aff7 libsystem_malloc.dylib (116.30.3) /usr/lib/system/libsystem_malloc.dylib 0x7fffab41b000 - 0x7fffab472ffb libsystem_network.dylib (856.30.16) <4AE368E9-605D-379D-B04C-2AC7455B8250> /usr/lib/system/libsystem_network.dylib 0x7fffab473000 - 0x7fffab47cff3 libsystem_networkextension.dylib (563.30.15) /usr/lib/system/libsystem_networkextension.dylib 0x7fffab47d000 - 0x7fffab486ff3 libsystem_notify.dylib (165.20.1) /usr/lib/system/libsystem_notify.dylib 0x7fffab487000 - 0x7fffab48ffe7 libsystem_platform.dylib (126.1.2) <3CA06D4E-C00A-36DE-AA65-3A390097D1F6> /usr/lib/system/libsystem_platform.dylib 0x7fffab490000 - 0x7fffab49aff7 libsystem_pthread.dylib (218.30.1) /usr/lib/system/libsystem_pthread.dylib 0x7fffab49b000 - 0x7fffab49eff7 libsystem_sandbox.dylib (592.31.1) <7BBFDF96-293F-3DD9-B3A4-7C168280B441> /usr/lib/system/libsystem_sandbox.dylib 0x7fffab49f000 - 0x7fffab4a0fff libsystem_secinit.dylib (24) <5C1F1E47-0F7D-3E25-8DEB-D9DB1F902281> /usr/lib/system/libsystem_secinit.dylib 0x7fffab4a1000 - 0x7fffab4a8fff libsystem_symptoms.dylib (532.30.6) <5D990CF5-B58F-39F7-B375-99B4EC62CFBD> /usr/lib/system/libsystem_symptoms.dylib 0x7fffab4a9000 - 0x7fffab4c9ff7 libsystem_trace.dylib (518.30.7) <6D34D1EA-2A3C-3D2D-803E-A666E6AEEE52> /usr/lib/system/libsystem_trace.dylib 0x7fffab4ca000 - 0x7fffab4cfffb libunwind.dylib (35.3) <9F7C2AD8-A9A7-3DE4-828D-B0F0F166AAA0> /usr/lib/system/libunwind.dylib 0x7fffab4d0000 - 0x7fffab4f9ff7 libxpc.dylib (972.30.7) <65E41BB6-EBD5-3D93-B0BE-B190CEE4DD93> /usr/lib/system/libxpc.dylib External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 871 thread_create: 0 thread_set_state: 0 VM Region Summary: ReadOnly portion of Libraries: Total=139.6M resident=0K(0%) swapped_out_or_unallocated=139.6M(100%) Writable regions: Total=76.8M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=76.8M(100%) VIRTUAL REGION REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= Activity Tracing 256K 2 Dispatch continuations 8192K 2 Kernel Alloc Once 8K 2 MALLOC 40.7M 14 MALLOC guard page 16K 4 MALLOC_LARGE (reserved) 128K 2 reserved VM address space (unallocated) STACK GUARD 4K 2 Stack 17.5M 5 Stack Guard 12K 4 VM_ALLOCATE 10.0M 25 __DATA 4416K 100 __LINKEDIT 112.5M 39 __TEXT 27.1M 99 __UNICODE 556K 2 shared memory 44K 5 =========== ======= ======= TOTAL 221.1M 292 TOTAL, minus reserved VM space 221.0M 292 Model: MacBookPro12,1, BootROM MBP121.0167.B21, 2 processors, Intel Core i5, 2,9 GHz, 16 GB, SMC 2.28f7 Graphics: Intel Iris Graphics 6100, Intel Iris Graphics 6100, Built-In Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1867 MHz, 0x02FE, 0x4544464232333241314D412D4A442D460000 Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1867 MHz, 0x02FE, 0x4544464232333241314D412D4A442D460000 AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x133), Broadcom BCM43xx 1.0 (7.21.171.68.1a5) Bluetooth: Version 5.0.3f1, 3 services, 17 devices, 1 incoming serial ports Network Service: Wi-Fi, AirPort, en0 Serial ATA Device: APPLE SSD SM0512G, 500,28 GB USB Device: USB 3.0 Bus USB Device: Hub USB Device: Hub USB Device: Bluetooth USB Host Controller USB Device: Hub USB Device: Microsoft USB Optical Mouse USB Device: USB2.0 Hub USB Device: daskeyboard USB Device: Hub Thunderbolt Bus: MacBook Pro, Apple Inc., 27.1 ---------- components: macOS files: request_multiprocessing_crash.py messages: 293849 nosy: gromgull, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Segfault on OSX with 3.6.1 type: crash versions: Python 3.6 Added file: http://bugs.python.org/file46868/request_multiprocessing_crash.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 09:04:02 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 17 May 2017 13:04:02 +0000 Subject: [issue30301] multiprocessing: AttributeError: 'SimpleQueue' object has no attribute '_poll' In-Reply-To: <1494183710.88.0.708414094068.issue30301@psf.upfronthosting.co.za> Message-ID: <1495026242.47.0.599536607881.issue30301@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 6f75bc003ab4d5294b0291289ae03f7a8d305f46 by Xiang Zhang in branch 'master': bpo-30301: Fix AttributeError when using SimpleQueue.empty() (#1601) https://github.com/python/cpython/commit/6f75bc003ab4d5294b0291289ae03f7a8d305f46 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 09:07:29 2017 From: report at bugs.python.org (Gunnar Aastrand Grimnes) Date: Wed, 17 May 2017 13:07:29 +0000 Subject: [issue30385] Segfault on OSX with 3.6.1 In-Reply-To: <1495024855.04.0.697140063474.issue30385@psf.upfronthosting.co.za> Message-ID: <1495026449.22.0.106294556106.issue30385@psf.upfronthosting.co.za> Gunnar Aastrand Grimnes added the comment: I am unable to reduce it to a small(ish) test-case like for 3.6.1, but I can also get 2.7.1 to seg fault in my original program, and the stack trace is similar: Process: Python [4023] Path: /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python Identifier: Python Version: 2.7.11 (2.7.11) Code Type: X86-64 (Native) Parent Process: Python [4018] Responsible: Python [4023] User ID: 501 Date/Time: 2017-05-17 15:04:48.824 +0200 OS Version: Mac OS X 10.12.3 (16D32) Report Version: 12 Anonymous UUID: DB16C70B-F979-86B6-864C-0AC84B0E6402 Sleep/Wake UUID: 03D0B108-E764-4834-A88D-7919CAF9B786 Time Awake Since Boot: 3000 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.os.log Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x000000010617c832 Exception Note: EXC_CORPSE_NOTIFY Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [0] VM Regions Near 0x10617c832: VM_ALLOCATE 000000010603c000-000000010617c000 [ 1280K] rw-/rwx SM=COW --> VM_ALLOCATE 00000001061bc000-00000001062fc000 [ 1280K] rw-/rwx SM=COW Application Specific Information: crashed on child side of fork pre-exec Thread 0 Crashed:: Dispatch queue: com.apple.os.log 0 libsystem_trace.dylib 0x00007fffab4bb622 _os_log_cmp_key + 4 1 libsystem_c.dylib 0x00007fffab324144 rb_tree_find_node + 58 2 libsystem_trace.dylib 0x00007fffab4bbb5a __os_log_create_block_invoke + 30 3 libdispatch.dylib 0x00007fffab2460b8 _dispatch_client_callout + 8 4 libdispatch.dylib 0x00007fffab246cf2 _dispatch_barrier_sync_f_invoke + 83 5 libsystem_trace.dylib 0x00007fffab4bb8ac os_log_create + 590 6 com.apple.SystemConfiguration 0x00007fff9c8faafa __SCDynamicStoreCheckRetryAndHandleError + 167 7 com.apple.SystemConfiguration 0x00007fff9c8f9e12 SCDynamicStoreCopyValue + 189 8 com.apple.SystemConfiguration 0x00007fff9c8fe6fb SCDynamicStoreCopyProxiesWithOptions + 560 9 _scproxy.so 0x0000000104cb9914 get_proxy_settings + 24 10 org.python.python 0x00000001044c2bfb PyEval_EvalFrameEx + 26904 11 org.python.python 0x00000001044c672d fast_function + 264 12 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 13 org.python.python 0x00000001044c672d fast_function + 264 14 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 15 org.python.python 0x00000001044c672d fast_function + 264 16 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 17 org.python.python 0x00000001044c672d fast_function + 264 18 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 19 org.python.python 0x00000001044c672d fast_function + 264 20 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 21 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 22 org.python.python 0x0000000104460fb1 function_call + 352 23 org.python.python 0x0000000104442eb0 PyObject_Call + 99 24 org.python.python 0x00000001044c3294 PyEval_EvalFrameEx + 28593 25 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 26 org.python.python 0x0000000104460fb1 function_call + 352 27 org.python.python 0x0000000104442eb0 PyObject_Call + 99 28 org.python.python 0x00000001044c3294 PyEval_EvalFrameEx + 28593 29 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 30 org.python.python 0x0000000104460fb1 function_call + 352 31 org.python.python 0x0000000104442eb0 PyObject_Call + 99 32 org.python.python 0x000000010444dcb8 instancemethod_call + 173 33 org.python.python 0x0000000104442eb0 PyObject_Call + 99 34 org.python.python 0x00000001044c2a27 PyEval_EvalFrameEx + 26436 35 org.python.python 0x00000001044c672d fast_function + 264 36 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 37 org.python.python 0x00000001044c672d fast_function + 264 38 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 39 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 40 org.python.python 0x00000001044c669a fast_function + 117 41 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 42 org.python.python 0x0000000104458398 gen_send_ex + 191 43 org.python.python 0x00000001044c2cd2 PyEval_EvalFrameEx + 27119 44 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 45 org.python.python 0x00000001044c669a fast_function + 117 46 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 47 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 48 org.python.python 0x0000000104460fb1 function_call + 352 49 org.python.python 0x0000000104442eb0 PyObject_Call + 99 50 org.python.python 0x00000001044c3294 PyEval_EvalFrameEx + 28593 51 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 52 org.python.python 0x0000000104460fb1 function_call + 352 53 org.python.python 0x0000000104442eb0 PyObject_Call + 99 54 _functools.so 0x00000001048587b7 partial_call + 189 55 org.python.python 0x0000000104442eb0 PyObject_Call + 99 56 org.python.python 0x00000001044c2a27 PyEval_EvalFrameEx + 26436 57 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 58 org.python.python 0x00000001044c669a fast_function + 117 59 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 60 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 61 org.python.python 0x00000001044c669a fast_function + 117 62 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 63 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 64 org.python.python 0x00000001044c669a fast_function + 117 65 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 66 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 67 org.python.python 0x0000000104460fb1 function_call + 352 68 org.python.python 0x0000000104442eb0 PyObject_Call + 99 69 org.python.python 0x00000001044c3294 PyEval_EvalFrameEx + 28593 70 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 71 org.python.python 0x0000000104460fb1 function_call + 352 72 org.python.python 0x0000000104442eb0 PyObject_Call + 99 73 org.python.python 0x000000010444dcb8 instancemethod_call + 173 74 org.python.python 0x0000000104442eb0 PyObject_Call + 99 75 org.python.python 0x00000001044896f8 slot_tp_call + 61 76 org.python.python 0x0000000104442eb0 PyObject_Call + 99 77 org.python.python 0x00000001044c3294 PyEval_EvalFrameEx + 28593 78 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 79 org.python.python 0x0000000104460fb1 function_call + 352 80 org.python.python 0x0000000104442eb0 PyObject_Call + 99 81 org.python.python 0x00000001044c3294 PyEval_EvalFrameEx + 28593 82 org.python.python 0x00000001044c672d fast_function + 264 83 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 84 org.python.python 0x00000001044c672d fast_function + 264 85 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 86 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 87 org.python.python 0x0000000104460fb1 function_call + 352 88 org.python.python 0x0000000104442eb0 PyObject_Call + 99 89 org.python.python 0x000000010444dcb8 instancemethod_call + 173 90 org.python.python 0x0000000104442eb0 PyObject_Call + 99 91 org.python.python 0x000000010448a143 slot_tp_init + 64 92 org.python.python 0x0000000104485954 type_call + 182 93 org.python.python 0x0000000104442eb0 PyObject_Call + 99 94 org.python.python 0x00000001044c2a27 PyEval_EvalFrameEx + 26436 95 org.python.python 0x00000001044c672d fast_function + 264 96 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 97 org.python.python 0x00000001044c672d fast_function + 264 98 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 99 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 100 org.python.python 0x0000000104460fb1 function_call + 352 101 org.python.python 0x0000000104442eb0 PyObject_Call + 99 102 org.python.python 0x000000010444dcb8 instancemethod_call + 173 103 org.python.python 0x0000000104442eb0 PyObject_Call + 99 104 org.python.python 0x000000010448a143 slot_tp_init + 64 105 org.python.python 0x0000000104485954 type_call + 182 106 org.python.python 0x0000000104442eb0 PyObject_Call + 99 107 org.python.python 0x00000001044c2a27 PyEval_EvalFrameEx + 26436 108 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 109 org.python.python 0x00000001044c669a fast_function + 117 110 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 111 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 112 org.python.python 0x0000000104460fb1 function_call + 352 113 org.python.python 0x0000000104442eb0 PyObject_Call + 99 114 org.python.python 0x000000010444dcb8 instancemethod_call + 173 115 org.python.python 0x0000000104442eb0 PyObject_Call + 99 116 org.python.python 0x000000010448a143 slot_tp_init + 64 117 org.python.python 0x0000000104485954 type_call + 182 118 org.python.python 0x0000000104442eb0 PyObject_Call + 99 119 org.python.python 0x00000001044c2a27 PyEval_EvalFrameEx + 26436 120 org.python.python 0x0000000104458398 gen_send_ex + 191 121 org.python.python 0x00000001044c2cd2 PyEval_EvalFrameEx + 27119 122 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 123 org.python.python 0x00000001044c669a fast_function + 117 124 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 125 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 126 org.python.python 0x0000000104460fb1 function_call + 352 127 org.python.python 0x0000000104442eb0 PyObject_Call + 99 128 org.python.python 0x000000010444dcb8 instancemethod_call + 173 129 org.python.python 0x0000000104442eb0 PyObject_Call + 99 130 org.python.python 0x000000010448a143 slot_tp_init + 64 131 org.python.python 0x0000000104485954 type_call + 182 132 org.python.python 0x0000000104442eb0 PyObject_Call + 99 133 org.python.python 0x00000001044c2a27 PyEval_EvalFrameEx + 26436 134 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 135 org.python.python 0x0000000104460fb1 function_call + 352 136 org.python.python 0x0000000104442eb0 PyObject_Call + 99 137 org.python.python 0x00000001044c3294 PyEval_EvalFrameEx + 28593 138 org.python.python 0x0000000104458398 gen_send_ex + 191 139 org.python.python 0x00000001044b98db builtin_next + 105 140 org.python.python 0x00000001044c2bcd PyEval_EvalFrameEx + 26858 141 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 142 org.python.python 0x0000000104460fb1 function_call + 352 143 org.python.python 0x0000000104442eb0 PyObject_Call + 99 144 org.python.python 0x00000001044c3294 PyEval_EvalFrameEx + 28593 145 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 146 org.python.python 0x00000001044c669a fast_function + 117 147 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 148 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 149 org.python.python 0x00000001044c669a fast_function + 117 150 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 151 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 152 org.python.python 0x00000001044c669a fast_function + 117 153 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 154 org.python.python 0x0000000104458398 gen_send_ex + 191 155 org.python.python 0x00000001044c2cd2 PyEval_EvalFrameEx + 27119 156 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 157 org.python.python 0x00000001044c669a fast_function + 117 158 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 159 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 160 org.python.python 0x0000000104460fb1 function_call + 352 161 org.python.python 0x0000000104442eb0 PyObject_Call + 99 162 org.python.python 0x000000010444dcb8 instancemethod_call + 173 163 org.python.python 0x0000000104442eb0 PyObject_Call + 99 164 org.python.python 0x000000010448a143 slot_tp_init + 64 165 org.python.python 0x0000000104485954 type_call + 182 166 org.python.python 0x0000000104442eb0 PyObject_Call + 99 167 org.python.python 0x00000001044c2a27 PyEval_EvalFrameEx + 26436 168 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 169 org.python.python 0x00000001044c669a fast_function + 117 170 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 171 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 172 org.python.python 0x00000001044c669a fast_function + 117 173 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 174 org.python.python 0x0000000104458398 gen_send_ex + 191 175 org.python.python 0x00000001044b98db builtin_next + 105 176 org.python.python 0x00000001044c2bcd PyEval_EvalFrameEx + 26858 177 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 178 org.python.python 0x00000001044c669a fast_function + 117 179 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 180 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 181 org.python.python 0x00000001044c669a fast_function + 117 182 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 183 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 184 org.python.python 0x00000001044c669a fast_function + 117 185 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 186 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 187 org.python.python 0x00000001044c669a fast_function + 117 188 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 189 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 190 org.python.python 0x0000000104460fb1 function_call + 352 191 org.python.python 0x0000000104442eb0 PyObject_Call + 99 192 org.python.python 0x00000001044c3294 PyEval_EvalFrameEx + 28593 193 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 194 org.python.python 0x00000001044c669a fast_function + 117 195 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 196 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 197 org.python.python 0x00000001044c669a fast_function + 117 198 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 199 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 200 org.python.python 0x00000001044c669a fast_function + 117 201 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 202 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 203 org.python.python 0x00000001044bc4fc PyEval_EvalFrameEx + 537 204 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 205 org.python.python 0x00000001044c669a fast_function + 117 206 org.python.python 0x00000001044c2af3 PyEval_EvalFrameEx + 26640 207 org.python.python 0x00000001044bc0f1 PyEval_EvalCodeEx + 1583 208 org.python.python 0x0000000104460fb1 function_call + 352 209 org.python.python 0x0000000104442eb0 PyObject_Call + 99 210 org.python.python 0x00000001044f165d RunModule + 113 211 org.python.python 0x00000001044f11b3 Py_Main + 2479 212 libdyld.dylib 0x00007fffab27c255 start + 1 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x00007fff5b7c5e20 rbx: 0x00007fc049a24ca0 rcx: 0x0030000000000203 rdx: 0x00007fff5b7c5e50 rdi: 0x000000010617c830 rsi: 0x00007fc049a24ca0 rbp: 0x00007fff5b7c5dc0 rsp: 0x00007fff5b7c5d88 r8: 0x0000000000000001 r9: 0x0000000000000048 r10: 0x00000000ffffffff r11: 0xffffffffbee66a4f r12: 0x00007fffb40ccf58 r13: 0x00007fffab4bb61e r14: 0x00007fff5b7c5e50 r15: 0x00007fc049a24cb0 rip: 0x00007fffab4bb622 rfl: 0x0000000000010206 cr2: 0x000000010617c832 Logical CPU: 3 Error Code: 0x00000004 Trap Number: 14 Binary Images: 0x104430000 - 0x104431fff +org.python.python (2.7.11 - 2.7.11) <6BAE76DA-21F3-361A-9D58-50D270E8B694> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python 0x104438000 - 0x10452eff7 +org.python.python (2.7.11, [c] 2001-2015 Python Software Foundation. - 2.7.11) /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/Python 0x10474e000 - 0x104750fff +_locale.so (0) <107BD336-C75C-38DF-B1E6-62A46B0D1ED2> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so 0x1047d3000 - 0x1047d5ff7 +time.so (0) <7157EF24-2AEF-3926-8D81-CA87C4593587> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/time.so 0x1047db000 - 0x1047dcfff +cStringIO.so (0) <7F42CD68-944C-39C4-8B30-4ED100621116> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cStringIO.so 0x1047e1000 - 0x1047e4fff +_collections.so (0) <7008439C-6500-3A96-B0A0-CC9FC6F1442C> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_collections.so 0x1047e9000 - 0x1047ecfff +operator.so (0) <61859B66-8F74-3D0C-B077-DFFFF4E87173> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/operator.so 0x1047f2000 - 0x1047f7fff +itertools.so (0) <8A084173-5061-3EFF-8670-E2558DAE3A0A> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/itertools.so 0x104800000 - 0x104801fff +_heapq.so (0) <797F412F-245E-3662-B274-054C39E4AFBD> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_heapq.so 0x104845000 - 0x10484dfff +_socket.so (0) /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_socket.so 0x104857000 - 0x104858fff +_functools.so (0) <04D277F9-3C8F-3961-B004-00CFFB4BA6A9> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_functools.so 0x10485b000 - 0x104865fff +_ssl.so (0) /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ssl.so 0x10486f000 - 0x1048aeff7 +libssl.1.0.0.dylib (0) <79FF0E4D-0C49-3BC1-8885-6BFD213C1C3E> /usr/local/opt/openssl/lib/libssl.1.0.0.dylib 0x1048cb000 - 0x104a3daf7 +libcrypto.1.0.0.dylib (0) <323A70A1-8F5C-3541-9570-B46743A8CD31> /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib 0x104af5000 - 0x104b00fff +cPickle.so (0) <854D8260-8D73-3572-8C6C-2A993F32CB9A> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cPickle.so 0x104b06000 - 0x104b09fff +_struct.so (0) /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_struct.so 0x104b0f000 - 0x104b13ff7 +_json.so (0) <3692EE31-F489-3478-BD5F-A9CA68A0B7B6> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_json.so 0x104b17000 - 0x104b1bfff +array.so (0) /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/array.so 0x104b21000 - 0x104b24fff +zlib.so (0) <0C5AA920-028F-3163-B982-4EBDD9DBDCF8> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/zlib.so 0x104c28000 - 0x104c2bff7 +strop.so (0) /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/strop.so 0x104c6f000 - 0x104c6fffb +speedups.so (0) /usr/local/lib/python2.7/site-packages/tornado/speedups.so 0x104c72000 - 0x104c75fff +binascii.so (0) /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/binascii.so 0x104cb8000 - 0x104cb9fff +_scproxy.so (0) <9E0219F0-2748-3EE6-A501-CC9AA6E2DA2E> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_scproxy.so 0x104cbc000 - 0x104cc6fff +_curses.so (0) /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_curses.so 0x104cce000 - 0x104cd7ff7 +datetime.so (0) /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/datetime.so 0x104d20000 - 0x104d22fff +select.so (0) <64C8EC8E-FE59-3CFC-93BC-518BD7A4DF74> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/select.so 0x104d27000 - 0x104d2aff7 +math.so (0) <00F67A27-1E1C-364E-9109-F368C5116343> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/math.so 0x104d6f000 - 0x104d70fff +fcntl.so (0) <143D25D2-7C46-3D58-AA97-9C302E2AFD98> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/fcntl.so 0x104db3000 - 0x104db6fff +_multiprocessing.so (0) <3E426864-B46F-3B76-A205-346EB97A9B15> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_multiprocessing.so 0x104e3a000 - 0x104e3cfff +_hashlib.so (0) <6A112A30-D2D8-39BE-93A0-5D3F3D8ACBAF> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_hashlib.so 0x104e40000 - 0x104e41fff +_random.so (0) <42C6DCEB-3F9E-3ACE-ABD9-9076154E35AC> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_random.so 0x104e84000 - 0x104e93fff +_io.so (0) <5215A53B-13E3-3D5E-9BB1-B356624C0BA4> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so 0x104ee5000 - 0x104f89fff +unicodedata.so (0) <68896A51-004C-358A-9F9B-9D248FA274B8> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/unicodedata.so 0x10500e000 - 0x105010fff +_csv.so (0) <9B0B6190-EFAB-31C0-982F-B81FA17E975F> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_csv.so 0x105155000 - 0x105156ff7 +cprocessors.so (0) /usr/local/lib/python2.7/site-packages/sqlalchemy/cprocessors.so 0x10531a000 - 0x10531afff +cutils.so (0) <91614C95-0AAD-3FDB-8FB4-DA92D5AD191F> /usr/local/lib/python2.7/site-packages/sqlalchemy/cutils.so 0x10531d000 - 0x10531efff +cresultproxy.so (0) /usr/local/lib/python2.7/site-packages/sqlalchemy/cresultproxy.so 0x105562000 - 0x105571fff +_ctypes.so (0) <7733FBD9-D716-30F3-B587-EF6DD843BEAD> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ctypes.so 0x1055bd000 - 0x1055c4ff7 +libuuid.dylib (0) <13A6DC18-3265-3CA7-8848-2F4A16F6333A> /usr/local/lib/libuuid.dylib 0x105648000 - 0x105649fff +grp.so (0) <4BBA1FBC-560C-30BC-B3AF-BCA27DDB83B8> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/grp.so 0x105849000 - 0x105867fff +pyexpat.so (0) /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/pyexpat.so 0x105972000 - 0x105972fff +_bisect.so (0) <20249492-13CC-3A19-BC5B-D3E861307AD5> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_bisect.so 0x105975000 - 0x105a81fff +etree.so (0) <04A9AB0D-F0E0-3A8F-A25E-998116D9518A> /usr/local/lib/python2.7/site-packages/lxml/etree.so 0x105cc7000 - 0x105d1eff3 +_regex.so (0) /usr/local/lib/python2.7/site-packages/_regex.so 0x1064d0000 - 0x1064d7fff +_bcrypt.so (???) <74E870F3-2799-38E9-81B9-E9980CA8409A> /usr/local/lib/python2.7/site-packages/bcrypt/_bcrypt.so 0x1064dc000 - 0x1064f6ff7 +_cffi_backend.so (???) <2CE78FC0-02E7-3D62-A4D0-D6DA09165D92> /usr/local/lib/python2.7/site-packages/_cffi_backend.so 0x10654c000 - 0x106554ff7 +_sqlite.so (0) /usr/local/lib/python2.7/site-packages/pysqlite2/_sqlite.so 0x106561000 - 0x106603fff +libsqlite3.0.dylib (0) <509D2F33-B2BF-3D53-9544-9A6EF6A92A58> /usr/local/opt/sqlite/lib/libsqlite3.0.dylib 0x10661b000 - 0x106658267 dyld (421.2) <947FC440-80F9-32F7-A773-6FC418FE1AB7> /usr/lib/dyld 0x7fff95ca7000 - 0x7fff96141fff com.apple.CoreFoundation (6.9 - 1348.28) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x7fff97c89000 - 0x7fff97d1eff7 com.apple.framework.IOKit (2.0.2 - 1324.30.13) <163BE7FA-B29A-348F-8B5F-E301F2E8C964> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff9c1ad000 - 0x7fff9c4ccfff com.apple.security (7.0 - 57740.31.2) /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fff9c8f7000 - 0x7fff9c968ff7 com.apple.SystemConfiguration (1.14 - 1.14) /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration 0x7fffa9a9a000 - 0x7fffa9a9bff3 libDiagnosticMessagesClient.dylib (102) <422911A4-E273-3E88-BFC4-DF6470E48242> /usr/lib/libDiagnosticMessagesClient.dylib 0x7fffa9cd3000 - 0x7fffa9cd3fff libOpenScriptingUtil.dylib (172) /usr/lib/libOpenScriptingUtil.dylib 0x7fffa9cd9000 - 0x7fffa9cdaff3 libSystem.B.dylib (1238) <9CB018AF-54E9-300F-82BE-81FE553C9154> /usr/lib/libSystem.B.dylib 0x7fffa9df2000 - 0x7fffa9df2ff3 libauto.dylib (187) <5BBF6A00-CC76-389D-84E7-CA88EDADE683> /usr/lib/libauto.dylib 0x7fffa9df3000 - 0x7fffa9e03ff3 libbsm.0.dylib (34) <20084796-B04D-3B35-A003-EA11459557A9> /usr/lib/libbsm.0.dylib 0x7fffa9e04000 - 0x7fffa9e12ff7 libbz2.1.0.dylib (38) <6FD3B63F-0F86-3A25-BD5B-E243F58792C9> /usr/lib/libbz2.1.0.dylib 0x7fffa9e13000 - 0x7fffa9e69ff7 libc++.1.dylib (307.4) /usr/lib/libc++.1.dylib 0x7fffa9e6a000 - 0x7fffa9e94fff libc++abi.dylib (307.2) <1CEF8ABB-7E6D-3C2F-8E0A-E7884478DD23> /usr/lib/libc++abi.dylib 0x7fffa9ebc000 - 0x7fffa9ebcff7 libcoretls.dylib (121.31.1) /usr/lib/libcoretls.dylib 0x7fffa9ebd000 - 0x7fffa9ebeff3 libcoretls_cfhelpers.dylib (121.31.1) <6F37C5AD-7999-3D31-A52F-7AEED935F32D> /usr/lib/libcoretls_cfhelpers.dylib 0x7fffaa2c9000 - 0x7fffaa2c9fff libenergytrace.dylib (15) /usr/lib/libenergytrace.dylib 0x7fffaa2ca000 - 0x7fffaa2d6ffb libexslt.0.dylib (15.8) <9910CD52-0A64-3992-B540-D7D38C626209> /usr/lib/libexslt.0.dylib 0x7fffaa2d7000 - 0x7fffaa2d8fff libffi.dylib (18.1) <49D03682-E111-351C-8266-4519B3B82BE9> /usr/lib/libffi.dylib 0x7fffaa3d2000 - 0x7fffaa5f7ffb libicucore.A.dylib (57149.0.1) <6B5FDA93-AA88-318F-9608-C2A33D602EC7> /usr/lib/libicucore.A.dylib 0x7fffaa5ff000 - 0x7fffaa618ffb liblzma.5.dylib (10) <44BD0279-99DD-36B5-8A6E-C11432E2098D> /usr/lib/liblzma.5.dylib 0x7fffaa8d8000 - 0x7fffaa909ffb libncurses.5.4.dylib (51.30.1) /usr/lib/libncurses.5.4.dylib 0x7fffaa90a000 - 0x7fffaa983ff7 libnetwork.dylib (856.30.16) <66C6E4D6-B39C-3309-80C1-CBBE170DDD51> /usr/lib/libnetwork.dylib 0x7fffaa984000 - 0x7fffaad54d97 libobjc.A.dylib (706) /usr/lib/libobjc.A.dylib 0x7fffaad57000 - 0x7fffaad5bfff libpam.2.dylib (21.30.1) <71EB0D88-DE84-3C8D-A2C5-58AA282BC5BC> /usr/lib/libpam.2.dylib 0x7fffaad5c000 - 0x7fffaad8cff7 libpcap.A.dylib (67) <450DB888-2C0C-3085-A5F1-69324DFE902C> /usr/lib/libpcap.A.dylib 0x7fffaae16000 - 0x7fffaaf5efe3 libsqlite3.dylib (253) /usr/lib/libsqlite3.dylib 0x7fffab053000 - 0x7fffab060fff libxar.1.dylib (357) <58BFB84B-66FE-3299-AA3D-BBA178ADEE39> /usr/lib/libxar.1.dylib 0x7fffab064000 - 0x7fffab153ffb libxml2.2.dylib (30.11) /usr/lib/libxml2.2.dylib 0x7fffab154000 - 0x7fffab17dfff libxslt.1.dylib (15.8) /usr/lib/libxslt.1.dylib 0x7fffab17e000 - 0x7fffab18fff3 libz.1.dylib (67) <46E3FFA2-4328-327A-8D34-A03E20BFFB8E> /usr/lib/libz.1.dylib 0x7fffab19e000 - 0x7fffab1a2ff7 libcache.dylib (79) <0C8092D3-600F-3ADD-A036-F225B6CDCA43> /usr/lib/system/libcache.dylib 0x7fffab1a3000 - 0x7fffab1aeff7 libcommonCrypto.dylib (60092.30.2) /usr/lib/system/libcommonCrypto.dylib 0x7fffab1af000 - 0x7fffab1b6fff libcompiler_rt.dylib (62) /usr/lib/system/libcompiler_rt.dylib 0x7fffab1b7000 - 0x7fffab1bffff libcopyfile.dylib (138) <64E285D9-5485-333B-AEE7-8B0C8FB9275F> /usr/lib/system/libcopyfile.dylib 0x7fffab1c0000 - 0x7fffab243fdf libcorecrypto.dylib (442.30.20) <2074B932-FD79-30A9-8E90-AF25C49F2AF1> /usr/lib/system/libcorecrypto.dylib 0x7fffab244000 - 0x7fffab276fff libdispatch.dylib (703.30.5) /usr/lib/system/libdispatch.dylib 0x7fffab277000 - 0x7fffab27cff3 libdyld.dylib (421.2) <6F506653-FFF6-3DB8-84F1-109AE3C52F32> /usr/lib/system/libdyld.dylib 0x7fffab27d000 - 0x7fffab27dffb libkeymgr.dylib (28) <1A318923-1200-3B06-B432-5007D82F195D> /usr/lib/system/libkeymgr.dylib 0x7fffab27e000 - 0x7fffab28affb libkxld.dylib (3789.41.3) <87550136-9353-348B-9CD9-C342B48C5AAF> /usr/lib/system/libkxld.dylib 0x7fffab28b000 - 0x7fffab28bfff liblaunch.dylib (972.30.7) <15FACC21-079A-3BDF-9AFB-4253EFDEB587> /usr/lib/system/liblaunch.dylib 0x7fffab28c000 - 0x7fffab291fff libmacho.dylib (894) /usr/lib/system/libmacho.dylib 0x7fffab292000 - 0x7fffab294ff3 libquarantine.dylib (85) /usr/lib/system/libquarantine.dylib 0x7fffab295000 - 0x7fffab296ffb libremovefile.dylib (45) /usr/lib/system/libremovefile.dylib 0x7fffab297000 - 0x7fffab2afff7 libsystem_asl.dylib (349.30.2) /usr/lib/system/libsystem_asl.dylib 0x7fffab2b0000 - 0x7fffab2b0ff7 libsystem_blocks.dylib (67) /usr/lib/system/libsystem_blocks.dylib 0x7fffab2b1000 - 0x7fffab33efef libsystem_c.dylib (1158.30.7) <2F881962-03CB-3B9D-A782-D98C1BBA4E3D> /usr/lib/system/libsystem_c.dylib 0x7fffab33f000 - 0x7fffab342ffb libsystem_configuration.dylib (888.30.2) <4FE3983C-E4ED-3939-A578-03AD29C99788> /usr/lib/system/libsystem_configuration.dylib 0x7fffab343000 - 0x7fffab346fff libsystem_coreservices.dylib (41.4) <1A572B9E-0C47-320F-8C64-7990D0A5FB5A> /usr/lib/system/libsystem_coreservices.dylib 0x7fffab347000 - 0x7fffab35fff3 libsystem_coretls.dylib (121.31.1) <4676F06D-274D-31BE-B61C-4D7A4AEF4858> /usr/lib/system/libsystem_coretls.dylib 0x7fffab360000 - 0x7fffab366fff libsystem_dnssd.dylib (765.30.11) /usr/lib/system/libsystem_dnssd.dylib 0x7fffab367000 - 0x7fffab390ff7 libsystem_info.dylib (503.30.1) <9ED9121C-F111-3FAD-BC2F-C95DEE1C9362> /usr/lib/system/libsystem_info.dylib 0x7fffab391000 - 0x7fffab3b3ff7 libsystem_kernel.dylib (3789.41.3) /usr/lib/system/libsystem_kernel.dylib 0x7fffab3b4000 - 0x7fffab3fbfe7 libsystem_m.dylib (3121.4) <266DB92B-A86F-3691-80FB-1B26AD73CFF3> /usr/lib/system/libsystem_m.dylib 0x7fffab3fc000 - 0x7fffab41aff7 libsystem_malloc.dylib (116.30.3) /usr/lib/system/libsystem_malloc.dylib 0x7fffab41b000 - 0x7fffab472ffb libsystem_network.dylib (856.30.16) <4AE368E9-605D-379D-B04C-2AC7455B8250> /usr/lib/system/libsystem_network.dylib 0x7fffab473000 - 0x7fffab47cff3 libsystem_networkextension.dylib (563.30.15) /usr/lib/system/libsystem_networkextension.dylib 0x7fffab47d000 - 0x7fffab486ff3 libsystem_notify.dylib (165.20.1) /usr/lib/system/libsystem_notify.dylib 0x7fffab487000 - 0x7fffab48ffe7 libsystem_platform.dylib (126.1.2) <3CA06D4E-C00A-36DE-AA65-3A390097D1F6> /usr/lib/system/libsystem_platform.dylib 0x7fffab490000 - 0x7fffab49aff7 libsystem_pthread.dylib (218.30.1) /usr/lib/system/libsystem_pthread.dylib 0x7fffab49b000 - 0x7fffab49eff7 libsystem_sandbox.dylib (592.31.1) <7BBFDF96-293F-3DD9-B3A4-7C168280B441> /usr/lib/system/libsystem_sandbox.dylib 0x7fffab49f000 - 0x7fffab4a0fff libsystem_secinit.dylib (24) <5C1F1E47-0F7D-3E25-8DEB-D9DB1F902281> /usr/lib/system/libsystem_secinit.dylib 0x7fffab4a1000 - 0x7fffab4a8fff libsystem_symptoms.dylib (532.30.6) <5D990CF5-B58F-39F7-B375-99B4EC62CFBD> /usr/lib/system/libsystem_symptoms.dylib 0x7fffab4a9000 - 0x7fffab4c9ff7 libsystem_trace.dylib (518.30.7) <6D34D1EA-2A3C-3D2D-803E-A666E6AEEE52> /usr/lib/system/libsystem_trace.dylib 0x7fffab4ca000 - 0x7fffab4cfffb libunwind.dylib (35.3) <9F7C2AD8-A9A7-3DE4-828D-B0F0F166AAA0> /usr/lib/system/libunwind.dylib 0x7fffab4d0000 - 0x7fffab4f9ff7 libxpc.dylib (972.30.7) <65E41BB6-EBD5-3D93-B0BE-B190CEE4DD93> /usr/lib/system/libxpc.dylib External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 2716 thread_create: 0 thread_set_state: 0 VM Region Summary: ReadOnly portion of Libraries: Total=142.2M resident=0K(0%) swapped_out_or_unallocated=142.2M(100%) Writable regions: Total=101.7M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=101.7M(100%) VIRTUAL REGION REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= Activity Tracing 256K 2 Dispatch continuations 8192K 2 Kernel Alloc Once 8K 2 MALLOC 61.6M 16 MALLOC guard page 16K 4 STACK GUARD 56.0M 2 Stack 9752K 5 Stack Guard 12K 4 VM_ALLOCATE 22.3M 34 __DATA 4580K 118 __LINKEDIT 113.3M 51 __TEXT 28.9M 114 __UNICODE 556K 2 shared memory 44K 6 =========== ======= ======= TOTAL 304.9M 348 Model: MacBookPro12,1, BootROM MBP121.0167.B21, 2 processors, Intel Core i5, 2,9 GHz, 16 GB, SMC 2.28f7 Graphics: Intel Iris Graphics 6100, Intel Iris Graphics 6100, Built-In Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1867 MHz, 0x02FE, 0x4544464232333241314D412D4A442D460000 Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1867 MHz, 0x02FE, 0x4544464232333241314D412D4A442D460000 AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x133), Broadcom BCM43xx 1.0 (7.21.171.68.1a5) Bluetooth: Version 5.0.3f1, 3 services, 17 devices, 1 incoming serial ports Network Service: Wi-Fi, AirPort, en0 Serial ATA Device: APPLE SSD SM0512G, 500,28 GB USB Device: USB 3.0 Bus USB Device: Hub USB Device: Hub USB Device: Bluetooth USB Host Controller USB Device: Hub USB Device: Microsoft USB Optical Mouse USB Device: USB2.0 Hub USB Device: daskeyboard USB Device: Hub Thunderbolt Bus: MacBook Pro, Apple Inc., 27.1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 09:11:42 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 17 May 2017 13:11:42 +0000 Subject: [issue30301] multiprocessing: AttributeError: 'SimpleQueue' object has no attribute '_poll' In-Reply-To: <1494183710.88.0.708414094068.issue30301@psf.upfronthosting.co.za> Message-ID: <1495026702.84.0.303531691935.issue30301@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1718 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 09:12:02 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 17 May 2017 13:12:02 +0000 Subject: [issue30301] multiprocessing: AttributeError: 'SimpleQueue' object has no attribute '_poll' In-Reply-To: <1494183710.88.0.708414094068.issue30301@psf.upfronthosting.co.za> Message-ID: <1495026722.23.0.311916204608.issue30301@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1719 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 09:57:53 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 17 May 2017 13:57:53 +0000 Subject: [issue30386] Add a build infrastructure for Android Message-ID: <1495029473.85.0.224153889861.issue30386@psf.upfronthosting.co.za> New submission from Xavier de Gaye: This PR adds a build infrastructure for Android on linux that allows a developer to check that source code changes do not break the existing state of this support by testing the changes on Android with a simple command. For example after a change to the socket module: $ /path/to/python_src/Android/makesetup && make python PYTHON_ARGS="-m test test_socket" The README in the PR describes how to install the Android NDK and SDK, how to cross-compile Python, how to run python interactively or to run the Python test suite on the emulator, how to debug python on the emulator with gdb. This build system has been tested with android-ndk-r13 and android-ndk-r14 which is the latest stable release of the NDK. UnifiedHeaders [1] introduced in android-ndk-r14 is not yet used by this version of the build system. [1] https://android.googlesource.com/platform/ndk.git/+/master/docs/UnifiedHeaders.md ---------- components: Cross-Build messages: 293852 nosy: Alex.Willmer, haypo, martin.panter, ncoghlan, xdegaye priority: normal severity: normal stage: patch review status: open title: Add a build infrastructure for Android type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 10:02:58 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 17 May 2017 14:02:58 +0000 Subject: [issue30301] multiprocessing: AttributeError: 'SimpleQueue' object has no attribute '_poll' In-Reply-To: <1494183710.88.0.708414094068.issue30301@psf.upfronthosting.co.za> Message-ID: <1495029778.5.0.697523807691.issue30301@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 9081b36f330964faa4dee3af03228d2ca7c71835 by Xiang Zhang in branch '3.5': bpo-30301: Fix AttributeError when using SimpleQueue.empty() (#1601) (#1627) https://github.com/python/cpython/commit/9081b36f330964faa4dee3af03228d2ca7c71835 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 10:03:40 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 17 May 2017 14:03:40 +0000 Subject: [issue30301] multiprocessing: AttributeError: 'SimpleQueue' object has no attribute '_poll' In-Reply-To: <1494183710.88.0.708414094068.issue30301@psf.upfronthosting.co.za> Message-ID: <1495029820.9.0.662392382636.issue30301@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 43d4c0329e2348540a3a16ac61b3032f04eefd34 by Xiang Zhang in branch '3.6': bpo-30301: Fix AttributeError when using SimpleQueue.empty() (#1601) (#1628) https://github.com/python/cpython/commit/43d4c0329e2348540a3a16ac61b3032f04eefd34 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 10:04:06 2017 From: report at bugs.python.org (Kirk Sayre) Date: Wed, 17 May 2017 14:04:06 +0000 Subject: [issue24960] Can't use lib2to3 with embeddable zip file. In-Reply-To: <1440869782.83.0.207113001402.issue24960@psf.upfronthosting.co.za> Message-ID: <1495029846.19.0.519654850773.issue24960@psf.upfronthosting.co.za> Kirk Sayre added the comment: Here is a more robust version of my local fix for this problem. ---------- Added file: http://bugs.python.org/file46869/pgen.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 10:06:16 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 17 May 2017 14:06:16 +0000 Subject: [issue30301] multiprocessing: AttributeError: 'SimpleQueue' object has no attribute '_poll' In-Reply-To: <1494183710.88.0.708414094068.issue30301@psf.upfronthosting.co.za> Message-ID: <1495029976.75.0.737290314177.issue30301@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 10:17:08 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 17 May 2017 14:17:08 +0000 Subject: [issue30386] Add a build infrastructure for Android In-Reply-To: <1495029473.85.0.224153889861.issue30386@psf.upfronthosting.co.za> Message-ID: <1495030628.49.0.429876257969.issue30386@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- pull_requests: +1720 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 10:17:54 2017 From: report at bugs.python.org (Berker Peksag) Date: Wed, 17 May 2017 14:17:54 +0000 Subject: [issue30376] Curses documentation refers to incorrect type In-Reply-To: <1494882965.33.0.779610991751.issue30376@psf.upfronthosting.co.za> Message-ID: <1495030674.07.0.555274737962.issue30376@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- pull_requests: +1721 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 10:23:36 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 17 May 2017 14:23:36 +0000 Subject: [issue30386] Add a build infrastructure for Android In-Reply-To: <1495029473.85.0.224153889861.issue30386@psf.upfronthosting.co.za> Message-ID: <1495031016.09.0.330974947715.issue30386@psf.upfronthosting.co.za> Xavier de Gaye added the comment: The build system for the x86_64, x86 and armv7 architectures has been tested on API 21 and for the x86_64 and arm64 architectures on API 24. Of these combinations of architecture/api, only x86_64 on API 21 builds correctly today, the others were building correctly few weeks ago but recent changes in Python seem to have broken those builds. To fix this temporarily: * Build the 32 bits architectures (x86 and armv7) with the attached issue29619.patch. This is a hack, the problem will be fixed in issue 29619. * Build on API 24 with the attached android-api-24.patch. This is another hack, I will enter a new issue for those problems which are of a kind that is recurrent with the NDK: a function implemented in libc and whose declaration is missing in the NDK headers, a problem that is supposed to be fixed by UnifiedHeaders. ---------- keywords: +patch Added file: http://bugs.python.org/file46870/issue29619.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 10:23:57 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 17 May 2017 14:23:57 +0000 Subject: [issue30386] Add a build infrastructure for Android In-Reply-To: <1495029473.85.0.224153889861.issue30386@psf.upfronthosting.co.za> Message-ID: <1495031037.6.0.164843070456.issue30386@psf.upfronthosting.co.za> Changes by Xavier de Gaye : Added file: http://bugs.python.org/file46871/android-api-24.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 11:01:59 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 17 May 2017 15:01:59 +0000 Subject: [issue30387] warning of threading_cleanup in test_threading Message-ID: <1495033319.08.0.193009058305.issue30387@psf.upfronthosting.co.za> New submission from Xiang Zhang: Running test_threading throws a warning now. ./python -m test test_threading Run tests sequentially 0:00:00 load avg: 0.22 [1/1] test_threading Warning -- threading_cleanup() failed to cleanup 0 threads after 2 sec (count: 0, dangling: 21) 1 test OK. Total duration: 13 sec Tests result: SUCCESS Seems related to 79ef7f8e88a4972c4aecf95cfc5cd934f1861e08. ---------- components: Tests messages: 293857 nosy: haypo, xiang.zhang priority: normal severity: normal status: open title: warning of threading_cleanup in test_threading _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 12:03:55 2017 From: report at bugs.python.org (Forest Gregg) Date: Wed, 17 May 2017 16:03:55 +0000 Subject: [issue30388] ndbm can't iterate through values on OS X Message-ID: <1495037035.06.0.766456965201.issue30388@psf.upfronthosting.co.za> New submission from Forest Gregg: On Mac OS 10.12.4, a large shelve, backed by ndbm, can be created. But when I attempt to iterate through the values of the shelve it raises this exception: File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/dedupe/api.py", line 281, in _blockData for block in viewvalues(blocks): File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/_collections_abc.py", line 693, in __iter__ for key in self._mapping: File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/shelve.py", line 95, in __iter__ for k in self.dict.keys(): SystemError: Negative size passed to PyBytes_FromStringAndSize I've confirmed that this works with Python 3.6.1. All the Python versions were installed from homebrew. I cannot reproduce on linux on windows machines. I've attached a zip file of the ndbm files that python created. ---------- components: Library (Lib) files: ndbm.zip messages: 293858 nosy: Forest Gregg priority: normal severity: normal status: open title: ndbm can't iterate through values on OS X versions: Python 3.5 Added file: http://bugs.python.org/file46872/ndbm.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 12:04:36 2017 From: report at bugs.python.org (Forest Gregg) Date: Wed, 17 May 2017 16:04:36 +0000 Subject: [issue30388] ndbm can't iterate through values on OS X In-Reply-To: <1495037035.06.0.766456965201.issue30388@psf.upfronthosting.co.za> Message-ID: <1495037076.8.0.980934208697.issue30388@psf.upfronthosting.co.za> Changes by Forest Gregg : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 12:11:47 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 17 May 2017 16:11:47 +0000 Subject: [issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat In-Reply-To: <1487766242.34.0.703380697066.issue29619@psf.upfronthosting.co.za> Message-ID: <1495037507.22.0.968926425269.issue29619@psf.upfronthosting.co.za> Xavier de Gaye added the comment: In configure.ac, HAVE_LARGEFILE_SUPPORT is defined if (off_t > long && longlong >= off_t) and thus, when it is not defined, it means that off_t <= long (since longlong < off_t is false) so an off_t should fit into a long. But on Android the size of off_t is different from the size of ino_t so one cannot use the value of HAVE_LARGEFILE_SUPPORT to know if an ino_t would fit into an unsigned long. On Android architecture 'x86' at api level 21: sizeof(st->st_ino) = 8 and from the output of configure: checking size of off_t... 4 checking size of long... 4 checking size of long long... 8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 13:05:27 2017 From: report at bugs.python.org (Tommy Carpenter) Date: Wed, 17 May 2017 17:05:27 +0000 Subject: [issue29895] Distutils blows up with an incorrect pypirc, should be caught In-Reply-To: <1490365473.69.0.662081207985.issue29895@psf.upfronthosting.co.za> Message-ID: <1495040727.9.0.461501319833.issue29895@psf.upfronthosting.co.za> Tommy Carpenter added the comment: Hi, I think option B might be best, because the issue was that I didn't know at first that the problem was in my .pypirc. I think this stack trace is not the most elegant way for the user to figure that out. Maybe catching this and then presenting a human readable error to the user would be better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 13:24:07 2017 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 17 May 2017 17:24:07 +0000 Subject: [issue27350] Compact and ordered dict In-Reply-To: <1466307796.29.0.980579044792.issue27350@psf.upfronthosting.co.za> Message-ID: <1495041847.06.0.650504416405.issue27350@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 13:31:46 2017 From: report at bugs.python.org (Decorater) Date: Wed, 17 May 2017 17:31:46 +0000 Subject: [issue29252] self in classes missinterpreted as a string. In-Reply-To: <1484224047.15.0.809127294576.issue29252@psf.upfronthosting.co.za> Message-ID: <1495042306.77.0.921232204117.issue29252@psf.upfronthosting.co.za> Changes by Decorater : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 13:34:55 2017 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 17 May 2017 17:34:55 +0000 Subject: [issue28023] python-gdb.py must be updated for the new Python 3.6 compact dict In-Reply-To: <1473351940.28.0.277088210884.issue28023@psf.upfronthosting.co.za> Message-ID: <1495042495.18.0.248815404634.issue28023@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 13:36:32 2017 From: report at bugs.python.org (Decorater) Date: Wed, 17 May 2017 17:36:32 +0000 Subject: [issue29063] Fixed timemodule compile warnings. In-Reply-To: <1482576109.57.0.29725831282.issue29063@psf.upfronthosting.co.za> Message-ID: <1495042592.89.0.95645972721.issue29063@psf.upfronthosting.co.za> Decorater added the comment: I think the patch that haypo added should help take care of the warning. It does however only warned when building for 64 bit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 13:54:52 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 17 May 2017 17:54:52 +0000 Subject: [issue30389] distutils._msvccompiler cannot find VS 2017 Message-ID: <1495043692.59.0.408402212012.issue30389@psf.upfronthosting.co.za> New submission from Steve Dower: Visual Studio 2017 (including VC 14.1) cannot be discovered by the old registry key method. There is a new method that requires instantiating a COM class and querying for all installs, then selecting one. My pyfindvs library (https://github.com/zooba/pyfindvs) can find a VS 2017 installation, and I propose porting the core C function into Python so that distutils._msvccompiler can use it. This would be internal and not for public use (except via the normal build_ext API). ---------- assignee: steve.dower components: Distutils, Windows messages: 293862 nosy: dstufft, merwok, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: patch review status: open title: distutils._msvccompiler cannot find VS 2017 type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 13:56:45 2017 From: report at bugs.python.org (Decorater) Date: Wed, 17 May 2017 17:56:45 +0000 Subject: [issue30390] Document how to make classes in the C API. Message-ID: <1495043805.38.0.403862403913.issue30390@psf.upfronthosting.co.za> New submission from Decorater: On the C API, it tells how to make modules, functions, variables, and other things, but what about classes? Like for example if you wanted to make a class with all of the methods having to use direct C Code which would then be converted to PyObject *'s for returning the information the C Code would normally return. Not only that but also being able to create class instance variables using the C API as well. Like for example here is an example class (As it would be if it was written in python): class Example: def __init__(self): self.data = None # None being a place holder for now. def somefunction(self): # C Code here. self.data = ret # return value for the C Code. return self.data Yes, there are better ways than writing the return data to the instance variable and returning it. That is just an example, I have classes that uses them for other things that does not return anything making the instance variables be the only way to get the data. But yeah long story short I think creating classes with the C API should be documented if not already, or at least an example of doing one to be added as an guide for others wondering how to use the C API to make their own (non exception) classes. ---------- assignee: docs at python components: Documentation, Extension Modules messages: 293863 nosy: Decorater, docs at python priority: normal severity: normal status: open title: Document how to make classes in the C API. versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 14:03:16 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 17 May 2017 18:03:16 +0000 Subject: [issue30389] distutils._msvccompiler cannot find VS 2017 In-Reply-To: <1495043692.59.0.408402212012.issue30389@psf.upfronthosting.co.za> Message-ID: <1495044196.75.0.0617496705453.issue30389@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- pull_requests: +1723 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 14:03:21 2017 From: report at bugs.python.org (Decorater) Date: Wed, 17 May 2017 18:03:21 +0000 Subject: [issue30390] Document how to make classes in the C API. In-Reply-To: <1495043805.38.0.403862403913.issue30390@psf.upfronthosting.co.za> Message-ID: <1495044201.1.0.201029763163.issue30390@psf.upfronthosting.co.za> Decorater added the comment: Hmm seems that when looking at the exports in python36.dll that the following functions seem to not be documented as far as I seen: PyClassMethodDescr_Type PyClassMethod_New PyClassMethod_Type There might be more functions dealing with classes that are not documented. However looking through the whole exports would take to long as there are so many. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 14:07:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 May 2017 18:07:58 +0000 Subject: [issue30390] Document how to make classes in the C API. In-Reply-To: <1495043805.38.0.403862403913.issue30390@psf.upfronthosting.co.za> Message-ID: <1495044478.55.0.02632735885.issue30390@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is documented. See https://docs.python.org/3/extending/newtypes.html. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 14:15:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 18:15:13 +0000 Subject: [issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7 In-Reply-To: <1494001389.01.0.0290337792937.issue30283@psf.upfronthosting.co.za> Message-ID: <1495044913.83.0.14192574577.issue30283@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy Storchaka: "Could you add a Misc/NEWS entry about backported regrtest features?" Oh, I don't really consider that regrtest is part of "Python", but sure, I can document my changes in NEWS. I reopen the issue to not forget. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 14:21:22 2017 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 17 May 2017 18:21:22 +0000 Subject: [issue24254] Make class definition namespace ordered by default In-Reply-To: <1432186488.39.0.20621749373.issue24254@psf.upfronthosting.co.za> Message-ID: <1495045282.64.0.621658517318.issue24254@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 14:27:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 18:27:41 +0000 Subject: [issue30387] warning of threading_cleanup in test_threading In-Reply-To: <1495033319.08.0.193009058305.issue30387@psf.upfronthosting.co.za> Message-ID: <1495045661.02.0.591648745599.issue30387@psf.upfronthosting.co.za> STINNER Victor added the comment: What is your OS? On which Python version? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 14:29:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 18:29:20 +0000 Subject: [issue30387] warning of threading_cleanup in test_threading In-Reply-To: <1495033319.08.0.193009058305.issue30387@psf.upfronthosting.co.za> Message-ID: <1495045760.57.0.689857709327.issue30387@psf.upfronthosting.co.za> STINNER Victor added the comment: > Seems related to 79ef7f8e88a4972c4aecf95cfc5cd934f1861e08. That's bpo-30357. It's just that before test_threaindg "leaked" tests but there was no warning. Getting a warning is a good thing, it means that we have a bug that it must be fixed ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 14:34:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 18:34:27 +0000 Subject: [issue30387] warning of threading_cleanup in test_threading In-Reply-To: <1495033319.08.0.193009058305.issue30387@psf.upfronthosting.co.za> Message-ID: <1495046067.5.0.448645015365.issue30387@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh wait, I succeeded to reproduce the bug on master. In verbose mode, we even get the test name! test_is_alive_after_fork (test.test_threading.ThreadTests) ... Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 21) ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 14:41:33 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 18:41:33 +0000 Subject: [issue30387] warning of threading_cleanup in test_threading In-Reply-To: <1495033319.08.0.193009058305.issue30387@psf.upfronthosting.co.za> Message-ID: <1495046493.18.0.332646711782.issue30387@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1724 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 14:41:33 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 18:41:33 +0000 Subject: [issue30357] test_thread should clean threads after each test In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1495046493.24.0.429263135119.issue30357@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1725 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 14:42:25 2017 From: report at bugs.python.org (Dima Pasechnik) Date: Wed, 17 May 2017 18:42:25 +0000 Subject: [issue29137] Fix fpectl-induced ABI breakage In-Reply-To: <1483402510.43.0.646850547969.issue29137@psf.upfronthosting.co.za> Message-ID: <1495046545.14.0.0797275317441.issue29137@psf.upfronthosting.co.za> Dima Pasechnik added the comment: @njs: to point out that usefulness of this module is not just wishful thinking. I just used it to locate, up to the line in a Python extension module written in C, a bug in Sagemath (that has perhaps 20 FPU-using extensions, some of them as large as numpy). (Without using it we were pulling out our hair for weeks over this) https://trac.sagemath.org/ticket/22799#comment:103 Thanks goodness that fpectl at FreeBSD is easy to fix by commenting out a couple of "fpresetsticky(fpgetsticky());" lines---fpresetsticky() is not available on 64-bit platforms. (our primary concern is OSX, where fpectl never worked---fortunately FreeBSD is close enough relative...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 14:42:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 18:42:41 +0000 Subject: [issue30387] warning of threading_cleanup in test_threading In-Reply-To: <1495033319.08.0.193009058305.issue30387@psf.upfronthosting.co.za> Message-ID: <1495046561.08.0.120519911222.issue30387@psf.upfronthosting.co.za> STINNER Victor added the comment: https://github.com/python/cpython/pull/1634 fixes the test_is_alive_after_fork() warning on Linux. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 14:46:50 2017 From: report at bugs.python.org (Dima Pasechnik) Date: Wed, 17 May 2017 18:46:50 +0000 Subject: [issue29137] Fix fpectl-induced ABI breakage In-Reply-To: <1483402510.43.0.646850547969.issue29137@psf.upfronthosting.co.za> Message-ID: <1495046810.38.0.949385808632.issue29137@psf.upfronthosting.co.za> Dima Pasechnik added the comment: PS. I would volunteer to fix it and maintain it, assuming I have some modest funding to support such an activity. (What precisely "it" should be, is another question). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 14:48:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 18:48:50 +0000 Subject: [issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat In-Reply-To: <1487766242.34.0.703380697066.issue29619@psf.upfronthosting.co.za> Message-ID: <1495046930.69.0.173220220963.issue29619@psf.upfronthosting.co.za> STINNER Victor added the comment: Before 0f6d73343d342c106cda2219ebb8a6f0c4bd9b3c, the code used PyLong_FromLong((long)st->st_ino), so the change doesn't introduce a regression but detected a real bug, right? > On Android architecture 'x86' at api level 21: > sizeof(st->st_ino) = 8 > and from the output of configure: > checking size of off_t... 4 > checking size of long... 4 > checking size of long long... 8 What is the type of st_ino? It's not off_t? A workaround would be to force the usage unsigned long long on Android, right? Can you please try the following patch on Android, and propose a PR if it works? diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index e8c15a9..78b3cb9 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -1927,7 +1927,7 @@ _pystat_fromstructstat(STRUCT_STAT *st) return NULL; PyStructSequence_SET_ITEM(v, 0, PyLong_FromLong((long)st->st_mode)); -#if defined(HAVE_LARGEFILE_SUPPORT) || defined(MS_WINDOWS) +#if defined(HAVE_LARGEFILE_SUPPORT) || defined(MS_WINDOWS) || defined(defined(__ANDROID__)) Py_BUILD_ASSERT(sizeof(unsigned long long) >= sizeof(st->st_ino)); PyStructSequence_SET_ITEM(v, 1, PyLong_FromUnsignedLongLong(st->st_ino)); ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 14:55:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 18:55:17 +0000 Subject: [issue29063] Fixed timemodule compile warnings. In-Reply-To: <1482576109.57.0.29725831282.issue29063@psf.upfronthosting.co.za> Message-ID: <1495047317.44.0.880232425323.issue29063@psf.upfronthosting.co.za> STINNER Victor added the comment: commit 0d659e5614cad512a1940125135b443b3eecb5d7 Author: Victor Stinner Date: Tue Apr 25 01:22:42 2017 +0200 ---------- pull_requests: +1726 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 14:58:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 18:58:52 +0000 Subject: [issue30387] warning of threading_cleanup in test_threading In-Reply-To: <1495033319.08.0.193009058305.issue30387@psf.upfronthosting.co.za> Message-ID: <1495047532.86.0.434856993971.issue30387@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset f8d05b3a24e745ab4a974b891ac1389e2f11ce4d by Victor Stinner in branch 'master': bpo-30387: Fix warning in test_threading (#1634) https://github.com/python/cpython/commit/f8d05b3a24e745ab4a974b891ac1389e2f11ce4d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 14:58:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 18:58:52 +0000 Subject: [issue30357] test_thread should clean threads after each test In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1495047532.93.0.970342398358.issue30357@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset f8d05b3a24e745ab4a974b891ac1389e2f11ce4d by Victor Stinner in branch 'master': bpo-30387: Fix warning in test_threading (#1634) https://github.com/python/cpython/commit/f8d05b3a24e745ab4a974b891ac1389e2f11ce4d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 15:00:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 19:00:37 +0000 Subject: [issue30387] warning of threading_cleanup in test_threading In-Reply-To: <1495033319.08.0.193009058305.issue30387@psf.upfronthosting.co.za> Message-ID: <1495047637.21.0.196863913741.issue30387@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1727 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 15:00:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 19:00:37 +0000 Subject: [issue30357] test_thread should clean threads after each test In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1495047637.27.0.367808520825.issue30357@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1728 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 15:00:54 2017 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 17 May 2017 19:00:54 +0000 Subject: [issue30149] inspect.signature() doesn't support partialmethod without explicit self parameter In-Reply-To: <1492978705.31.0.200843668782.issue30149@psf.upfronthosting.co.za> Message-ID: <1495047654.26.0.683670695681.issue30149@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 378d70642aa1c8de2a53ecb811927faf0388db2d by Yury Selivanov (Dong-hee Na) in branch 'master': bpo-30149: Fix partialmethod without explicit self parameter (#1308) https://github.com/python/cpython/commit/378d70642aa1c8de2a53ecb811927faf0388db2d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 15:01:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 19:01:18 +0000 Subject: [issue30387] warning of threading_cleanup in test_threading In-Reply-To: <1495033319.08.0.193009058305.issue30387@psf.upfronthosting.co.za> Message-ID: <1495047678.24.0.839280729381.issue30387@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1729 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 15:01:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 19:01:18 +0000 Subject: [issue30357] test_thread should clean threads after each test In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1495047678.32.0.801710452897.issue30357@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1730 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 15:04:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 19:04:10 +0000 Subject: [issue30387] warning of threading_cleanup in test_threading In-Reply-To: <1495033319.08.0.193009058305.issue30387@psf.upfronthosting.co.za> Message-ID: <1495047849.99.0.605097013706.issue30387@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, strange, the test in Python 2.7 doesn't have the bug: see commit 30a5445b30bb627a64b2d30788f6db58f6db3ae1. Compare it to the code in Python 3: commit 9939cc89a4ee54ab50719a597a8b8a0795a691f6. The warning is already fixed in master. I created backports for 3.5 and 3.6. ---------- versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 15:07:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 19:07:04 +0000 Subject: [issue30391] test_socketserver killed after 15 min on AMD64 FreeBSD 10.x Shared 3.6 Message-ID: <1495048024.31.0.0717718671213.issue30391@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.6/builds/142/steps/test/logs/stdio ... 0:10:10 [396/405] test_pulldom passed -- running: test_socketserver (487 sec) 0:10:11 [397/405] test_dictcomps passed -- running: test_socketserver (488 sec) 0:10:11 [398/405] test_support passed -- running: test_socketserver (488 sec) 0:10:22 [399/405] test_email passed -- running: test_socketserver (499 sec) 0:10:44 [400/405] test_buffer passed -- running: test_socketserver (521 sec), test_concurrent_futures (40 sec), test_datetime (49 sec) 0:10:53 [401/405] test_ftplib passed -- running: test_socketserver (530 sec), test_concurrent_futures (49 sec), test_datetime (58 sec) 0:10:55 [402/405] test_ucn passed -- running: test_socketserver (532 sec), test_concurrent_futures (51 sec), test_datetime (60 sec) fetching http://www.pythontest.net/unicode/9.0.0/NamedSequences.txt ... 0:11:09 [403/405] test_concurrent_futures passed (65 sec) -- running: test_socketserver (546 sec), test_datetime (74 sec) 0:11:16 [404/405] test_datetime passed (81 sec) -- running: test_socketserver (553 sec) running: test_socketserver (583 sec) running: test_socketserver (613 sec) running: test_socketserver (643 sec) running: test_socketserver (673 sec) running: test_socketserver (703 sec) running: test_socketserver (733 sec) running: test_socketserver (763 sec) running: test_socketserver (793 sec) running: test_socketserver (823 sec) running: test_socketserver (853 sec) running: test_socketserver (883 sec) 0:17:04 [405/405] test_socketserver crashed Timeout (0:15:00)! Thread 0x0000000802006400 (most recent call first): File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/threading.py", line 295 in wait File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/threading.py", line 551 in wait File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/test_socketserver.py", line 369 in wait_done File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/test_socketserver.py", line 341 in __init__ File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/test_socketserver.py", line 362 in __init__ File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/test_socketserver.py", line 307 in test_threading_handled File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/case.py", line 601 in run File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/case.py", line 649 in __call__ File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/runner.py", line 176 in run File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/support/__init__.py", line 1889 in _run_suite File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/support/__init__.py", line 1923 in run_unittest File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/runtest.py", line 164 in test_runner File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/runtest.py", line 165 in runtest_inner File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/runtest.py", line 119 in runtest File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/runtest_mp.py", line 71 in run_tests_slave File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 475 in _main File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 468 in main File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 532 in main File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/regrtest.py", line 46 in _main File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/regrtest.py", line 50 in File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/runpy.py", line 85 in _run_code File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/runpy.py", line 193 in _run_module_as_main Traceback (most recent call last): File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/__main__.py", line 2, in main() File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 532, in main Regrtest().main(tests=tests, **kwargs) File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 468, in main self._main(tests, kwargs) File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 490, in _main self.run_tests() File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 416, in run_tests run_tests_multiprocess(self) File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/libregrtest/runtest_mp.py", line 221, in run_tests_multiprocess raise Exception(msg) Exception: Child error on test_socketserver: Exit code 1 *** Error code 1 Stop. make: stopped in /usr/home/buildbot/python/3.6.koobs-freebsd10/build program finished with exit code 1 elapsedTime=1026.162135 ---------- components: Tests keywords: buildbot messages: 293879 nosy: haypo priority: normal severity: normal status: open title: test_socketserver killed after 15 min on AMD64 FreeBSD 10.x Shared 3.6 versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 15:14:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 19:14:15 +0000 Subject: [issue29063] Fixed timemodule compile warnings (gmtoff). In-Reply-To: <1482576109.57.0.29725831282.issue29063@psf.upfronthosting.co.za> Message-ID: <1495048455.73.0.198339523582.issue29063@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Fixed timemodule compile warnings. -> Fixed timemodule compile warnings (gmtoff). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 15:14:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 19:14:38 +0000 Subject: [issue29063] Fixed timemodule compile warnings (gmtoff). In-Reply-To: <1482576109.57.0.29725831282.issue29063@psf.upfronthosting.co.za> Message-ID: <1495048478.02.0.640717274259.issue29063@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1731 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 15:15:28 2017 From: report at bugs.python.org (Decorater) Date: Wed, 17 May 2017 19:15:28 +0000 Subject: [issue30390] Document how to make classes in the C API. In-Reply-To: <1495043805.38.0.403862403913.issue30390@psf.upfronthosting.co.za> Message-ID: <1495048528.02.0.376063523281.issue30390@psf.upfronthosting.co.za> Decorater added the comment: Still it does look the functions lited in the second comment are undocumented. https://docs.python.org/3/search.html?q=PyClassMethodDescr_Type https://docs.python.org/3/search.html?q=PyClassMethod_New&check_keywords=yes&area=default However on the last function I did find 1 thing However it was not what I was looking for. What I actually was looking for was the args for the 3 functions and description on what it does and all that similar to how this function is documented: ``` PyObject* PyObject_CallObject(PyObject *callable_object, PyObject *args) Return value: New reference. Call a callable Python object callable_object, with arguments given by the tuple args. If no arguments are needed, then args may be NULL. Returns the result of the call on success, or NULL on failure. This is the equivalent of the Python expression callable_object(*args). ``` This is actually the reason why the issue was opened as the functions was not documented like this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 15:17:41 2017 From: report at bugs.python.org (Decorater) Date: Wed, 17 May 2017 19:17:41 +0000 Subject: [issue30390] Document how to make classes in the C API. In-Reply-To: <1495043805.38.0.403862403913.issue30390@psf.upfronthosting.co.za> Message-ID: <1495048661.9.0.992438790946.issue30390@psf.upfronthosting.co.za> Changes by Decorater : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 15:21:49 2017 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 17 May 2017 19:21:49 +0000 Subject: [issue28240] Enhance the timeit module: display average +- std dev instead of minimum In-Reply-To: <1474466930.94.0.352912034658.issue28240@psf.upfronthosting.co.za> Message-ID: <1495048909.21.0.349268416313.issue28240@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 15:44:16 2017 From: report at bugs.python.org (Andrew Jaffe) Date: Wed, 17 May 2017 19:44:16 +0000 Subject: [issue30392] default webbrowser macOS Sierra 10.12.5 Message-ID: <1495050256.02.0.645481549853.issue30392@psf.upfronthosting.co.za> Changes by Andrew Jaffe : ---------- components: Library (Lib), macOS nosy: Andrew.Jaffe, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: default webbrowser macOS Sierra 10.12.5 type: behavior versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 15:45:08 2017 From: report at bugs.python.org (Andrew Jaffe) Date: Wed, 17 May 2017 19:45:08 +0000 Subject: [issue30392] default webbrowser not used on macOS Sierra 10.12.5 Message-ID: <1495050308.12.0.465166663844.issue30392@psf.upfronthosting.co.za> Changes by Andrew Jaffe : ---------- title: default webbrowser macOS Sierra 10.12.5 -> default webbrowser not used on macOS Sierra 10.12.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 15:50:01 2017 From: report at bugs.python.org (Andrew Jaffe) Date: Wed, 17 May 2017 19:50:01 +0000 Subject: [issue30392] default webbrowser not used on macOS Sierra 10.12.5 Message-ID: <1495050601.31.0.205212071557.issue30392@psf.upfronthosting.co.za> New submission from Andrew Jaffe: On the newly-released macOS Sierra 10.12.5, the default web browser which is meant to returned by webbrowser.get() gives an error. Specifically: >>> import webbrowser >>> br = webbrowser.get() >>> br.open("http://python.org") 0:33: execution error: "http://python.org" doesn?t understand the ?open location? message. (-1708) False >>> ### but this works >>> br = webbrowser.get("safari") >>> br.open("http://python.org") True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 15:53:20 2017 From: report at bugs.python.org (Andrew Jaffe) Date: Wed, 17 May 2017 19:53:20 +0000 Subject: [issue30392] default webbrowser not used on macOS Sierra 10.12.5 In-Reply-To: <1495050601.31.0.205212071557.issue30392@psf.upfronthosting.co.za> Message-ID: <1495050800.02.0.363110954486.issue30392@psf.upfronthosting.co.za> Andrew Jaffe added the comment: A few more details: - I believe this worked correctly under previous macOS versions (but I don't currently have access to any such machines). - This behaviour is identical under 3.6.1 and 2.7.13 (untested elsewhere) - Behaviour first noticed under Jupyter notebook -- see https://github.com/jupyter/notebook/issues/2438 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 15:53:33 2017 From: report at bugs.python.org (Andrew Jaffe) Date: Wed, 17 May 2017 19:53:33 +0000 Subject: [issue30392] default webbrowser fails on macOS Sierra 10.12.5 In-Reply-To: <1495050601.31.0.205212071557.issue30392@psf.upfronthosting.co.za> Message-ID: <1495050813.66.0.562641968256.issue30392@psf.upfronthosting.co.za> Changes by Andrew Jaffe : ---------- title: default webbrowser not used on macOS Sierra 10.12.5 -> default webbrowser fails on macOS Sierra 10.12.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 15:55:53 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 17 May 2017 19:55:53 +0000 Subject: [issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat In-Reply-To: <1487766242.34.0.703380697066.issue29619@psf.upfronthosting.co.za> Message-ID: <1495050953.68.0.277414717658.issue29619@psf.upfronthosting.co.za> Xavier de Gaye added the comment: > What is the type of st_ino? It's not off_t? The type of st_ino is unsigned long long as defined in sys/stat.h for x86 and off_t is defined in sys/types.h this way;, quoting: /* This historical accident means that we had a 32-bit off_t on 32-bit architectures. */ typedef __kernel_off_t off_t; There is also a related section in the bionic github repo [1] quoted here: ========================= This probably belongs in the NDK documentation rather than here, but these are the known ABI bugs in the 32-bit ABI: time_t is 32-bit. http://b/5819737. In the 64-bit ABI, time_t is 64-bit. off_t is 32-bit. There is off64_t, and in newer releases there is almost-complete support for _FILE_OFFSET_BITS. Unfortunately our stdio implementation uses 32-bit offsets and -- worse -- function pointers to functions that use 32-bit offsets, so there's no good way to implement the last few pieces http://b/24807045. In the 64-bit ABI, off_t is off64_t. sigset_t is too small on ARM and x86 (but correct on MIPS), so support for real-time signals is broken. http://b/5828899 In the 64-bit ABI, sigset_t is the correct size for every architecture. ========================= I will test your patch on x86 and x86_64 on Android and propose a patch if it works. [1] https://android.googlesource.com/platform/bionic.git/#32_bit-ABI-bugs ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 16:05:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 May 2017 20:05:36 +0000 Subject: [issue30390] Document how to make classes in the C API. In-Reply-To: <1495043805.38.0.403862403913.issue30390@psf.upfronthosting.co.za> Message-ID: <1495051536.0.0.53323934782.issue30390@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The title of this issue is "Document how to make classes in the C API." This already is documented. For documenting the PyClassMethod* names open a new issue. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 16:16:07 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 17 May 2017 20:16:07 +0000 Subject: [issue30318] test_distutils is too verbose on Windows In-Reply-To: <1494345266.31.0.621231206863.issue30318@psf.upfronthosting.co.za> Message-ID: <1495052167.4.0.811161504961.issue30318@psf.upfronthosting.co.za> Steve Dower added the comment: The problem here I think is that distutils itself should only dump stdout/stderr on failure, but because of how it spawns processes it never actually captures the output from external tools. We really need to update distutils's spawn() function to use subprocess. That would also resolve a handful of other issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 16:33:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 20:33:03 +0000 Subject: [issue30318] test_distutils is too verbose on Windows In-Reply-To: <1494345266.31.0.621231206863.issue30318@psf.upfronthosting.co.za> Message-ID: <1495053183.74.0.386452729642.issue30318@psf.upfronthosting.co.za> STINNER Victor added the comment: > The problem here I think is that distutils itself should only dump stdout/stderr on failure, ... Hum, I would like to see warnings even if the compilation succeed. So I would prefer to only modify test_distutils. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 16:33:25 2017 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 17 May 2017 20:33:25 +0000 Subject: [issue30039] Resuming a 'yield from' stack is broken if a signal arrives in the middle In-Reply-To: <1491903207.11.0.00986687800627.issue30039@psf.upfronthosting.co.za> Message-ID: <1495053205.89.0.737403354938.issue30039@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset ab4413a7e9bda95b6fcd517073e2a51dafaa1624 by Yury Selivanov (Nathaniel J. Smith) in branch 'master': bpo-30039: Don't run signal handlers while resuming a yield from stack (#1081) https://github.com/python/cpython/commit/ab4413a7e9bda95b6fcd517073e2a51dafaa1624 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 16:34:48 2017 From: report at bugs.python.org (Eric Snow) Date: Wed, 17 May 2017 20:34:48 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1495053288.28.0.114931013782.issue29723@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 16:45:30 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 17 May 2017 20:45:30 +0000 Subject: [issue29660] Document that print/format_exception ignore etype In-Reply-To: <1488158499.0.0.645448196253.issue29660@psf.upfronthosting.co.za> Message-ID: <1495053930.33.0.556566680814.issue29660@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 16:46:59 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 17 May 2017 20:46:59 +0000 Subject: [issue29104] Left bracket remains in format string result when '\' preceeds it In-Reply-To: <1483012585.51.0.342717701316.issue29104@psf.upfronthosting.co.za> Message-ID: <1495054019.71.0.243441021126.issue29104@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 17:16:44 2017 From: report at bugs.python.org (Eric Snow) Date: Wed, 17 May 2017 21:16:44 +0000 Subject: [issue28411] Eliminate PyInterpreterState.modules. In-Reply-To: <1476138783.81.0.661524291989.issue28411@psf.upfronthosting.co.za> Message-ID: <1495055804.11.0.438434587318.issue28411@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- pull_requests: +1732 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 17:23:14 2017 From: report at bugs.python.org (Eric Snow) Date: Wed, 17 May 2017 21:23:14 +0000 Subject: [issue29102] Add an id field to PyInterpreterState. In-Reply-To: <1482994422.5.0.64533163171.issue29102@psf.upfronthosting.co.za> Message-ID: <1495056194.61.0.119252708408.issue29102@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- pull_requests: +1734 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 17:30:00 2017 From: report at bugs.python.org (Igor) Date: Wed, 17 May 2017 21:30:00 +0000 Subject: [issue17560] problem using multiprocessing with really big objects? In-Reply-To: <1364399521.2.0.696890688109.issue17560@psf.upfronthosting.co.za> Message-ID: <1495056600.87.0.979776044168.issue17560@psf.upfronthosting.co.za> Changes by Igor : ---------- nosy: +i3v _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 17:37:35 2017 From: report at bugs.python.org (wmayner) Date: Wed, 17 May 2017 21:37:35 +0000 Subject: [issue30393] test_readline hangs Message-ID: <1495057055.24.0.281941215032.issue30393@psf.upfronthosting.co.za> New submission from wmayner: I'm trying to build Python 3.6.1 from source with the `--enable-optimizations` configuration option. As I understand it, this entails running and profiling all the tests for PGO. When `test_readline` is run, it hangs. OS: Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux Please let me know what other information I should provide. ---------- components: Tests messages: 293888 nosy: wmayner priority: normal severity: normal status: open title: test_readline hangs type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 17:48:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 21:48:22 +0000 Subject: [issue29063] Fixed timemodule compile warnings (gmtoff). In-Reply-To: <1482576109.57.0.29725831282.issue29063@psf.upfronthosting.co.za> Message-ID: <1495057702.09.0.316573004796.issue29063@psf.upfronthosting.co.za> STINNER Victor added the comment: I backported the fix to 3.6. So all warnings on timemodule.c should now be fixed. Thanks for the bug report and the patch Decorater! commit 69f3a5ac28041fac86897e0c90d98ad9fd6fa3f7 Author: Victor Stinner Date: Wed May 17 14:45:45 2017 -0700 ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 17:49:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 21:49:41 +0000 Subject: [issue30387] warning of threading_cleanup in test_threading In-Reply-To: <1495033319.08.0.193009058305.issue30387@psf.upfronthosting.co.za> Message-ID: <1495057780.99.0.654156289212.issue30387@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 44944b602af23712d7119801183cdc6e202e4f76 by Victor Stinner in branch '3.6': bpo-30387: Fix warning in test_threading (#1634) (#1636) https://github.com/python/cpython/commit/44944b602af23712d7119801183cdc6e202e4f76 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 17:49:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 21:49:41 +0000 Subject: [issue30357] test_thread should clean threads after each test In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1495057781.08.0.0116744194477.issue30357@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 44944b602af23712d7119801183cdc6e202e4f76 by Victor Stinner in branch '3.6': bpo-30387: Fix warning in test_threading (#1634) (#1636) https://github.com/python/cpython/commit/44944b602af23712d7119801183cdc6e202e4f76 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 17:49:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 21:49:45 +0000 Subject: [issue30387] warning of threading_cleanup in test_threading In-Reply-To: <1495033319.08.0.193009058305.issue30387@psf.upfronthosting.co.za> Message-ID: <1495057785.88.0.782551559637.issue30387@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset f5633e02433a81a6d0f14fc1c3294e752f4ac1a3 by Victor Stinner in branch '3.5': bpo-30387: Fix warning in test_threading (#1634) (#1637) https://github.com/python/cpython/commit/f5633e02433a81a6d0f14fc1c3294e752f4ac1a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 17:49:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 21:49:45 +0000 Subject: [issue30357] test_thread should clean threads after each test In-Reply-To: <1494628504.48.0.976457186073.issue30357@psf.upfronthosting.co.za> Message-ID: <1495057785.98.0.377172683554.issue30357@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset f5633e02433a81a6d0f14fc1c3294e752f4ac1a3 by Victor Stinner in branch '3.5': bpo-30387: Fix warning in test_threading (#1634) (#1637) https://github.com/python/cpython/commit/f5633e02433a81a6d0f14fc1c3294e752f4ac1a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 17:50:38 2017 From: report at bugs.python.org (April King) Date: Wed, 17 May 2017 21:50:38 +0000 Subject: [issue18617] AIA chasing for missing intermediate certificates on TLS connections In-Reply-To: <1375376317.99.0.429350247521.issue18617@psf.upfronthosting.co.za> Message-ID: <1495057838.7.0.690460432502.issue18617@psf.upfronthosting.co.za> April King added the comment: Browsers universally support AIA chasing/fetching, as do a number of underlying OS libraries, such as Secure Transport (macOS) and schannel (Windows). As a result, it is becoming increasingly common for server operators to fail to include the entire certificate chain in their handshake. By some measures, anywhere from 10 to over 30% of all TLS errors(1) are caused by missing intermediate certificates. There are a handful of ways that scanners and other tools have worked around this issue. Some, like SSL Labs, do their own AIA chasing. Others make subprocess to other tools linked to OS libraries which invisibly perform AIA chasing, such as curl on macOS. Others, like Firefox, maintain a cache of intermediate certificates. In any case, all of these solutions are concession to the reality that TLS is really hard and that it is largely impossible to solve this particular misconfiguration issue. I myself write a popular tool(2) that does scanning of sites for missing security configurations. Although it's not explicitly focused on TLS, some of the underlying tests rely on a verified TLS connection. For example, the HTTP Strict Transport Security (HSTS) header can only be set on valid TLS connections. I use requests (which uses httplib underneath), but I'm unable to tell if a given certificate error is because of either: a) the certificate validation actually failed (for example, due to being expired), or b) there was a missing intermediate certificate and that things would have worked if AIA chasing was available As a result, I have to tell people that their HSTS header can't be set. This is often incorrect, because browsers that do AIA chasing consider the connection perfectly secure for the purposes of HSTS. It would be really nice if Python's httplib could be updated to do transparent AIA chasing, with the optional ability to turn it off. In an ideal world, the underlying TLS libraries (such as OpenSSL) would do this for us, but unfortunately as things stand now OpenSSL leaves it up to the applications themselves to perform chasing. According to Mozilla research (3), if implemented, it would reduce TLS errors by approximately 6% were AIA chasing always performed and successful. Thanks! 1. https://docs.google.com/document/d/1ryqFMSHHRDERg1jm3LeVt7VMfxtXXrI8p49gmtniNP0/edit?pli=1 2. https://observatory.mozilla.org/ 3. https://bugzilla.mozilla.org/show_bug.cgi?id=399324#c80 ---------- nosy: +april title: TLS and Intermediate Certificates -> AIA chasing for missing intermediate certificates on TLS connections _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 17:51:34 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 17 May 2017 21:51:34 +0000 Subject: [issue30303] IDLE: Add _utest to textview In-Reply-To: <1494230289.92.0.930894896454.issue30303@psf.upfronthosting.co.za> Message-ID: <1495057894.04.0.782015900753.issue30303@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset ba365da9cee8901fad08ab0b61c7489c110e5c97 by terryjreedy (Louie Lu) in branch 'master': bpo-30303: IDLE: Add _utest argument to textview (#1499) https://github.com/python/cpython/commit/ba365da9cee8901fad08ab0b61c7489c110e5c97 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 17:59:37 2017 From: report at bugs.python.org (April King) Date: Wed, 17 May 2017 21:59:37 +0000 Subject: [issue18617] AIA chasing for missing intermediate certificates on TLS connections In-Reply-To: <1375376317.99.0.429350247521.issue18617@psf.upfronthosting.co.za> Message-ID: <1495058377.47.0.905642292535.issue18617@psf.upfronthosting.co.za> April King added the comment: Err, sorry, I may have been a bit unclear. AIA chasing is not *universal* amongst browsers. IE, Edge, Chrome, and Safari perform AIA chasing. Firefox maintains a cache of intermediate certificate authorities. I noted that a bit further underneath, but my apologies if it was confusing. That said, every browser has a some chosen some underlying method to ameliorate this common TLS error. It would be amazing if Python could similarly resolve this issue for developers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 18:02:24 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 17 May 2017 22:02:24 +0000 Subject: [issue30303] IDLE: Add _utest to textview In-Reply-To: <1494230289.92.0.930894896454.issue30303@psf.upfronthosting.co.za> Message-ID: <1495058544.33.0.753732021169.issue30303@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> backport needed versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 18:05:33 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 17 May 2017 22:05:33 +0000 Subject: [issue30303] IDLE: Add _utest to textview and add textview tests In-Reply-To: <1494230289.92.0.930894896454.issue30303@psf.upfronthosting.co.za> Message-ID: <1495058733.74.0.148434989637.issue30303@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- title: IDLE: Add _utest to textview -> IDLE: Add _utest to textview and add textview tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 18:06:32 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 17 May 2017 22:06:32 +0000 Subject: [issue30303] IDLE: Add _utest to textview and add textview tests In-Reply-To: <1494230289.92.0.930894896454.issue30303@psf.upfronthosting.co.za> Message-ID: <1495058792.23.0.0426674308911.issue30303@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am adding a couple of exception tests to complete coverage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 18:37:17 2017 From: report at bugs.python.org (Alex Gaynor) Date: Wed, 17 May 2017 22:37:17 +0000 Subject: [issue18617] AIA chasing for missing intermediate certificates on TLS connections In-Reply-To: <1375376317.99.0.429350247521.issue18617@psf.upfronthosting.co.za> Message-ID: <1495060637.09.0.705852063791.issue18617@psf.upfronthosting.co.za> Alex Gaynor added the comment: Just discussed with Christian, and we're both in favor of adding AIA chasing support to the stdlib ssl. ---------- nosy: +alex, janssen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 18:37:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 22:37:58 +0000 Subject: [issue29102] Add an id field to PyInterpreterState. In-Reply-To: <1482994422.5.0.64533163171.issue29102@psf.upfronthosting.co.za> Message-ID: <1495060678.33.0.106741829027.issue29102@psf.upfronthosting.co.za> STINNER Victor added the comment: What the status of this issue Eric? Do you still need interpreter ID? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 18:39:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 22:39:17 +0000 Subject: [issue30387] warning of threading_cleanup in test_threading In-Reply-To: <1495033319.08.0.193009058305.issue30387@psf.upfronthosting.co.za> Message-ID: <1495060757.39.0.490696919148.issue30387@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, the warning should now be fixed. Thanks for the report Xiang. I don't know how I missed it ;-) ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 18:42:31 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Wed, 17 May 2017 22:42:31 +0000 Subject: [issue29137] Fix fpectl-induced ABI breakage In-Reply-To: <1483402510.43.0.646850547969.issue29137@psf.upfronthosting.co.za> Message-ID: <1495060951.0.0.370243445232.issue29137@psf.upfronthosting.co.za> Nathaniel Smith added the comment: @Dima: > @njs: to point out that usefulness of this module is not just wishful thinking. I just used it to locate, up to the line in a Python extension module written in C, a bug in Sagemath (that has perhaps 20 FPU-using extensions, some of them as large as numpy). (Without using it we were pulling out our hair for weeks over this) That's pretty cool :-). But from skimming your link, it sounds like it would have been sufficient in your case to add a call to "fesetmask(FP_X_INV)" using C or Cython or ctypes (or directly in gdb), and then running the program under gdb to get a backtrace where the SIGFPE was delivered? Is that correct? Or did your debugging depend on the specific fpectl machinery for responding to that signal? > PS. I would volunteer to fix it and maintain it, assuming I have some modest funding to support such an activity. I'm not personally aware of any funding sources for this, if that's the question. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 19:01:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 23:01:08 +0000 Subject: [issue30039] Resuming a 'yield from' stack is broken if a signal arrives in the middle In-Reply-To: <1491903207.11.0.00986687800627.issue30039@psf.upfronthosting.co.za> Message-ID: <1495062068.67.0.831428900457.issue30039@psf.upfronthosting.co.za> STINNER Victor added the comment: The change should be backported to 3.5 and 3.6, right? The change seems very short and safe. IMHO it's ok to backport. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 19:02:13 2017 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 17 May 2017 23:02:13 +0000 Subject: [issue30039] Resuming a 'yield from' stack is broken if a signal arrives in the middle In-Reply-To: <1491903207.11.0.00986687800627.issue30039@psf.upfronthosting.co.za> Message-ID: <1495062133.04.0.301068150165.issue30039@psf.upfronthosting.co.za> Yury Selivanov added the comment: Yes, I'll do the backport. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 19:05:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 23:05:27 +0000 Subject: [issue30339] test_multiprocessing_main_handling: "RuntimeError: Timed out waiting for results" on x86 Windows7 3.x In-Reply-To: <1494463699.01.0.364437710045.issue30339@psf.upfronthosting.co.za> Message-ID: <1495062327.1.0.840673299929.issue30339@psf.upfronthosting.co.za> STINNER Victor added the comment: Another failure on AMD64 Windows7 SP1 3.5: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.5/builds/145/steps/test/logs/stdio ====================================================================== FAIL: test_directory (test.test_multiprocessing_main_handling.SpawnCmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\test_multiprocessing_main_handling.py", line 197, in test_directory self._check_script(script_dir) File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\test_multiprocessing_main_handling.py", line 155, in _check_script rc, out, err = assert_python_ok(*run_args, __isolated=False) File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\support\script_helper.py", line 150, in assert_python_ok return _assert_python(True, *args, **env_vars) File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\support\script_helper.py", line 136, in _assert_python err)) AssertionError: Process return code is 1 command line: ['C:\\buildbot.python.org\\3.5.kloth-win64\\build\\PCbuild\\amd64\\python_d.exe', '-X', 'faulthandler', '-E', 'C:\\Users\\Buildbot\\AppData\\Local\\Temp\\tmpld1_lj4t', 'spawn'] stdout: --- --- stderr: --- Traceback (most recent call last): File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\Buildbot\AppData\Local\Temp\tmpld1_lj4t\__main__.py", line 23, in raise RuntimeError("Timed out waiting for results") RuntimeError: Timed out waiting for results --- ---------- versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 19:20:48 2017 From: report at bugs.python.org (Jeremy Kloth) Date: Wed, 17 May 2017 23:20:48 +0000 Subject: [issue30339] test_multiprocessing_main_handling: "RuntimeError: Timed out waiting for results" on x86 Windows7 3.x In-Reply-To: <1494463699.01.0.364437710045.issue30339@psf.upfronthosting.co.za> Message-ID: <1495063248.51.0.832512006605.issue30339@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 19:23:43 2017 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 17 May 2017 23:23:43 +0000 Subject: [issue30039] Resuming a 'yield from' stack is broken if a signal arrives in the middle In-Reply-To: <1491903207.11.0.00986687800627.issue30039@psf.upfronthosting.co.za> Message-ID: <1495063423.81.0.873375340513.issue30039@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- pull_requests: +1735 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 19:25:01 2017 From: report at bugs.python.org (Joel Hillacre) Date: Wed, 17 May 2017 23:25:01 +0000 Subject: [issue30394] smtplib leaves open sockets around if SMTPConnectError is raised in __init__ Message-ID: <1495063501.64.0.551060830389.issue30394@psf.upfronthosting.co.za> New submission from Joel Hillacre: I am encountering a ResourceWarning about an unclosed socket when getting a non 220 response during connect() in __init__() of smtplib.SMTP. Attached are a client script causing this warning for me, a server script to cause the client to the warning and a patch that fixes the warning for me. My python version is Python 3.6.1 (default, Apr 7 2017, 09:32:32) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux. I had found previous related issue with similar symptom and remedy in issue #21641. $ python3.6 test_server.py connected by ('127.0.0.1', 53630) $ $ python3.6 test_client.py Traceback (most recent call last): File "test_client.py", line 2, in smtp = smtplib.SMTP('127.0.0.1', 8025) File "/usr/lib64/python3.6/smtplib.py", line 253, in __init__ raise SMTPConnectError(code, msg) smtplib.SMTPConnectError: (554, b'Nope.') /usr/lib64/python3.6/socket.py:657: ResourceWarning: unclosed $ RFC 2821 states that servers responding with non 220 greetings must not close the connection. It is this behaviour that test_server.py is using to trigger the warning in test_client.py. RFC 2821 Section 3.1 Paragraph 3 https://tools.ietf.org/html/rfc2821#section-3.1 '... a 554 response MAY be given in the initial connection opening message instead of the 220. A server taking this approach MUST still wait for the client to send a QUIT (see section 4.1.1.10) before closing the connection and SHOULD respond to any intervening commands with "503 bad sequence of commands".' The ResourceWarning is no longer caused for me after applying this change. ---------- components: Library (Lib) files: smtplib.patch keywords: patch messages: 293905 nosy: jhillacre priority: normal severity: normal status: open title: smtplib leaves open sockets around if SMTPConnectError is raised in __init__ type: enhancement versions: Python 3.6 Added file: http://bugs.python.org/file46873/smtplib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 19:25:12 2017 From: report at bugs.python.org (Joel Hillacre) Date: Wed, 17 May 2017 23:25:12 +0000 Subject: [issue30394] smtplib leaves open sockets around if SMTPConnectError is raised in __init__ In-Reply-To: <1495063501.64.0.551060830389.issue30394@psf.upfronthosting.co.za> Message-ID: <1495063512.57.0.276534939326.issue30394@psf.upfronthosting.co.za> Changes by Joel Hillacre : Added file: http://bugs.python.org/file46874/test_server.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 19:25:17 2017 From: report at bugs.python.org (Joel Hillacre) Date: Wed, 17 May 2017 23:25:17 +0000 Subject: [issue30394] smtplib leaves open sockets around if SMTPConnectError is raised in __init__ In-Reply-To: <1495063501.64.0.551060830389.issue30394@psf.upfronthosting.co.za> Message-ID: <1495063517.16.0.292640083983.issue30394@psf.upfronthosting.co.za> Changes by Joel Hillacre : Added file: http://bugs.python.org/file46875/test_client.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 19:25:18 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 17 May 2017 23:25:18 +0000 Subject: [issue23749] asyncio missing wrap_socket (starttls) In-Reply-To: <1427119199.61.0.485462184824.issue23749@psf.upfronthosting.co.za> Message-ID: <1495063518.33.0.894098347317.issue23749@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 19:25:58 2017 From: report at bugs.python.org (Louis Brandy) Date: Wed, 17 May 2017 23:25:58 +0000 Subject: [issue30395] deadlocked child process after forking on pystate.c's head_mutex Message-ID: <1495063558.63.0.859469853078.issue30395@psf.upfronthosting.co.za> New submission from Louis Brandy: A forked process (via os.fork) can inherit a locked `head_mutex` from its parent process and will promptly deadlock in this stack (on my linux box): Child Process (deadlocked): #0 0x00007f1a4da82e3c in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x7f1a4c2964e0) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 #1 0x00007f1a4da82e3c in do_futex_wait (sem=sem at entry=0x7f1a4c2964e0, abstime=0x0) at sem_waitcommon.c:111 #2 0x00007f1a4da82efc in __new_sem_wait_slow (sem=0x7f1a4c2964e0, abstime=0x0) at sem_waitcommon.c:181 #3 0x00007f1a4da82fb9 in __new_sem_wait (sem=) at sem_wait.c:29 #4 0x00007f1a4de4c605 in PyThread_acquire_lock_timed (lock=0x7f1a4c2964e0, microseconds=-1, intr_flag=0) at Python/thread_pthread.h:352 #5 0x00007f1a4de4c4b4 in PyThread_acquire_lock (lock=, waitflag=waitflag at entry=1) at Python/thread_pthread.h:556 #6 0x00007f1a4dd59e08 in _PyThreadState_DeleteExcept (tstate=0x7f19f2301800) at Python/pystate.c:483 #7 0x00007f1a4dd46af4 in PyEval_ReInitThreads () at Python/ceval.c:326 #8 0x00007f1a4dd78b0b in PyOS_AfterFork () at ./Modules/signalmodule.c:1608 The parent process has a race between one thread calling `os.fork` (and holding the GIL) and another (in our case C++) thread trying to use PyGILState_Ensure. PyGILState_Ensure will grab the head_mutex before it tries to get the GIL. So if a fork happens in this critical section, the child process will get the locked head_mutex. The path from PyGILState_Ensure -> head_mutex looks like this: #0 new_threadstate (interp=0x7fb5fd483d80, init=init at entry=1) at Python/pystate.c:183 #1 0x00007fb5ff149027 in PyThreadState_New (interp=) at Python/pystate.c:250 #2 0x00007fb5ff006ac7 in PyGILState_Ensure () at Python/pystate.c:838 ---- Possible fix? A simple fix would be to, inside PyOS_AfterFork, reset/unlock pystate.c's head_mutex if it's already locked. Unclear if this is related to: https://bugs.python.org/issue28812 ---------- components: Interpreter Core messages: 293906 nosy: Louis Brandy priority: normal severity: normal status: open title: deadlocked child process after forking on pystate.c's head_mutex versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 19:28:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 May 2017 23:28:37 +0000 Subject: [issue30395] deadlocked child process after forking on pystate.c's head_mutex In-Reply-To: <1495063558.63.0.859469853078.issue30395@psf.upfronthosting.co.za> Message-ID: <1495063717.76.0.531235883171.issue30395@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 19:41:42 2017 From: report at bugs.python.org (=?utf-8?q?P=C3=A1draig_Brady?=) Date: Wed, 17 May 2017 23:41:42 +0000 Subject: [issue30395] deadlocked child process after forking on pystate.c's head_mutex In-Reply-To: <1495063558.63.0.859469853078.issue30395@psf.upfronthosting.co.za> Message-ID: <1495064502.7.0.130940731904.issue30395@psf.upfronthosting.co.za> Changes by P?draig Brady

: ---------- nosy: +pixelbeat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 20:42:46 2017 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 18 May 2017 00:42:46 +0000 Subject: [issue28618] Decorate hot functions using __attribute__((hot)) to optimize Python In-Reply-To: <1478305744.67.0.856588872906.issue28618@psf.upfronthosting.co.za> Message-ID: <1495068166.15.0.712450072194.issue28618@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 21:17:46 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 May 2017 01:17:46 +0000 Subject: [issue30303] IDLE: Add _utest to textview and add textview tests In-Reply-To: <1494230289.92.0.930894896454.issue30303@psf.upfronthosting.co.za> Message-ID: <1495070266.87.0.332578722276.issue30303@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +1736 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 21:49:31 2017 From: report at bugs.python.org (Decorater) Date: Thu, 18 May 2017 01:49:31 +0000 Subject: [issue30396] Document the PyClassMethod* C API functions. Message-ID: <1495072171.73.0.812244452186.issue30396@psf.upfronthosting.co.za> New submission from Decorater: The way the documentation currently is set up there is no way to know what these functions in the C API actually do or what all the parameters are to call it unless someone source dives into python. Because of this I think making an C API page or a section for the functions like these or similar capabilities would be an Great an huge help to others as well as an example small module using said PyClassMethod* functions. I will need to look at how far down in python versions that these functions exist for though. ---------- assignee: docs at python components: Documentation, Extension Modules messages: 293907 nosy: Decorater, docs at python priority: normal severity: normal status: open title: Document the PyClassMethod* C API functions. versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 22:30:41 2017 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 18 May 2017 02:30:41 +0000 Subject: [issue16487] Allow ssl certificates to be specified from memory rather than files. In-Reply-To: <1353078615.85.0.973290481578.issue16487@psf.upfronthosting.co.za> Message-ID: <1495074641.68.0.00179655641703.issue16487@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Hi Jan-Philip, we might be close on this one. Could you convert your latest patch into PR against (https://github.com/python/cpython). Is will help to record you as the author as we can discuss the patch in python sprints and get this in. :-) Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 17 22:30:52 2017 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 18 May 2017 02:30:52 +0000 Subject: [issue16487] Allow ssl certificates to be specified from memory rather than files. In-Reply-To: <1353078615.85.0.973290481578.issue16487@psf.upfronthosting.co.za> Message-ID: <1495074652.59.0.302328123314.issue16487@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 00:49:01 2017 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 18 May 2017 04:49:01 +0000 Subject: [issue29976] urllib.parse clarify what ' ' in schemes mean In-Reply-To: <1491281657.78.0.713830439385.issue29976@psf.upfronthosting.co.za> Message-ID: <1495082941.32.0.787061594094.issue29976@psf.upfronthosting.co.za> Senthil Kumaran added the comment: New changeset 906f5330b9c9a74cad1cf27fddaf77e99dff9edd by Senthil Kumaran in branch 'master': bpo-29976: urllib.parse clarify '' in scheme values. (GH-984) https://github.com/python/cpython/commit/906f5330b9c9a74cad1cf27fddaf77e99dff9edd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 01:36:15 2017 From: report at bugs.python.org (Louie Lu) Date: Thu, 18 May 2017 05:36:15 +0000 Subject: [issue23667] IDLE to provide option for making trailing whitespace visible In-Reply-To: <1426376584.28.0.267295855034.issue23667@psf.upfronthosting.co.za> Message-ID: <1495085775.77.0.753203285776.issue23667@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +1737 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 01:51:59 2017 From: report at bugs.python.org (Louie Lu) Date: Thu, 18 May 2017 05:51:59 +0000 Subject: [issue23667] IDLE to provide option for making trailing whitespace visible In-Reply-To: <1426376584.28.0.267295855034.issue23667@psf.upfronthosting.co.za> Message-ID: <1495086719.77.0.110499399455.issue23667@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +1738 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 01:55:39 2017 From: report at bugs.python.org (Louie Lu) Date: Thu, 18 May 2017 05:55:39 +0000 Subject: [issue23667] IDLE to provide option for making trailing whitespace visible In-Reply-To: <1426376584.28.0.267295855034.issue23667@psf.upfronthosting.co.za> Message-ID: <1495086939.12.0.969308064351.issue23667@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +1739 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 02:14:19 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 May 2017 06:14:19 +0000 Subject: [issue23667] IDLE to provide option for making trailing whitespace visible In-Reply-To: <1426376584.28.0.267295855034.issue23667@psf.upfronthosting.co.za> Message-ID: <1495088059.42.0.942826196517.issue23667@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Louie, when you close and open PRs, please give at least a brief explanation. In particular, how is the new one different? ---------- assignee: -> terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 02:18:26 2017 From: report at bugs.python.org (Louie Lu) Date: Thu, 18 May 2017 06:18:26 +0000 Subject: [issue23667] IDLE to provide option for making trailing whitespace visible In-Reply-To: <1426376584.28.0.267295855034.issue23667@psf.upfronthosting.co.za> Message-ID: <1495088306.64.0.726645647433.issue23667@psf.upfronthosting.co.za> Louie Lu added the comment: terry, these close isn't changing anything. But I'm migrating my GitHub account from old one to new one, thus will close the PR and reopen another one, sorry for annoying mailing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 02:23:17 2017 From: report at bugs.python.org (David Rothera) Date: Thu, 18 May 2017 06:23:17 +0000 Subject: [issue30395] deadlocked child process after forking on pystate.c's head_mutex In-Reply-To: <1495063558.63.0.859469853078.issue30395@psf.upfronthosting.co.za> Message-ID: <1495088597.38.0.468906065616.issue30395@psf.upfronthosting.co.za> Changes by David Rothera : ---------- nosy: +David Rothera _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 02:29:41 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 18 May 2017 06:29:41 +0000 Subject: [issue23749] asyncio missing wrap_socket (starttls) In-Reply-To: <1427119199.61.0.485462184824.issue23749@psf.upfronthosting.co.za> Message-ID: <1495088981.04.0.130134474093.issue23749@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I'm very interested in this because, even though we do support STARTTLS in aiosmtpd, it's a hack using non-public symbols, and we have a hidden traceback! (I.e. one that doesn't cause the test suite to fail, but only shows up when clients disconnect.) Here's our STARTTLS implementation (at least as of this writing): https://github.com/aio-libs/aiosmtpd/blob/master/aiosmtpd/smtp.py#L361 And here's the bug description: https://github.com/aio-libs/aiosmtpd/issues/83 We're getting eof_received() *after* connection_lost()! And the "fix": https://github.com/aio-libs/aiosmtpd/pull/101/files Basically, once we flip the protocol to the SSLProtocol and then munge the transport, we have to keep the original transport around so that we can close that explicitly on connection_lost(). I don't really know whether this is 1) the right way to implement STARTTLS, and 2) to handle the traceback fix given the APIs we have to work with today (Python 3.4-3.6). But that's the problem right? :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 03:12:34 2017 From: report at bugs.python.org (Stephan Gorget) Date: Thu, 18 May 2017 07:12:34 +0000 Subject: [issue30395] deadlocked child process after forking on pystate.c's head_mutex In-Reply-To: <1495063558.63.0.859469853078.issue30395@psf.upfronthosting.co.za> Message-ID: <1495091554.43.0.628804824621.issue30395@psf.upfronthosting.co.za> Changes by Stephan Gorget : ---------- nosy: +phantez _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 04:28:41 2017 From: report at bugs.python.org (neeverett) Date: Thu, 18 May 2017 08:28:41 +0000 Subject: [issue30374] Make win_add2path.py take effect without having to log off In-Reply-To: <1494870505.18.0.0357720836897.issue30374@psf.upfronthosting.co.za> Message-ID: <1495096121.05.0.876115082274.issue30374@psf.upfronthosting.co.za> Changes by neeverett : ---------- pull_requests: +1740 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 04:30:25 2017 From: report at bugs.python.org (Andrew Jaffe) Date: Thu, 18 May 2017 08:30:25 +0000 Subject: [issue30392] default webbrowser fails on macOS Sierra 10.12.5 In-Reply-To: <1495050601.31.0.205212071557.issue30392@psf.upfronthosting.co.za> Message-ID: <1495096225.36.0.8789447597.issue30392@psf.upfronthosting.co.za> Andrew Jaffe added the comment: The same behaviour also happens under Apple's system Python 2.7.10. Perhaps this implies a macOS bug or deliberate behaviour change? (I couldn't find anything obviously appropriate in the list of security fixes for 10.12.5.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 05:17:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 May 2017 09:17:51 +0000 Subject: [issue30397] Expose regular expression and match objects types in the re module Message-ID: <1495099071.76.0.78537158998.issue30397@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Proposed patch adds re.Patter and re.Match types (names are conforming with the typing module) that represent the types of compiled regular expressin objects and match objects. The purpose of this is exposing the documentation of the methods of these objects in the module documentation produced by pydoc. The patch also changes the __module__ attribute of these classes and re.error (this enhances the help and repr and increases pickle compatibility of re.error), adds docstrings for re.error and many descriptors, and fixes few other docstrings. ---------- assignee: serhiy.storchaka components: Extension Modules, Library (Lib), Regular Expressions messages: 293914 nosy: ezio.melotti, mrabarnett, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Expose regular expression and match objects types in the re module type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 05:22:39 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 May 2017 09:22:39 +0000 Subject: [issue30397] Expose regular expression and match objects types in the re module In-Reply-To: <1495099071.76.0.78537158998.issue30397@psf.upfronthosting.co.za> Message-ID: <1495099359.46.0.411249953311.issue30397@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1741 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 05:34:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 May 2017 09:34:42 +0000 Subject: [issue30363] Backport warnings in the re module to 2.7 In-Reply-To: <1494764170.53.0.794863715798.issue30363@psf.upfronthosting.co.za> Message-ID: <1495100082.47.0.7682226557.issue30363@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 955b6760cfa73c54bae9b6f2b335eb0cd806c7b0 by Serhiy Storchaka in branch '2.7': [2.7] bpo-30363: Backport warnings in the re module. (#1577) https://github.com/python/cpython/commit/955b6760cfa73c54bae9b6f2b335eb0cd806c7b0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 05:44:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 May 2017 09:44:45 +0000 Subject: [issue30398] Add a docstring for re.error Message-ID: <1495100685.75.0.311779362479.issue30398@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: re.error doesn't have its own docstring and inherits it from Exception when format pydoc output: "Common base class for all non-exit exceptions." This is wrong of course. Proposed patch adds a docstring for re.error. It overrides Exception docstring and documents additional re.error attributes. ---------- assignee: serhiy.storchaka components: Library (Lib), Regular Expressions messages: 293916 nosy: ezio.melotti, mrabarnett, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Add a docstring for re.error type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 05:48:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 May 2017 09:48:41 +0000 Subject: [issue30398] Add a docstring for re.error In-Reply-To: <1495100685.75.0.311779362479.issue30398@psf.upfronthosting.co.za> Message-ID: <1495100921.57.0.189016537427.issue30398@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1742 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 05:49:56 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 May 2017 09:49:56 +0000 Subject: [issue30397] Expose regular expression and match objects types in the re module In-Reply-To: <1495099071.76.0.78537158998.issue30397@psf.upfronthosting.co.za> Message-ID: <1495100996.7.0.0609345213596.issue30397@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The part with re.error docstring is extracted in separate issue30398. It should be backported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 05:50:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 May 2017 09:50:07 +0000 Subject: [issue30397] Expose regular expression and match objects types in the re module In-Reply-To: <1495099071.76.0.78537158998.issue30397@psf.upfronthosting.co.za> Message-ID: <1495101007.46.0.310986456279.issue30397@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Add a docstring for re.error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 05:50:39 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 May 2017 09:50:39 +0000 Subject: [issue30363] Backport warnings in the re module to 2.7 In-Reply-To: <1494764170.53.0.794863715798.issue30363@psf.upfronthosting.co.za> Message-ID: <1495101039.26.0.760439420252.issue30363@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 06:24:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 May 2017 10:24:58 +0000 Subject: [issue30375] Correct stacklevel of warnings when compile regular expressions In-Reply-To: <1494877670.21.0.548090172972.issue30375@psf.upfronthosting.co.za> Message-ID: <1495103098.08.0.696350126456.issue30375@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1743 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 06:46:20 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 May 2017 10:46:20 +0000 Subject: [issue30375] Correct stacklevel of warnings when compile regular expressions In-Reply-To: <1494877670.21.0.548090172972.issue30375@psf.upfronthosting.co.za> Message-ID: <1495104380.16.0.498839679537.issue30375@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset dfcfc915787def056e225fb22ad5a5ee8da4052f by Serhiy Storchaka in branch '2.7': [2.7] bpo-30375: Correct the stacklevel of regex compiling warnings. (#1595) (#1648) https://github.com/python/cpython/commit/dfcfc915787def056e225fb22ad5a5ee8da4052f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 06:46:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 May 2017 10:46:58 +0000 Subject: [issue30375] Correct stacklevel of warnings when compile regular expressions In-Reply-To: <1494877670.21.0.548090172972.issue30375@psf.upfronthosting.co.za> Message-ID: <1495104418.65.0.482884902364.issue30375@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 07:39:51 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Thu, 18 May 2017 11:39:51 +0000 Subject: [issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat In-Reply-To: <1487766242.34.0.703380697066.issue29619@psf.upfronthosting.co.za> Message-ID: <1495107591.86.0.177420444358.issue29619@psf.upfronthosting.co.za> Xavier de Gaye added the comment: With the patch proposed by Victor in msg293873 the cross-compilation of posixmodule.c succeeds on android-21-x86 and android-21-x86_64. Following my suggestion in msg292174, I propose the following patch instead: diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index e8c15a9473..d7ff3c78bd 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -1927,14 +1927,12 @@ _pystat_fromstructstat(STRUCT_STAT *st) return NULL; PyStructSequence_SET_ITEM(v, 0, PyLong_FromLong((long)st->st_mode)); -#if defined(HAVE_LARGEFILE_SUPPORT) || defined(MS_WINDOWS) Py_BUILD_ASSERT(sizeof(unsigned long long) >= sizeof(st->st_ino)); - PyStructSequence_SET_ITEM(v, 1, + if (sizeof(unsigned long) >= sizeof(st->st_ino)) + PyStructSequence_SET_ITEM(v, 1, PyLong_FromUnsignedLong(st->st_ino)); + else + PyStructSequence_SET_ITEM(v, 1, PyLong_FromUnsignedLongLong(st->st_ino)); -#else - Py_BUILD_ASSERT(sizeof(unsigned long) >= sizeof(st->st_ino)); - PyStructSequence_SET_ITEM(v, 1, PyLong_FromUnsignedLong(st->st_ino)); -#endif #ifdef MS_WINDOWS PyStructSequence_SET_ITEM(v, 2, PyLong_FromUnsignedLong(st->st_dev)); #else This patch removes the conditional on HAVE_LARGEFILE_SUPPORT (explicit is better than implicit) and fixes the problem for any operating system where the size of off_t and the size of st_ino are different. The compiler removes the dead branch of the conditional, so actually it compiles to the same binary as the other patch (gcc does this without any optimization configured on the command line, I didn't check this for clang). The same kind of fix could also be applied elsewhere in posixmodule.c where behind the use of HAVE_LARGEFILE_SUPPORT there is an incorrect assumption that the size of off_t is the same as the size of another type: * In _pystat_fromstructstat() - a little bit further down this patch - where the other type is st_size. * In os_DirEntry_inode_impl() where the other type is ino_t. Maybe this should be done in a new issue then ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 07:45:11 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Thu, 18 May 2017 11:45:11 +0000 Subject: [issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat In-Reply-To: <1487766242.34.0.703380697066.issue29619@psf.upfronthosting.co.za> Message-ID: <1495107911.22.0.981017290906.issue29619@psf.upfronthosting.co.za> Xavier de Gaye added the comment: > The same kind of fix could also be applied elsewhere in posixmodule.c By also adding a Py_BUILD_ASSERT() statement which is a welcome improvement on the previous code that allowed to pinpoint the problem on Android. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 08:25:13 2017 From: report at bugs.python.org (Marcel Plch) Date: Thu, 18 May 2017 12:25:13 +0000 Subject: [issue30177] pathlib.resolve(strict=False) only includes first child In-Reply-To: <1493223585.29.0.982122563762.issue30177@psf.upfronthosting.co.za> Message-ID: <1495110313.76.0.40560684206.issue30177@psf.upfronthosting.co.za> Changes by Marcel Plch : ---------- pull_requests: +1744 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 08:38:46 2017 From: report at bugs.python.org (Erik Bray) Date: Thu, 18 May 2017 12:38:46 +0000 Subject: [issue30353] ctypes: pass by value for structs broken on Cygwin/MinGW 64-bit In-Reply-To: <1494605988.92.0.550577143248.issue30353@psf.upfronthosting.co.za> Message-ID: <1495111126.06.0.561262905919.issue30353@psf.upfronthosting.co.za> Erik Bray added the comment: Sure, thanks for pointing that out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 08:47:14 2017 From: report at bugs.python.org (Alexey Popravka) Date: Thu, 18 May 2017 12:47:14 +0000 Subject: [issue27585] asyncio.Lock deadlock after cancellation In-Reply-To: <1469120801.4.0.62510822161.issue27585@psf.upfronthosting.co.za> Message-ID: <1495111634.5.0.833087896879.issue27585@psf.upfronthosting.co.za> Alexey Popravka added the comment: Hi guys! Any update on this? I've just hit this issue. Cancelled futures in _waiters is not a problem (any more). There is still a problem when release() wakes up next waiter but task waiting for it gets cancelled and so all the rest waiters are in pending state forever. I've attach one more test to reproduce this issue. ---------- nosy: +Alexey Popravka Added file: http://bugs.python.org/file46876/deadlock2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 10:35:58 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 18 May 2017 14:35:58 +0000 Subject: [issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib In-Reply-To: <1494162484.35.0.941296488498.issue30296@psf.upfronthosting.co.za> Message-ID: <1495118158.73.0.0414358966551.issue30296@psf.upfronthosting.co.za> Raymond Hettinger added the comment: New changeset 3972628de3d569c88451a2a176a1c94d8822b8a6 by Raymond Hettinger (Jon Dufresne) in branch 'master': bpo-30296 Remove unnecessary tuples, lists, sets, and dicts (#1489) https://github.com/python/cpython/commit/3972628de3d569c88451a2a176a1c94d8822b8a6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 10:36:36 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 18 May 2017 14:36:36 +0000 Subject: [issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib In-Reply-To: <1494162484.35.0.941296488498.issue30296@psf.upfronthosting.co.za> Message-ID: <1495118196.78.0.202600978647.issue30296@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 10:51:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 May 2017 14:51:24 +0000 Subject: [issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat In-Reply-To: <1495107911.22.0.981017290906.issue29619@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Please propose the change as a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 10:55:41 2017 From: report at bugs.python.org (Piotr Wysocki) Date: Thu, 18 May 2017 14:55:41 +0000 Subject: [issue30395] deadlocked child process after forking on pystate.c's head_mutex In-Reply-To: <1495063558.63.0.859469853078.issue30395@psf.upfronthosting.co.za> Message-ID: <1495119341.18.0.0594783233431.issue30395@psf.upfronthosting.co.za> Changes by Piotr Wysocki : ---------- nosy: +Piotr Wysocki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 11:03:15 2017 From: report at bugs.python.org (Alexey Popravka) Date: Thu, 18 May 2017 15:03:15 +0000 Subject: [issue27585] asyncio.Lock deadlock after cancellation In-Reply-To: <1469120801.4.0.62510822161.issue27585@psf.upfronthosting.co.za> Message-ID: <1495119795.34.0.240295494175.issue27585@psf.upfronthosting.co.za> Alexey Popravka added the comment: Also there is the same problem with asyncio.Condition wait() / notify() couple as it repeats the same Lock.acquire()/release() logic ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 11:05:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 May 2017 15:05:49 +0000 Subject: [issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib In-Reply-To: <1494162484.35.0.941296488498.issue30296@psf.upfronthosting.co.za> Message-ID: <1495119949.43.0.295770701247.issue30296@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oh, the PR was merged while I made a review. tuple([i for i in a]) is 2 times faster than tuple(i for i in a). Since there is no significant difference in readability I would keep the variant with a list comprehension if it is initial. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 11:15:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 May 2017 15:15:26 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1495120526.16.0.53018043802.issue29094@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 11:16:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 May 2017 15:16:49 +0000 Subject: [issue29960] _random.Random state corrupted on exception In-Reply-To: <1491043586.04.0.46814850863.issue29960@psf.upfronthosting.co.za> Message-ID: <1495120609.65.0.0510215105356.issue29960@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Mariatta, can you update your PRs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 11:32:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 May 2017 15:32:17 +0000 Subject: [issue30399] Get rid of trailing comma if the repr() of BaseException Message-ID: <1495121537.81.0.536306192808.issue30399@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The repr() of BaseException (and all exceptions that don't override __repr__) with a single argument contains a redundant trailing comma: >>> BaseException('spam') BaseException('spam',) This is just an artefact of the implementation. Proposed patch removes this comma. ---------- components: Interpreter Core messages: 293928 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Get rid of trailing comma if the repr() of BaseException type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 11:39:31 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 May 2017 15:39:31 +0000 Subject: [issue30399] Get rid of trailing comma if the repr() of BaseException In-Reply-To: <1495121537.81.0.536306192808.issue30399@psf.upfronthosting.co.za> Message-ID: <1495121971.41.0.600744140035.issue30399@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1745 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 13:14:53 2017 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 18 May 2017 17:14:53 +0000 Subject: [issue27585] asyncio.Lock deadlock after cancellation In-Reply-To: <1469120801.4.0.62510822161.issue27585@psf.upfronthosting.co.za> Message-ID: <1495127693.83.0.0301999974787.issue27585@psf.upfronthosting.co.za> Guido van Rossum added the comment: I'm really sorry, but I personally don't have time to look into this. If you have a fix in mind you can send a PR to GitHub mentioning bpi-27585. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 13:16:33 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 May 2017 17:16:33 +0000 Subject: [issue30351] regrtest hangs on x86 Windows XP 2.7 In-Reply-To: <1494588560.82.0.408106199182.issue30351@psf.upfronthosting.co.za> Message-ID: <1495127793.41.0.668569848586.issue30351@psf.upfronthosting.co.za> STINNER Victor added the comment: Another one on AMD64 Windows7 SP1 2.7: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%202.7/builds/92/steps/test/logs/stdio ... 0:03:30 [377/403] test_code passed 0:03:30 [378/403] test_wait4 skipped -- running: test_mmap (30 sec) test_wait4 skipped -- module 'os' has no attribute 'fork' 0:03:30 [379/403] test_buffer passed -- running: test_mmap (30 sec) 0:03:43 [380/403] test_mmap passed (43 sec) -- running: test_httpservers (39 sec) 0:03:44 [381/403] test_decimal passed -- running: test_httpservers (39 sec) 0:03:44 [382/403] test_new passed -- running: test_httpservers (40 sec) 0:03:44 [383/403] test_md5 passed -- running: test_httpservers (40 sec) 0:03:44 [384/403] test_sys_setprofile passed -- running: test_httpservers (40 sec) 0:03:46 [385/403] test_heapq passed -- running: test_httpservers (42 sec) 0:03:46 [386/403] test_funcattrs passed -- running: test_httpservers (42 sec) 0:03:46 [387/403] test__osx_support passed -- running: test_httpservers (42 sec) 0:03:47 [388/403] test_threading passed -- running: test_httpservers (43 sec) [26108 refs] [27135 refs] 0:03:47 [389/403] test_pprint passed -- running: test_httpservers (43 sec) 0:03:49 [390/403] test_re passed -- running: test_httpservers (45 sec) 0:03:50 [391/403] test_richcmp passed -- running: test_httpservers (46 sec) 0:03:51 [392/403] test_linecache passed -- running: test_httpservers (46 sec) 0:03:51 [393/403] test_threadsignals skipped -- running: test_httpservers (47 sec) test_threadsignals skipped -- Can't test signal on win32 0:03:51 [394/403] test_binascii passed -- running: test_httpservers (47 sec) 0:03:52 [395/403] test_email_renamed passed -- running: test_httpservers (47 sec) 0:03:52 [396/403] test_copy_reg passed -- running: test_httpservers (48 sec) 0:03:52 [397/403] test_ttk_textonly passed -- running: test_httpservers (48 sec) 0:03:53 [398/403] test_bigmem passed -- running: test_httpservers (48 sec) 0:03:53 [399/403] test_threading_local passed -- running: test_httpservers (49 sec) 0:03:53 [400/403] test_wait3 skipped -- running: test_httpservers (49 sec) test_wait3 skipped -- os.fork not defined -- skipping test_wait3 0:03:57 [401/403] test_lib2to3 passed -- running: test_httpservers (52 sec) [34066 refs] 0:04:04 [402/403] test_httpservers passed (60 sec) command timed out: 1200 seconds without output, attempting to kill program finished with exit code 1 elapsedTime=1446.138000 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 13:21:22 2017 From: report at bugs.python.org (paul j3) Date: Thu, 18 May 2017 17:21:22 +0000 Subject: [issue18943] argparse: default args in mutually exclusive groups In-Reply-To: <1378458002.17.0.371205806782.issue18943@psf.upfronthosting.co.za> Message-ID: <1495128082.96.0.427946182569.issue18943@psf.upfronthosting.co.za> paul j3 added the comment: I haven't downloaded the development distribution to this computer, so can't write formal patches at this time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 13:30:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 May 2017 17:30:26 +0000 Subject: [issue27103] regrtest: capture stdout (-W) option is incompatible with refleak hunter (-R) In-Reply-To: <1464103230.09.0.503477330066.issue27103@psf.upfronthosting.co.za> Message-ID: <1495128626.4.0.892308081737.issue27103@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1746 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 13:41:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 May 2017 17:41:42 +0000 Subject: [issue27103] regrtest: capture stdout (-W) option is incompatible with refleak hunter (-R) In-Reply-To: <1464103230.09.0.503477330066.issue27103@psf.upfronthosting.co.za> Message-ID: <1495129302.16.0.040146534052.issue27103@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 13:49:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 May 2017 17:49:50 +0000 Subject: [issue25794] __setattr__ does not always overload operators In-Reply-To: <1449219157.0.0.30103039285.issue25794@psf.upfronthosting.co.za> Message-ID: <1495129790.0.0.285922107188.issue25794@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1747 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 13:56:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 May 2017 17:56:42 +0000 Subject: [issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros In-Reply-To: <1384348276.8.0.185765824651.issue19569@psf.upfronthosting.co.za> Message-ID: <1495130202.36.0.690707983066.issue19569@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I do not have the possibility to test on Windows. Maybe someone wants to test Arfrever's suggestion. ---------- assignee: serhiy.storchaka -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 13:58:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 May 2017 17:58:55 +0000 Subject: [issue29948] DeprecationWarning when parse ElementTree with a doctype in 2.7 In-Reply-To: <1490886187.9.0.0310872110299.issue29948@psf.upfronthosting.co.za> Message-ID: <1495130335.52.0.806556774114.issue29948@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Fixed in issue30365. ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed superseder: -> Backport warnings in ElementTree/cElementTree modules and fix bugs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 14:16:42 2017 From: report at bugs.python.org (Forest Gregg) Date: Thu, 18 May 2017 18:16:42 +0000 Subject: [issue30388] ndbm can't iterate through values on OS X In-Reply-To: <1495037035.06.0.766456965201.issue30388@psf.upfronthosting.co.za> Message-ID: <1495131402.4.0.780241820089.issue30388@psf.upfronthosting.co.za> Forest Gregg added the comment: The ndbm db's two files (in the attachment) have the following size tmp___otctx 0 bytes tmp___otctx.db 12857344 bytes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 14:31:48 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 May 2017 18:31:48 +0000 Subject: [issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib In-Reply-To: <1494162484.35.0.941296488498.issue30296@psf.upfronthosting.co.za> Message-ID: <1495132308.77.0.550927994028.issue30296@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I made a note of the idlelib.multicall changes for when I review the module to modernize and test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 15:09:16 2017 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 May 2017 19:09:16 +0000 Subject: [issue8450] httplib: false BadStatusLine() raised In-Reply-To: <1271630731.08.0.327097174192.issue8450@psf.upfronthosting.co.za> Message-ID: <1495134556.29.0.215590966527.issue8450@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +1748 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 15:49:11 2017 From: report at bugs.python.org (Berker Peksag) Date: Thu, 18 May 2017 19:49:11 +0000 Subject: [issue28647] python --help: -u is misdocumented as binary mode In-Reply-To: <1478687165.61.0.754522524524.issue28647@psf.upfronthosting.co.za> Message-ID: <1495136951.8.0.0112965563372.issue28647@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- pull_requests: +1749 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 16:03:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 May 2017 20:03:26 +0000 Subject: [issue27103] regrtest: capture stdout (-W) option is incompatible with refleak hunter (-R) In-Reply-To: <1464103230.09.0.503477330066.issue27103@psf.upfronthosting.co.za> Message-ID: <1495137806.3.0.365607185006.issue27103@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset fcdd9b6b7e73427ce5aa63cf095312f603c4edce by Victor Stinner in branch 'master': bpo-27103: regrtest disables -W if -R is used (#1651) https://github.com/python/cpython/commit/fcdd9b6b7e73427ce5aa63cf095312f603c4edce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 16:05:32 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 May 2017 20:05:32 +0000 Subject: [issue27103] regrtest: capture stdout (-W) option is incompatible with refleak hunter (-R) In-Reply-To: <1464103230.09.0.503477330066.issue27103@psf.upfronthosting.co.za> Message-ID: <1495137932.93.0.728706252394.issue27103@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1750 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 16:07:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 May 2017 20:07:34 +0000 Subject: [issue27103] regrtest: capture stdout (-W) option is incompatible with refleak hunter (-R) In-Reply-To: <1464103230.09.0.503477330066.issue27103@psf.upfronthosting.co.za> Message-ID: <1495138054.42.0.420714497223.issue27103@psf.upfronthosting.co.za> STINNER Victor added the comment: It seems like Python 2.7 is not affected. I will apply my workaround to 3.5, 3.6 and master, since Zachary created a buildbot testing 2.7, 3.5, 3.6 and master branches. ---------- nosy: +zach.ware versions: +Python 3.5, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 16:08:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 May 2017 20:08:15 +0000 Subject: [issue27945] Various segfaults with dict In-Reply-To: <1472852008.61.0.354257945943.issue27945@psf.upfronthosting.co.za> Message-ID: <1495138095.72.0.355137339025.issue27945@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1751 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 16:13:23 2017 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 May 2017 20:13:23 +0000 Subject: =?utf-8?q?=5Bissue30367=5D_Cannot_build_CPython3=2E6_with_module_?= =?utf-8?q?=E2=80=9Ctestcapimodule=E2=80=9D_statically?= In-Reply-To: <1494816939.58.0.996227470169.issue30367@psf.upfronthosting.co.za> Message-ID: <1495138403.4.0.575651064191.issue30367@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +1752 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 16:22:00 2017 From: report at bugs.python.org (Preston Moore) Date: Thu, 18 May 2017 20:22:00 +0000 Subject: [issue30400] Race condition in shutil.copyfile() Message-ID: <1495138920.07.0.300372261513.issue30400@psf.upfronthosting.co.za> New submission from Preston Moore: A race condition exists in shutil.copyfile() that allows the file being copied to be replaced between the time it was initially checked with stat() in this function and when it is actually open()'d and copied. This issue can be triggered from shutil.move() (and likely other places) when attempting to move a file from one location to another where the source and destination are on different devices. This behavior can be replicated by setting a catchpoint in gdb on calls to stat() and, after the initial call to stat in shutil.copyfile(), replacing the source file. The attached pull request addresses this issue by storing the inode number of the source file when it is initially stat()'d and comparing this value to an inode value taken from a call to fstat() after the file is open. If these two values differ, the file has been replaced. This is the pattern employed by coreutil's mv utility in an effort to address this issue. This bug was found as part of an ongoing research effort into detecting and addressing bugs caused by differences in the environments in which an application may be run (the environmental issue in this place being the difficulties around correctly copying a file from one disk to another). ---------- components: Library (Lib) messages: 293938 nosy: Preston Moore priority: normal severity: normal status: open title: Race condition in shutil.copyfile() type: security versions: Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 16:36:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 May 2017 20:36:38 +0000 Subject: =?utf-8?q?=5Bissue30367=5D_Cannot_build_CPython3=2E6_with_module_?= =?utf-8?q?=E2=80=9Ctestcapimodule=E2=80=9D_statically?= In-Reply-To: <1494816939.58.0.996227470169.issue30367@psf.upfronthosting.co.za> Message-ID: <1495139798.54.0.813828076174.issue30367@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 16:36:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 May 2017 20:36:54 +0000 Subject: [issue27103] regrtest: capture stdout (-W) option is incompatible with refleak hunter (-R) In-Reply-To: <1464103230.09.0.503477330066.issue27103@psf.upfronthosting.co.za> Message-ID: <1495139813.99.0.566989455606.issue27103@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 2773add19aff873377d81e3bb6ab8aa942756f5a by Victor Stinner in branch '3.6': bpo-27103: regrtest disables -W if -R is used (#1651) (#1656) https://github.com/python/cpython/commit/2773add19aff873377d81e3bb6ab8aa942756f5a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 16:42:07 2017 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 May 2017 20:42:07 +0000 Subject: [issue30400] Race condition in shutil.copyfile() In-Reply-To: <1495138920.07.0.300372261513.issue30400@psf.upfronthosting.co.za> Message-ID: <1495140127.55.0.36282395495.issue30400@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +1753 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 16:49:01 2017 From: report at bugs.python.org (Preston Moore) Date: Thu, 18 May 2017 20:49:01 +0000 Subject: [issue30400] Race condition in shutil.copyfile() In-Reply-To: <1495138920.07.0.300372261513.issue30400@psf.upfronthosting.co.za> Message-ID: <1495140541.26.0.364486648166.issue30400@psf.upfronthosting.co.za> Preston Moore added the comment: It looks like the PR is not passing 3 tests. I think this might be a result of the mock file objects not having inode numbers? Any feedback on this front? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 16:51:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 May 2017 20:51:25 +0000 Subject: [issue27103] regrtest: capture stdout (-W) option is incompatible with refleak hunter (-R) In-Reply-To: <1464103230.09.0.503477330066.issue27103@psf.upfronthosting.co.za> Message-ID: <1495140685.62.0.641505344792.issue27103@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1755 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 16:55:18 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 18 May 2017 20:55:18 +0000 Subject: [issue30401] Remove the .bzrignore file Message-ID: <1495140918.07.0.988961408689.issue30401@psf.upfronthosting.co.za> New submission from St?phane Wirtel: Maybe we could remove the .bzrignore file, I don't think we would continue to support a mirror of the repository for Bazaar. ---------- messages: 293941 nosy: matrixise priority: normal severity: normal status: open title: Remove the .bzrignore file versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 17:02:57 2017 From: report at bugs.python.org (Armin Rigo) Date: Thu, 18 May 2017 21:02:57 +0000 Subject: [issue18943] argparse: default args in mutually exclusive groups In-Reply-To: <1378458002.17.0.371205806782.issue18943@psf.upfronthosting.co.za> Message-ID: <1495141377.92.0.633176814194.issue18943@psf.upfronthosting.co.za> Changes by Armin Rigo : ---------- nosy: -arigo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 16:57:29 2017 From: report at bugs.python.org (Dan Snider) Date: Thu, 18 May 2017 20:57:29 +0000 Subject: [issue30402] Unexpected and/or inconsistent del behavior Message-ID: <1495141049.61.0.154560922326.issue30402@psf.upfronthosting.co.za> New submission from Dan Snider: k = 'k' del [k] That deletes the variable k from the local scope (even though it *looks* like it's trying to delete a list containing 1 element which is equivalent to the variable k). But if using list literals to delete groups of objects is valid, then why not set literals? del {k} raises SyntaxError: can't delete literal The better option imo would be to only allow tuples when del-ing groups of objects, but if list literals are allowed then set literals should be as well. ---------- components: Interpreter Core messages: 293942 nosy: assume_away priority: normal severity: normal status: open title: Unexpected and/or inconsistent del behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 17:05:07 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 18 May 2017 21:05:07 +0000 Subject: [issue30401] Remove the .bzrignore file In-Reply-To: <1495140918.07.0.988961408689.issue30401@psf.upfronthosting.co.za> Message-ID: <1495141507.37.0.638603053794.issue30401@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- pull_requests: +1756 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 17:58:54 2017 From: report at bugs.python.org (Zachary Ware) Date: Thu, 18 May 2017 21:58:54 +0000 Subject: [issue30386] Add a build infrastructure for Android In-Reply-To: <1495029473.85.0.224153889861.issue30386@psf.upfronthosting.co.za> Message-ID: <1495144734.68.0.857633643113.issue30386@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 19:31:02 2017 From: report at bugs.python.org (Ellison Marks) Date: Thu, 18 May 2017 23:31:02 +0000 Subject: [issue30000] Inconsistency in the zlib module In-Reply-To: <1491434902.87.0.645672242128.issue30000@psf.upfronthosting.co.za> Message-ID: <1495150262.8.0.952773066283.issue30000@psf.upfronthosting.co.za> Ellison Marks added the comment: Erm, is there anyone else we should poke for their opinion then? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 20:02:30 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 19 May 2017 00:02:30 +0000 Subject: [issue28087] macOS 12 poll syscall returns prematurely In-Reply-To: <1473637008.93.0.918549766701.issue28087@psf.upfronthosting.co.za> Message-ID: <1495152149.98.0.698084758107.issue28087@psf.upfronthosting.co.za> Ned Deily added the comment: If the problem is fixed in 10.12.2, I agree with gps that there is no need to add a workaround for 10.12.0 and .1. We should only ever need to support the most recent macOS point release; it is the user's responsibility to keep up-to-date and with most users these days that happens automatically. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 20:40:19 2017 From: report at bugs.python.org (Davin Potts) Date: Fri, 19 May 2017 00:40:19 +0000 Subject: [issue26434] multiprocessing cannot spawn grandchild from a Windows service In-Reply-To: <1456394207.49.0.123218861266.issue26434@psf.upfronthosting.co.za> Message-ID: <1495154419.62.0.356614513469.issue26434@psf.upfronthosting.co.za> Davin Potts added the comment: New changeset c47c315812b1fa9acb16510a7aa3b37d113def48 by Davin Potts (Marc Schlaich) in branch '2.7': bpo-26434: Fix multiprocessing grandchilds in a Windows service (GH-1167) https://github.com/python/cpython/commit/c47c315812b1fa9acb16510a7aa3b37d113def48 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 20:42:32 2017 From: report at bugs.python.org (Davin Potts) Date: Fri, 19 May 2017 00:42:32 +0000 Subject: [issue26434] multiprocessing cannot spawn grandchild from a Windows service In-Reply-To: <1456394207.49.0.123218861266.issue26434@psf.upfronthosting.co.za> Message-ID: <1495154552.29.0.0582268176445.issue26434@psf.upfronthosting.co.za> Davin Potts added the comment: Patch committed in 2.7 branch. Thanks for your help, Marc. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 20:45:07 2017 From: report at bugs.python.org (Davin Potts) Date: Fri, 19 May 2017 00:45:07 +0000 Subject: [issue28053] parameterize what serialization is used in multiprocessing In-Reply-To: <1473454734.41.0.810069156927.issue28053@psf.upfronthosting.co.za> Message-ID: <1495154707.1.0.948557859018.issue28053@psf.upfronthosting.co.za> Davin Potts added the comment: Docs need updating still. ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 22:17:12 2017 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 19 May 2017 02:17:12 +0000 Subject: [issue30149] inspect.signature() doesn't support partialmethod without explicit self parameter In-Reply-To: <1492978705.31.0.200843668782.issue30149@psf.upfronthosting.co.za> Message-ID: <1495160232.63.0.547884830515.issue30149@psf.upfronthosting.co.za> Changes by Dong-hee Na : ---------- pull_requests: +1757 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 18 22:17:49 2017 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 19 May 2017 02:17:49 +0000 Subject: [issue30149] inspect.signature() doesn't support partialmethod without explicit self parameter In-Reply-To: <1492978705.31.0.200843668782.issue30149@psf.upfronthosting.co.za> Message-ID: <1495160269.43.0.0118802223042.issue30149@psf.upfronthosting.co.za> Changes by Dong-hee Na : ---------- pull_requests: +1758 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 00:46:10 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 May 2017 04:46:10 +0000 Subject: [issue30402] Unexpected and/or inconsistent del behavior In-Reply-To: <1495141049.61.0.154560922326.issue30402@psf.upfronthosting.co.za> Message-ID: <1495169170.34.0.879300507317.issue30402@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry, this is just how expression lists work. See Grammar/Grammar at https://hg.python.org/cpython/file/tip/Grammar/Grammar This is really no different than: for [k] is s: ... or: [k, j] = s > Why not set literals Because sets are unordered and because it isn't needed. ---------- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 01:12:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 May 2017 05:12:59 +0000 Subject: [issue27103] regrtest: capture stdout (-W) option is incompatible with refleak hunter (-R) In-Reply-To: <1464103230.09.0.503477330066.issue27103@psf.upfronthosting.co.za> Message-ID: <1495170779.6.0.0141743179974.issue27103@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 9503dd1e1865bb873a1f72f63ae384bba8462c5e by Victor Stinner in branch '3.5': bpo-27103: regrtest disables -W if -R is used (#1660) https://github.com/python/cpython/commit/9503dd1e1865bb873a1f72f63ae384bba8462c5e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 01:33:38 2017 From: report at bugs.python.org (Rudi Grams) Date: Fri, 19 May 2017 05:33:38 +0000 Subject: [issue30392] default webbrowser fails on macOS Sierra 10.12.5 In-Reply-To: <1495050601.31.0.205212071557.issue30392@psf.upfronthosting.co.za> Message-ID: <1495172018.17.0.141767983782.issue30392@psf.upfronthosting.co.za> Rudi Grams added the comment: changing lines 594 and 623 in webbrowser.py (python 2.7.13) to avoid the broken 'open location' seems to solve the problem in idle . script = 'do shell script "open %s"' % url.replace('"', '%22') ---------- nosy: +Rudi Grams _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 02:05:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 May 2017 06:05:41 +0000 Subject: [issue28087] macOS 12 poll syscall returns prematurely In-Reply-To: <1473637008.93.0.918549766701.issue28087@psf.upfronthosting.co.za> Message-ID: <1495173941.83.0.816549066442.issue28087@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +1759 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 02:06:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 May 2017 06:06:55 +0000 Subject: [issue28087] macOS 12 poll syscall returns prematurely In-Reply-To: <1473637008.93.0.918549766701.issue28087@psf.upfronthosting.co.za> Message-ID: <1495174015.22.0.143934228295.issue28087@psf.upfronthosting.co.za> STINNER Victor added the comment: I abandonned PR 1426 which proposed to blacklist bogus macOS versions, and instead I proposed a new PR to simply reenable previsouly skipped tests (because of the bug which is now fixed). https://github.com/python/cpython/pull/1664 I'm unable to test my own PR right now. Ned Deily: would you mind to test it and review my change please? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 04:14:19 2017 From: report at bugs.python.org (Albert-Jan Nijburg) Date: Fri, 19 May 2017 08:14:19 +0000 Subject: [issue30377] Unnecessary complexity in tokenize.py around handling of comments and newlines In-Reply-To: <1494940089.25.0.512912878732.issue30377@psf.upfronthosting.co.za> Message-ID: <1495181659.56.0.102379393505.issue30377@psf.upfronthosting.co.za> Albert-Jan Nijburg added the comment: Still no CLA, I checked my username on the pdf, and it's correct, hope someone looks at it soon :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 04:45:53 2017 From: report at bugs.python.org (Andrew Jaffe) Date: Fri, 19 May 2017 08:45:53 +0000 Subject: [issue30392] default webbrowser fails on macOS Sierra 10.12.5 In-Reply-To: <1495050601.31.0.205212071557.issue30392@psf.upfronthosting.co.za> Message-ID: <1495183553.72.0.240671867619.issue30392@psf.upfronthosting.co.za> Andrew Jaffe added the comment: This seems to be a bug in the `osascript` application in the latest macOS 10.12.5: $ osascript < open location "http://python.org" > EOF 0:33: execution error: "http://python.org" doesn?t understand the ?open location? message. (-1708) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 05:39:43 2017 From: report at bugs.python.org (Erik Bray) Date: Fri, 19 May 2017 09:39:43 +0000 Subject: [issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture In-Reply-To: <1489413054.1.0.4012026352.issue29804@psf.upfronthosting.co.za> Message-ID: <1495186783.41.0.0703485728622.issue29804@psf.upfronthosting.co.za> Changes by Erik Bray : ---------- pull_requests: +1760 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 07:20:43 2017 From: report at bugs.python.org (Marcel Plch) Date: Fri, 19 May 2017 11:20:43 +0000 Subject: [issue30403] Running extension modules using -m switch Message-ID: <1495192842.98.0.357031276673.issue30403@psf.upfronthosting.co.za> New submission from Marcel Plch: Currently the -m switch does not work with extension modules: $ python3 -m math /usr/bin/python3: No code object available for math In order to enable extension modules to behave like Python source modules, the -m switch should be supported. Please, see this proof of concept: https://github.com/Traceur759/cpython/tree/main_c_modules ---------- components: Extension Modules messages: 293954 nosy: Dormouse759 priority: normal severity: normal status: open title: Running extension modules using -m switch type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 08:01:30 2017 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 19 May 2017 12:01:30 +0000 Subject: [issue30403] Running extension modules using -m switch In-Reply-To: <1495192842.98.0.357031276673.issue30403@psf.upfronthosting.co.za> Message-ID: <1495195290.93.0.647603767618.issue30403@psf.upfronthosting.co.za> Changes by Petr Viktorin : ---------- nosy: +encukou, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 08:33:02 2017 From: report at bugs.python.org (Daniel Birnstiel) Date: Fri, 19 May 2017 12:33:02 +0000 Subject: [issue30385] Segfault on OSX with 3.6.1 In-Reply-To: <1495024855.04.0.697140063474.issue30385@psf.upfronthosting.co.za> Message-ID: <1495197182.21.0.490044020003.issue30385@psf.upfronthosting.co.za> Daniel Birnstiel added the comment: I am currently (occasionally) running into the same problem, using Python 3.6.0 on OSX 10.12.3. I cannot reproduce this segmentation fault reliably, it happens after running for a while in production. This appears to be similar to issue 13829. python traceback (trimmed): Fatal Python error: Segmentation fault Current thread 0x00007000065fb000 (most recent call first): File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2592 in proxy_bypass_macosx_sysconf File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 2616 in proxy_bypass File "/Users/daniel/Workspace/venv/lib/python3.6/site-packages/requests/utils.py", line 677 in should_bypass_proxies File "/Users/daniel/Workspace/venv/lib/python3.6/site-packages/requests/utils.py", line 693 in get_environ_proxies File "/Users/daniel/Workspace/venv/lib/python3.6/site-packages/requests/sessions.py", line 686 in merge_environment_settings File "/Users/daniel/Workspace/venv/lib/python3.6/site-packages/requests/sessions.py", line 509 in request File "/Users/daniel/Workspace/venv/lib/python3.6/site-packages/requests/api.py", line 58 in request crash dump traceback (trimmed): * thread #1: tid = 0x0000, 0x00007fffc1ef0dd6 libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGSTOP * frame #0: 0x00007fffc1ef0dd6 libsystem_kernel.dylib`__pthread_kill + 10 frame #1: 0x00007fffc1fdc787 libsystem_pthread.dylib`pthread_kill + 90 frame #2: 0x00007fffc1e07497 libsystem_c.dylib`raise + 26 frame #3: 0x00007fffc1fcfbba libsystem_platform.dylib`_sigtramp + 26 frame #4: 0x00007fffc1da188f libdispatch.dylib`_dispatch_queue_push + 172 frame #5: 0x00007fffc1d91572 libdispatch.dylib`_dispatch_mach_msg_send + 657 frame #6: 0x00007fffc1d924ba libdispatch.dylib`_dispatch_mach_send_drain + 280 frame #7: 0x00007fffc1da91ea libdispatch.dylib`_dispatch_mach_send_push_and_trydrain + 487 frame #8: 0x00007fffc1da6745 libdispatch.dylib`_dispatch_mach_send_msg + 282 frame #9: 0x00007fffc1da6804 libdispatch.dylib`dispatch_mach_send_with_result + 50 frame #10: 0x00007fffc201f25e libxpc.dylib`_xpc_connection_enqueue + 104 frame #11: 0x00007fffc201eca3 libxpc.dylib`xpc_connection_send_message_with_reply + 152 frame #12: 0x00007fffac99b8e5 CoreFoundation`__80-[CFPrefsSearchListSource alreadylocked_generationCountFromListOfSources:count:]_block_invoke_2 + 133 frame #13: 0x00007fffac9cb4e4 CoreFoundation`-[_CFXPreferences withConnectionForRole:performBlock:] + 36 frame #14: 0x00007fffac99b817 CoreFoundation`__80-[CFPrefsSearchListSource alreadylocked_generationCountFromListOfSources:count:]_block_invoke + 199 frame #15: 0x00007fffac99b662 CoreFoundation`-[CFPrefsSearchListSource alreadylocked_generationCountFromListOfSources:count:] + 226 frame #16: 0x00007fffac81ee80 CoreFoundation`-[CFPrefsSearchListSource alreadylocked_copyDictionary] + 336 frame #17: 0x00007fffac81eb5c CoreFoundation`-[CFPrefsSearchListSource alreadylocked_copyValueForKey:] + 60 frame #18: 0x00007fffac94dd75 CoreFoundation`-[CFPrefsSource copyValueForKey:] + 53 frame #19: 0x00007fffac9c9b00 CoreFoundation`__76-[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:]_block_invoke + 32 frame #20: 0x00007fffac99ca32 CoreFoundation`__108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 290 frame #21: 0x00007fffac99c8a9 CoreFoundation`-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 345 frame #22: 0x00007fffac9c9a66 CoreFoundation`-[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] + 310 frame #23: 0x00007fffb343a56f SystemConfiguration`SCDynamicStoreCopyProxiesWithOptions + 164 frame #24: 0x000000010b36f926 _scproxy.cpython-36m-darwin.so`get_proxy_settings + 24 frame #25: 0x000000010942148b Python`_PyCFunction_FastCallDict + 529 frame #26: 0x0000000109488959 Python`call_function + 562 frame #27: 0x0000000109485d10 Python`_PyEval_EvalFrameDefault + 26835 ---------- nosy: +Birne94 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 09:21:01 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 19 May 2017 13:21:01 +0000 Subject: [issue30386] Add a build infrastructure for Android In-Reply-To: <1495029473.85.0.224153889861.issue30386@psf.upfronthosting.co.za> Message-ID: <1495200061.42.0.589021533763.issue30386@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Commited 'bpo-30386: Support the new NDK Unified Headers'. This does fix the missing declarations in the NDK headers and android-api-24.patch is not needed now. It also fixes the missing declaration of sethostname() at API 24 that caused the import of the _socket module to fail. More surprisingly it also fixes the compilation failure with 32 bits architectures (the size of off_t is now 8 instead of 4 previously) and issue29619.patch is not needed now. Only one version of the NDK is supported, currently it is android-ndk-r14 the latest stable release. The '-Wno-nullability-completeness' compilation flag is needed to avoid a flow of warnings in the processing of some NDK headers. Unified Headers comes with a new annoying problem: langinfo.h exists now but nl_langinfo() is intentionaly not declared except for the __ANDROID_API_FUTURE__ API level which is reserved for the development of the NDK itself. The solution chosen here is: * Undefine HAVE_LANGINFO_H and CODESET in Include/pyport.h to maintain the status quo in the Python code. * The Makefile generated by makesetup runs a script at configure time that checks that nl_langinfo() is not declared and aborts the build otherwise. This allows to detect when langinfo.h starts being not broken anymore when swicthing to a new version of the NDK. In that case the following steps should be taken upon swicthing to this new version: + Remove this script from the build system (obviously). + Remove the changes in Include/pyport.h. + Revert the changes made in issue 28596. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 11:08:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 May 2017 15:08:22 +0000 Subject: [issue29611] TextIOWrapper's write_through option behave differently between C and pure Python implementation. In-Reply-To: <1487670654.12.0.413723829989.issue29611@psf.upfronthosting.co.za> Message-ID: <1495206502.56.0.882406420626.issue29611@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a duplicate of issue15571. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed superseder: -> Python version of TextIOWrapper ignores "write_through" arg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 11:16:25 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 19 May 2017 15:16:25 +0000 Subject: [issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat In-Reply-To: <1487766242.34.0.703380697066.issue29619@psf.upfronthosting.co.za> Message-ID: <1495206985.1.0.806904833937.issue29619@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- pull_requests: +1761 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 11:21:23 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 19 May 2017 15:21:23 +0000 Subject: [issue30385] Segfault on OSX with 3.6.1 In-Reply-To: <1495024855.04.0.697140063474.issue30385@psf.upfronthosting.co.za> Message-ID: <1495207283.92.0.793763680204.issue30385@psf.upfronthosting.co.za> Ned Deily added the comment: Unfortunately, his is a long standing problem when using Python applications that fork on macOS and that end up calling certain system frameworks that under the covers use the system libdispatch which is not fork safe. In this case, it is most likely due to a call to s urllib function that results in a call to Python's helper module _scproxy to query the macOS system configuration for network proxies. If your application and system are not using a proxy, the simplest workaround is to disable network proxy lookups by defining the environment variable 'no_proxy' with value '*' in the Python process, for example: env no_proxy='*' python3.6 ... Otherwise, restructuring your code to ensure network initialization occurs in the main thread before any forking *might* also prevent the segfault. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> _scproxy.so causes EXC_BAD_ACCESS (SIGSEGV) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 11:24:14 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 19 May 2017 15:24:14 +0000 Subject: [issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat In-Reply-To: <1487766242.34.0.703380697066.issue29619@psf.upfronthosting.co.za> Message-ID: <1495207454.62.0.604364296698.issue29619@psf.upfronthosting.co.za> Xavier de Gaye added the comment: PR 1666 added. With Unified Headers introduced in android-ndk-r14, the size of off_t for 32 bits Android devices is 8 instead of 4 and the cross-compilation of Python on Android does not fail in this case, see msg293956. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 11:52:05 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 May 2017 15:52:05 +0000 Subject: [issue30404] Make stdout and stderr truly unbuffered when run with the -u option Message-ID: <1495209125.34.0.468493818937.issue30404@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: In Python 2 when run the interpreter with the -u option the stdout and stderr streams are unbuffered. In Python 3 they become just line-buffered. This is because initially there was no way to create unbuffered text streams. But since Python 3.3 TextIOWrapper supports unbuffered output binary stream and accepts the write_through argument which switch off its own buffering. Proposed patch makes the stdout and stderr streams truly unbuffered when run with the -u option. ---------- components: IO, Interpreter Core messages: 293960 nosy: benjamin.peterson, pitrou, serhiy.storchaka, stutzbach priority: normal severity: normal stage: patch review status: open title: Make stdout and stderr truly unbuffered when run with the -u option type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 12:02:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 May 2017 16:02:43 +0000 Subject: [issue30404] Make stdout and stderr truly unbuffered when run with the -u option In-Reply-To: <1495209125.34.0.468493818937.issue30404@psf.upfronthosting.co.za> Message-ID: <1495209763.12.0.27623479532.issue30404@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1762 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 12:05:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 May 2017 16:05:37 +0000 Subject: [issue28647] python --help: -u is misdocumented as binary mode In-Reply-To: <1478687165.61.0.754522524524.issue28647@psf.upfronthosting.co.za> Message-ID: <1495209937.45.0.238925282331.issue28647@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Issue30404 makes stdout and stderr truly unbuffered when run with -u. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 13:09:12 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 19 May 2017 17:09:12 +0000 Subject: [issue30000] Inconsistency in the zlib module In-Reply-To: <1491434902.87.0.645672242128.issue30000@psf.upfronthosting.co.za> Message-ID: <1495213752.22.0.986954807054.issue30000@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I think adding these parameters to the zlib.compress() function is a fine addition for 3.7. They are more convenient for those (few) who do need them. I'd go ahead and turn it into a cpython PR. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 14:07:51 2017 From: report at bugs.python.org (Pranav Deshpande) Date: Fri, 19 May 2017 18:07:51 +0000 Subject: [issue18299] Change script_helper to use universal_newlines=True in _assert_python In-Reply-To: <1372163490.54.0.858843080501.issue18299@psf.upfronthosting.co.za> Message-ID: <1495217271.7.0.103464656532.issue18299@psf.upfronthosting.co.za> Pranav Deshpande added the comment: I am afraid I didn't make myself clear. I am a beginner when it comes to open source contribution and have decided to take up this issue. I did some basic research about the issue and found this file: cpython/Lib/test/support/script_helper.py The function _assert_python calls run_python_until_end which calls subprocess.Popen which takes the parameter universal_newlines=True. That is all I could discover. Could you guide me further regarding this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 14:22:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 May 2017 18:22:10 +0000 Subject: [issue30399] Get rid of trailing comma in the repr() of BaseException In-Reply-To: <1495121537.81.0.536306192808.issue30399@psf.upfronthosting.co.za> Message-ID: <1495218130.06.0.928420882845.issue30399@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: Get rid of trailing comma if the repr() of BaseException -> Get rid of trailing comma in the repr() of BaseException _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 14:53:47 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 19 May 2017 18:53:47 +0000 Subject: [issue30359] A standard convention for annotating a function as returning an (async) context manager? In-Reply-To: <1494643727.56.0.6539898445.issue30359@psf.upfronthosting.co.za> Message-ID: <1495220027.34.0.997736764263.issue30359@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Or you can use typing.ContextManager[ret_type] if you like generics (typing.AsyncContextManager will be also added soon). Also this recent discussion seems relevant https://github.com/python/peps/pull/242 and the corresponding thread on python-dev: https://www.mail-archive.com/python-dev at python.org/msg95595.html ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 15:06:27 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 May 2017 19:06:27 +0000 Subject: [issue30355] Unicode symbols crash lib2to3.parse In-Reply-To: <1494624360.33.0.637905256361.issue30355@psf.upfronthosting.co.za> Message-ID: <1495220787.6.0.946183788011.issue30355@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I agree. ? is not a 2.x identifier (variable name) or anything else (like 'binary operator') and it would be wrong for lib2to3.pgen2.parse.classify to classify it is such, or as anything else. So I am closing this. Benjamin can reopen if we are mistaken. ---------- nosy: +benjamin.peterson, terry.reedy resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 15:08:07 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 May 2017 19:08:07 +0000 Subject: [issue30359] Annotating a function as returning an (async) context manager? In-Reply-To: <1494643727.56.0.6539898445.issue30359@psf.upfronthosting.co.za> Message-ID: <1495220887.43.0.032719529016.issue30359@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- title: A standard convention for annotating a function as returning an (async) context manager? -> Annotating a function as returning an (async) context manager? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 15:16:26 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 May 2017 19:16:26 +0000 Subject: [issue30360] getpass.getpass() does not accept stdin from an Expect script In-Reply-To: <1494734740.65.0.654665602133.issue30360@psf.upfronthosting.co.za> Message-ID: <1495221386.79.0.489851309238.issue30360@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I strongly suspect that this should be closed as 'not a bug', but I know too little about expect to be sure. If there is a python, as opposed to expect or os bug, then it should be possible to demonstrate the problem with python. If you leave this open, please post to python-ideas, where there are people who use expect. Also, text files should be uploaded as they are, uncompressed, so readers can click and view in a browser. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 15:18:32 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 May 2017 19:18:32 +0000 Subject: [issue30361] Docs example: converting mixed types to floating point In-Reply-To: <1494752919.15.0.561616045601.issue30361@psf.upfronthosting.co.za> Message-ID: <1495221512.65.0.266767256669.issue30361@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Agreed. Also, I think one example is enough. A good sprint fix. ---------- keywords: +easy nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 15:46:40 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 May 2017 19:46:40 +0000 Subject: [issue30405] PCbuild.bat: register binaries for py launcher Message-ID: <1495223200.37.0.229712024273.issue30405@psf.upfronthosting.co.za> New submission from Terry J. Reedy: While working on patches for python, typing path\repository\PCbuild\win32\python-d.exe is an error-prone pain. I would really like to be able to run locally built binaries with py. Could pcbuild/build.bat register binaries that it successfully builds? And then print the -x.y option needed for py? #30362 would nicely complement this issue. ---------- components: Build, Unicode messages: 293968 nosy: ezio.melotti, haypo, paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware priority: normal severity: normal stage: test needed status: open title: PCbuild.bat: register binaries for py launcher type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 15:49:17 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 May 2017 19:49:17 +0000 Subject: [issue30362] Launcher add list and list with paths options In-Reply-To: <1494753197.17.0.253655325044.issue30362@psf.upfronthosting.co.za> Message-ID: <1495223357.79.0.216232908941.issue30362@psf.upfronthosting.co.za> Terry J. Reedy added the comment: py already has the -number option space. To avoid conflict, use -0 (zero). I think only one option is needed -- print 'x.y path' for each binary it can find and run. 'x.y' should be the exact option needed to start the particular binary. This enhancement would enable IDEs to much more easily offer 'Run with x.y'. It also would make #30405 (register locally built binaries) more useful. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 15:52:33 2017 From: report at bugs.python.org (Paul Moore) Date: Fri, 19 May 2017 19:52:33 +0000 Subject: [issue30405] PCbuild.bat: register binaries for py launcher In-Reply-To: <1495223200.37.0.229712024273.issue30405@psf.upfronthosting.co.za> Message-ID: <1495223553.63.0.399087666571.issue30405@psf.upfronthosting.co.za> Paul Moore added the comment: I'd be wary of leaving out of date registry entries around. Maybe make it a separate script (or part of build.bat but requiring a command line flag to request it)? Alternatively (or as well) we could have a cleanup command that removes registry entries for working builds that are no longer wanted. Of course you can handle this by manually editing the registry - but the same could equally be said of the original request... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 15:57:10 2017 From: report at bugs.python.org (Paul Moore) Date: Fri, 19 May 2017 19:57:10 +0000 Subject: [issue30405] PCbuild.bat: register binaries for py launcher In-Reply-To: <1495223200.37.0.229712024273.issue30405@psf.upfronthosting.co.za> Message-ID: <1495223830.41.0.258123185311.issue30405@psf.upfronthosting.co.za> Paul Moore added the comment: Hmm, thinking a bit further, are you just suggesting registering the build as -3.7? What if I were to build the 3.6 branch? Would that overwrite my "real" 3.6 registry entries? As things stand, the launcher can only register two copies of Python for any given minor version (one 32 bit and one 64 bit). So this would only really be useful for trunk (and for builds of versions where you don't already have the release version installed). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 16:06:01 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 May 2017 20:06:01 +0000 Subject: [issue30372] Status of __builtins__ is not totally clear In-Reply-To: <1494865238.41.0.458723699483.issue30372@psf.upfronthosting.co.za> Message-ID: <1495224361.52.0.577841627836.issue30372@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Moving "CPython implementation detail: " up a paragraph should be trivial. Resolving the conflict between " __builtins__ can be set to a user-created dictionary to create a weak form of restricted execution." and "Users should not touch __builtins__;" seems less so. I suspect the the latter was added well after the former, and that the former should have been deleted at that time. ---------- nosy: +terry.reedy stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 16:10:02 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 May 2017 20:10:02 +0000 Subject: [issue30376] Curses documentation refers to incorrect type In-Reply-To: <1494882965.33.0.779610991751.issue30376@psf.upfronthosting.co.za> Message-ID: <1495224602.47.0.845829603534.issue30376@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> needs patch type: -> behavior versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 16:10:59 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 May 2017 20:10:59 +0000 Subject: [issue30376] Curses documentation refers to incorrect type In-Reply-To: <1494882965.33.0.779610991751.issue30376@psf.upfronthosting.co.za> Message-ID: <1495224659.8.0.995778824584.issue30376@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 16:17:53 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 May 2017 20:17:53 +0000 Subject: [issue30377] Unnecessary complexity in tokenize.py: comments and newlines In-Reply-To: <1494940089.25.0.512912878732.issue30377@psf.upfronthosting.co.za> Message-ID: <1495225073.35.0.562021088104.issue30377@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is pycon week, so staff person is busy with that. ---------- nosy: +terry.reedy title: Unnecessary complexity in tokenize.py around handling of comments and newlines -> Unnecessary complexity in tokenize.py: comments and newlines _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 17:02:05 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 May 2017 21:02:05 +0000 Subject: [issue30388] ndbm can't iterate through values on OS X In-Reply-To: <1495037035.06.0.766456965201.issue30388@psf.upfronthosting.co.za> Message-ID: <1495227725.23.0.693073240348.issue30388@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Do you mean that on OSX, you code works with 3.6.1 and fails with 3.5.3? ---------- components: +macOS nosy: +ned.deily, ronaldoussoren, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 17:04:30 2017 From: report at bugs.python.org (Forest Gregg) Date: Fri, 19 May 2017 21:04:30 +0000 Subject: [issue30388] ndbm can't iterate through values on OS X In-Reply-To: <1495037035.06.0.766456965201.issue30388@psf.upfronthosting.co.za> Message-ID: <1495227870.87.0.702496217167.issue30388@psf.upfronthosting.co.za> Forest Gregg added the comment: Very sorry for the ambiguity. The bug appears for both python 3.5 and python 3.6.1 on OS X. I have not tried other versions of python on OS X. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 17:27:42 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Fri, 19 May 2017 21:27:42 +0000 Subject: [issue30406] async and await should be keywords in 3.7 Message-ID: <1495229262.01.0.300246152317.issue30406@psf.upfronthosting.co.za> New submission from Jelle Zijlstra: According to PEP 492, async and await should be full keywords in Python 3.7, but this hasn't been implemented yet. I have a patch ready that I'll submit as a PR soon. ---------- components: Interpreter Core messages: 293976 nosy: Jelle Zijlstra, giampaolo.rodola, haypo, yselivanov priority: normal severity: normal status: open title: async and await should be keywords in 3.7 versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 17:28:28 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 May 2017 21:28:28 +0000 Subject: [issue30399] Get rid of trailing comma in the repr() of BaseException In-Reply-To: <1495121537.81.0.536306192808.issue30399@psf.upfronthosting.co.za> Message-ID: <1495229308.76.0.676395028674.issue30399@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think the trailing comma is slightly worse than redundant, as someone who has forgotten the trailing comma rule for calls can mistakenly read it as making the arg a tuple. So +1 on removing it. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 17:29:23 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Fri, 19 May 2017 21:29:23 +0000 Subject: [issue30406] async and await should be keywords in 3.7 In-Reply-To: <1495229262.01.0.300246152317.issue30406@psf.upfronthosting.co.za> Message-ID: <1495229363.96.0.67561157885.issue30406@psf.upfronthosting.co.za> Changes by Jelle Zijlstra : ---------- pull_requests: +1763 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 17:34:42 2017 From: report at bugs.python.org (kelly hirai) Date: Fri, 19 May 2017 21:34:42 +0000 Subject: [issue30407] ipaddress ver. 1.0.14 IPv4Network off by 1 Message-ID: <1495229682.89.0.370209437456.issue30407@psf.upfronthosting.co.za> New submission from kelly hirai: for x in ipaddress.IPv4Network(u"192.168.0.0/23").hosts(): print x contains 192.168.1.0 but does not contain 192.168.1.255 ipaddress version 1.0.14 ---------- messages: 293978 nosy: kghongaku priority: normal severity: normal status: open title: ipaddress ver. 1.0.14 IPv4Network off by 1 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 17:43:52 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 May 2017 21:43:52 +0000 Subject: [issue30403] Running extension modules using -m switch In-Reply-To: <1495192842.98.0.357031276673.issue30403@psf.upfronthosting.co.za> Message-ID: <1495230232.36.0.739281638227.issue30403@psf.upfronthosting.co.za> Terry J. Reedy added the comment: What is the use case? It only make sense to run any stdlib module with -m, and without -i, if it has a command line interface (and an if __name__ clause). Otherwise, the module is created and then deleted when python exits. > py -m math > C-coded modules with such a command line interface have a mod.py file that imports _mod. The following can make sense. > py -m -i math Python x.y ... >>> math.sin(1.48973) But it is hardly needed as '-m -i math' is only one char less than 'import math' ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 17:45:35 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 May 2017 21:45:35 +0000 Subject: [issue30404] Make stdout and stderr truly unbuffered when using -u option In-Reply-To: <1495209125.34.0.468493818937.issue30404@psf.upfronthosting.co.za> Message-ID: <1495230335.25.0.332902849139.issue30404@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- title: Make stdout and stderr truly unbuffered when run with the -u option -> Make stdout and stderr truly unbuffered when using -u option _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 18:12:49 2017 From: report at bugs.python.org (kelly hirai) Date: Fri, 19 May 2017 22:12:49 +0000 Subject: [issue30407] ipaddress ver. 1.0.14 IPv4Network off by 1 In-Reply-To: <1495229682.89.0.370209437456.issue30407@psf.upfronthosting.co.za> Message-ID: <1495231969.11.0.659558431835.issue30407@psf.upfronthosting.co.za> kelly hirai added the comment: tested with 1.0.18 with same results. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 18:25:31 2017 From: report at bugs.python.org (Nir Soffer) Date: Fri, 19 May 2017 22:25:31 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1495232731.23.0.128582988311.issue29854@psf.upfronthosting.co.za> Nir Soffer added the comment: I think the issue can be solved in readline or in the code using it, but I don't have more time to dig into this, and I think that python should not crash in this case. I don't have an environment to test Apple editline, so I cannot test this issue. The PR includes a test case now, running the new test on OS X will tell us if this is the case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 18:57:41 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 May 2017 22:57:41 +0000 Subject: [issue30405] PCbuild.bat: register binaries for py launcher In-Reply-To: <1495223200.37.0.229712024273.issue30405@psf.upfronthosting.co.za> Message-ID: <1495234661.94.0.0606904094182.issue30405@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I presume there is already a dead registry entry problem if someone simply deletes the pythonxy directory. (I know, very bad idea.) On the other hand, deleting a git repository directory *is* the thing to do. While listing entries and paths, py could check that the path exists and delete the registry entry if it does not. I have no idea how easy it would be to expand to more than x.y and x.y-32. For myself, this is not immediately an issue as I install 64 bit versions and build the default 32 bit debug versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 19:17:53 2017 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 19 May 2017 23:17:53 +0000 Subject: [issue30403] Running extension modules using -m switch In-Reply-To: <1495192842.98.0.357031276673.issue30403@psf.upfronthosting.co.za> Message-ID: <1495235873.67.0.518581323187.issue30403@psf.upfronthosting.co.za> Petr Viktorin added the comment: It's part of a larger effort to bring the capabilities of extension modules up to par with Python ones. For example, it's one less surprise you'd get when you Cythonize a module. And it's not only for stdlib modules ? it's for any extension module. I'd be happy to answer questions here. But to get up to speed and avoid bpo comment lag, you can also see the current discussion on import-sig [0], or dig up some of the older conversations there leading up to PEP 489 (Feb-May 2015). And if you're at PyCon, you could have a high-bandwidth conversation with Nick Coghlan ? he has the master plan in his head :) [0] https://mail.python.org/pipermail/import-sig/2017-May/001072.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 19:30:57 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 19 May 2017 23:30:57 +0000 Subject: [issue23667] IDLE to provide option for making trailing whitespace visible In-Reply-To: <1426376584.28.0.267295855034.issue23667@psf.upfronthosting.co.za> Message-ID: <1495236657.16.0.740574797783.issue23667@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Terry, Should IDLE library modules get docstrings or is that something you'd rather not have? Putting the question here because ColorDelegator in colorizer.py doesn't have any docstrings. I wanted to read some of the IDLE code and I can try to add missing docstrings if it's something that should be done. Thanks! ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 19:40:41 2017 From: report at bugs.python.org (Zachary Ware) Date: Fri, 19 May 2017 23:40:41 +0000 Subject: [issue30405] PCbuild.bat: register binaries for py launcher In-Reply-To: <1495223200.37.0.229712024273.issue30405@psf.upfronthosting.co.za> Message-ID: <1495237241.78.0.598031357741.issue30405@psf.upfronthosting.co.za> Zachary Ware added the comment: Terry: Is python.bat sufficient for your uses? It's created by PCbuild/python.vcxproj, and always points to whatever interpreter you built last. If it's not enough, maybe it could be extended to invoke any already-built interpreter? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 19:44:18 2017 From: report at bugs.python.org (Eric N. Vander Weele) Date: Fri, 19 May 2017 23:44:18 +0000 Subject: [issue28845] Clean up known issues for AIX In-Reply-To: <1480542032.97.0.55863701863.issue28845@psf.upfronthosting.co.za> Message-ID: <1495237458.31.0.362817743389.issue28845@psf.upfronthosting.co.za> Changes by Eric N. Vander Weele : ---------- pull_requests: +1764 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 19:51:37 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 19 May 2017 23:51:37 +0000 Subject: [issue23674] super() documentation isn't very clear In-Reply-To: <1426448451.56.0.492486239807.issue23674@psf.upfronthosting.co.za> Message-ID: <1495237897.04.0.0533143010111.issue23674@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I don't know if it's appropriate to add this to this ticket, but on the Data Model doc page, section 3.3.2.2 for Invoking Descriptors describes Super Binding. A separate discussion with Nick in PR 1561 highlighted that section as a possible candidate for clarification. It seemed to fit in with the discussion of super() and __mro__ here. ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 20:09:47 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 20 May 2017 00:09:47 +0000 Subject: [issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat In-Reply-To: <1487766242.34.0.703380697066.issue29619@psf.upfronthosting.co.za> Message-ID: <1495238987.01.0.110224772831.issue29619@psf.upfronthosting.co.za> Martin Panter added the comment: What is the advantage of compiling calls to both Long and LongLong converters? Isn?t it simpler to blindly call PyLong_FromUnsignedLongLong or similar? ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 20:16:41 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 20 May 2017 00:16:41 +0000 Subject: [issue17188] Document 'from None' in raise statement doc. In-Reply-To: <1360631999.8.0.76627095073.issue17188@psf.upfronthosting.co.za> Message-ID: <1495239401.57.0.823469989085.issue17188@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +1765 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 20:16:45 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 20 May 2017 00:16:45 +0000 Subject: [issue17188] Document 'from None' in raise statement doc. In-Reply-To: <1360631999.8.0.76627095073.issue17188@psf.upfronthosting.co.za> Message-ID: <1495239405.97.0.589377791537.issue17188@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +1765, 1766 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 21:34:44 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 20 May 2017 01:34:44 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1495244084.22.0.019700519417.issue29854@psf.upfronthosting.co.za> Martin Panter added the comment: I suspect the test won?t be effective with Editline (either fail, or silently pass without testing the bug). From memory Editline uses an ~/.editrc file, not INPUTRC, with different syntax and configuration. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 21:36:06 2017 From: report at bugs.python.org (Eryk Sun) Date: Sat, 20 May 2017 01:36:06 +0000 Subject: [issue30405] build.bat: register binaries for py launcher In-Reply-To: <1495223200.37.0.229712024273.issue30405@psf.upfronthosting.co.za> Message-ID: <1495244166.0.0.869483216418.issue30405@psf.upfronthosting.co.za> Eryk Sun added the comment: The launcher could be extended to support additional suffixes in the version string. Currently -32 is supported after the minor version number (e.g. 3.6-32), and (per a recent update) the latest version of the launcher will also support -64, with and without specifying the minor version number. This could be extended to support specifying an [o]fficial / [s]ource and [r]elease / [d]ebug build. A debug build wouldn't be separately registered on the system since it coexists with the release build. Instead, "d" would force the launcher to look for python_d.exe instead of python.exe. A default search would prefer an official build over a source build and a release build over a debug build. The point of supporting "o" and "r" suffixes is to force an error if an official/release build isn't available, rather than defaulting to a source/debug build. Under the hood, the INSTALLED_PYTHON struct would be extended with source_build and debug_build boolean values in addition to the bits value (which is an int but may as well be boolean). So there are up to 8 possibilities for every minor version number. MAX_INSTALLED_PYTHONS shouldn't have to be increased from 100. For example, `py -3-32d` would look for the highest 3.x 32-bit debug build and prefer an official build over a source build. `py -3-32od` would narrow the search to only official builds. `py -3-32sd` would instead narrow it to only source builds. In the latter case, the registry key would be named like "3.7-32s" to distinguish it from an official install. A build process with admin privileges would register the build in HKLM (taking care to create a "-32" key using KEY_WOW64_32KEY). Otherwise use HKCU. For convenience, build.bat could set PY_PYTHON after a successful build, to make the current source build the default for the command-line and virtual shebangs, e.g. `set PY_PYTHON=3.7sd` for a registered 64-bit debug build. This would have to be executed after an endlocal statement, since it does most of its work in a setlocal block. ---------- components: +Windows -Unicode nosy: +eryksun title: PCbuild.bat: register binaries for py launcher -> build.bat: register binaries for py launcher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 21:49:44 2017 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 20 May 2017 01:49:44 +0000 Subject: [issue30000] Inconsistency in the zlib module In-Reply-To: <1491434902.87.0.645672242128.issue30000@psf.upfronthosting.co.za> Message-ID: <1495244984.63.0.200423891568.issue30000@psf.upfronthosting.co.za> Xiang Zhang added the comment: Since Martin and Gregory support it, Ellison if you'd like you could make a PR for it. But code change alone is not enough. You need also adding corresponding tests and docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 22:02:34 2017 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 20 May 2017 02:02:34 +0000 Subject: [issue30407] ipaddress ver. 1.0.14 IPv4Network off by 1 In-Reply-To: <1495229682.89.0.370209437456.issue30407@psf.upfronthosting.co.za> Message-ID: <1495245754.76.0.878455273257.issue30407@psf.upfronthosting.co.za> Xiang Zhang added the comment: See the doc: https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Network.hosts. For hosts() method, network address and broadcast address are excluded from the result. So it's right IPv4Address('192.168.0.0') and IPv4Address('192.168.1.255') are not included. ---------- nosy: +xiang.zhang resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 22:38:07 2017 From: report at bugs.python.org (Nam) Date: Sat, 20 May 2017 02:38:07 +0000 Subject: [issue30408] [defaultdict] default_factory should accept a "key" default parameter (which can be passed my __missing__) Message-ID: <1495247887.3.0.825267700687.issue30408@psf.upfronthosting.co.za> New submission from Nam: currently default_factory does not accept any parameter. This made the default value generated by it constant among keys. If default_factory takes in key as the parameter, it should be able to generate default values based on key, which provide more flexibility to the class defaultdict. ---------- components: Extension Modules messages: 293992 nosy: namtt priority: normal severity: normal status: open title: [defaultdict] default_factory should accept a "key" default parameter (which can be passed my __missing__) versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 23:06:43 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 May 2017 03:06:43 +0000 Subject: [issue30408] [defaultdict] default_factory should accept a "key" default parameter (which can be passed my __missing__) In-Reply-To: <1495247887.3.0.825267700687.issue30408@psf.upfronthosting.co.za> Message-ID: <1495249603.0.0.362236099421.issue30408@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Take a look at the __missing__(key) method for the regular dict API to see if it meets your needs. It is in the ``d[key]`` section at https://docs.python.org/3/library/stdtypes.html#dict >>> class UpperDict(dict): def __missing__(self, key): return key.upper() >>> d = UpperDict() >>> print(d['tom']) TOM ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 23:10:48 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 May 2017 03:10:48 +0000 Subject: [issue30406] async and await should be keywords in 3.7 In-Reply-To: <1495229262.01.0.300246152317.issue30406@psf.upfronthosting.co.za> Message-ID: <1495249848.67.0.992915888943.issue30406@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 These words are here to stay. That said, Guido needs to explicitly sign-off on any new language keywords. ---------- assignee: -> gvanrossum nosy: +gvanrossum, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 23:41:44 2017 From: report at bugs.python.org (Sean McCully) Date: Sat, 20 May 2017 03:41:44 +0000 Subject: [issue30409] locale.getpreferredencoding doesn't return result Message-ID: <1495251704.43.0.135851535967.issue30409@psf.upfronthosting.co.za> New submission from Sean McCully: 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 312, in run wheel_cache File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 295, in populate_requirement_set wheel_cache=wheel_cache): File "/usr/lib/python2.7/site-packages/pip/req/req_file.py", line 84, in parse_requirements filename, comes_from=comes_from, session=session File "/usr/lib/python2.7/site-packages/pip/download.py", line 422, in get_file_content content = auto_decode(f.read()) File "/usr/lib/python2.7/site-packages/pip/utils/encoding.py", line 31, in auto_decode return data.decode(locale.getpreferredencoding(False)) TypeError: decode() argument 1 must be string, not None ---------- components: Unicode files: patchset.diff keywords: patch messages: 293995 nosy: ezio.melotti, haypo, seanmccully priority: normal pull_requests: 1767 severity: normal status: open title: locale.getpreferredencoding doesn't return result versions: Python 2.7 Added file: http://bugs.python.org/file46877/patchset.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 19 23:43:47 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 May 2017 03:43:47 +0000 Subject: [issue30405] build.bat: register binaries for py launcher In-Reply-To: <1495223200.37.0.229712024273.issue30405@psf.upfronthosting.co.za> Message-ID: <1495251827.37.0.032598664467.issue30405@psf.upfronthosting.co.za> Terry J. Reedy added the comment: >From a couple of tests, the local python.bat should be satisfactory for most of my current uses. Being part of a #30362 listing would be nice, but I don't often change my set of build binaries. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 00:18:11 2017 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 May 2017 04:18:11 +0000 Subject: [issue30406] async and await should be keywords in 3.7 In-Reply-To: <1495249848.67.0.992915888943.issue30406@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Yes, I signed off on this when I approved that PEP. On May 19, 2017 20:10, "Raymond Hettinger" wrote: > > Raymond Hettinger added the comment: > > +1 These words are here to stay. > > That said, Guido needs to explicitly sign-off on any new language keywords. > > ---------- > assignee: -> gvanrossum > nosy: +gvanrossum, rhettinger > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 01:01:02 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 May 2017 05:01:02 +0000 Subject: [issue30290] IDLE: add tests for help_about.py In-Reply-To: <1494046999.85.0.702748551727.issue30290@psf.upfronthosting.co.za> Message-ID: <1495256462.35.0.187260042361.issue30290@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 4a. Change uglyMidcap widget names and CamelCase function names to pep8_conformant names. Simplify: byline, email, docs, pyver, tkver, idlever, py_license, py_copyright, py_credits, readme, idle_news, idle_credits. 4b. Change CamelCase function names to pep8_conformant names. ShowIDLEAbout => show_readme, 5. Add docstrings For show_xyz functions, "Command for xyz button"? even though not verb? #30303 implemented 2a, improve textview and tests. Cheryl: this should be much easier than colorizer. Let me know if you want to take a stab at at least 4 and 5. ---------- dependencies: +IDLE: Add _utest to textview and add textview tests nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 01:29:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 May 2017 05:29:22 +0000 Subject: [issue30409] locale.getpreferredencoding doesn't return result In-Reply-To: <1495251704.43.0.135851535967.issue30409@psf.upfronthosting.co.za> Message-ID: <1495258162.21.0.221664645433.issue30409@psf.upfronthosting.co.za> STINNER Victor added the comment: File "/usr/lib/python2.7/site-packages/pip/utils/encoding.py", line 31, in auto_decode return data.decode(locale.getpreferredencoding(False)) TypeError: decode() argument 1 must be string, not None I'm sorry, but this issue looks like a bug in pip, not in Python. Please report the issue at https://github.com/pypa/pip/issues ---------- nosy: +dstufft resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 01:31:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 May 2017 05:31:11 +0000 Subject: [issue30409] locale.getpreferredencoding doesn't return result In-Reply-To: <1495251704.43.0.135851535967.issue30409@psf.upfronthosting.co.za> Message-ID: <1495258271.04.0.954001282667.issue30409@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, I'm sorry, I read too fast. I didn't notice the pull request. It seems like a real bug in Python 2.7. ---------- resolution: third party -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 01:32:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 May 2017 05:32:26 +0000 Subject: [issue30409] locale.getpreferredencoding doesn't return result In-Reply-To: <1495251704.43.0.135851535967.issue30409@psf.upfronthosting.co.za> Message-ID: <1495258346.67.0.792985870956.issue30409@psf.upfronthosting.co.za> STINNER Victor added the comment: In fact, it seems like I introduced a regression in bpo-6393, commit 94a3694c3dda97e3bcb51264bf47d948c5424d84. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 01:34:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 May 2017 05:34:28 +0000 Subject: [issue30409] locale.getpreferredencoding doesn't return result In-Reply-To: <1495251704.43.0.135851535967.issue30409@psf.upfronthosting.co.za> Message-ID: <1495258468.59.0.855843375015.issue30409@psf.upfronthosting.co.za> STINNER Victor added the comment: > In fact, it seems like I introduced a regression in bpo-6393, commit 94a3694c3dda97e3bcb51264bf47d948c5424d84. I backported this commit, but I didn't notice the bug in the code... In fact, this commit was followed by the commit 6a448d4c2eac16af4c451b43c6dc46cf287b1671. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 01:40:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 May 2017 05:40:31 +0000 Subject: [issue30406] async and await should be keywords in 3.7 In-Reply-To: <1495229262.01.0.300246152317.issue30406@psf.upfronthosting.co.za> Message-ID: <1495258831.31.0.869498372235.issue30406@psf.upfronthosting.co.za> STINNER Victor added the comment: It's time to remove Yury's hacks from the parser and get a sane syntax ;-) I agree to make async and await real keywords! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 01:44:00 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 May 2017 05:44:00 +0000 Subject: [issue30290] IDLE: add tests for help_about.py In-Reply-To: <1494046999.85.0.702748551727.issue30290@psf.upfronthosting.co.za> Message-ID: <1495259040.15.0.816263435655.issue30290@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Follow-up issues. A. Move code and tests into help.py and test_help.py. B. Improve content: 1) #25224; 2) remove or update credits; 3) reconsider each item. C. Improve appearance: 1) ttk widgets; 2) Redo entire look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 01:44:38 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 May 2017 05:44:38 +0000 Subject: [issue23667] IDLE to provide option for making trailing whitespace visible In-Reply-To: <1426376584.28.0.267295855034.issue23667@psf.upfronthosting.co.za> Message-ID: <1495259078.36.0.148178258331.issue23667@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Louie: It appears that old PRs might merge as they are but any change, including an update merge, requires that you close and re-open. When you re-open, please add "was prnnnn". It would be easier for me if you redid all the IDLE PRs in a batch or two. Cheryl: Yes. Idlelib callables need docstrings, especially because they are not otherwise documented. Based on our work on bdb, I was hoping you would work on IDLE. I added you to #30290 Some of the colorizer functions are hard to usefully characterize. This is parly because everything is done by side-effect and most functions have multiple side-effects. There is a connection between the lack of docstrings and the vestigial nature of test_colorizer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 01:48:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 May 2017 05:48:08 +0000 Subject: [issue25794] __setattr__ does not always overload operators In-Reply-To: <1449219157.0.0.30103039285.issue25794@psf.upfronthosting.co.za> Message-ID: <1495259288.75.0.888629563852.issue25794@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset d896985bb2de49046f9b6879e906d1e4db255e23 by Serhiy Storchaka in branch 'master': bpo-25794: Fix `type.__setattr__()` for non-interned attribute names. (#1652) https://github.com/python/cpython/commit/d896985bb2de49046f9b6879e906d1e4db255e23 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 01:51:45 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 20 May 2017 05:51:45 +0000 Subject: [issue30408] [defaultdict] default_factory should accept a "key" default parameter (which can be passed my __missing__) In-Reply-To: <1495247887.3.0.825267700687.issue30408@psf.upfronthosting.co.za> Message-ID: <1495259505.66.0.167607260333.issue30408@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I think this should be closed. For backwards compatibility, the defaultdict default_factory function must remain as it is. There is lots of code that uses something like `int` or `list` as the factory, and if the missing key was to be passed, the code would break. As Raymond says, if you need the key passed to your factory, you can subclass dict and give it a __missing__ method. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 01:55:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 May 2017 05:55:03 +0000 Subject: [issue25794] __setattr__ does not always overload operators In-Reply-To: <1449219157.0.0.30103039285.issue25794@psf.upfronthosting.co.za> Message-ID: <1495259703.33.0.0454361696654.issue25794@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1768 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 01:59:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 May 2017 05:59:27 +0000 Subject: [issue25794] __setattr__ does not always overload operators In-Reply-To: <1449219157.0.0.30103039285.issue25794@psf.upfronthosting.co.za> Message-ID: <1495259967.14.0.392113242564.issue25794@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1769 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 02:04:26 2017 From: report at bugs.python.org (Sean McCully) Date: Sat, 20 May 2017 06:04:26 +0000 Subject: [issue30409] locale.getpreferredencoding doesn't return result In-Reply-To: <1495258468.59.0.855843375015.issue30409@psf.upfronthosting.co.za> Message-ID: <825555346.1753862.1495260023144@mail.yahoo.com> Sean McCully added the comment: ok,? is this a valid fix then? On Saturday, May 20, 2017 1:34 AM, STINNER Victor wrote: STINNER Victor added the comment: > In fact, it seems like I introduced a regression in bpo-6393, commit 94a3694c3dda97e3bcb51264bf47d948c5424d84. I backported this commit, but I didn't notice the bug in the code... In fact, this commit was followed by the commit 6a448d4c2eac16af4c451b43c6dc46cf287b1671. ---------- _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 02:07:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 May 2017 06:07:00 +0000 Subject: [issue30409] locale.getpreferredencoding doesn't return result In-Reply-To: <825555346.1753862.1495260023144@mail.yahoo.com> Message-ID: STINNER Victor added the comment: > ok, is this a valid fix then? Yes, totally. Sorry, ignore my first comment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 02:12:42 2017 From: report at bugs.python.org (Nam) Date: Sat, 20 May 2017 06:12:42 +0000 Subject: [issue30408] [defaultdict] default_factory should accept a "key" default parameter (which can be passed my __missing__) In-Reply-To: <1495247887.3.0.825267700687.issue30408@psf.upfronthosting.co.za> Message-ID: <1495260762.25.0.654473105414.issue30408@psf.upfronthosting.co.za> Nam added the comment: Sure, thanks Raymond and Steven for your thoughts. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 02:20:04 2017 From: report at bugs.python.org (Decorater) Date: Sat, 20 May 2017 06:20:04 +0000 Subject: [issue30409] locale.getpreferredencoding doesn't return result In-Reply-To: <1495251704.43.0.135851535967.issue30409@psf.upfronthosting.co.za> Message-ID: <1495261204.03.0.834507991987.issue30409@psf.upfronthosting.co.za> Changes by Decorater : Added file: http://bugs.python.org/file46878/suggested_change.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 02:41:46 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 May 2017 06:41:46 +0000 Subject: [issue25794] __setattr__ does not always overload operators In-Reply-To: <1449219157.0.0.30103039285.issue25794@psf.upfronthosting.co.za> Message-ID: <1495262506.59.0.695021805991.issue25794@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1770 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 02:48:30 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 May 2017 06:48:30 +0000 Subject: [issue17188] Document 'from None' in raise statement doc. In-Reply-To: <1360631999.8.0.76627095073.issue17188@psf.upfronthosting.co.za> Message-ID: <1495262910.52.0.165417758242.issue17188@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 763557eac06ba60d7c5133e4f80df8870d8f917e by terryjreedy (csabella) in branch 'master': bpo-17188: DOC: Document 'from None' in raise statement (#1671) https://github.com/python/cpython/commit/763557eac06ba60d7c5133e4f80df8870d8f917e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 02:48:50 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 May 2017 06:48:50 +0000 Subject: [issue23674] super() documentation isn't very clear In-Reply-To: <1426448451.56.0.492486239807.issue23674@psf.upfronthosting.co.za> Message-ID: <1495262930.55.0.243978048232.issue23674@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Martin, can we just fix the signature here. It is not the purpose of the super docs explain the MRO (that is a feature of all new-style classes, super() is just something that hops to the next in the chain) or to be a tutorial. I would like to keep the rest of the docs mostly as-is. These docs have already been refined multiple times and proven themselves usable for a lot of user). The only part that wasn't previously edited was the parameter names for the signature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 02:51:30 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 May 2017 06:51:30 +0000 Subject: [issue17188] Document 'from None' in raise statement doc. In-Reply-To: <1360631999.8.0.76627095073.issue17188@psf.upfronthosting.co.za> Message-ID: <1495263090.38.0.321104764488.issue17188@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The double listing seems to be a glitch. Either someone else does backport or online doc change waits until I can do it. ---------- assignee: docs at python -> terry.reedy stage: patch review -> backport needed versions: +Python 3.6, Python 3.7 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 02:54:29 2017 From: report at bugs.python.org (Steve Barnes) Date: Sat, 20 May 2017 06:54:29 +0000 Subject: [issue30362] Launcher add list and list with paths options In-Reply-To: <1494753197.17.0.253655325044.issue30362@psf.upfronthosting.co.za> Message-ID: <1495263269.46.0.872283661552.issue30362@psf.upfronthosting.co.za> Steve Barnes added the comment: @terry.reedy - Very good points and I like the shortness of -0 note that there is already an accepted change to allow -x.y-64 to specifically require the 64 bit versions so we don't need the complex logic to distinguish cases where -x.y will run 32 bit because there is no 64 bit verses -x.y will run 64 bit and -x.y-32 will run 32 bit so I haven't implemented that complex logic. I have put a tab between the run flag and the path as I find that is easier to detect than some number of spaces. Found that I needed to move the test for -0 nearer the top as 0 is a potentially valid version specifier, (isdigit). Also modified the "not found" message to mention -0 as an option for discovery. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 03:04:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 May 2017 07:04:55 +0000 Subject: [issue25794] __setattr__ does not always overload operators In-Reply-To: <1449219157.0.0.30103039285.issue25794@psf.upfronthosting.co.za> Message-ID: <1495263895.53.0.667448503852.issue25794@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset e9f9b042781e3cb480315860bcdf7b7d22cba0f8 by Serhiy Storchaka in branch '2.7': [2.7] bpo-25794: Fix `type.__setattr__()` for non-interned or unicode attribute names. (GH-1652) (#1675) https://github.com/python/cpython/commit/e9f9b042781e3cb480315860bcdf7b7d22cba0f8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 03:22:43 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 20 May 2017 07:22:43 +0000 Subject: [issue30403] Running extension modules using -m switch In-Reply-To: <1495192842.98.0.357031276673.issue30403@psf.upfronthosting.co.za> Message-ID: <1495264963.93.0.772985814313.issue30403@psf.upfronthosting.co.za> Nick Coghlan added the comment: As a high level overview of the general idea: we'd like it to be almost entirely transparent to the end user as to whether a particular module is implemented as normal Python source code, a precompiled bytecode/wordcode file, or a precompiled Cython extension module (or equivalent). At the moment, this is pretty close to being true for source code vs precompiled bytecode/wordcode when it comes to both imports and execution as a script. The main missing piece there is to implement source code maps for generating more informative tracebacks given only the precompiled form (perhaps by borrowing JavaScript's "source map" concept) For extension modules, the original multi-phase initialisation PEP got this pretty close to being true for the import case - things like reload() can now work much the same way they do for pure Python and pyc files if a module author (or module generation tool) cares to make it so. However, we don't yet support the use of extension modules as scripts, neither for direct execution, nor via the `-m` switch, so it's impossible for a tool like Cython to handle that transparently - if a module exposes functionality via -m, then migrating it directly to Cython will break than behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 03:23:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 May 2017 07:23:33 +0000 Subject: [issue25794] __setattr__ does not always overload operators In-Reply-To: <1449219157.0.0.30103039285.issue25794@psf.upfronthosting.co.za> Message-ID: <1495265013.55.0.332646921256.issue25794@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 193f7e094f070cecbc6faea6dffafb80ea9e7536 by Serhiy Storchaka in branch '3.6': [3.6] bpo-25794: Fix `type.__setattr__()` for non-interned attribute names. (GH-1652) (#1673) https://github.com/python/cpython/commit/193f7e094f070cecbc6faea6dffafb80ea9e7536 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 03:24:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 May 2017 07:24:00 +0000 Subject: [issue25794] __setattr__ does not always overload operators In-Reply-To: <1449219157.0.0.30103039285.issue25794@psf.upfronthosting.co.za> Message-ID: <1495265040.09.0.60941265755.issue25794@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 4a86fe9d3f5e7af6f019ae22536eec228f04e22e by Serhiy Storchaka in branch '3.5': [3.5] bpo-25794: Fix `type.__setattr__()` for non-interned attribute names. (GH-1652) (#1674) https://github.com/python/cpython/commit/4a86fe9d3f5e7af6f019ae22536eec228f04e22e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 03:25:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 May 2017 07:25:38 +0000 Subject: [issue25794] __setattr__ does not always overload operators In-Reply-To: <1449219157.0.0.30103039285.issue25794@psf.upfronthosting.co.za> Message-ID: <1495265137.99.0.748539780099.issue25794@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 03:45:54 2017 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 20 May 2017 07:45:54 +0000 Subject: [issue30378] SysLogHandler does not support IPv6 destinations In-Reply-To: <1494944599.91.0.527371158049.issue30378@psf.upfronthosting.co.za> Message-ID: <1495266354.07.0.589090768074.issue30378@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +1771 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 03:49:31 2017 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 20 May 2017 07:49:31 +0000 Subject: [issue30378] SysLogHandler does not support IPv6 destinations In-Reply-To: <1494944599.91.0.527371158049.issue30378@psf.upfronthosting.co.za> Message-ID: <1495266571.42.0.528165371169.issue30378@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +vinay.sajip, xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 04:13:01 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 May 2017 08:13:01 +0000 Subject: [issue30403] Running extension modules using -m switch In-Reply-To: <1495192842.98.0.357031276673.issue30403@psf.upfronthosting.co.za> Message-ID: <1495267981.77.0.583566084313.issue30403@psf.upfronthosting.co.za> Terry J. Reedy added the comment: So a use case might be that someone could compile all the stdlib .py modules with cython, as they are, without touching the code, and have the result be a drop-in replacement. I'd like that to be possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 04:58:49 2017 From: report at bugs.python.org (Paul Moore) Date: Sat, 20 May 2017 08:58:49 +0000 Subject: [issue30410] Documentation for sys.stdout encoding does not reflect the new Windows behavior in Python 3.6+ Message-ID: <1495270729.75.0.717879181788.issue30410@psf.upfronthosting.co.za> New submission from Paul Moore: The documentation for the encoding of sys.stdin/out/err (see https://docs.python.org/3.6/library/sys.html#sys.stdout) does not reflect the change in Python 3.6 on Windows to use the console Unicode APIs, and hence UTF-8 for the encoding. ---------- assignee: docs at python components: Documentation, Windows keywords: easy messages: 294020 nosy: docs at python, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Documentation for sys.stdout encoding does not reflect the new Windows behavior in Python 3.6+ type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 05:29:22 2017 From: report at bugs.python.org (Yuan Liu) Date: Sat, 20 May 2017 09:29:22 +0000 Subject: [issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac Message-ID: <1495272562.29.0.0547762381804.issue30411@psf.upfronthosting.co.za> New submission from Yuan Liu: git doesn't support "-C" args under 1.8.5 occurs in configure.ac as I noticed from git release notes in 1.8.5: * Just like "make -C ", "git -C ..." tells Git to go there before doing anything else. So we should have some conditional statements in configure.ac around git checkpoint, otherwise we got error message which is : Unknown option: -C usage: git [--version] [--help] [-c name=value] [--exec-path[=]] [--html-path] [--man-path] [--info-path] [-p|--paginate|--no-pager] [--no-replace-objects] [--bare] [--git-dir=] [--work-tree=] [--namespace=] [] ---------- messages: 294021 nosy: Yuan Liu priority: normal severity: normal status: open title: git doesn't support "-C" args under 1.8.5 occurs in configure.ac versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 05:30:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 May 2017 09:30:04 +0000 Subject: [issue27945] Various segfaults with dict In-Reply-To: <1472852008.61.0.354257945943.issue27945@psf.upfronthosting.co.za> Message-ID: <1495272604.68.0.993663736641.issue27945@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 753bca3934a7618a4fa96e107ad1c5c18633a683 by Serhiy Storchaka in branch 'master': bpo-27945: Fixed various segfaults with dict. (#1657) https://github.com/python/cpython/commit/753bca3934a7618a4fa96e107ad1c5c18633a683 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 05:35:51 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 20 May 2017 09:35:51 +0000 Subject: [issue20751] Misleading descriptor protocol documentation: direct call, super binding In-Reply-To: <1393193636.36.0.125202538555.issue20751@psf.upfronthosting.co.za> Message-ID: <1495272951.58.0.701844451143.issue20751@psf.upfronthosting.co.za> Martin Panter added the comment: Lower-case ?a? is defined at the top of the list: ?The starting point . . . is ?a.x?.? The last entry may fit in better if it was written ?If binding to an instance of ?super? ?. The problem with the m() call is also mentioned in Issue 25777, about the descriptor how-to. Issue 12077 seems to be largely about the __get__ signature. ---------- dependencies: +Harmonizing descriptor protocol documentation nosy: +martin.panter, rhettinger stage: -> needs patch title: Misleading examples in the descriptor protocol documentation -> Misleading descriptor protocol documentation: direct call, super binding versions: +Python 2.7, Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 05:38:20 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 May 2017 09:38:20 +0000 Subject: [issue27945] Various segfaults with dict In-Reply-To: <1472852008.61.0.354257945943.issue27945@psf.upfronthosting.co.za> Message-ID: <1495273100.85.0.3032480834.issue27945@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1772 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 05:43:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 May 2017 09:43:15 +0000 Subject: [issue27945] Various segfaults with dict In-Reply-To: <1472852008.61.0.354257945943.issue27945@psf.upfronthosting.co.za> Message-ID: <1495273395.25.0.434121375272.issue27945@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1773 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 05:46:27 2017 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 May 2017 09:46:27 +0000 Subject: [issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac In-Reply-To: <1495272562.29.0.0547762381804.issue30411@psf.upfronthosting.co.za> Message-ID: <1495273587.98.0.631855141844.issue30411@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +1774 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 06:06:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 May 2017 10:06:28 +0000 Subject: [issue27945] Various segfaults with dict In-Reply-To: <1472852008.61.0.354257945943.issue27945@psf.upfronthosting.co.za> Message-ID: <1495274788.45.0.63991586006.issue27945@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 564398af6ccb34d0db8b6e2537830eca285689e5 by Serhiy Storchaka in branch '3.6': [3.6] bpo-27945: Fixed various segfaults with dict. (GH-1657) (#1677) https://github.com/python/cpython/commit/564398af6ccb34d0db8b6e2537830eca285689e5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 06:06:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 May 2017 10:06:49 +0000 Subject: [issue27945] Various segfaults with dict In-Reply-To: <1472852008.61.0.354257945943.issue27945@psf.upfronthosting.co.za> Message-ID: <1495274809.52.0.156583913284.issue27945@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 2f7f533cf6fb57fcedcbc7bd454ac59fbaf2c655 by Serhiy Storchaka in branch '3.5': [3.5] bpo-27945: Fixed various segfaults with dict. (GH-1657) (#1678) https://github.com/python/cpython/commit/2f7f533cf6fb57fcedcbc7bd454ac59fbaf2c655 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 06:09:03 2017 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 May 2017 10:09:03 +0000 Subject: [issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac In-Reply-To: <1495272562.29.0.0547762381804.issue30411@psf.upfronthosting.co.za> Message-ID: <1495274943.32.0.310771051862.issue30411@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +1775 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 06:32:19 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 20 May 2017 10:32:19 +0000 Subject: [issue23674] super() documentation isn't very clear In-Reply-To: <1426448451.56.0.492486239807.issue23674@psf.upfronthosting.co.za> Message-ID: <1495276339.05.0.214051194714.issue23674@psf.upfronthosting.co.za> Martin Panter added the comment: Cheryl: see also Issue 25777 and Issue 20751, both about the ?super binding? under Invoking Descriptors. Raymond: if you want to just pick parts of my patch, go for it. But I don?t understand your concern about explaining the MRO. I think it is important to explain which base classes are skipped, and which are searched. It is not just the type/subclass (super.__thisclass__) entry in the MRO that is skipped; this parameter determines the starting point, so the preceding entries are also skipped. Another problem with referring to ?getattr? is that it checks for instance attributes and custom __getattr__ and __getattribute__ implementations, but I don?t think ?super? does any of that. Looking at my patch now, I would propose that the exception message only be changed in the current (3.7) branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 20 06:40:20 2017 From: report at bugs.python.org (=?utf-8?b?0JDRgNGC0YPRgCDQmtC70LXRgdGD0L0=?=) Date: Sat, 20 May 2017 10:40:20 +0000 Subject: [issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers In-Reply-To: <1273759972.28.0.178671810955.issue8704@psf.upfronthosting.co.za> Message-ID: <1495276820.53.0.606918425085.issue8704@psf.upfronthosting.co.za> ????? ?????? added the comment: Apache started strict check of headers ch aracters to be valid recently. That causes it fail on "<--: spam". ``` [Sat May 20 13:09:23.056673 2017] [http:error] [pid 26379] [client 12.34.567.41:60988] AH02429: Response header name '