From report at bugs.python.org Sat Jun 1 00:07:01 2019 From: report at bugs.python.org (=?utf-8?b?5p6X6Ieq5Z2H?=) Date: Sat, 01 Jun 2019 04:07:01 +0000 Subject: [issue37119] Equality on dict.values() are inconsistent between 2 and 3 Message-ID: <1559362021.42.0.783299654915.issue37119@roundup.psfhosted.org> New submission from ??? : When I create 2 different dicts with the same literal, their dict.values() are equal in python2 but not equal in python3. Here is an example in python2: $ python2 Python 2.7.16 (default, Mar 4 2019, 09:02:22) [GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.11.45.5)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> a = {'hello': 'world'} >>> b = {'hello': 'world'} >>> a.values() == b.values() True >>> a.keys() == b.keys() True However, the dict.values() are not equal in python3: $ python3 Python 3.7.2 (default, Feb 12 2019, 08:16:38) [Clang 10.0.0 (clang-1000.11.45.5)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> a = {'hello': 'world'} >>> b = {'hello': 'world'} >>> a.values() == b.values() False >>> a.keys() == b.keys() True Is this a bug? Or is this behavior specified somewhere in the documentation? Thanks. Note: it's inspired by this StackOverflow question: https://stackoverflow.com/questions/56403613/questions-about-python-dictionary-equality ---------- components: Library (Lib) messages: 344145 nosy: johnlinp priority: normal severity: normal status: open title: Equality on dict.values() are inconsistent between 2 and 3 type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 00:14:00 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 04:14:00 +0000 Subject: [issue29984] Improve test coverage for 'heapq' module In-Reply-To: <1491336159.04.0.480090056771.issue29984@psf.upfronthosting.co.za> Message-ID: <1559362440.55.0.534189985117.issue29984@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 664fe3996f7e05ae351526f02b21504bb065bcf8 by Raymond Hettinger (Rob Day) in branch 'master': bpo-29984: Improve 'heapq' test coverage (GH-992) https://github.com/python/cpython/commit/664fe3996f7e05ae351526f02b21504bb065bcf8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 00:17:03 2019 From: report at bugs.python.org (Windson Yang) Date: Sat, 01 Jun 2019 04:17:03 +0000 Subject: [issue37073] clarify functions docs in IO modules and Bytes Objects In-Reply-To: <1559027884.63.0.0963085588001.issue37073@roundup.psfhosted.org> Message-ID: <1559362623.65.0.249662990398.issue37073@roundup.psfhosted.org> Windson Yang added the comment: Sure. Feel free to edit my PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 00:26:41 2019 From: report at bugs.python.org (Windson Yang) Date: Sat, 01 Jun 2019 04:26:41 +0000 Subject: [issue37073] clarify functions docs in IO modules and Bytes Objects In-Reply-To: <1559027884.63.0.0963085588001.issue37073@roundup.psfhosted.org> Message-ID: <1559363201.34.0.53216205895.issue37073@roundup.psfhosted.org> Change by Windson Yang : ---------- keywords: +patch pull_requests: +13600 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13713 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 00:29:06 2019 From: report at bugs.python.org (Eric Snow) Date: Sat, 01 Jun 2019 04:29:06 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1559363346.89.0.750736214517.issue33608@roundup.psfhosted.org> Change by Eric Snow : ---------- pull_requests: +13601 pull_request: https://github.com/python/cpython/pull/13714 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 00:30:17 2019 From: report at bugs.python.org (Eric Snow) Date: Sat, 01 Jun 2019 04:30:17 +0000 Subject: [issue36818] Add PyInterpreterState.runtime. In-Reply-To: <1557168344.92.0.643564511932.issue36818@roundup.psfhosted.org> Message-ID: <1559363417.83.0.107923528065.issue36818@roundup.psfhosted.org> Change by Eric Snow : ---------- resolution: rejected -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 00:34:23 2019 From: report at bugs.python.org (Windson Yang) Date: Sat, 01 Jun 2019 04:34:23 +0000 Subject: [issue37073] clarify functions docs in IO modules and Bytes Objects In-Reply-To: <1559027884.63.0.0963085588001.issue37073@roundup.psfhosted.org> Message-ID: <1559363663.59.0.743479241232.issue37073@roundup.psfhosted.org> Change by Windson Yang : ---------- pull_requests: +13602 pull_request: https://github.com/python/cpython/pull/13715 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 00:42:29 2019 From: report at bugs.python.org (Berker Peksag) Date: Sat, 01 Jun 2019 04:42:29 +0000 Subject: [issue14014] codecs.StreamWriter.reset contract not fulfilled In-Reply-To: <1329242513.77.0.581823861095.issue14014@psf.upfronthosting.co.za> Message-ID: <1559364149.98.0.537317347582.issue14014@roundup.psfhosted.org> Change by Berker Peksag : ---------- pull_requests: +13603 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13716 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 01:05:29 2019 From: report at bugs.python.org (Nathaniel Smith) Date: Sat, 01 Jun 2019 05:05:29 +0000 Subject: [issue37120] Provide knobs to disable session ticket generation on TLS 1.3 Message-ID: <1559365529.23.0.311490427939.issue37120@roundup.psfhosted.org> New submission from Nathaniel Smith : Maybe we should expose the SSL_CTX_set_num_tickets function: https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_num_tickets.html This is a new function added in OpenSSL 1.1.1, that lets you control the number of tickets issued by a TLS 1.3 connection. It turns out that by default, openssl 1.1.1 issues 2 tickets at the end of the server handshake. In principle this can cause deadlocks and data corruption: https://github.com/openssl/openssl/issues/7967 https://github.com/openssl/openssl/issues/7948 And my problem specifically is that this pretty much kills all of Trio's fancy protocol testing helpers, because any protocol that's built on top of TLS is automatically broken as far as the helpers are concerned. And they're right. Right now I have to disable TLS 1.3 entirely to get Trio's test suite to avoid deadlocking. Hopefully the openssl devs will fix this, but so far their latest comment is that they consider this a feature and so they think it has to stay broken for at least RHEL 8's lifetime. Currently the only workaround is to either disable TLS 1.3, or disable tickets. But the 'ssl' module doesn't expose any way to control tickets. This issue proposes to add that. Fortunately, exposing SSL_CTX_set_num_tickets should be pretty trivial, at least in theory. Questions: Do we have a preferred convention for how to expose these kinds of settings at the Python level? Attribute on SSLContext? There's both an SSL* and a SSL_CTX* ? I guess the CTX version is sufficient, or is there another convention? As a bonus complication, openssl sometimes ignores the configured number of tickets, and uses a completely different mechanism: > The default number of tickets is 2; the default number of tickets sent following a resumption handshake is 1 but this cannot be changed using these functions. The number of tickets following a resumption handshake can be reduced to 0 using custom session ticket callbacks (see https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_session_ticket_cb.html) Do we want to open the can-of-worms involved in wrapping this too? I think if we only wrapped SSL_CTX_set_num_tickets then that would be enough to let me kluge my tests into passing and pretend that things are just fine, so long as we don't test session resumption... ---------- assignee: christian.heimes components: SSL messages: 344148 nosy: alex, christian.heimes, dstufft, janssen, njs priority: normal severity: normal status: open title: Provide knobs to disable session ticket generation on TLS 1.3 type: enhancement versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 01:24:36 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sat, 01 Jun 2019 05:24:36 +0000 Subject: [issue36411] Python 3 f.tell() gets out of sync with file pointer in binary append+read mode In-Reply-To: <1553387625.02.0.693122073587.issue36411@roundup.psfhosted.org> Message-ID: <1559366676.89.0.413175326606.issue36411@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- keywords: +patch pull_requests: +13604 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13717 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 01:33:47 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 01 Jun 2019 05:33:47 +0000 Subject: [issue37119] Equality on dict.values() are inconsistent between 2 and 3 In-Reply-To: <1559362021.42.0.783299654915.issue37119@roundup.psfhosted.org> Message-ID: <1559367227.39.0.549643507695.issue37119@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: https://docs.python.org/3/library/stdtypes.html#dictionary-view-objects > Keys views are set-like since their entries are unique and hashable. If all values are hashable, so that (key, value) pairs are unique and hashable, then the items view is also set-like. (Values views are not treated as set-like since the entries are generally not unique.) For set-like views, all of the operations defined for the abstract base class collections.abc.Set are available (for example, ==, <, or ^). In Python 2 keys() and values() return a list where __eq__ is implemented. In Python 3 view objects are returned. This can be seen in Python 2 also using viewkeys and viewvalues where viewvalues() is False. So this is not a bug but I am not sure if docs can be improved to clarify this further. $ python2 Python 2.7.14 (default, Mar 12 2018, 13:54:56) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> a = {'a': 1} >>> b = {'a': 1} >>> a.viewkeys() == b.viewkeys() True >>> a.viewvalues() == b.viewvalues() False >>> a.values() == b.values() True ---------- nosy: +rhettinger, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 02:08:29 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jun 2019 06:08:29 +0000 Subject: [issue37119] Equality on dict.values() are inconsistent between 2 and 3 In-Reply-To: <1559362021.42.0.783299654915.issue37119@roundup.psfhosted.org> Message-ID: <1559369309.91.0.123423884331.issue37119@roundup.psfhosted.org> Serhiy Storchaka added the comment: See also issue12445. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> dict view values objects are missing tp_richcmp and tp_as_number _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 02:16:00 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sat, 01 Jun 2019 06:16:00 +0000 Subject: [issue36411] Python 3 f.tell() gets out of sync with file pointer in binary append+read mode In-Reply-To: <1553387625.02.0.693122073587.issue36411@roundup.psfhosted.org> Message-ID: <1559369760.41.0.244772940397.issue36411@roundup.psfhosted.org> Jeffrey Kintscher added the comment: Further testing revealed the problem and fix also apply to text mode. I submitted a pull request to fix this issue with tests for both binary and text mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 02:33:25 2019 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 01 Jun 2019 06:33:25 +0000 Subject: [issue18911] minidom does not encode correctly when calling Document.writexml In-Reply-To: <1378186619.58.0.930376227557.issue18911@psf.upfronthosting.co.za> Message-ID: <1559370805.15.0.0616618888819.issue18911@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset 5ac0b988fd5f1428efe35329c531c7b5c74d37f6 by Stefan Behnel (Windson yang) in branch 'master': bpo-18911: clarify that the minidom XML writer receives texts but not bytes (GH-13352) https://github.com/python/cpython/commit/5ac0b988fd5f1428efe35329c531c7b5c74d37f6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 02:34:15 2019 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 01 Jun 2019 06:34:15 +0000 Subject: [issue18911] minidom does not encode correctly when calling Document.writexml In-Reply-To: <1378186619.58.0.930376227557.issue18911@psf.upfronthosting.co.za> Message-ID: <1559370855.74.0.297719687503.issue18911@roundup.psfhosted.org> Change by Stefan Behnel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 02:36:41 2019 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 01 Jun 2019 06:36:41 +0000 Subject: [issue18911] minidom does not encode correctly when calling Document.writexml In-Reply-To: <1378186619.58.0.930376227557.issue18911@psf.upfronthosting.co.za> Message-ID: <1559371001.67.0.404689822353.issue18911@roundup.psfhosted.org> Change by Stefan Behnel : ---------- resolution: fixed -> stage: resolved -> backport needed status: closed -> open versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 02:40:04 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 01 Jun 2019 06:40:04 +0000 Subject: [issue18911] minidom does not encode correctly when calling Document.writexml In-Reply-To: <1378186619.58.0.930376227557.issue18911@psf.upfronthosting.co.za> Message-ID: <1559371204.72.0.729336246963.issue18911@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13605 stage: backport needed -> patch review pull_request: https://github.com/python/cpython/pull/13718 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 02:40:08 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jun 2019 06:40:08 +0000 Subject: [issue36518] Avoid conflicts when pass arbitrary keyword arguments to Python function In-Reply-To: <1554300842.91.0.496796216897.issue36518@roundup.psfhosted.org> Message-ID: <1559371208.18.0.0646704322991.issue36518@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +13606 pull_request: https://github.com/python/cpython/pull/13700 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 02:58:57 2019 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 01 Jun 2019 06:58:57 +0000 Subject: [issue18911] minidom does not encode correctly when calling Document.writexml In-Reply-To: <1378186619.58.0.930376227557.issue18911@psf.upfronthosting.co.za> Message-ID: <1559372337.14.0.217642674434.issue18911@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset 18e23f227be59241cbb1eeb6d6669771dd7275fb by Stefan Behnel (Miss Islington (bot)) in branch '3.7': bpo-18911: clarify that the minidom XML writer receives texts but not bytes (GH-13718) https://github.com/python/cpython/commit/18e23f227be59241cbb1eeb6d6669771dd7275fb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 03:00:02 2019 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 01 Jun 2019 07:00:02 +0000 Subject: [issue18911] minidom does not encode correctly when calling Document.writexml In-Reply-To: <1378186619.58.0.930376227557.issue18911@psf.upfronthosting.co.za> Message-ID: <1559372402.39.0.139598760142.issue18911@roundup.psfhosted.org> Change by Stefan Behnel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 03:01:26 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sat, 01 Jun 2019 07:01:26 +0000 Subject: [issue21109] tarfile: Traversal attack vulnerability In-Reply-To: <1396253659.12.0.842636239516.issue21109@psf.upfronthosting.co.za> Message-ID: <1559372486.87.0.706073420776.issue21109@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 03:21:30 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 07:21:30 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559373690.87.0.184506298288.issue35431@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 4a686504eb2bbf69adf78077458508a7ba131667 by Raymond Hettinger (Yash Aggarwal) in branch 'master': bpo-35431: Implemented math.comb (GH-11414) https://github.com/python/cpython/commit/4a686504eb2bbf69adf78077458508a7ba131667 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 03:33:22 2019 From: report at bugs.python.org (Christian Heimes) Date: Sat, 01 Jun 2019 07:33:22 +0000 Subject: [issue37120] Provide knobs to disable session ticket generation on TLS 1.3 In-Reply-To: <1559365529.23.0.311490427939.issue37120@roundup.psfhosted.org> Message-ID: <1559374402.16.0.5285752219.issue37120@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +13607 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13719 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 03:34:29 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 07:34:29 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559374469.98.0.376131407135.issue35431@roundup.psfhosted.org> Raymond Hettinger added the comment: Leaving this open for a while in case there is more work that needs to be done or any further comments to be resolved. ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 03:44:03 2019 From: report at bugs.python.org (Christian Heimes) Date: Sat, 01 Jun 2019 07:44:03 +0000 Subject: [issue37120] Provide knobs to disable session ticket generation on TLS 1.3 In-Reply-To: <1559365529.23.0.311490427939.issue37120@roundup.psfhosted.org> Message-ID: <1559375043.88.0.468897169035.issue37120@roundup.psfhosted.org> Christian Heimes added the comment: +1 for the idea Yes, for simple flags and settings, an attribute on the SSLContext is prefer. The SSLContext object is the configuration space for its connections. I would prefer to keep the setting only on the context and not clutter SSLSocket and SSLObject with additional attributes. PR 13719 goes one step further and restricts the setter to a PROTOCOL_TLS_SERVER, too. Let's look in the callback another time. I won't be able to come up with a wrapper for that in the next three days. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 03:51:22 2019 From: report at bugs.python.org (jpic) Date: Sat, 01 Jun 2019 07:51:22 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1559283982.86.0.259349738436.issue34155@roundup.psfhosted.org> Message-ID: jpic added the comment: The email API does error recovery without loading invalid domains into the domain variable which could lead to dangerous situations, example with "a at foo.": >>> email.message_from_string('From: a at foo.',policy=email.policy.default)['from'].addresses[0].domain '' In perspective with the new patch proposed by maxking that lets an invalid domain make it to the domain variable: >>> email.message_from_string('From: a at b@c.com',policy=email.policy.default)['from'].addresses[0].domain 'b at c.com' For me maxking's suggestion opens the question of where to draw the line between invalid domains should be loaded into the domain variable and what invalid domains should not be loaded into the domain variable. Another smaller advantage of of Go's net/mail behaviour is that results between parseaddr and email are consistently empty strings for an invalid domain: parseaddr does not seem able to return a list of defects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 03:55:22 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sat, 01 Jun 2019 07:55:22 +0000 Subject: [issue21872] LZMA library sometimes fails to decompress a file In-Reply-To: <1403720935.87.0.990494824612.issue21872@psf.upfronthosting.co.za> Message-ID: <1559375722.23.0.854192941847.issue21872@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 03:56:56 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 07:56:56 +0000 Subject: [issue29984] Improve test coverage for 'heapq' module In-Reply-To: <1491336159.04.0.480090056771.issue29984@psf.upfronthosting.co.za> Message-ID: <1559375816.21.0.106109371327.issue29984@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 04:00:24 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jun 2019 08:00:24 +0000 Subject: [issue37116] Use PEP 570 syntax for positional-only parameters In-Reply-To: <1559314061.29.0.391357031696.issue37116@roundup.psfhosted.org> Message-ID: <1559376024.75.0.780882081053.issue37116@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 2085bd0877e17ad4d98a4586d5eabb6faecbb190 by Serhiy Storchaka in branch 'master': bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-13700) https://github.com/python/cpython/commit/2085bd0877e17ad4d98a4586d5eabb6faecbb190 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 05:16:02 2019 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 01 Jun 2019 09:16:02 +0000 Subject: [issue37117] Simplify customization of the logging time through datefmt In-Reply-To: <1559328242.82.0.712821467925.issue37117@roundup.psfhosted.org> Message-ID: <1559380562.8.0.962113601429.issue37117@roundup.psfhosted.org> Vinay Sajip added the comment: > AFAIK, the converter attribute is only to "be set" with a function of such signature. It is not documented that it can be used and it is only used on the format time function. What do you mean by "it is not documented"? It is documented here: https://docs.python.org/3/library/logging.html#logging.Formatter.formatTime See also questions on Stack Overflow relating to it: https://stackoverflow.com/search?q=%5Bpython%5D+%5Blogging%5D+converter Not sure what you mean by "only to be set". Obviously, it is also read *somewhere* - otherwise why would you set it? > The only situation where this might break someone is if they inherit from formatter, substitute the formatTime function by their own implementation and rely on the function returning a time tuple. Doing that is relying on the implementation of the formatter though, as the docs explain is just something to be set. But the converter is documented as returning a time tuple, and there conceivably exists code that relies on that. There is no reason why someone couldn't have implemented a Formatter subclass with an overridden formatTime method that assumes the converter returns a time tuple. We can't know the impact of this change in terms of the number of people/amount of software affected, but that it might break *someone's* code is IMO enough reason not to proceed with it. > Note how you need to split the formatting of time into two different parts. It's still a one-liner both ways in your example - just a slightly different format string. Also, note that %f doesn't give you all that much flexibility - you get six places whether you like it or not. So it's hardly something which will meet everybody's formatting requirements. So "hey, just use datefmt" won't cut it for all scenarios. Ditto for timezone display - there is a school of thought that says logs should only hold UTC time. Users can always override formatTime in their Formatter subclass to do exactly what they want - it could be a one-time thing that they can then use wherever they want. I don't want to give the impression that I'm against *any* change - I'm not. You can see lots of changes in the logging codebase contributed by various people. A recent example in the area of logging Formatter is https://github.com/python/cpython/pull/9703 So by all means I welcome contributions, but you might find me a bit more conservative than you would like! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 05:19:15 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 01 Jun 2019 09:19:15 +0000 Subject: [issue36813] QueueListener not calling task_done upon termination In-Reply-To: <1557155039.79.0.434860875914.issue36813@roundup.psfhosted.org> Message-ID: <1559380755.43.0.21588502367.issue36813@roundup.psfhosted.org> miss-islington added the comment: New changeset 6b282e18877ec84e927b381b4ce187eaf4ba3dd7 by Miss Islington (bot) (Bar Harel) in branch 'master': bpo-36813: Fix QueueListener to call task_done() upon termination. (GH-13113) https://github.com/python/cpython/commit/6b282e18877ec84e927b381b4ce187eaf4ba3dd7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 05:19:21 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 01 Jun 2019 09:19:21 +0000 Subject: [issue36813] QueueListener not calling task_done upon termination In-Reply-To: <1557155039.79.0.434860875914.issue36813@roundup.psfhosted.org> Message-ID: <1559380761.86.0.540243035599.issue36813@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13608 pull_request: https://github.com/python/cpython/pull/13722 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 05:36:32 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 01 Jun 2019 09:36:32 +0000 Subject: [issue36813] QueueListener not calling task_done upon termination In-Reply-To: <1557155039.79.0.434860875914.issue36813@roundup.psfhosted.org> Message-ID: <1559381792.44.0.74699452262.issue36813@roundup.psfhosted.org> miss-islington added the comment: New changeset f286e0373feda0955c910a9fe4ef99cd2c40969e by Miss Islington (bot) in branch '3.7': bpo-36813: Fix QueueListener to call task_done() upon termination. (GH-13113) https://github.com/python/cpython/commit/f286e0373feda0955c910a9fe4ef99cd2c40969e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 05:36:25 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 01 Jun 2019 09:36:25 +0000 Subject: [issue36813] QueueListener not calling task_done upon termination In-Reply-To: <1557155039.79.0.434860875914.issue36813@roundup.psfhosted.org> Message-ID: <1559381785.02.0.568609606965.issue36813@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 05:45:07 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 01 Jun 2019 09:45:07 +0000 Subject: [issue36027] Support negative exponents in pow() where a modulus is specified. In-Reply-To: <1550520659.43.0.126744170658.issue36027@roundup.psfhosted.org> Message-ID: <1559382307.59.0.598407463508.issue36027@roundup.psfhosted.org> Mark Dickinson added the comment: I think GH-13266 is ready to go, but I'd appreciate a second pair of eyes on it if anyone has time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 05:48:20 2019 From: report at bugs.python.org (Mario Corchero) Date: Sat, 01 Jun 2019 09:48:20 +0000 Subject: [issue37117] Simplify customization of the logging time through datefmt In-Reply-To: <1559328242.82.0.712821467925.issue37117@roundup.psfhosted.org> Message-ID: <1559382500.2.0.571012311182.issue37117@roundup.psfhosted.org> Mario Corchero added the comment: > What do you mean by "it is not documented"? It is documented here: As it says: "This function uses a user-configurable function to convert the creation time to a tuple. By default, time.localtime() is used; to change this for a particular formatter instance, set the converter attribute to a function with the same signature as time.localtime() or time.gmtime(). To change it for all formatters, for example if you want all logging times to be shown in GMT, set the converter attribute in the Formatter class." I assumed it means users can set such attribute but not something in the formatter class where people will do formatter.converter(xyz). If the intention was for users to also be able to use the converter attribute then I misunderstood that. > Obviously, it is also read *somewhere* - otherwise why would you set it? The implementation of formatTime uses it only at the moment. > See also questions on Stack Overflow relating to it: https://stackoverflow.com/search?q=%5Bpython%5D+%5Blogging%5D+converter Through all the questions and answers in stackoverflow they are all setting the converter (which will still work) and some (2 I think) only are reading it when they are also setting it in the class (Example: https://stackoverflow.com/questions/6290739/python-logging-use-milliseconds-in-time-format/6290946#6290946, which by chance is effectively trying to solve the same problem brought up here). > But the converter is documented as returning a time tuple, It just says "set the converter attribute to a function with the same signature as time.localtime() or time.gmtime()" there is no reference to what the default value has, it could even be None when user is reading it. Of course, you wrote it hehe, so if you say the intent is for people to use the default formatter that is a different thing :). > but that it might break *someone's* code is IMO enough reason not to proceed with it. I looked hard and could not find any of those in Github (it does not mean that there are none indeed). I would agree on not releasing this as a patch release, but as part of a new minor I would argue that it is fair. From my point of view, it only breaks people depending on the implementation of it and using the formatter in a not common way (at least from what was seen in stackoverflow and github, there is also no cookbook that recommends doing anything like that). > It's still a one-liner both ways in your example Yeah but it requires to deeply understand how Formatter is formatting time rather than just using a template. > Users can always override formatTime in their Formatter subclass to do exactly what they want - it could be a one-time thing that they can then use wherever they want They need to copy paste this code around on all their scripts/apps or create their own library to include this. > I don't want to give the impression that I'm against *any* change - I'm not Don't worry, I can totally understand :), if you still think it is not worth pursuing this feel free to close the issue. It was an idea I thought it was worth pushing but it is totally your call (I won't take it at all personal ^^). Thanks for taking the time to answer! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 05:50:59 2019 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 01 Jun 2019 09:50:59 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1559382659.9.0.491826378077.issue37111@roundup.psfhosted.org> Vinay Sajip added the comment: > This seems like an attempt at victim blaming. Er, no, it was a straight question about whether you'd read the documentation. > I'm afraid this line of reasoning is suffering from selection bias, cherry picking, confirmation bias, and probably some others too. Er, no, it was stating that lots of people have successfully used logging on Windows with utf-8, as a way of justifying my opinion that there's no deficiency here that needs addressing. > Sure "stream" is on there, but then you need to know about streams and make the association with logging which I apparently don't. You have to remember not everyone has your level of proficiency in the language. In fact, most Python users don't. Sure, and that's fine. Experienced developers learn stuff every day too. But responding to issues takes time (notice how many people will have been notified about this issue from the "nosy list" above; each would have to spend at least some time looking at it), so raising issues should be done only after exhausting other resources to make sure that the problem isn't in one's own level of knowledge or understanding, but an actual problem with the software. This is why I earlier suggested Stack Overflow and python-list as useful resources for improving one's knowledge and understanding. > Lets put this another way - is there a reason NOT to have Unicode logging as the default? I have no idea what you mean by this. As my example illustrated, it's quite easy to log Unicode in log files. A simple Internet search for "basicConfig encoding" yields for me as the second result this Stack Overflow question https://stackoverflow.com/questions/21402530 for which the accepted answer is a slight variation on what I suggested earlier. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 05:52:25 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 01 Jun 2019 09:52:25 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559382745.85.0.424463990192.issue35431@roundup.psfhosted.org> Mark Dickinson added the comment: Thanks, Raymond. I'm planning to do a post-merge review and test this weekend. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 05:56:13 2019 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 01 Jun 2019 09:56:13 +0000 Subject: [issue37117] Simplify customization of the logging time through datefmt In-Reply-To: <1559328242.82.0.712821467925.issue37117@roundup.psfhosted.org> Message-ID: <1559382973.41.0.586762223704.issue37117@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 06:45:51 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 01 Jun 2019 10:45:51 +0000 Subject: [issue36461] timeit: Additional changes for autorange In-Reply-To: <1558762853.33.0.966475323893.issue36461@roundup.psfhosted.org> Message-ID: <20190601104543.GR4221@ando.pearwood.info> Steven D'Aprano added the comment: Sorry for the late reply. > Just a question: why we need to check ``if number == 0:``? In the > proposal you asked for None too. What changed? Even if the function is > called with False, will it hurts to keep the default value? Fair question. On rethinking, I'm okay with an explicit check for None or zero, ``if number is None or number < 0`` but I don't like the idea of accepting *any* falsey value. Calling the function with False is fine, since False == 0 but I don't think it is fine to call the function with (say) [] or {} or "", which are all falsey values. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 06:54:11 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 01 Jun 2019 10:54:11 +0000 Subject: [issue36461] timeit: Additional changes for autorange In-Reply-To: <20190601104543.GR4221@ando.pearwood.info> Message-ID: <20190601105406.GS4221@ando.pearwood.info> Steven D'Aprano added the comment: > ``if number is None or number < 0`` Sorry, that should be number == 0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 07:04:40 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 01 Jun 2019 11:04:40 +0000 Subject: [issue36411] Python 3 f.tell() gets out of sync with file pointer in binary append+read mode In-Reply-To: <1553387625.02.0.693122073587.issue36411@roundup.psfhosted.org> Message-ID: <1559387080.59.0.451507874886.issue36411@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 07:38:56 2019 From: report at bugs.python.org (Inada Naoki) Date: Sat, 01 Jun 2019 11:38:56 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1559324839.4.0.572294965949.issue36839@roundup.psfhosted.org> Message-ID: Inada Naoki added the comment: On Sat, Jun 1, 2019 at 2:47 AM Brett Cannon wrote: > > Brett Cannon added the comment: > > RE: "I think it needs significant benefits for typical users, not only for Instagram. If only Instagram get benefit from this, keep it as Instagram's internal patch." > > But who's typical in this case? You? Me? We're talking code objects, something that the typical Python user doesn't even know exists if you take "typical" to mean "common" or "majority". I suspect if we asked Python developers if they knew what lnotab was an abbreviation of they wouldn't know, let alone how it worked. > > And just because Instagram did this work and is making it public doesn't mean (a) others wouldn't use it or (b) others are already doing it privately. There are plenty of other companies with massive server installs of Python beyond Instagram. > > My point is we have to be very careful when we start to claim we know what is typical or useful to the wider community considering how huge and diverse the Python community is. > I'm sorry for bad word choice. I didn't mean "majority" or "common". For example, I was +1 for gc.freeze(), even if majority users doesn't use it. My point is (a) it's very hard others utilize it, and (b) it's very hard others confirm the benefit. And I suspect that Dino's estimation is wrong, but no one can verify the estimation because he didn't show enough concrete information. Elaborately speaking, * They need to use custom importer and serializer other than marshal to import code objects. * They need to use lightweight object for buffer. At least, memoryview object is large (192byte on Python 3.7.3 amd64). Even if Instaram can not open source their import system, they can be show more concrete data. For example, their this [1] report is very good at considering gc.freeze(). [1] https://instagram-engineering.com/dismissing-python-garbage-collection-at-instagram-4dca40b29172 While I agree that mmap pyc files is interesting idea, I feel allowing buffer object for co_code is wrong way to achieve it (*). But there are no enough data to discuss the benefit. Current status is Dino claims this idea have benefit in Instagram, but no one can confirm the benefit. I think we shouldn't discuss without reliable or reproducible data for this type of proposal. (*) One possible idea is code object have just a pointer and length for co_code, and reference to object who owns the data (mmaped file). code object can load co_lnotab and docstring lazily too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 07:47:09 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 01 Jun 2019 11:47:09 +0000 Subject: [issue36984] typing docs "versionadded" is inaccurate for many attributes In-Reply-To: <1558416035.31.0.248938950481.issue36984@roundup.psfhosted.org> Message-ID: <1559389629.15.0.463732768301.issue36984@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 08:02:14 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 01 Jun 2019 12:02:14 +0000 Subject: [issue35849] Added thousands separators to Lib/pstats.py final report In-Reply-To: <1548766331.46.0.0833286868767.issue35849@roundup.psfhosted.org> Message-ID: <1559390534.65.0.752873728357.issue35849@roundup.psfhosted.org> Cheryl Sabella added the comment: For reference, issue24084 is about increasing the size of the quicker timings. Both projects change the layout. ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 08:10:23 2019 From: report at bugs.python.org (Yash Aggarwal) Date: Sat, 01 Jun 2019 12:10:23 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559391023.4.0.814796359897.issue35431@roundup.psfhosted.org> Yash Aggarwal added the comment: Thanks @rhettinger for cleaning up the code and closing the pr. I didn't get what you meant by long, and sorry for not being much active as well. I am stuck with a pretty time consuming internship. ---------- versions: +Python 3.6 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 09:08:51 2019 From: report at bugs.python.org (Dale Visser) Date: Sat, 01 Jun 2019 13:08:51 +0000 Subject: [issue37101] Filterer.filter can be rewritten using built-ins just as efficient much more readable In-Reply-To: <1559231349.65.0.379811854452.issue37101@roundup.psfhosted.org> Message-ID: <1559394531.98.0.705741169972.issue37101@roundup.psfhosted.org> Dale Visser added the comment: I've learned a lot about the performance trade-offs of generator expressions. The only way of shortening this code (readability is subjective) that I've found not to negatively impact performance is this: def filter(self, record): rv = True for f in self.filters: if not getattr(f, 'filter', f)(record): rv = False break return rv ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 09:12:58 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jun 2019 13:12:58 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559394778.18.0.119108472111.issue36839@roundup.psfhosted.org> Serhiy Storchaka added the comment: > * They need to use lightweight object for buffer. At least, > memoryview object is large (192byte > on Python 3.7.3 amd64). Actually it is larger, because you should add the size of internal objects. In 3.8: >>> sys.getsizeof(memoryview(b'')) 184 >>> sys.getsizeof(gc.get_referents(memoryview(b''))[0]) 128 312 bytes total, not counting padding. The average size of co_code in Lib/*.py is 85 bytes. Unless Instagram uses gigantic functions and methods (and no comprehensions or lambdas), the net benefit will be negative. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 09:29:51 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jun 2019 13:29:51 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559395791.17.0.23293030009.issue36839@roundup.psfhosted.org> Serhiy Storchaka added the comment: The size of the code object is at least 144 bytes. >>> def f(): pass ... >>> sys.getsizeof(f.__code__) 144 If the function uses parameters, variables or constants (and you cannot do much useful without using them), their size should be added too. It overwhelms the size of the raw bytecode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 10:13:52 2019 From: report at bugs.python.org (Lasha Gogua) Date: Sat, 01 Jun 2019 14:13:52 +0000 Subject: =?utf-8?b?W2lzc3VlMzcxMjFdICfhg5AnLnVwcGVyKCkgc2hvdWxkIHJldHVybiAn4YOQ?= =?utf-8?q?=27?= Message-ID: <1559398432.1.0.631402061489.issue37121@roundup.psfhosted.org> New submission from Lasha Gogua : Python's .upper() string method still translates Georgian characters this to "'?'" which is not right Python 3.7.3 (default, May 11 2019, 00:45:16) [GCC 8.3.1 20190223 (Red Hat 8.3.1-2)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> '?' '?' >>> '?'.upper() '?' >>> print('?'.upper()) ? >>> and it works in Python 3.6.x and below Python 3.6.3 (default, Jan 4 2018, 16:40:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> '?' '?' >>> '?'.upper() '?' >>> print('?'.upper()) ? >>> now i have found the solution but is it correct? What's changed in the new version (Python 3.7.x)? Python 3.7.3 (default, May 11 2019, 00:45:16) [GCC 8.3.1 20190223 (Red Hat 8.3.1-2)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> print('?'.upper()) ? >>> print('?'.encode().upper().decode()) ? >>> print('?'.encode('utf-8').upper().decode('utf-8')) ? >>> ---------- components: Unicode messages: 344174 nosy: Lasha Gogua, ezio.melotti, vstinner priority: normal severity: normal status: open title: '?'.upper() should return '?' type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 10:41:14 2019 From: report at bugs.python.org (SilentGhost) Date: Sat, 01 Jun 2019 14:41:14 +0000 Subject: =?utf-8?b?W2lzc3VlMzcxMjFdICfhg5AnLnVwcGVyKCkgc2hvdWxkIHJldHVybiAn4YOQ?= =?utf-8?q?=27?= In-Reply-To: <1559398432.1.0.631402061489.issue37121@roundup.psfhosted.org> Message-ID: <1559400074.29.0.383522091465.issue37121@roundup.psfhosted.org> SilentGhost added the comment: What changed was that python 3.7 is using Unicode 11 standard, which has introduced changes for Georgian script. See "Casing Issues" under https://www.unicode.org/versions/Unicode11.0.0/#Migration The Python is correctly implements the standard. ---------- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 11:04:22 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jun 2019 15:04:22 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559401462.95.0.055786583241.issue35431@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +13609 pull_request: https://github.com/python/cpython/pull/13725 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 11:08:41 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jun 2019 15:08:41 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559401721.2.0.763209006495.issue35431@roundup.psfhosted.org> Serhiy Storchaka added the comment: PR 13725 is a technical fix/optimization/cleanup. Later we can apply algorithmic optimization. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 11:21:51 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 01 Jun 2019 15:21:51 +0000 Subject: [issue36612] Unittest document is not clear on SetUpClass calls In-Reply-To: <1555070993.71.0.91547720267.issue36612@roundup.psfhosted.org> Message-ID: <1559402511.21.0.0655292823409.issue36612@roundup.psfhosted.org> Cheryl Sabella added the comment: @xtreak or @lisroach, any thoughts? Thanks! ---------- nosy: +cheryl.sabella, lisroach, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 11:46:08 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 15:46:08 +0000 Subject: [issue37122] Make co->co_argcount represent the total number of positional arguments in the code object Message-ID: <1559403968.0.0.258896403168.issue37122@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : Originally proposed in: https://mail.python.org/pipermail/python-dev/2019-June/157812.html ---------- components: Interpreter Core messages: 344178 nosy: pablogsal, scoder, serhiy.storchaka priority: normal severity: normal status: open title: Make co->co_argcount represent the total number of positional arguments in the code object versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 11:46:58 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 15:46:58 +0000 Subject: [issue37122] Make co->co_argcount represent the total number of positional arguments in the code object In-Reply-To: <1559403968.0.0.258896403168.issue37122@roundup.psfhosted.org> Message-ID: <1559404018.93.0.403992555505.issue37122@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +13610 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13726 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 11:52:01 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 15:52:01 +0000 Subject: [issue31968] exec(): method's default arguments from dict-inherited globals In-Reply-To: <1510058956.93.0.213398074469.issue31968@psf.upfronthosting.co.za> Message-ID: <1559404321.85.0.0722698708172.issue31968@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 059b9ea5ac98f432e41b05d1fa5aab4ffa22df4d by Raymond Hettinger (Anthony Shaw) in branch 'master': bpo-31968: Documentation -- add clarification on the globals dict for exec() (GH-13140) https://github.com/python/cpython/commit/059b9ea5ac98f432e41b05d1fa5aab4ffa22df4d ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 11:53:07 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 15:53:07 +0000 Subject: [issue31968] exec(): method's default arguments from dict-inherited globals In-Reply-To: <1510058956.93.0.213398074469.issue31968@psf.upfronthosting.co.za> Message-ID: <1559404387.75.0.561119121119.issue31968@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 12:05:31 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 16:05:31 +0000 Subject: [issue37123] test_multiprocessing fails randomly on Windows Message-ID: <1559405131.96.0.0818992217462.issue37123@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : https://buildbot.python.org/all/#/builders/58/builds/2539 https://buildbot.python.org/all/#/builders/58/builds/2539 Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_venv.py", line 327, in test_multiprocessing out, err = check_output([envpy, '-c', File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_venv.py", line 42, in check_output raise subprocess.CalledProcessError( subprocess.CalledProcessError: Command '['d:\\temp\\tmp_qt0ywa6\\Scripts\\python_d.exe', '-c', 'from multiprocessing import Pool; print(Pool(1).apply_async("Python".lower).get(3))']' returned non-zero exit status 3221225477. ====================================================================== FAIL: test_mymanager (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 2806, in test_mymanager self.assertEqual(manager._process.exitcode, 0) AssertionError: -15 != 0 ---------------------------------------------------------------------- ---------- messages: 344180 nosy: pablogsal priority: normal severity: normal status: open title: test_multiprocessing fails randomly on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 12:13:14 2019 From: report at bugs.python.org (Berker Peksag) Date: Sat, 01 Jun 2019 16:13:14 +0000 Subject: [issue36993] zipfile: tuple IndexError on extract In-Reply-To: <1558441969.28.0.928640082083.issue36993@roundup.psfhosted.org> Message-ID: <1559405594.08.0.770063550116.issue36993@roundup.psfhosted.org> Berker Peksag added the comment: This report is valid. Serhiy has improved error reporting of the extra field in feccdb2a249a71be330765be77dee57121866779. counts can indeed be an empty tuple: elif ln == 0: counts = () If I'm reading section 4.5.3 of https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT correctly, I think we need to raise BadZipFile if ln == 0. ---------- components: +Library (Lib) nosy: +berker.peksag, serhiy.storchaka resolution: not a bug -> stage: resolved -> needs patch status: closed -> open type: -> behavior versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 12:13:45 2019 From: report at bugs.python.org (Berker Peksag) Date: Sat, 01 Jun 2019 16:13:45 +0000 Subject: [issue36993] zipfile: tuple IndexError on extract In-Reply-To: <1558441969.28.0.928640082083.issue36993@roundup.psfhosted.org> Message-ID: <1559405625.7.0.997209336702.issue36993@roundup.psfhosted.org> Change by Berker Peksag : ---------- keywords: +patch pull_requests: +13611 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13727 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 12:15:26 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 16:15:26 +0000 Subject: [issue37124] test_msilib is potentially leaking references and memory blocks Message-ID: <1559405726.45.0.528544648803.issue37124@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : BUILDBOT FAILURE REPORT ======================= Builder name: AMD64 Windows8.1 Refleaks 2.7 Builder url: https://buildbot.python.org/all/#/builders/33/ Build url: https://buildbot.python.org/all/#/builders/33/builds/604 Failed tests ------------ Test leaking resources ---------------------- - test_msilib is leaking references Build summary ------------- == Tests result: FAILURE then FAILURE == 360 tests OK. 10 slowest tests: - test_bsddb3: 4042.9s - test_mmap: 434.0s - test_multiprocessing: 313.8s - test_shelve: 246.5s - test_mailbox: 239.3s - test_ssl: 227.2s - test_lib2to3: 135.6s - test_largefile: 131.5s - test_decimal: 126.0s - test_urllib2_localnet: 122.6s 1 test failed: test_msilib 42 tests skipped: test_aepack test_al test_applesingle test_bsddb185 test_cd test_cl test_commands test_crypt test_curses test_dbm test_dl test_epoll test_fcntl test_fork1 test_gdb test_gdbm test_gl test_grp test_imgfile test_ioctl test_kqueue test_linuxaudiodev test_macos test_macostools test_mhlib test_nis test_openpty test_ossaudiodev test_pipes test_poll test_posix test_pty test_pwd test_readline test_resource test_scriptpackages test_spwd test_sunaudiodev test_threadsignals test_wait3 test_wait4 test_zipfile64 2 skips unexpected on win32: test_gdb test_readline 1 re-run test: test_msilib Total duration: 1 hour 20 min Tracebacks ---------- Current builder status ---------------------- The builder is failing currently Commits ------- Other builds with similar failures ---------------------------------- - https://buildbot.python.org/all/#/builders/80/builds/608 - https://buildbot.python.org/all/#/builders/132/builds/505 ---------- components: Tests messages: 344182 nosy: pablogsal priority: normal severity: normal status: open title: test_msilib is potentially leaking references and memory blocks type: behavior versions: Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 12:15:32 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 16:15:32 +0000 Subject: [issue37124] test_msilib is potentially leaking references and memory blocks In-Reply-To: <1559405726.45.0.528544648803.issue37124@roundup.psfhosted.org> Message-ID: <1559405732.61.0.892294192447.issue37124@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 12:15:53 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 16:15:53 +0000 Subject: [issue37124] test_msilib is potentially leaking references and memory blocks In-Reply-To: <1559405726.45.0.528544648803.issue37124@roundup.psfhosted.org> Message-ID: <1559405753.63.0.373744024884.issue37124@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: This is likely to be caused by: https://github.com/python/cpython/pull/13688 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 12:20:23 2019 From: report at bugs.python.org (Berker Peksag) Date: Sat, 01 Jun 2019 16:20:23 +0000 Subject: [issue36992] zipfile: AttributeError on extract (LZMA) In-Reply-To: <1558441771.7.0.234228276725.issue36992@roundup.psfhosted.org> Message-ID: <1559406023.81.0.61470578628.issue36992@roundup.psfhosted.org> Berker Peksag added the comment: This is a duplicate of issue 36991 and will be fixed by the same PR. ---------- nosy: +berker.peksag resolution: not a bug -> duplicate superseder: -> zipfile: AttributeError on extract _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 12:31:17 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 16:31:17 +0000 Subject: [issue37125] math.comb is leaking references Message-ID: <1559406677.46.0.632223828362.issue37125@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : ./python Lib/test/bisect_cmd.py test_math -R 2:2 ... WARNING: Running tests with --huntrleaks/-R and less than 3 warmup repetitions can give false positives! Run tests sequentially 0:00:00 load avg: 1.32 [1/1] test_math beginning 4 repetitions 1234 .... test_math leaked [12352, 12352] references, sum=24704 test_math leaked [1, 1] memory blocks, sum=2 test_math failed == Tests result: FAILURE == 1 test failed: test_math Total duration: 663 ms Tests result: FAILURE ran 1 tests/2 exit 2 Tests failed: continuing with this subtest Tests (1): * test.test_math.IsCloseTests.testComb Bisection completed in 13 iterations and 0:00:11 ---------- components: Interpreter Core, Tests messages: 344185 nosy: pablogsal, rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: math.comb is leaking references versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 12:33:18 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 16:33:18 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559406798.46.0.307906583739.issue35431@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: math.comb is leaking, I opened https://bugs.python.org/issue37125 to track it. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 12:33:24 2019 From: report at bugs.python.org (Berker Peksag) Date: Sat, 01 Jun 2019 16:33:24 +0000 Subject: [issue36976] email: AttributeError In-Reply-To: <1558376398.04.0.740342940317.issue36976@roundup.psfhosted.org> Message-ID: <1559406804.43.0.78319070734.issue36976@roundup.psfhosted.org> Change by Berker Peksag : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Certain Malformed email causes email.parser to throw AttributeError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 12:34:56 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 16:34:56 +0000 Subject: [issue37125] math.comb is leaking references In-Reply-To: <1559406677.46.0.632223828362.issue37125@roundup.psfhosted.org> Message-ID: <1559406896.67.0.86410430584.issue37125@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: It seems that https://github.com/python/cpython/pull/13725 fixes the leak: ? ./python -m test test_math -R : Run tests sequentially 0:00:00 load avg: 1.55 [1/1] test_math beginning 9 repetitions 123456789 ......... == Tests result: SUCCESS == 1 test OK. Total duration: 26 sec 283 ms Tests result: SUCCESS ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 12:37:49 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 01 Jun 2019 16:37:49 +0000 Subject: [issue37123] test_multiprocessing fails randomly on Windows In-Reply-To: <1559405131.96.0.0818992217462.issue37123@roundup.psfhosted.org> Message-ID: <1559407069.15.0.907090436808.issue37123@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I couldn't find the traceback for test_venv in the buildbot logs. They were skipped and fixed as part of issue35978. ---------- components: +Tests nosy: +xtreak type: -> behavior versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 12:55:05 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 16:55:05 +0000 Subject: [issue37123] test_multiprocessing fails randomly on Windows In-Reply-To: <1559405131.96.0.0818992217462.issue37123@roundup.psfhosted.org> Message-ID: <1559408105.17.0.0498063119967.issue37123@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Sorry, I posted the same link twice. Here is the test_venv failure: https://buildbot.python.org/all/#/builders/58/builds/2538 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 12:59:27 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 16:59:27 +0000 Subject: [issue32411] Idlelib.browser: stop sorting dicts created by pyclbr In-Reply-To: <1513996869.13.0.213398074469.issue32411@psf.upfronthosting.co.za> Message-ID: <1559408367.51.0.570634413901.issue32411@roundup.psfhosted.org> Raymond Hettinger added the comment: Can this move forward now? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 13:00:48 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 17:00:48 +0000 Subject: [issue37126] test_threading is leaking references Message-ID: <1559408448.65.0.831974411649.issue37126@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : https://buildbot.python.org/all/#/builders/1/builds/601 OK (skipped=1) . test_threading leaked [9770, 9772, 9768] references, sum=29310 test_threading leaked [3960, 3961, 3959] memory blocks, sum=11880 2 tests failed again: test_asyncio test_threading ---------- components: Tests messages: 344191 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: test_threading is leaking references versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 13:08:07 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 17:08:07 +0000 Subject: [issue37122] Make co->co_argcount represent the total number of positional arguments in the code object In-Reply-To: <1559403968.0.0.258896403168.issue37122@roundup.psfhosted.org> Message-ID: <1559408887.45.0.0472005950128.issue37122@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset cd74e66a8c420be675fd2fbf3fe708ac02ee9f21 by Pablo Galindo in branch 'master': bpo-37122: Make co->co_argcount represent the total number of positonal arguments in the code object (GH-13726) https://github.com/python/cpython/commit/cd74e66a8c420be675fd2fbf3fe708ac02ee9f21 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 13:08:23 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 17:08:23 +0000 Subject: [issue37122] Make co->co_argcount represent the total number of positional arguments in the code object In-Reply-To: <1559403968.0.0.258896403168.issue37122@roundup.psfhosted.org> Message-ID: <1559408903.9.0.650974496965.issue37122@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 13:12:04 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jun 2019 17:12:04 +0000 Subject: [issue36993] zipfile: tuple IndexError on extract In-Reply-To: <1558441969.28.0.928640082083.issue36993@roundup.psfhosted.org> Message-ID: <1559409124.25.0.683265278199.issue36993@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is not enough. IndexError can be raised for ln == 8 or 16 when file_size, compress_size and header_offset are all set to 0xffffffff. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 13:14:57 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 17:14:57 +0000 Subject: [issue21879] str.format() gives poor diagnostic on placeholder mismatch In-Reply-To: <1404052648.46.0.81950938275.issue21879@psf.upfronthosting.co.za> Message-ID: <1559409297.64.0.633779540022.issue21879@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 13:27:57 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 17:27:57 +0000 Subject: [issue33346] Syntax error with async generator inside dictionary comprehension In-Reply-To: <1524567941.57.0.682650639539.issue33346@psf.upfronthosting.co.za> Message-ID: <1559410077.72.0.83568501666.issue33346@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Ping, should we include this in beta1 or as is a "bugfix" this can be backported? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 13:37:19 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 17:37:19 +0000 Subject: [issue37126] test_threading is leaking references In-Reply-To: <1559408448.65.0.831974411649.issue37126@roundup.psfhosted.org> Message-ID: <1559410639.96.0.197798241029.issue37126@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: ? ./python -m test test_threading -m test_excepthook_thread_None -R : Run tests sequentially 0:00:00 load avg: 1.38 [1/1] test_threading beginning 9 repetitions 123456789 ......... test_threading leaked [364, 364, 364, 364] references, sum=1456 test_threading leaked [164, 164, 164, 164] memory blocks, sum=656 test_threading failed == Tests result: FAILURE == 1 test failed: test_threading Total duration: 159 ms Tests result: FAILURE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 13:37:26 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 17:37:26 +0000 Subject: [issue37126] test_threading is leaking references In-Reply-To: <1559408448.65.0.831974411649.issue37126@roundup.psfhosted.org> Message-ID: <1559410646.22.0.694716873334.issue37126@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 13:54:03 2019 From: report at bugs.python.org (Christian Heimes) Date: Sat, 01 Jun 2019 17:54:03 +0000 Subject: [issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILE In-Reply-To: <1532867889.16.0.56676864532.issue34271@psf.upfronthosting.co.za> Message-ID: <1559411643.98.0.119381952589.issue34271@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +13612 pull_request: https://github.com/python/cpython/pull/13728 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 14:05:35 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 01 Jun 2019 18:05:35 +0000 Subject: [issue37125] math.comb is leaking references In-Reply-To: <1559406677.46.0.632223828362.issue37125@roundup.psfhosted.org> Message-ID: <1559412335.58.0.151434180872.issue37125@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 14:07:35 2019 From: report at bugs.python.org (Berker Peksag) Date: Sat, 01 Jun 2019 18:07:35 +0000 Subject: [issue36993] zipfile: tuple IndexError on extract In-Reply-To: <1558441969.28.0.928640082083.issue36993@roundup.psfhosted.org> Message-ID: <1559412455.04.0.106035969937.issue36993@roundup.psfhosted.org> Berker Peksag added the comment: @alter-bug-tracer, could you please create test files for the cases Serhiy has just mentioned? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 15:00:33 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 19:00:33 +0000 Subject: [issue37126] test_threading is leaking references In-Reply-To: <1559408448.65.0.831974411649.issue37126@roundup.psfhosted.org> Message-ID: <1559415633.88.0.506092593398.issue37126@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: The problem here is that there is a reference cycle with threading.ExceptHookArgs but structseq objects are not tracked by the GC. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 15:01:26 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 19:01:26 +0000 Subject: [issue37126] test_threading is leaking references In-Reply-To: <1559408448.65.0.831974411649.issue37126@roundup.psfhosted.org> Message-ID: <1559415686.84.0.376375471504.issue37126@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +13613 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13729 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 15:03:10 2019 From: report at bugs.python.org (Jonathan) Date: Sat, 01 Jun 2019 19:03:10 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1559415790.19.0.0400659188798.issue37111@roundup.psfhosted.org> Jonathan added the comment: > I have no idea what you mean by this. I don't see how I can be clearer. What are the reasons for NOT implementing logging to file be unicode as a default? Logging to screen is unicode as a default. What are the reasons for not wanting consistency? > A simple Internet search for "basicConfig encoding" yields for me as the second result this Stack Overflow question Indeed, and it was from that question I got my solution in fact. The problem was the 30-60 minutes I wasted before that trying to figure out why my program was crashing and why it was only crashing *sometimes*. I'd written the logging part of the program a year ago and not really touched it since, so the logging module being a possible culprit was not even in my mind when the program crashed. > As my example illustrated, it's quite easy to log Unicode in log files. Yes, things are easy when you know it's necessary. It's the process of discovery that's an unnecessary waste of people's time. That's why I raised this and that's why I would consider this a bug in my own software. It's inconsistent, it invites problems, and it wastes peoples time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 15:09:05 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jun 2019 19:09:05 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559416145.38.0.390683707685.issue35431@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 2b843ac0ae745026ce39514573c5d075137bef65 by Serhiy Storchaka in branch 'master': bpo-35431: Refactor math.comb() implementation. (GH-13725) https://github.com/python/cpython/commit/2b843ac0ae745026ce39514573c5d075137bef65 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 15:09:20 2019 From: report at bugs.python.org (Stefan Krah) Date: Sat, 01 Jun 2019 19:09:20 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559416160.09.0.496934223399.issue36839@roundup.psfhosted.org> Stefan Krah added the comment: The managed buffer can be shared: >>> b = b'12345' >>> m1 = memoryview(b) >>> m2 = memoryview(m1) >>> gc.get_referents(m1)[0] >>> gc.get_referents(m2)[0] And I understood that Dino proposed to share one code instance as a memory mapped file for *all* processes. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 15:09:25 2019 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 01 Jun 2019 19:09:25 +0000 Subject: [issue28595] shlex.shlex should not augment wordchars In-Reply-To: <1478166136.94.0.995190174918.issue28595@psf.upfronthosting.co.za> Message-ID: <1559416165.49.0.917878637512.issue28595@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 56624a99a916fd27152d5b23364303acc0d707de by Vinay Sajip (Evan) in branch 'master': bpo-28595: Allow shlex whitespace_split with punctuation_chars (GH-2071) https://github.com/python/cpython/commit/56624a99a916fd27152d5b23364303acc0d707de ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 15:11:46 2019 From: report at bugs.python.org (Eric Snow) Date: Sat, 01 Jun 2019 19:11:46 +0000 Subject: [issue37127] Handling pending calls during runtime finalization may cause problems. Message-ID: <1559416306.37.0.716771519489.issue37127@roundup.psfhosted.org> New submission from Eric Snow : In Python/lifecycle.c (Py_FinalizeEx) we call _Py_FinishPendingCalls(), right after we stop all non-daemon Python threads but before we've actually started finalizing the runtime state. That call looks for any remaining pending calls (for the main interpreter) and runs them. There's some evidence of a bug there. In bpo-33608 I moved the pending calls to per-interpreter state. We saw failures (sometimes sporadic) on a few buildbots (e.g. FreeBSD) during runtime finalization. However, nearly all of the buildbots were fine, so it may be a question of architecture or slow hardware. See bpo-33608 for details on the failures. There are a number of possibilities, but it's been tricky reproducing the problem in order to investigate. Here are some theories: * daemon threads (a known weak point in runtime finalization) block pending calls from happening until some time after portions of the runtime have already been cleaned up * there's a race that causes the pending calls machinery to get caught in some sort infinite loop (e.g. a pending call fails and gets re-queued) * a corner case in the pending calls logic that triggers only during finalization Here are some other points to consider: * do we have the same problem during subinterpreter finalization (Py_EndInterpreter() rather than runtime finalization)? * perhaps the problem extends beyond finalization, but the conditions are more likely there * the change for bpo-33608 could have introduced the bug rather that exposing an existing one ---------- assignee: eric.snow components: Interpreter Core messages: 344202 nosy: eric.snow priority: normal severity: normal stage: test needed status: open title: Handling pending calls during runtime finalization may cause problems. type: crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 15:13:04 2019 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 01 Jun 2019 19:13:04 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1559416384.6.0.0379606041174.issue37111@roundup.psfhosted.org> Vinay Sajip added the comment: Learning is not a waste of time. You're entitled to your opinion, but this is not a bug in logging. We'll have to agree to disagree. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 15:16:06 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 01 Jun 2019 19:16:06 +0000 Subject: [issue20092] type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not In-Reply-To: <1388260592.79.0.323683192221.issue20092@psf.upfronthosting.co.za> Message-ID: <1559416566.83.0.724647440147.issue20092@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 15:17:36 2019 From: report at bugs.python.org (Jonathan) Date: Sat, 01 Jun 2019 19:17:36 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1559416656.86.0.308751719097.issue37111@roundup.psfhosted.org> Jonathan added the comment: > Learning is not a waste of time. You're entitled to your opinion, but this is not a bug in logging. We'll have to agree to disagree. I agree and value learning a great deal. However learning should happen on your own time, NOT when a program crashes randomly and tries taking you down the rabbit hole. I like learning but not about unrelated things when I'm trying to do useful work. Fine, if you don't consider this a bug, consider it a feature request. "User would like Python logging of Unicode characters to be consistent" is not an unreasonable request. ---------- status: closed -> open type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 15:20:33 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 01 Jun 2019 19:20:33 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1559416833.73.0.0656305198822.issue34155@roundup.psfhosted.org> Abhilash Raj added the comment: I don't know if we can make the API consistent between parseaddr and the parsing header value since they are completely different even right now. Like you already noticed there is no way to register defects and instead parseaddr returns ('', '') to denote the failure to parse. About parsing malicious domain, my line of thinking was along the lines of presenting whatever is there to user of the API, without 'hiding' that information. It would be harder to figure out the exception if the domain is missing. Even though the domain is parsed in the `domain` value, the value itself is clearly invalid. Any attempt to ever use that Address() will definitely cause an error (perhaps, there should be a sanity check in SMTP.send_message for that?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 15:21:31 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 01 Jun 2019 19:21:31 +0000 Subject: [issue20092] type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not In-Reply-To: <1388260592.79.0.323683192221.issue20092@psf.upfronthosting.co.za> Message-ID: <1559416891.31.0.877952914663.issue20092@roundup.psfhosted.org> Mark Dickinson added the comment: I like the delegation of `float` and `complex` to use `__index__` that was introduced in GH-13108; it would be nice to have that regardless of which solution is decided on for `__int__` and `__index__`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 15:21:38 2019 From: report at bugs.python.org (Eric Snow) Date: Sat, 01 Jun 2019 19:21:38 +0000 Subject: [issue37127] Handling pending calls during runtime finalization may cause problems. In-Reply-To: <1559416306.37.0.716771519489.issue37127@roundup.psfhosted.org> Message-ID: <1559416898.04.0.919934982508.issue37127@roundup.psfhosted.org> Eric Snow added the comment: Also, someone did manage to investigate and identify a likely cause: https://bugs.python.org/issue33608#msg342791 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 15:24:13 2019 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 01 Jun 2019 19:24:13 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1559417053.68.0.544689866918.issue37111@roundup.psfhosted.org> Vinay Sajip added the comment: Different people have different ideas of what a default should be. You can pretty much guarantee that whatever a default is, someone will think it should be something else. The basicConfig functionality has been around in its present form since 2003, and people in general haven't had a problem with the current defaults. There is no case for changing a default unless there is a consensus among lots of people that a default needs changing. ---------- stage: resolved -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 15:28:02 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 19:28:02 +0000 Subject: [issue37126] test_threading is leaking references In-Reply-To: <1559408448.65.0.831974411649.issue37126@roundup.psfhosted.org> Message-ID: <1559417282.46.0.587833376501.issue37126@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: ?ukasz, this PR will fix the x86 Gentoo Refleaks 3.x and friends, so I would recommend landing this before the release. ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 15:29:52 2019 From: report at bugs.python.org (Eric Snow) Date: Sat, 01 Jun 2019 19:29:52 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1559417392.17.0.341636484413.issue33608@roundup.psfhosted.org> Eric Snow added the comment: That's really helpful, Pavel! Thanks for investigating so thoroughly. I'm going to double check all the places I've made the assumption that "tstate" isn't NULL and likewise for "tstate->interp". Is there an issue open for the bug in multiprocessing? If not, would you mind opening one? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 15:32:35 2019 From: report at bugs.python.org (Eric Snow) Date: Sat, 01 Jun 2019 19:32:35 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1559417555.04.0.0293341877325.issue33608@roundup.psfhosted.org> Eric Snow added the comment: I've made a few tweaks and Victor did some cleanup, so I'm going to try the PR again. At first I'm also going to disable the _PyEval_FinishPendingCalls() call in _Py_FinalizeEx() and then enable it is a separate PR. Also, I've opened bpo-37127 specifically to track the problem with _PyEval_FinishPendingCalls() during _Py_FinalizeEx(), to ensure that the disabled call doesn't slip through the cracks. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 15:49:35 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 19:49:35 +0000 Subject: [issue32515] Add an option to trace to run module as a script In-Reply-To: <1515358727.93.0.467229070634.issue32515@psf.upfronthosting.co.za> Message-ID: <1559418575.97.0.137388301935.issue32515@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 15:50:43 2019 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 01 Jun 2019 19:50:43 +0000 Subject: [issue36885] Make makeunicode.py script more readable In-Reply-To: <1557558491.4.0.613612433422.issue36885@roundup.psfhosted.org> Message-ID: <1559418643.13.0.924897396568.issue36885@roundup.psfhosted.org> Change by Stefan Behnel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 15:55:22 2019 From: report at bugs.python.org (Paul Moore) Date: Sat, 01 Jun 2019 19:55:22 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1559418922.45.0.236583342508.issue37111@roundup.psfhosted.org> Paul Moore added the comment: > User would like Python logging of Unicode characters to be consistent It is consistent. The encoding of logging.basicConfig(filename='c:\\my_log.log') is consistent with the encoding of open('c:\\my_log.log') Both use the system default encoding, which is not UTF-8. There is some discussion going on right now, as to whether it *should* be, but it isn't, and I wouldn't consider changing the behaviour of loging *without* changing the behaviour of open() to be consistent. Logging to the console is consistent with the standard IO streams, and it was PEP 528 (https://www.python.org/dev/peps/pep-0528/) that made that change - before that, the standard IO streams, and logging to the console, used the console codepage. So, while I agree that the behaviour takes a bit of work to understand, it's not (IMO) inconsistent, nor is it (IMO) a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 15:57:58 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jun 2019 19:57:58 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559419078.57.0.496644246277.issue35431@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +13614 pull_request: https://github.com/python/cpython/pull/13731 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 16:01:21 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 20:01:21 +0000 Subject: [issue5680] Command-line arguments when running in IDLE In-Reply-To: <1238798556.38.0.28468201552.issue5680@psf.upfronthosting.co.za> Message-ID: <1559419281.84.0.633327794358.issue5680@roundup.psfhosted.org> Raymond Hettinger added the comment: Can be bump this up in priority? The patch has been awaiting review for a good while. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 16:08:35 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 20:08:35 +0000 Subject: [issue37125] math.comb is leaking references In-Reply-To: <1559406677.46.0.632223828362.issue37125@roundup.psfhosted.org> Message-ID: <1559419715.45.0.478929901281.issue37125@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Fixed by https://github.com/python/cpython/pull/13725 ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 16:13:40 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 20:13:40 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1559420020.23.0.0287950053248.issue29882@roundup.psfhosted.org> Raymond Hettinger added the comment: Is everyone comfortable with how negative numbers are handled by this patch? It might be better to limit the domain and raise a ValueError rather than make a presumption about what the user intends. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 16:16:20 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jun 2019 20:16:20 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1559420180.35.0.568848544648.issue29882@roundup.psfhosted.org> Serhiy Storchaka added the comment: I am going to add the imath module. If we decide to add popcount(), it may be better to add it in this module instead of int class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 16:18:51 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 20:18:51 +0000 Subject: [issue36842] Implement PEP 578 In-Reply-To: <1557262112.79.0.0300199683807.issue36842@roundup.psfhosted.org> Message-ID: <1559420331.46.0.75834623689.issue36842@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 3b57f50efc16c65df96914ec53bc8d3dc28e18b6 by Pablo Galindo in branch 'master': bpo-36842: Pass positional only parameters to code_new audit hook (GH-13707) https://github.com/python/cpython/commit/3b57f50efc16c65df96914ec53bc8d3dc28e18b6 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 16:20:53 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 20:20:53 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559420453.17.0.377305396021.issue35431@roundup.psfhosted.org> Raymond Hettinger added the comment: Why do we want __index__ support? This seems like an unnecessary extension without relevant use cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 16:23:38 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jun 2019 20:23:38 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559420618.0.0.946586556892.issue35431@roundup.psfhosted.org> Serhiy Storchaka added the comment: NumPy integer types are not subclasses of int. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 16:26:09 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 20:26:09 +0000 Subject: [issue37125] math.comb is leaking references In-Reply-To: <1559406677.46.0.632223828362.issue37125@roundup.psfhosted.org> Message-ID: <1559420769.63.0.989030836292.issue37125@roundup.psfhosted.org> Raymond Hettinger added the comment: Please file this in the tracker issue so that the discussions don't sprawl. Thx. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 16:31:46 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 01 Jun 2019 20:31:46 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559421106.34.0.151176756502.issue35431@roundup.psfhosted.org> Mark Dickinson added the comment: I'd expect any math module function accepting integers to be sufficiently duck-typed to accept integer-like things (i.e., objects that implement `__index__`), in just the same way that the regular math module functions (sin, log, atan, sqrt, ...) accept arbitrary objects defining `__float__`. We already do this for gcd, factorial. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 16:32:21 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 20:32:21 +0000 Subject: [issue34303] micro-optimizations in functools.reduce() In-Reply-To: <1533100143.91.0.56676864532.issue34303@psf.upfronthosting.co.za> Message-ID: <1559421141.23.0.0261704894537.issue34303@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset e5f6207ba6cb510d9370519ba869296be01787be by Raymond Hettinger (Sergey Fedoseev) in branch 'master': bpo-34303: Micro-optimizations in functools.reduce() (GH-8598) https://github.com/python/cpython/commit/e5f6207ba6cb510d9370519ba869296be01787be ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 16:32:46 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 20:32:46 +0000 Subject: [issue34303] micro-optimizations in functools.reduce() In-Reply-To: <1533100143.91.0.56676864532.issue34303@psf.upfronthosting.co.za> Message-ID: <1559421166.14.0.628030130894.issue34303@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 16:34:42 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 01 Jun 2019 20:34:42 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1559421282.43.0.39503669671.issue29882@roundup.psfhosted.org> Mark Dickinson added the comment: > Is everyone comfortable with how negative numbers are handled by this patch? Not entirely, but it's not terribly wrong and it's consistent with how `int.bit_length` works. (I'm also a bit uncomfortable about `int.bit_length`s behaviour on negative numbers, but it is the way it is.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 16:35:32 2019 From: report at bugs.python.org (Tim Peters) Date: Sat, 01 Jun 2019 20:35:32 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1559421332.55.0.166534933022.issue29882@roundup.psfhosted.org> Tim Peters added the comment: I prefer that a negative int raise ValueError, but am OK with it using the absolute value instead (i.e., what it does now). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 16:35:34 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 01 Jun 2019 20:35:34 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1559421334.93.0.131719928311.issue29882@roundup.psfhosted.org> Mark Dickinson added the comment: > I am going to add the imath module. Aimed at 3.8, or 3.9? This seems somewhat rushed for 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 16:46:10 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sat, 01 Jun 2019 20:46:10 +0000 Subject: [issue26791] shutil.move fails to move symlink (Invalid cross-device link) In-Reply-To: <1460912297.17.0.227992133358.issue26791@psf.upfronthosting.co.za> Message-ID: <1559421970.93.0.319678554019.issue26791@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 16:47:29 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jun 2019 20:47:29 +0000 Subject: [issue37128] Add math.perm() Message-ID: <1559422049.94.0.857716315829.issue37128@roundup.psfhosted.org> New submission from Serhiy Storchaka : The function which returns the number of ways to choose k items from n items without repetition and without order was added in issue35431. This functions is always goes in pair with other function, which returns the number of ways to choose k items from n items without repetition and with order. These functions are always learned together in curses of combinatorics. Often C(n,k) is determined via P(n,k) (and both are determined via factorial). P(n, k) = n! / (n-k)! C(n, k) = P(n, k) / k! The proposed PR adds meth.perm(). It shares most of the code with math.comb(). ---------- components: Library (Lib) messages: 344226 nosy: lemburg, mark.dickinson, serhiy.storchaka, stutzbach priority: normal severity: normal status: open title: Add math.perm() type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 16:49:09 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 20:49:09 +0000 Subject: [issue37128] Add math.perm() In-Reply-To: <1559422049.94.0.857716315829.issue37128@roundup.psfhosted.org> Message-ID: <1559422149.16.0.736475519772.issue37128@roundup.psfhosted.org> Raymond Hettinger added the comment: +0 from me. It is inevitable that this will be requested now that we have comb(). The need for this is much less though. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 16:49:22 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jun 2019 20:49:22 +0000 Subject: [issue37128] Add math.perm() In-Reply-To: <1559422049.94.0.857716315829.issue37128@roundup.psfhosted.org> Message-ID: <1559422162.73.0.749731734093.issue37128@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +13615 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13731 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 16:52:11 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sat, 01 Jun 2019 20:52:11 +0000 Subject: [issue26468] shutil.copy2 raises OSError if filesystem doesn't support chmod In-Reply-To: <1456910519.95.0.44073308632.issue26468@psf.upfronthosting.co.za> Message-ID: <1559422331.25.0.980642872874.issue26468@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 16:54:40 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 01 Jun 2019 20:54:40 +0000 Subject: [issue37128] Add math.perm() In-Reply-To: <1559422049.94.0.857716315829.issue37128@roundup.psfhosted.org> Message-ID: <1559422480.66.0.114515686992.issue37128@roundup.psfhosted.org> Mark Dickinson added the comment: > +0 from me. It is inevitable that this will be requested now that we have comb(). Exactly my thoughts, too. I don't think I'll have any use for `math.perm`; the main reason to add it will be to satisfy all those who got taught combinations and permutations at the same time, see them as a unit, and then get surprised when they find `math.comb` without `math.perm`. The good part is that now that we have math.comb, I think everything about the API of math.perm is already clear (including what to call it). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 16:56:05 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 20:56:05 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559422565.83.0.488897536904.issue35431@roundup.psfhosted.org> Raymond Hettinger added the comment: Mark, please see: https://twitter.com/daveinstpaul/status/1134919179361034240 What are your thoughts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 16:58:07 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 20:58:07 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559422687.25.0.406921401373.issue35431@roundup.psfhosted.org> Raymond Hettinger added the comment: One other idea: it may be worth putting in an alias for "binomial" to improve findability and readability in contexts where a person really does what binomial coefficients and is not otherwise thinking about counting contexts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 17:01:20 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 01 Jun 2019 21:01:20 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559422880.65.0.0398578691282.issue35431@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Just a heads up from issue37125: The leak is was fixed by PR13725. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 17:02:47 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 01 Jun 2019 21:02:47 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559422967.55.0.941580406754.issue35431@roundup.psfhosted.org> Mark Dickinson added the comment: > What are your thoughts? Sigh. I don't object to extending to `k < 0` and `k > n`, but once we've made that extension it's impossible to undo if we decide we'd rather have had the error checking. I'd really like to see some convincing use-cases. Quotes from Concrete Mathematics (fine book though it is) don't amount to use-cases. I'd say leave it as-is for 3.8, see what the reaction is, and maybe relax constraints in 3.9 if that seems appropriate. But if a majority of others really want to make the change now, that's okay with me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 17:03:25 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 01 Jun 2019 21:03:25 +0000 Subject: [issue32411] Idlelib.browser: stop sorting dicts created by pyclbr In-Reply-To: <1513996869.13.0.213398074469.issue32411@psf.upfronthosting.co.za> Message-ID: <1559423005.59.0.666208191804.issue32411@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 1a4d9ffa1aecd7e750195f2be06d3d16c7a3a88f by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-32411: IDLE: Remove line number sort in browser.py (#5011) https://github.com/python/cpython/commit/1a4d9ffa1aecd7e750195f2be06d3d16c7a3a88f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 17:03:45 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 01 Jun 2019 21:03:45 +0000 Subject: [issue32411] Idlelib.browser: stop sorting dicts created by pyclbr In-Reply-To: <1513996869.13.0.213398074469.issue32411@psf.upfronthosting.co.za> Message-ID: <1559423025.91.0.563417710376.issue32411@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13616 pull_request: https://github.com/python/cpython/pull/13732 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 17:05:50 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Jun 2019 21:05:50 +0000 Subject: [issue20092] type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not In-Reply-To: <1388260592.79.0.323683192221.issue20092@psf.upfronthosting.co.za> Message-ID: <1559423150.7.0.370938012326.issue20092@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset bdbad71b9def0b86433de12cecca022eee91bd9f by Serhiy Storchaka in branch 'master': bpo-20092. Use __index__ in constructors of int, float and complex. (GH-13108) https://github.com/python/cpython/commit/bdbad71b9def0b86433de12cecca022eee91bd9f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 17:10:24 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 21:10:24 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559423424.7.0.59183502409.issue35431@roundup.psfhosted.org> Raymond Hettinger added the comment: > I'd say leave it as-is for 3.8, see what the reaction is, > and maybe relax constraints in 3.9 if that seems appropriate. I concur. That said, the referenced tweet was a reaction :-) FWIW, itertools.combinations(seq, r) returns 0 values when r > len(seq). Tim, what do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 17:10:52 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 01 Jun 2019 21:10:52 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559423452.64.0.251037048416.issue35431@roundup.psfhosted.org> Mark Dickinson added the comment: I'm particularly sceptical about real-world use-cases for k < 0. Maybe we should consider removing just the k > n requirement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 17:11:50 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 21:11:50 +0000 Subject: [issue29414] Change 'the for statement is such an iterator' in Tutorial In-Reply-To: <1485976216.65.0.169866413965.issue29414@psf.upfronthosting.co.za> Message-ID: <1559423510.84.0.621116963958.issue29414@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 218e47b61862470477922e9aba1a23fd3dab18ae by Raymond Hettinger (Marco Buttu) in branch 'master': bpo-29414: Change 'the for statement is such an iterator' in Tutorial (GH-273) https://github.com/python/cpython/commit/218e47b61862470477922e9aba1a23fd3dab18ae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 17:12:13 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 21:12:13 +0000 Subject: [issue29414] Change 'the for statement is such an iterator' in Tutorial In-Reply-To: <1485976216.65.0.169866413965.issue29414@psf.upfronthosting.co.za> Message-ID: <1559423533.3.0.991567726619.issue29414@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 17:15:26 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 21:15:26 +0000 Subject: [issue34722] Non-deterministic bytecode generation In-Reply-To: <1537278827.47.0.956365154283.issue34722@psf.upfronthosting.co.za> Message-ID: <1559423726.47.0.290633889702.issue34722@roundup.psfhosted.org> Raymond Hettinger added the comment: Bumping up the priority a bit on this one. It would be nice to get it in for 3.8. ---------- priority: normal -> high versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 17:19:47 2019 From: report at bugs.python.org (Tim Peters) Date: Sat, 01 Jun 2019 21:19:47 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559423987.0.0.601596370725.issue35431@roundup.psfhosted.org> Tim Peters added the comment: Strongly prefer requiring 0 <= k <= n at first. This is a programming language: it will be applied to real problems, not to abstract proofs where some slop can be helpful in reducing the number of cases that need to be considered. The Twitter fellow is certainly right that "0" is the clear answer to "how many 5-element subsets does have a 4-element set have?", but in the context of real problems it's more likely (to my eyes) that a programmer asking that question of `comb()` has gotten confused. It certainly would have been "an error" in any programming use for `comb()` I've ever had. Raymond, I'm not clear on what you mean by "alias". You mean supplying the same function under more than one name? I'd be -1 on that (where would it end? the answer to every future name bikeshedding issue then would be "all of the above"). But +1 on, e.g., adding a doc index entry for "binomial" pointing to "comb". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 17:26:34 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 21:26:34 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559424394.23.0.968607333459.issue35431@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +13617 pull_request: https://github.com/python/cpython/pull/13734 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 17:39:49 2019 From: report at bugs.python.org (Eric Snow) Date: Sat, 01 Jun 2019 21:39:49 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1559425189.75.0.888990179238.issue33608@roundup.psfhosted.org> Eric Snow added the comment: New changeset 6a150bcaeb190d1731b38ab9c7a5d1a352847ddc by Eric Snow in branch 'master': bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). (gh-13714) https://github.com/python/cpython/commit/6a150bcaeb190d1731b38ab9c7a5d1a352847ddc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 17:51:52 2019 From: report at bugs.python.org (Michal) Date: Sat, 01 Jun 2019 21:51:52 +0000 Subject: [issue37129] Add RWF_APPEND flag Message-ID: <1559425912.96.0.374088169798.issue37129@roundup.psfhosted.org> Change by Michal : ---------- components: Library (Lib) nosy: bezoka, pablogsal, vstinner priority: normal severity: normal status: open title: Add RWF_APPEND flag type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 17:52:32 2019 From: report at bugs.python.org (Michal) Date: Sat, 01 Jun 2019 21:52:32 +0000 Subject: [issue37129] Add RWF_APPEND flag Message-ID: <1559425952.87.0.398536904195.issue37129@roundup.psfhosted.org> Change by Michal : ---------- keywords: +patch pull_requests: +13618 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13735 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 18:26:03 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 01 Jun 2019 22:26:03 +0000 Subject: [issue32411] Idlelib.browser: stop sorting dicts created by pyclbr In-Reply-To: <1513996869.13.0.213398074469.issue32411@psf.upfronthosting.co.za> Message-ID: <1559427963.37.0.0632554086124.issue32411@roundup.psfhosted.org> miss-islington added the comment: New changeset ac60d1afd2b04f61fe4c965740fa32809f2b84ed by Miss Islington (bot) in branch '3.7': bpo-32411: IDLE: Remove line number sort in browser.py (GH-5011) https://github.com/python/cpython/commit/ac60d1afd2b04f61fe4c965740fa32809f2b84ed ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 18:28:07 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 01 Jun 2019 22:28:07 +0000 Subject: [issue32411] Idlelib.browser: stop sorting dicts created by pyclbr In-Reply-To: <1513996869.13.0.213398074469.issue32411@psf.upfronthosting.co.za> Message-ID: <1559428087.8.0.864798186027.issue32411@roundup.psfhosted.org> Terry J. Reedy added the comment: yes ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 18:37:31 2019 From: report at bugs.python.org (David Radcliffe) Date: Sat, 01 Jun 2019 22:37:31 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559428651.33.0.42234840663.issue35431@roundup.psfhosted.org> David Radcliffe added the comment: I think that binomial(n, k) should return 0 when k > n or k < 0. This is a practical consideration. I'm concerned about evaluating sums involving binomial coefficients. Mathematicians are often rather loose about specifying the upper and lower bounds of summation, because the unwanted terms are zero anyway. These formulas should not result in value errors when they are implemented directly. To give a simplistic example, the sum of the first n positive integers is binomial(n+1, 2), and the formula should still work if n is zero. ---------- nosy: +David Radcliffe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 19:16:53 2019 From: report at bugs.python.org (Eric Snow) Date: Sat, 01 Jun 2019 23:16:53 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1559431013.87.0.779898930754.issue33608@roundup.psfhosted.org> Eric Snow added the comment: So far so good. :) I'll keep an eye on things and if the buildbots are still happy then I'll add back _PyEval_FinishPendingCalls() in _Py_FinalizeEx() in a few days. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 19:32:41 2019 From: report at bugs.python.org (Eric Snow) Date: Sat, 01 Jun 2019 23:32:41 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1559431961.17.0.639232739651.issue33608@roundup.psfhosted.org> Eric Snow added the comment: FYI, after merging that PR I realized that the COMPUTE_EVAL_BREAKER macro isn't quite right. While the following scenario worked before, now it doesn't: 1. interpreter A: _PyEval_AddPendingCall() causes the global eval breaker to be set 2. interpreter B: the next pass through the eval loop uses COMPUTE_EVAL_BREAKER; it has no pending calls so the global eval breaker is unset 3. interpreter A: the next pass through the eval loop does not run the pending call because the eval breaker is no longer set This really isn't a problem because the eval breaker is triggered for the GIL pretty frequently. Furthermore, it won't be a problem once the GIL is per-interpreter (at which point we will switch to a per-interpreter eval breaker). If it is important enough then I can fix it. I even wrote up a solution. [1] However, I'd rather leave it alone (hence no PR). The alternatives are more complicated and the situation should be relatively short-lived. FWIW, in addition to the solution I mentioned above, I tried a few other ways: * have a per-interpreter eval breaker in addition to the global one * have only a per-interpreter eval breaker (the ultimate objective) * consolidate the pending calls for every interpreter every time UNSIGNAL_PENDING_CALLS and UNSIGNAL_ASYNC_EXC are used However, each has performance penalties while the branch I created does not. I try to be really careful when it comes to the performance of the eval loop. :) [1] https://github.com/ericsnowcurrently/cpython/tree/eval-breaker-shared ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 20:07:20 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 02 Jun 2019 00:07:20 +0000 Subject: [issue36985] typing.ForwardRef is undocumented In-Reply-To: <1558416902.0.0.868432422236.issue36985@roundup.psfhosted.org> Message-ID: <1559434040.77.0.43284750444.issue36985@roundup.psfhosted.org> Ivan Levkivskyi added the comment: Guido, I remember you were against exposing `ForwardRef` as public at some point, but recently you approved https://github.com/python/cpython/pull/13456 that added it to `typing.__all__`. I don't have any particular opinion on this, but if you don't object, I think it would make sense to add a short section about this to the docs, since it may be exposed at runtime, e.g. in `List['Cls']`. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 20:14:56 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 02 Jun 2019 00:14:56 +0000 Subject: [issue36984] typing docs "versionadded" is inaccurate for many attributes In-Reply-To: <1558416035.31.0.248938950481.issue36984@roundup.psfhosted.org> Message-ID: <1559434496.3.0.92226350951.issue36984@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13620 pull_request: https://github.com/python/cpython/pull/13737 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 20:15:09 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 02 Jun 2019 00:15:09 +0000 Subject: [issue5680] Simulate command-line arguments for program run in IDLE In-Reply-To: <1238798556.38.0.28468201552.issue5680@psf.upfronthosting.co.za> Message-ID: <1559434509.19.0.72257617941.issue5680@roundup.psfhosted.org> Terry J. Reedy added the comment: 3 recent 'doit' requests (2 on PR 1589) raise my priority for this issue. When a user runs a file from an editor, IDLE simulates, as well as it can, the user entering 'python -i path' in a system command line shell. Both on a command line and in IDLE, the program starts with sys.argv = ['path'] (at least on my Windows system). This can be shown by running a file with 'import sys; print(sys.path)' both ways. The request for this issue is to simulate 'python -i path a1, a2, ...'. The program should start with sys.argv = ['path', 'a1', 'a2', '...'], with the argument strings being the same as they would be if entered at a command line on the *same system*. I have looked at least a bit at all 4 patches and have decided to start fresh, using just a few existing lines. The latest of the 4 was submitted 2 years ago, while I was learning to use git. By the following September, using config-extensions was obsolete. *If* we want to save a command string across sessions, a line could be added to config-main. But I am dubious about this. I expect that users will want to vary argument values for 1 program and need different sets of arguments for different programs. I want to use a subclass of idlelib.query.Query for the query box. No need to reinvent it. I believe that argument strings should be parsed into an argument list using shlex.split. No need to reinvent that either. But I am not an expert in this area and the doc it rather vague. I suspect that 'posix=False' should be used on Windows. Does anyone know? Gabriel's patch is the only one using shlex.split, but always with the default 'posix=True'. Saimadhav tested his patch on Debian. The others did not say. A verified-by-human htest should be added to runscript.py, and manual test running 'import sys; print(sys.argv)' from an editor done on the 3 major OSes. ---------- stage: patch review -> needs patch title: Command-line arguments when running in IDLE -> Simulate command-line arguments for program run in IDLE versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 20:25:05 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 02 Jun 2019 00:25:05 +0000 Subject: [issue36984] typing docs "versionadded" is inaccurate for many attributes In-Reply-To: <1558416035.31.0.248938950481.issue36984@roundup.psfhosted.org> Message-ID: <1559435105.76.0.780081619171.issue36984@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 20:37:13 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 02 Jun 2019 00:37:13 +0000 Subject: [issue5680] Simulate command-line arguments for program run in IDLE In-Reply-To: <1238798556.38.0.28468201552.issue5680@psf.upfronthosting.co.za> Message-ID: <1559435833.63.0.420887024955.issue5680@roundup.psfhosted.org> Cheryl Sabella added the comment: I'll can work on a PR for this, unless you want to do it based on your research. ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 21:13:40 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 02 Jun 2019 01:13:40 +0000 Subject: [issue5680] Simulate command-line arguments for program run in IDLE In-Reply-To: <1238798556.38.0.28468201552.issue5680@psf.upfronthosting.co.za> Message-ID: <1559438020.61.0.397254675825.issue5680@roundup.psfhosted.org> Terry J. Reedy added the comment: When running IDLE normally, with a subprocess, it would be possible to pass arguments to python itself when IDLE restarts the user process (with shell.restart_shell()). That would be another issue. We would have to look at whether any options would disable idlelib.run and how running code supervised might change results. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 21:18:12 2019 From: report at bugs.python.org (N.P. Khelili) Date: Sun, 02 Jun 2019 01:18:12 +0000 Subject: [issue37130] pathlib.with_name() doesn't like unnamed files. Message-ID: <1559438292.33.0.601764456145.issue37130@roundup.psfhosted.org> New submission from N.P. Khelili : Hi guys! I'm new to python and working on my first real project with it.... I'm sorry if it's not the right place for posting this. I noticed that that pathlib.with_name() method does not accept to give a name to a path that does not already have one. It seems a bit inconsistent knowing that the Path constructor does not require one... >>> Path() PosixPath('.') >>> Path().resolve() PosixPath('/home/nono') but: >>> Path().with_name('dodo') Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.7/pathlib.py", line 819, in with_name raise ValueError("%r has an empty name" % (self,)) ValueError: PosixPath('.') has an empty name whereas if you do: >>> Path().resolve().with_name('dodo') PosixPath('/home/dodo') I first tought "explicit is better than implicit" and then why not allways use resolve first! That was not a big deal but then I tried: >>> Path('..').with_name('dudu').resolve() PosixPath('/home/nono/dudu') ( ! ) >>> Path('..').resolve().with_name('dudu') PosixPath('/dudu') It seems that the dots and slashes are in fact not really interpreted leading to: >>> Path('../..').with_name('dudu') PosixPath('../dudu') >>> Path('../..').with_name('dudu').resolve() PosixPath('/home/dudu') ( ! ) >>> Path('../..').resolve().with_name('dudu') Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.7/pathlib.py", line 819, in with_name raise ValueError("%r has an empty name" % (self,)) ValueError: PosixPath('/') has an empty name Even if the doc briefly tells about this, I found this behavior quite disturbing.... I don't know what could be the correct answer to this, maybe making Path('..') as invalid as Path('.'), or adding a few more lines in the doc... Sincerly yours, ---------- components: Library (Lib) messages: 344250 nosy: Nophke priority: normal severity: normal status: open title: pathlib.with_name() doesn't like unnamed files. type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 21:20:53 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 02 Jun 2019 01:20:53 +0000 Subject: [issue5680] Simulate command-line arguments for program run in IDLE In-Reply-To: <1238798556.38.0.28468201552.issue5680@psf.upfronthosting.co.za> Message-ID: <1559438453.54.0.335802186596.issue5680@roundup.psfhosted.org> Terry J. Reedy added the comment: My suspicion about posix=False was wrong. >>> shlex.split(''' 1 "'a' 'b'" ''', posix=False) ['1', '"\'a\' \'b\'"'] # len(...[1]) = 9 >>> shlex.split(''' 1 '"a" "b"' ''') ['1', '"a" "b"'] # len = 7 f:\dev\3x>py -c "import sys; print(sys.argv)" 1 "'a' 'b'" ['-c', '1', "'a' 'b'"] # Matches 'True' >>> shlex.split(''' 1 '"a" "b"' ''', posix=False) ['1', '\'"a" "b"\''] >>> shlex.split(''' 1 '"a" "b"' ''') ['1', '"a" "b"'] # Similar difference f:\dev\3x>py -c "import sys; print(sys.argv)" 1 '"a" "b"' ['-c', '1', "'a", "b'"] # crazy inversion and 3 args, matches neither ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 21:37:19 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 02 Jun 2019 01:37:19 +0000 Subject: [issue5680] Simulate command-line arguments for program run in IDLE In-Reply-To: <1238798556.38.0.28468201552.issue5680@psf.upfronthosting.co.za> Message-ID: <1559439439.13.0.696459641267.issue5680@roundup.psfhosted.org> Terry J. Reedy added the comment: Cheryl, go ahead after reading the notes above. Use an f-string for the runcommand argument and remember that it is run within the pristine user environment. Otherwise, let's start with minimal changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 22:38:21 2019 From: report at bugs.python.org (Inada Naoki) Date: Sun, 02 Jun 2019 02:38:21 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559443101.7.0.947808525505.issue36839@roundup.psfhosted.org> Inada Naoki added the comment: > And I understood that Dino proposed to share one code instance as a memory mapped file for *all* processes. What instance means? code object? co_code? Anyway, Dino didn't propose such thing. He only proposed accepting buffer object for code constructor. He didn't describe how to use buffer object. Python doesn't provide share buffer object inter processes. There are no enough concrete information for estimate benefits. We're discussing imagination, not concrete idea. Let's stop discuss more, and wait Dino provide concrete example which can be used to estimate benefits. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 22:40:43 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sun, 02 Jun 2019 02:40:43 +0000 Subject: [issue35964] shutil.make_archive (xxx, tar, root_dir) is adding './' entry to archive which is wrong In-Reply-To: <1549888846.57.0.721579437713.issue35964@roundup.psfhosted.org> Message-ID: <1559443243.44.0.823278203912.issue35964@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- keywords: +patch pull_requests: +13621 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13738 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 1 22:45:22 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sun, 02 Jun 2019 02:45:22 +0000 Subject: [issue35964] shutil.make_archive (xxx, tar, root_dir) is adding './' entry to archive which is wrong In-Reply-To: <1549888846.57.0.721579437713.issue35964@roundup.psfhosted.org> Message-ID: <1559443522.41.0.0744971372706.issue35964@roundup.psfhosted.org> Jeffrey Kintscher added the comment: I submitted a pull request that excludes '.' directory entries when adding directories to a tar archive. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 01:58:22 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 02 Jun 2019 05:58:22 +0000 Subject: [issue32865] os.pipe creates inheritable FDs with a bad internal state on Windows In-Reply-To: <1518882714.97.0.467229070634.issue32865@psf.upfronthosting.co.za> Message-ID: <1559455102.84.0.397040745882.issue32865@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +13622 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13739 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 02:08:31 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Jun 2019 06:08:31 +0000 Subject: [issue36781] Optimize sum() for bools In-Reply-To: <1556876973.98.0.990157093134.issue36781@roundup.psfhosted.org> Message-ID: <1559455711.35.0.473338525017.issue36781@roundup.psfhosted.org> Serhiy Storchaka added the comment: I am not sure that this optimization should be added. sum(pred(x) for x in data) will be always slower than sum(1 for x in data if pred(x)) because more items is passed to sun() in the former case. It can be considered as an anti-pattern. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 02:15:24 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Jun 2019 06:15:24 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559456124.77.0.985218383015.issue36839@roundup.psfhosted.org> Serhiy Storchaka added the comment: The managed buffer can be shared if it refers to the same bytes. But different code objects in the same process refer to different bytes, therefore they should have distinct managed buffers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 03:38:22 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sun, 02 Jun 2019 07:38:22 +0000 Subject: [issue1438480] shutil.move raises OSError when copystat fails Message-ID: <1559461102.45.0.774199083563.issue1438480@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 03:41:56 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 02 Jun 2019 07:41:56 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559461316.0.0.774721961709.issue35431@roundup.psfhosted.org> Mark Dickinson added the comment: @David Ratcliffe > the sum of the first n positive integers is binomial(n+1, 2), and the formula should still work if n is zero. I agree that's a convincing use-case. Can you think of any practical uses for allowing negative `k`? I can't. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 03:43:36 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 02 Jun 2019 07:43:36 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559461416.22.0.00430568926377.issue35431@roundup.psfhosted.org> Mark Dickinson added the comment: > @David Ratcliffe Radcliffe! Apologies for the misspelling. It's still early in this timezone and I haven't had any coffee yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 04:17:04 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Jun 2019 08:17:04 +0000 Subject: [issue37128] Add math.perm() In-Reply-To: <1559422049.94.0.857716315829.issue37128@roundup.psfhosted.org> Message-ID: <1559463424.46.0.255655740138.issue37128@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 5ae299ac78abb628803ab7dee0997364547f5cc8 by Serhiy Storchaka in branch 'master': bpo-37128: Add math.perm(). (GH-13731) https://github.com/python/cpython/commit/5ae299ac78abb628803ab7dee0997364547f5cc8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 04:53:34 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Jun 2019 08:53:34 +0000 Subject: [issue37128] Add math.perm() In-Reply-To: <1559422049.94.0.857716315829.issue37128@roundup.psfhosted.org> Message-ID: <1559465614.71.0.765601980685.issue37128@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 04:53:41 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Jun 2019 08:53:41 +0000 Subject: [issue37128] Add math.perm() In-Reply-To: <1559422049.94.0.857716315829.issue37128@roundup.psfhosted.org> Message-ID: <1559465621.32.0.896610996582.issue37128@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 05:10:40 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 02 Jun 2019 09:10:40 +0000 Subject: [issue36879] bug with round() and "numpy floats" In-Reply-To: <1557521461.62.0.231118714409.issue36879@roundup.psfhosted.org> Message-ID: <1559466640.1.0.776281395934.issue36879@roundup.psfhosted.org> Change by Mark Dickinson : ---------- resolution: -> third party stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 05:24:09 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 02 Jun 2019 09:24:09 +0000 Subject: [issue36027] Support negative exponents in pow() where a modulus is specified. In-Reply-To: <1550520659.43.0.126744170658.issue36027@roundup.psfhosted.org> Message-ID: <1559467449.09.0.223110054675.issue36027@roundup.psfhosted.org> Mark Dickinson added the comment: New changeset c52996785a45d4693857ea219e040777a14584f8 by Mark Dickinson in branch 'master': bpo-36027: Extend three-argument pow to negative second argument (GH-13266) https://github.com/python/cpython/commit/c52996785a45d4693857ea219e040777a14584f8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 05:25:02 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 02 Jun 2019 09:25:02 +0000 Subject: [issue36027] Support negative exponents in pow() where a modulus is specified. In-Reply-To: <1550520659.43.0.126744170658.issue36027@roundup.psfhosted.org> Message-ID: <1559467502.97.0.407208085846.issue36027@roundup.psfhosted.org> Mark Dickinson added the comment: Done. Closing. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 05:32:08 2019 From: report at bugs.python.org (Stefan Krah) Date: Sun, 02 Jun 2019 09:32:08 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559467928.57.0.116015194278.issue36839@roundup.psfhosted.org> Stefan Krah added the comment: On Sun, Jun 02, 2019 at 02:38:21AM +0000, Inada Naoki wrote: > What instance means? code object? co_code? > Anyway, Dino didn't propose such thing. He only proposed accepting buffer object for code constructor. > He didn't describe how to use buffer object. Python doesn't provide share buffer object inter processes. He did, at a high level. in the original mail: "If code objects supported the buffer protocol it would be possible to load code from a memory mapped file which is shared across all of the processes." It is not very detailed, but gives the rationale. I assumed that the new shared memory support would be used, but it would be nice to hear more details. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 05:39:49 2019 From: report at bugs.python.org (Terji) Date: Sun, 02 Jun 2019 09:39:49 +0000 Subject: [issue37131] all(range()...)) is needlessley slow Message-ID: <1559468389.01.0.935675553387.issue37131@roundup.psfhosted.org> New submission from Terji : Checking if a range's items are ll truthy can be done y checking if 0 the range contains 0, however currently Python iterates over the range, making the operation slower than needed. >>> rng = range(1, 1_000_000) >>> timeit all(rng) 19.9 ms ? 599 ?s per loop If the all function could special case range, this could be like made fast like this: if isinstance(obj, range): if 0 in obj: return False return True ---------- components: Interpreter Core messages: 344263 nosy: Petersen priority: normal severity: normal status: open title: all(range()...)) is needlessley slow type: performance versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 05:58:04 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 02 Jun 2019 09:58:04 +0000 Subject: [issue37131] all(range()...)) is needlessley slow In-Reply-To: <1559468389.01.0.935675553387.issue37131@roundup.psfhosted.org> Message-ID: <1559469484.67.0.591441021466.issue37131@roundup.psfhosted.org> Steven D'Aprano added the comment: Why should ``all()`` special case ``range``? Apart from showing off benchmarks, what's the point? Should ``any()`` also special case it? How about other lazy sequences and computed iterables, such as itertools.count objects, itertools.cycle objects, itertools.repeat objects, etc? How many special cases do we want? Personally, I don't *necessarily* oppose special-casing types, but it breaks the independence of types, and couples the all() function and the range() function. To be worth doing, we should get some practical benefit out of it. It isn't clear what that benefit is. Don't get me wrong, its not like I *want* all(range(1, 10**10)) to be slow. But nor do I want to couple the all() function to the range function and complicate the implementation if there is no corresponding benefit. After all, testing with all() is fundamentally an O(N) worst case operation so anything better than that is a nice surprise. If there were special dunders __all__ and __any__ it would be easy to encapsulate this behaviour inside the range objects themselves, and neither any() nor all() would need to know anything about range objects. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 06:25:22 2019 From: report at bugs.python.org (Terji) Date: Sun, 02 Jun 2019 10:25:22 +0000 Subject: [issue37131] all(range()...)) is needlessley slow In-Reply-To: <1559468389.01.0.935675553387.issue37131@roundup.psfhosted.org> Message-ID: <1559471122.88.0.327136075482.issue37131@roundup.psfhosted.org> Terji added the comment: >> Why should ``all()`` special case ``range``? Apart from showing off benchmarks, what's the point? Mostly to avoid silly mistakes, and the overhead of doing it would be very small, so a very small trade-off. >> Should ``any()`` also special case it? No, ``any()``takes at most two iterations to check truthiness in a ``range()``, so that's wouldn't be needed. >> How about other lazy sequences and computed iterables, such as itertools.count objects, itertools.cycle objects, itertools.repeat objects, etc? How many special cases do we want? No, I wouldn't propose that. The argument would be that those are iterators/generators while ``range()`` is special-cased built-in sequence with known properties. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 06:27:17 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 02 Jun 2019 10:27:17 +0000 Subject: [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1559471237.66.0.182013088254.issue17576@roundup.psfhosted.org> Mark Dickinson added the comment: I'm working on a PR that finally changes the DeprecationWarnings that Serhiy introduced to TypeErrors; I think that should be acceptable, four Python versions and some years later. With that PR: - int will always return something of exact type `int` (or raise) - operator.index will always return something of exact type `int` (or raise) - PyNumber_Index will always use `__index__` for int subclasses, so this should fix the issue that Barry originally reported (mismatch between `obj.__index__()` and `operator.index(obj)`). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 06:30:44 2019 From: report at bugs.python.org (Terji) Date: Sun, 02 Jun 2019 10:30:44 +0000 Subject: [issue37131] all(range()...)) is needlessley slow In-Reply-To: <1559468389.01.0.935675553387.issue37131@roundup.psfhosted.org> Message-ID: <1559471444.51.0.271430280205.issue37131@roundup.psfhosted.org> Terji added the comment: >> If there were special dunders __all__ and __any__ it would be easy to encapsulate this behaviour inside the range objects themselves, and neither any() nor all() would need to know anything about range objects. This sounds very interesting, and more general. It would be useful for e.g. numpy arrays, where ``all(arr)`` currently is slower than ``arr.all()``. Don't know it there's a reason it wasn't implemented this way originally? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 06:37:37 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 02 Jun 2019 10:37:37 +0000 Subject: [issue37131] all(range()...)) is needlessley slow In-Reply-To: <1559471122.88.0.327136075482.issue37131@roundup.psfhosted.org> Message-ID: <20190602103728.GU4221@ando.pearwood.info> Steven D'Aprano added the comment: > >> Why should ``all()`` special case ``range``? Apart from showing off benchmarks, what's the point? > > Mostly to avoid silly mistakes What sort of silly mistakes? > and the overhead of doing it would be very small, so a very small trade-off. Its not just the overhead, its the coupling between two chunks of code which should be independent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 06:46:42 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 02 Jun 2019 10:46:42 +0000 Subject: [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1559472402.09.0.271020602945.issue17576@roundup.psfhosted.org> Change by Mark Dickinson : ---------- assignee: ethan.furman -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 06:54:57 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Jun 2019 10:54:57 +0000 Subject: [issue37132] Add a module for integer related math functions Message-ID: <1559472897.43.0.110105466613.issue37132@roundup.psfhosted.org> New submission from Serhiy Storchaka : The math module contains as function for floating-point numbers, as wells as functions for integer only numbers: factorial(), gcd(). Yet few integer specific functions was added in 3.8: isqrt(), perm(), comb(). The proposed PR adds the new imath module, adds into it old functions factorial() and gcd() and moves new functions. It also adds two additional functions: as_integer_ratio() and ilog2(). There are plans for adding more integer functions: divide_and_round(), is_prime(), primes(), but the work in progress. ---------- components: Library (Lib) messages: 344269 nosy: mark.dickinson, rhettinger, serhiy.storchaka, stutzbach, tim.peters priority: normal severity: normal status: open title: Add a module for integer related math functions type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 06:56:11 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 02 Jun 2019 10:56:11 +0000 Subject: [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1559472971.65.0.644729907792.issue17576@roundup.psfhosted.org> Change by Mark Dickinson : ---------- pull_requests: +13623 pull_request: https://github.com/python/cpython/pull/13740 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 06:56:41 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 02 Jun 2019 10:56:41 +0000 Subject: [issue35621] asyncio.create_subprocess_exec() only works with main event loop In-Reply-To: <1546210778.19.0.43686311162.issue35621@roundup.psfhosted.org> Message-ID: <1559473001.18.0.383202564667.issue35621@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 13ed07998ad93dbdd94991ba0451b9b559f07972 by Andrew Svetlov in branch 'master': bpo-35621: Support running subprocesses in asyncio when loop is executed in non-main thread (#13630) https://github.com/python/cpython/commit/13ed07998ad93dbdd94991ba0451b9b559f07972 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 06:57:09 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 02 Jun 2019 10:57:09 +0000 Subject: [issue35621] asyncio.create_subprocess_exec() only works with main event loop In-Reply-To: <1546210778.19.0.43686311162.issue35621@roundup.psfhosted.org> Message-ID: <1559473029.81.0.0256277828828.issue35621@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 06:58:49 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Jun 2019 10:58:49 +0000 Subject: [issue37132] Add a module for integer related math functions In-Reply-To: <1559472897.43.0.110105466613.issue37132@roundup.psfhosted.org> Message-ID: <1559473129.78.0.642881826132.issue37132@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +13624 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13741 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 07:01:47 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Jun 2019 11:01:47 +0000 Subject: [issue36027] Support negative exponents in pow() where a modulus is specified. In-Reply-To: <1550520659.43.0.126744170658.issue36027@roundup.psfhosted.org> Message-ID: <1559473307.2.0.118866788397.issue36027@roundup.psfhosted.org> Serhiy Storchaka added the comment: PR 13266 introduced a compiler warning. Objects/longobject.c: In function ?long_invmod?: Objects/longobject.c:4246:25: warning: passing argument 2 of ?long_compare? from incompatible pointer type [-Wincompatible-pointer-types] if (long_compare(a, _PyLong_One)) { ^~~~~~~~~~~ Objects/longobject.c:3057:1: note: expected ?PyLongObject * {aka struct _longobject *}? but argument is of type ?PyObject * {aka struct _object *}? long_compare(PyLongObject *a, PyLongObject *b) ^~~~~~~~~~~~ ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 07:01:50 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 02 Jun 2019 11:01:50 +0000 Subject: [issue35635] asyncio.create_subprocess_exec() only works in main thread In-Reply-To: <1546394840.15.0.0864584726941.issue35635@roundup.psfhosted.org> Message-ID: <1559473310.69.0.391500443167.issue35635@roundup.psfhosted.org> Andrew Svetlov added the comment: Fixed by #35621 ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> asyncio.create_subprocess_exec() only works with main event loop _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 07:09:41 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 02 Jun 2019 11:09:41 +0000 Subject: [issue32052] Provide access to buffer of asyncio.StreamReader In-Reply-To: <1510859388.33.0.213398074469.issue32052@psf.upfronthosting.co.za> Message-ID: <1559473781.31.0.257800232695.issue32052@roundup.psfhosted.org> Andrew Svetlov added the comment: Closing. Brief: 1. Access to an internal buffer is not an option. 2. Pushing data back to stream after fetching is not an option too: it kills almost any possible optimization and makes code overcomplicated. aiohttp used to have "unread_data()" API but we deprecated it and going to remove the method entirely. A wrapper around the stream with puback functionality is an option though unless it doesn't touch underlying stream implementation. 3. Extending a set of reader operations is a good idea, please make a separate issue with a concrete proposal if needed. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 07:10:30 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 02 Jun 2019 11:10:30 +0000 Subject: [issue37132] Add a module for integer related math functions In-Reply-To: <1559472897.43.0.110105466613.issue37132@roundup.psfhosted.org> Message-ID: <1559473830.89.0.622325971573.issue37132@roundup.psfhosted.org> Mark Dickinson added the comment: Some questions: - What's the plan for the existing functions `math.gcd` and `math.factorial`? Do they eventually get deprecated, or do we keep `gcd` and `factorial` in both `math` and `imath`? - Does PEP 399 apply here? If so, we'll need a pure Python version as well as a C version - Should `imath.isqrt` be renamed to `imath.sqrt`? - What's the actual benefit of this separation? This feels like a really big change to be making a day before feature freeze; I'm not convinced that we don't need a PEP for this. How bad would it be if we have to defer until 3.9? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 07:11:42 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 02 Jun 2019 11:11:42 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1559473902.93.0.750571890561.issue33694@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- pull_requests: +13625 pull_request: https://github.com/python/cpython/pull/13630 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 07:11:49 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Jun 2019 11:11:49 +0000 Subject: [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1559473909.82.0.673703627215.issue17576@roundup.psfhosted.org> Serhiy Storchaka added the comment: I am not sure that raising an error is the best option. We can just convert an integer subclass to an exact int using _PyLong_Copy(). I am not sure that converting to an exact int in low-level C API functions is the best option. In many cases we use only the content of the resulting object ignoring its type (when convert it to the C integer or float, to bytes array, to new instance of int subclass). Creating a new exact int is a waste of time. This is why I withdrawn my patches and this issue is still open. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 07:14:24 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 02 Jun 2019 11:14:24 +0000 Subject: [issue31087] asyncio.create_subprocess_* should honor `encoding` In-Reply-To: <1501477317.46.0.791551033282.issue31087@psf.upfronthosting.co.za> Message-ID: <1559474064.59.0.726176071066.issue31087@roundup.psfhosted.org> Andrew Svetlov added the comment: encoding was explicitly disabled by #36686 Now its usage generates ValueError. asyncio stdio/stdout/stderr streams are bytes. If you want to propose a patch that supports text streams -- please create another issue for that. ---------- nosy: +asvetlov resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 07:14:49 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 02 Jun 2019 11:14:49 +0000 Subject: [issue37132] Add a module for integer related math functions In-Reply-To: <1559472897.43.0.110105466613.issue37132@roundup.psfhosted.org> Message-ID: <1559474089.86.0.770482313099.issue37132@roundup.psfhosted.org> Mark Dickinson added the comment: > Should `imath.isqrt` be renamed to `imath.sqrt`? On futher reflection, I don't think it should. It's a different function, so it's not like comparing `math.sqrt` and `cmath.sqrt`. One more: I suggest renaming the new function `ilog` to `ilog2`, for consistency with `math.log` versus `math.log2`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 07:16:29 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 02 Jun 2019 11:16:29 +0000 Subject: [issue32115] Ignored SIGCHLD causes asyncio.Process.wait to hang forever In-Reply-To: <1511375532.97.0.213398074469.issue32115@psf.upfronthosting.co.za> Message-ID: <1559474189.93.0.0729238176664.issue32115@roundup.psfhosted.org> Andrew Svetlov added the comment: #35621 fixes the problem for default ThreadedChildWatcher ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> asyncio.create_subprocess_exec() only works with main event loop _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 07:25:16 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Jun 2019 11:25:16 +0000 Subject: [issue37132] Add a module for integer related math functions In-Reply-To: <1559472897.43.0.110105466613.issue37132@roundup.psfhosted.org> Message-ID: <1559474716.18.0.768878584457.issue37132@roundup.psfhosted.org> Serhiy Storchaka added the comment: > What's the plan for the existing functions `math.gcd` and `math.factorial`? I think they should eventually get deprecated, but with long term of deprecation. Deprecation warning should be added only when imath versions are already available in older Python versions. But they can be also kept as pure aliases for very long time. > Does PEP 399 apply here? There were no Python implementations when these functions was in the math module. But there are Python implementations for all these functions (used in tests or as predecessors), so it is not hard to add them in the stdlib. Easier that to implement math.sin() on Python from scratch. > Should `imath.isqrt` be renamed to `imath.sqrt`? I considered this idea and do not have answer. > What's the actual benefit of this separation? Currently math becomes a mix of very different functions. Separation will help to keep it simpler (from user and implementation sides). It also adds a place for landing new integer specific functions which are too specific to add them into the math module or into the int class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 07:26:28 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 02 Jun 2019 11:26:28 +0000 Subject: [issue37132] Add a module for integer related math functions In-Reply-To: <1559472897.43.0.110105466613.issue37132@roundup.psfhosted.org> Message-ID: <1559474788.76.0.170292819268.issue37132@roundup.psfhosted.org> Mark Dickinson added the comment: I think the new `as_integer_ratio` also needs discussion: it was agreed at some point in the past to add `as_integer_ratio` *methods* on all numeric built-in types, and there's a PR for that. Adding `as_integer_ratio` as a new function too seems like two ways to do it. Please can we defer to 3.9? There just isn't time for the design discussions that are needed, and I'd personally rather see the first version of the `imath` module be somewhat complete, with `is_prime` and `primes` already. I do realise that from the perspective of adding an `imath` module, the accumulation of integer-based functions in the `math` module is something of a wart that we're making worse in 3.8, but I don't think rushing in this change is the solution. Radical suggestion: should we consider delaying the inclusions of `comb`, `perm` and `isqrt` in the math module so that we can do this properly for 3.9? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 07:39:07 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Jun 2019 11:39:07 +0000 Subject: [issue37132] Add a module for integer related math functions In-Reply-To: <1559472897.43.0.110105466613.issue37132@roundup.psfhosted.org> Message-ID: <1559475547.09.0.51301349465.issue37132@roundup.psfhosted.org> Serhiy Storchaka added the comment: Actually it was ilog2. There was just an error in the documentation. Currently we have two ways to represent the number as an integer ratio. The official way is two properties numerator and denominator, every number should have them. And some concrete numeric types have the as_integer_ratio() method which returns both values. Rather of adding as_integer_ratio() to all other numeric types I propose to add a helper function which uses either the as_integer_ratio() method if available, or the numerator and denominator properties. Currently any code that uses the as_integer_ratio() method should implement a fallback to numerator and denominator. With imath.as_integer_ratio() it can just use this function. > Radical suggestion: should we consider delaying the inclusions of `comb`, `perm` and `isqrt` in the math module so that we can do this properly for 3.9? I like it. I suggest to delay also adding the int.as_integer_ratio() method. Currently it does not help because there are other numeric methods without the as_integer_ratio() method. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 07:59:57 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Jun 2019 11:59:57 +0000 Subject: [issue37131] all(range()...)) is needlessley slow In-Reply-To: <1559468389.01.0.935675553387.issue37131@roundup.psfhosted.org> Message-ID: <1559476797.22.0.531648232037.issue37131@roundup.psfhosted.org> Serhiy Storchaka added the comment: You can implement it yourself. _all = all def all(obj): if isinstance(obj, range): return 0 not in obj return _all(obj) I do not see reasons to do this in the stdlib. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 08:14:18 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 02 Jun 2019 12:14:18 +0000 Subject: [issue37132] Add a module for integer related math functions In-Reply-To: <1559472897.43.0.110105466613.issue37132@roundup.psfhosted.org> Message-ID: <1559477658.94.0.118231914365.issue37132@roundup.psfhosted.org> Mark Dickinson added the comment: I'm pretty much out of core-dev cycles for this weekend; I'm happy to review GH-13741, but won't have time to do so before next weekend. I'm overall -0 on this change; there's a minor benefit in the separation, but for me it's outweighted by the duplication of `gcd` and `factorial` (or in the case of `gcd`, triplication, since it's also in the `fractions` module). I'm out of time, so I'll be brief, but if this does go into 3.8, here are my thoughts: - please remove the imath.as_integer_ratio function; it needs more discussion, and it has quite a different character from the other functions; it's not at all clear to me that it belongs. We might end up putting it back in eventually, but it needs discussion first, and we don't have time for that discussion before feature freeze. - please add the pure Python version of imath that PEP 399 requires, or get Brett's confirmation that PEP 399 doesn't apply in this case. - please get agreement from one (preferably both) of Tim and Raymond Raymond, Tim: thoughts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 08:37:53 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Sun, 02 Jun 2019 12:37:53 +0000 Subject: [issue35621] asyncio.create_subprocess_exec() only works with main event loop In-Reply-To: <1546210778.19.0.43686311162.issue35621@roundup.psfhosted.org> Message-ID: <1559479073.26.0.674255431599.issue35621@roundup.psfhosted.org> Kubilay Kocak added the comment: New buildbot failure on koobs-freebsd10 that appears related to (includes) this changeset Full log attached ---------- nosy: +koobs Added file: https://bugs.python.org/file48384/koobs-freebsd-10-non-debug-3x-build-1170.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 08:38:10 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Sun, 02 Jun 2019 12:38:10 +0000 Subject: [issue35621] asyncio.create_subprocess_exec() only works with main event loop In-Reply-To: <1546210778.19.0.43686311162.issue35621@roundup.psfhosted.org> Message-ID: <1559479090.33.0.0665506880127.issue35621@roundup.psfhosted.org> Change by Kubilay Kocak : ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 09:38:01 2019 From: report at bugs.python.org (Marco Sulla) Date: Sun, 02 Jun 2019 13:38:01 +0000 Subject: [issue36964] `python3 -m venv NAME`: virtualenv is not portable In-Reply-To: <1558267639.25.0.0700835222258.issue36964@roundup.psfhosted.org> Message-ID: <1559482681.76.0.630211501807.issue36964@roundup.psfhosted.org> Marco Sulla added the comment: Well, what about the modification to VIRTUAL_ENV? I think it's little and without harm. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 10:11:37 2019 From: report at bugs.python.org (=?utf-8?b?5p6X6Ieq5Z2H?=) Date: Sun, 02 Jun 2019 14:11:37 +0000 Subject: [issue37119] Equality on dict.values() are inconsistent between 2 and 3 In-Reply-To: <1559362021.42.0.783299654915.issue37119@roundup.psfhosted.org> Message-ID: <1559484697.88.0.257467374567.issue37119@roundup.psfhosted.org> ??? added the comment: Hi Karthikeyan and Serhiy, Thank you for the explanation. I'll check the references you gave me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 10:21:12 2019 From: report at bugs.python.org (=?utf-8?b?0JDQvdC00YDQtdC5INCa0LDQt9Cw0L3RhtC10LI=?=) Date: Sun, 02 Jun 2019 14:21:12 +0000 Subject: [issue37133] Erro "ffi.h: No such file" when build python 3.8 (branch master) on windows 10 Message-ID: <1559485272.43.0.308074768888.issue37133@roundup.psfhosted.org> New submission from ?????? ???????? : Where to get "ffi.h" file? ---------- components: Build messages: 344287 nosy: heckad priority: normal severity: normal status: open title: Erro "ffi.h: No such file" when build python 3.8 (branch master) on windows 10 versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 10:22:24 2019 From: report at bugs.python.org (SilentGhost) Date: Sun, 02 Jun 2019 14:22:24 +0000 Subject: [issue37133] Erro "ffi.h: No such file" when build python 3.8 (branch master) on windows 10 In-Reply-To: <1559485272.43.0.308074768888.issue37133@roundup.psfhosted.org> Message-ID: <1559485344.06.0.81147397489.issue37133@roundup.psfhosted.org> Change by SilentGhost : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 10:24:28 2019 From: report at bugs.python.org (SilentGhost) Date: Sun, 02 Jun 2019 14:24:28 +0000 Subject: [issue37133] Erro "ffi.h: No such file" when build python 3.8 (branch master) on windows 10 In-Reply-To: <1559485272.43.0.308074768888.issue37133@roundup.psfhosted.org> Message-ID: <1559485468.33.0.851904771549.issue37133@roundup.psfhosted.org> SilentGhost added the comment: How are you building python? Have you been following these instructions? https://cpython-core-tutorial.readthedocs.io/en/latest/build_cpython_windows.html ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 10:45:18 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Jun 2019 14:45:18 +0000 Subject: [issue37126] test_threading is leaking references In-Reply-To: <1559408448.65.0.831974411649.issue37126@roundup.psfhosted.org> Message-ID: <1559486718.28.0.835156860499.issue37126@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 7ffcf848df214135abeea7f6c6faa4135fd0928f by Pablo Galindo in branch 'master': bpo-37126: Allow structseq objects to be tracked by the GC (GH-13729) https://github.com/python/cpython/commit/7ffcf848df214135abeea7f6c6faa4135fd0928f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 10:45:33 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Jun 2019 14:45:33 +0000 Subject: [issue37126] test_threading is leaking references In-Reply-To: <1559408448.65.0.831974411649.issue37126@roundup.psfhosted.org> Message-ID: <1559486733.05.0.985950973976.issue37126@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 10:51:11 2019 From: report at bugs.python.org (=?utf-8?b?0JDQvdC00YDQtdC5INCa0LDQt9Cw0L3RhtC10LI=?=) Date: Sun, 02 Jun 2019 14:51:11 +0000 Subject: [issue37133] Erro "ffi.h: No such file" when build python 3.8 (branch master) on windows 10 In-Reply-To: <1559485272.43.0.308074768888.issue37133@roundup.psfhosted.org> Message-ID: <1559487071.61.0.241043220342.issue37133@roundup.psfhosted.org> ?????? ???????? added the comment: No, I used https://devguide.python.org/setup/ guide. I have downloaded the latest version of Visual Studio 2019 and evaluated in PowerShell "PCBuild\build.bat". After this, I opened "PCBuild\pcbuild.sln" and trying to build "python" solution and run it. Instead of successful build, the build broked. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 11:05:21 2019 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 02 Jun 2019 15:05:21 +0000 Subject: [issue37024] SQLite flag in configure due to homebrew not linking sqlite In-Reply-To: <1558632381.76.0.984637995348.issue37024@roundup.psfhosted.org> Message-ID: <1559487921.69.0.872249086761.issue37024@roundup.psfhosted.org> Lysandros Nikolaou added the comment: This can be most likely be closed. In the last days I had some unrelated problems with my mac and had to do a full format. After reinstalling macOS the problem went away, so it must have been something specific to my previous state of things that triggered the error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 11:09:45 2019 From: report at bugs.python.org (Ned Deily) Date: Sun, 02 Jun 2019 15:09:45 +0000 Subject: [issue37024] SQLite flag in configure due to homebrew not linking sqlite In-Reply-To: <1558632381.76.0.984637995348.issue37024@roundup.psfhosted.org> Message-ID: <1559488185.75.0.188965751164.issue37024@roundup.psfhosted.org> Change by Ned Deily : ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 11:19:39 2019 From: report at bugs.python.org (Tim Peters) Date: Sun, 02 Jun 2019 15:19:39 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559488779.31.0.84783706415.issue35431@roundup.psfhosted.org> Tim Peters added the comment: I'm not convinced, although I agree relaxing k <= n is less damaging than relaxing k >= 0. Python isn't aimed at mathematicians (although some 3rd-party packages certainly are, and they're free to define things however they like). We have to trade off convenience for experts in edge cases against the likelihood that an ordinary user is making a mistake. For example, that's why, despite that Python supports complex numbers, math.sqrt(-1) raises ValueError. For _most_ users, trying that was probably an error in their logic that led to the argument being negative. Experts can use cmath.sqrt() instead. Ordinary users think comb(n, k) is the value of n!//(k!*(n-k)!), and as far as they're concerned factorial is only defined for non-negative integers. 0 <= k <= n follows from that. (Indeed, the current docs for `comb()` _define_ the result via the factorial expression.) And ordinary users think of the sum of the first n integers as "number of terms times the average", or memorize directly that the answer is n*(n+1)/2. That works fine for n=0. Only an expert thinks of it as `comb(n+1, 2)`. So I would still rather enforce 0 <= k <= n at the start, and relax it later only if there's significant demand. In going on three decades of using Python and having written my own `comb()` at least a dozen times, I've never found that constraint limiting, and enforcing it _has_ caught errors in my code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 11:57:53 2019 From: report at bugs.python.org (=?utf-8?b?0JDQvdC00YDQtdC5INCa0LDQt9Cw0L3RhtC10LI=?=) Date: Sun, 02 Jun 2019 15:57:53 +0000 Subject: [issue36670] test suite broken due to cpu usage feature on win 10/ german In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1559491073.63.0.0687670777968.issue36670@roundup.psfhosted.org> ?????? ???????? added the comment: I have the same problem in Russian locale. Adding "oem" encoding in the decode method solve problem with decoding but got: File "C:\Users\User\Documents\Projects\cpython\lib\test\libregrtest\win_utils.py", line 98, in getloadavg load = float(toks[1].replace('"', '')) ValueError: could not convert string to float In typeperf_output text with description of the error: '\r\n??????????? ?????, ?????????... \r\n??????: ???????? ?? ???????.\r\n\r\r' Translation on English is "Exiting, wait... Error: Counters are not specified." Is it possible to check if the counters are found in advance? ---------- nosy: +heckad _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 12:04:29 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 02 Jun 2019 16:04:29 +0000 Subject: [issue30786] getaddrinfo emulation does not support AI_NUMERICSERV In-Reply-To: <1498560008.54.0.948539783321.issue30786@psf.upfronthosting.co.za> Message-ID: <1559491469.08.0.523466283747.issue30786@roundup.psfhosted.org> Cheryl Sabella added the comment: I'm going to close this as the OP hasn't provided a response to Benjamin's question. It can be re-opened if additional information is provided. Thanks! ---------- nosy: +cheryl.sabella resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 12:10:43 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 02 Jun 2019 16:10:43 +0000 Subject: [issue35610] IDLE: replace use of EditorWindow.context_use_ps1 In-Reply-To: <1546059751.61.0.784436952304.issue35610@roundup.psfhosted.org> Message-ID: <1559491843.32.0.263671666593.issue35610@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10657 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 12:18:06 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Jun 2019 16:18:06 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation Message-ID: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : In the documentation, there are a lot of mismatches regarding function and method signatures that use positional-only arguments with respect to the docstrings (that properly use PEP570 syntax for documenting positional-only parameters). Not that the official syntax for positional-only parameters is accepted (the "/"), the documentation needs to be updated to reflect positional-only parameters in the functions and methods that use them as covered in the PEP document. ---------- assignee: docs at python components: Documentation messages: 344295 nosy: docs at python, pablogsal priority: normal severity: normal status: open title: Use PEP570 syntax in the documentation versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 12:24:34 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Jun 2019 16:24:34 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559492674.47.0.881810883102.issue37134@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +easy stage: -> needs patch title: Use PEP570 syntax in the documentation -> [EASY] Use PEP570 syntax in the documentation type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 12:34:17 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Jun 2019 16:34:17 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559493257.08.0.47751803551.issue37134@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +13626 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13743 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 12:36:28 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 02 Jun 2019 16:36:28 +0000 Subject: [issue37132] Add a module for integer related math functions In-Reply-To: <1559472897.43.0.110105466613.issue37132@roundup.psfhosted.org> Message-ID: <1559493388.47.0.724507437088.issue37132@roundup.psfhosted.org> Raymond Hettinger added the comment: -1 I prefer these functions get left in the regular math module and just organize the docs to separate out integer functions. Additional namespacing creates cognitive load and creates a findability problem. Also, I really don't want gcd() to be moved yet again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 12:41:32 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 02 Jun 2019 16:41:32 +0000 Subject: [issue37132] Add a module for integer related math functions In-Reply-To: <1559472897.43.0.110105466613.issue37132@roundup.psfhosted.org> Message-ID: <1559493692.05.0.926196401904.issue37132@roundup.psfhosted.org> Raymond Hettinger added the comment: After the beta feature freeze, I'll write up an edit the math module docs that makes in easier to find functions (by splitting out a section of the docs for these functions and by creating a summary link table at the top like we do for builtins). I really don't want a separate module for this and think that would work against the needs of usres. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 12:42:51 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 02 Jun 2019 16:42:51 +0000 Subject: [issue35610] IDLE: replace use of EditorWindow.context_use_ps1 In-Reply-To: <1546059751.61.0.784436952304.issue35610@roundup.psfhosted.org> Message-ID: <1559493771.24.0.366594165467.issue35610@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -10656 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 12:46:01 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 02 Jun 2019 16:46:01 +0000 Subject: [issue35610] IDLE: replace use of EditorWindow.context_use_ps1 In-Reply-To: <1546059751.61.0.784436952304.issue35610@roundup.psfhosted.org> Message-ID: <1559493961.24.0.10191493192.issue35610@roundup.psfhosted.org> Terry J. Reedy added the comment: PR 5968 was previously linked here due to my title editing mistake, soon reversed, on the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 12:58:54 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Jun 2019 16:58:54 +0000 Subject: [issue34261] Add description to clinic.py In-Reply-To: <1532782049.63.0.56676864532.issue34261@psf.upfronthosting.co.za> Message-ID: <1559494734.06.0.401991028683.issue34261@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 13:44:54 2019 From: report at bugs.python.org (Tim Hoffmann) Date: Sun, 02 Jun 2019 17:44:54 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1559497494.77.0.705587030673.issue33694@roundup.psfhosted.org> Change by Tim Hoffmann : ---------- pull_requests: +13627 pull_request: https://github.com/python/cpython/pull/8518 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 14:05:40 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Jun 2019 18:05:40 +0000 Subject: [issue12639] msilib Directory.start_component() fails if keyfile is not None In-Reply-To: <1311611007.28.0.321431208072.issue12639@psf.upfronthosting.co.za> Message-ID: <1559498740.05.0.285890365049.issue12639@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: test_msilib is leaking references https://bugs.python.org/issue37124 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 14:06:03 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Jun 2019 18:06:03 +0000 Subject: [issue37124] test_msilib is potentially leaking references and memory blocks In-Reply-To: <1559405726.45.0.528544648803.issue37124@roundup.psfhosted.org> Message-ID: <1559498763.19.0.855836023341.issue37124@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +lukasz.langa priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 14:19:01 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sun, 02 Jun 2019 18:19:01 +0000 Subject: [issue12178] csv writer doesn't escape escapechar In-Reply-To: <1306348030.98.0.468032848078.issue12178@psf.upfronthosting.co.za> Message-ID: <1559499541.19.0.340315588968.issue12178@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: -Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 14:31:56 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 02 Jun 2019 18:31:56 +0000 Subject: [issue35610] IDLE: replace use of EditorWindow.context_use_ps1 In-Reply-To: <1546059751.61.0.784436952304.issue35610@roundup.psfhosted.org> Message-ID: <1559500316.78.0.594230813641.issue35610@roundup.psfhosted.org> Terry J. Reedy added the comment: I don't especially like 'prompt_last_line', but cannot think of anything better. Removing the duplication now will make any future change easier. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 14:54:43 2019 From: report at bugs.python.org (Petter S) Date: Sun, 02 Jun 2019 18:54:43 +0000 Subject: [issue35047] Better error messages in unittest.mock In-Reply-To: <1540283736.06.0.788709270274.issue35047@psf.upfronthosting.co.za> Message-ID: <1559501683.39.0.812772694117.issue35047@roundup.psfhosted.org> Change by Petter S : ---------- pull_requests: +13628 pull_request: https://github.com/python/cpython/pull/13746 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 14:56:50 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 02 Jun 2019 18:56:50 +0000 Subject: [issue35610] IDLE: replace use of EditorWindow.context_use_ps1 In-Reply-To: <1546059751.61.0.784436952304.issue35610@roundup.psfhosted.org> Message-ID: <1559501810.94.0.656654240457.issue35610@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 6bdc4dee01788599808c7858e2fe9fdd72cf6792 by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-35610: IDLE - Replace .context_use_ps1 with .prompt_last_line (GH-11307) https://github.com/python/cpython/commit/6bdc4dee01788599808c7858e2fe9fdd72cf6792 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 14:58:50 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 02 Jun 2019 18:58:50 +0000 Subject: [issue35610] IDLE: replace use of EditorWindow.context_use_ps1 In-Reply-To: <1546059751.61.0.784436952304.issue35610@roundup.psfhosted.org> Message-ID: <1559501930.91.0.388546843297.issue35610@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13629 pull_request: https://github.com/python/cpython/pull/13747 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 14:59:29 2019 From: report at bugs.python.org (Petter S) Date: Sun, 02 Jun 2019 18:59:29 +0000 Subject: [issue27682] wsgiref BaseHandler / SimpleHandler can raise additional errors when handling an error In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1559501969.4.0.06494183706.issue27682@roundup.psfhosted.org> Change by Petter S : ---------- pull_requests: +13630 pull_request: https://github.com/python/cpython/pull/13748 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 15:00:02 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 02 Jun 2019 19:00:02 +0000 Subject: [issue36670] test suite broken due to cpu usage feature on win 10/ german In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1559502002.87.0.574884841851.issue36670@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: -terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 15:03:26 2019 From: report at bugs.python.org (Pierre Glaser) Date: Sun, 02 Jun 2019 19:03:26 +0000 Subject: [issue26836] Add memfd_create to os module In-Reply-To: <1461506163.13.0.0180353008827.issue26836@psf.upfronthosting.co.za> Message-ID: <1559502206.01.0.702485708.issue26836@roundup.psfhosted.org> Pierre Glaser added the comment: >From a quick skim at the man page of memfd_create, this looks promising. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 15:35:29 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Jun 2019 19:35:29 +0000 Subject: [issue37124] test_msilib is potentially leaking references and memory blocks In-Reply-To: <1559405726.45.0.528544648803.issue37124@roundup.psfhosted.org> Message-ID: <1559504129.78.0.620163609968.issue37124@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +13631 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13750 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 15:35:55 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 02 Jun 2019 19:35:55 +0000 Subject: [issue35610] IDLE: replace use of EditorWindow.context_use_ps1 In-Reply-To: <1546059751.61.0.784436952304.issue35610@roundup.psfhosted.org> Message-ID: <1559504155.98.0.706217756651.issue35610@roundup.psfhosted.org> miss-islington added the comment: New changeset b4e0bfd4778e142f037f50c19c4bb5bd123b4641 by Miss Islington (bot) in branch '3.7': bpo-35610: IDLE - Replace .context_use_ps1 with .prompt_last_line (GH-11307) https://github.com/python/cpython/commit/b4e0bfd4778e142f037f50c19c4bb5bd123b4641 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 15:36:38 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 02 Jun 2019 19:36:38 +0000 Subject: [issue35610] IDLE: replace use of EditorWindow.context_use_ps1 In-Reply-To: <1546059751.61.0.784436952304.issue35610@roundup.psfhosted.org> Message-ID: <1559504198.69.0.254789641815.issue35610@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 15:38:04 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Jun 2019 19:38:04 +0000 Subject: [issue37124] test_msilib is potentially leaking references and memory blocks In-Reply-To: <1559405726.45.0.528544648803.issue37124@roundup.psfhosted.org> Message-ID: <1559504284.92.0.966743484249.issue37124@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: The leak is because creating a 'msilib.Directory' adds an entry on a global variable '_directories', therefore leaking. My first PR will make sure the _directories is cleared out after the test to stop the leak, but it seems to me that the variable is unused. @Steve, could you confirm that there is still a reason for the msilib._directories? ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 15:42:56 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 02 Jun 2019 19:42:56 +0000 Subject: [issue35621] asyncio.create_subprocess_exec() only works with main event loop In-Reply-To: <1546210778.19.0.43686311162.issue35621@roundup.psfhosted.org> Message-ID: <1559504576.56.0.439902304309.issue35621@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Also seems to occur on Ubuntu : https://buildbot.python.org/all/#/builders/141/builds/1912/steps/5/logs/stdio karthi at ubuntu-s-1vcpu-1gb-blr1-01:~/cpython$ ./python -m unittest test.test_asyncio.test_unix_events ...................Exception in thread Thread-1: Traceback (most recent call last): File "/home/karthi/cpython/Lib/threading.py", line 923, in _bootstrap_inner self.run() File "/home/karthi/cpython/Lib/threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "/home/karthi/cpython/Lib/test/test_asyncio/test_unix_events.py", line 1833, in f self.assertIsInstance(watcher, asyncio.SafeChildWatcher) File "/home/karthi/cpython/Lib/unittest/case.py", line 1330, in assertIsInstance self.fail(self._formatMessage(msg, standardMsg)) File "/home/karthi/cpython/Lib/unittest/case.py", line 748, in fail raise self.failureException(msg) AssertionError: is not an instance of ../home/karthi/cpython/Lib/asyncio/base_events.py:646: ResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False> _warn(f"unclosed event loop {self!r}", ResourceWarning, source=self) ResourceWarning: Enable tracemalloc to get the object allocation traceback ............................................................................................... ---------------------------------------------------------------------- Ran 116 tests in 1.391s OK ---------- nosy: +pablogsal, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 15:51:58 2019 From: report at bugs.python.org (Zachary Ware) Date: Sun, 02 Jun 2019 19:51:58 +0000 Subject: [issue37133] Erro "ffi.h: No such file" when build python 3.8 (branch master) on windows 10 In-Reply-To: <1559485272.43.0.308074768888.issue37133@roundup.psfhosted.org> Message-ID: <1559505118.32.0.6572658944.issue37133@roundup.psfhosted.org> Zachary Ware added the comment: Did running PCbuild/build.bat successfully download dependencies to the `externals` directory? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 16:17:16 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 02 Jun 2019 20:17:16 +0000 Subject: [issue35621] asyncio.create_subprocess_exec() only works with main event loop In-Reply-To: <1546210778.19.0.43686311162.issue35621@roundup.psfhosted.org> Message-ID: <1559506636.5.0.569535614185.issue35621@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: It seems the assertion has to use ThreadedChildWatcher instead of SafeChildWatcher as the default seems to be changed at [0] . If changing assertion fixes the test I am curious why it didn't fail in the primary CI. [0] https://github.com/python/cpython/commit/13ed07998ad93dbdd94991ba0451b9b559f07972#diff-8441007d39090aec5e09dbfcfa9973b7R1299 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 16:22:01 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 02 Jun 2019 20:22:01 +0000 Subject: [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1559506921.43.0.802954892216.issue17576@roundup.psfhosted.org> Raymond Hettinger added the comment: Can we at least switch to PyLong_CheckExact? That would fix Barry's original issue and should run slightly faster. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 16:23:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Jun 2019 20:23:27 +0000 Subject: [issue37126] test_threading is leaking references In-Reply-To: <1559408448.65.0.831974411649.issue37126@roundup.psfhosted.org> Message-ID: <1559507007.23.0.520151802289.issue37126@roundup.psfhosted.org> STINNER Victor added the comment: You forgot to call PyObject_GC_UnTrack() in structseq_dealloc(), no? ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 16:25:20 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Jun 2019 20:25:20 +0000 Subject: [issue37126] test_threading is leaking references In-Reply-To: <1559408448.65.0.831974411649.issue37126@roundup.psfhosted.org> Message-ID: <1559507120.55.0.145027766138.issue37126@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +13632 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/13751 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 16:30:51 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Jun 2019 20:30:51 +0000 Subject: [issue37126] test_threading is leaking references In-Reply-To: <1559408448.65.0.831974411649.issue37126@roundup.psfhosted.org> Message-ID: <1559507451.32.0.273827557505.issue37126@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > You forgot to call PyObject_GC_UnTrack() in structseq_dealloc(), no? Yep, thanks for the catch! ---------- stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 16:36:24 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Jun 2019 20:36:24 +0000 Subject: [issue37124] test_msilib is potentially leaking references and memory blocks In-Reply-To: <1559405726.45.0.528544648803.issue37124@roundup.psfhosted.org> Message-ID: <1559507784.63.0.49515772089.issue37124@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset c0295dba259accc4b247beb22a0b2cc2f31d9850 by Pablo Galindo in branch 'master': bpo-37124: Fix reference leak in test_msilib (GH-13750) https://github.com/python/cpython/commit/c0295dba259accc4b247beb22a0b2cc2f31d9850 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 16:40:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Jun 2019 20:40:03 +0000 Subject: [issue36829] Add sys.unraisablehook() to customize how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1559508003.64.0.257711603701.issue36829@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Add sys.unraisablehook() to custom how "unraisable exceptions" are logged -> Add sys.unraisablehook() to customize how "unraisable exceptions" are logged _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 16:41:26 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 02 Jun 2019 20:41:26 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences In-Reply-To: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> Message-ID: <1559508086.01.0.0566514317663.issue32912@roundup.psfhosted.org> Raymond Hettinger added the comment: I'm seeing these warnings pop up from time to time with various third party packages (such as pyparsing which is invoked by ensurepip). Am wondering whether this should be deferred for another version or so until be have good confidence that the major third party packages have all had a chance to adapt. Otherwise, this will mostly be noise for end-users. Also, it gets in the way of the end-user strategy of "backslash anything that looks special" as preferred over "remember exactly which things are special". This may be a case of "the cure is worse than the disease". ---------- nosy: +rhettinger status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 16:42:45 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Jun 2019 20:42:45 +0000 Subject: [issue35621] asyncio.create_subprocess_exec() only works with main event loop In-Reply-To: <1546210778.19.0.43686311162.issue35621@roundup.psfhosted.org> Message-ID: <1559508165.94.0.442936041505.issue35621@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I cannot reproduce this issue locally :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 16:45:08 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Jun 2019 20:45:08 +0000 Subject: [issue35621] asyncio.create_subprocess_exec() only works with main event loop In-Reply-To: <1546210778.19.0.43686311162.issue35621@roundup.psfhosted.org> Message-ID: <1559508308.34.0.506633819807.issue35621@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: When I ran the tests, the watcher I get is a SafeChildWatcher ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 16:46:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Jun 2019 20:46:06 +0000 Subject: [issue36829] Add sys.unraisablehook() to customize how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1559508366.52.0.763187565432.issue36829@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13633 pull_request: https://github.com/python/cpython/pull/13752 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 16:50:18 2019 From: report at bugs.python.org (Jarl Gullberg) Date: Sun, 02 Jun 2019 20:50:18 +0000 Subject: [issue37080] Cannot compile Python3.7.3 on Alt-F (ARM) In-Reply-To: <1559337987.58.0.910746899611.issue37080@roundup.psfhosted.org> Message-ID: Jarl Gullberg added the comment: That's correct, CPython. I'm not sure if MicroPython would fit the bill for me, since this system is a full-blown Linux system. On Fri, 31 May 2019 at 23:26, Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > I presume you are trying to compile CPython. Perhaps you might do better > with MicroPython, designed for micro devices. Steve, do you know anything > about CPython on Arm with linux? > > ---------- > nosy: +steve.dower, terry.reedy > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 17:01:52 2019 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 02 Jun 2019 21:01:52 +0000 Subject: [issue37014] [First easy issue] fileinput module should document that openhook and mode are ignored when reading from stdin In-Reply-To: <1558545967.04.0.906137299955.issue37014@roundup.psfhosted.org> Message-ID: <1559509312.56.0.83488611034.issue37014@roundup.psfhosted.org> Ezio Melotti added the comment: New changeset aca273e2401ca3151e15e984f400233b7f255e15 by Ezio Melotti (Michele Angrisano) in branch 'master': bpo-37014: Update docstring and Documentation of fileinput.FileInput(). (GH-13545) https://github.com/python/cpython/commit/aca273e2401ca3151e15e984f400233b7f255e15 ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 17:02:03 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 02 Jun 2019 21:02:03 +0000 Subject: [issue37014] [First easy issue] fileinput module should document that openhook and mode are ignored when reading from stdin In-Reply-To: <1558545967.04.0.906137299955.issue37014@roundup.psfhosted.org> Message-ID: <1559509323.22.0.218259215051.issue37014@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13634 pull_request: https://github.com/python/cpython/pull/13753 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 17:03:25 2019 From: report at bugs.python.org (Jarl Gullberg) Date: Sun, 02 Jun 2019 21:03:25 +0000 Subject: [issue37080] Cannot compile Python3.7.3 on Alt-F (ARM) In-Reply-To: <1559057852.62.0.663214501823.issue37080@roundup.psfhosted.org> Message-ID: <1559509405.69.0.2593421702.issue37080@roundup.psfhosted.org> Jarl Gullberg added the comment: After some more testing, I can add that the same issue crops up when attempting to compile Python 2.7.16 as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 17:08:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Jun 2019 21:08:44 +0000 Subject: [issue36829] Add sys.unraisablehook() to customize how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1559509724.0.0.885467350769.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: New changeset cdce0574d03005e27b843fc110c54c99c7a76412 by Victor Stinner in branch 'master': bpo-36829: test_threading: Fix a ref cycle (GH-13752) https://github.com/python/cpython/commit/cdce0574d03005e27b843fc110c54c99c7a76412 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 17:13:42 2019 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 02 Jun 2019 21:13:42 +0000 Subject: [issue36985] typing.ForwardRef is undocumented In-Reply-To: <1559434040.77.0.43284750444.issue36985@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: Huh. I think I have mellowed with age. IOW SGTM. On Sat, Jun 1, 2019 at 17:07 Ivan Levkivskyi wrote: > > Ivan Levkivskyi added the comment: > > Guido, I remember you were against exposing `ForwardRef` as public at some > point, but recently you approved > https://github.com/python/cpython/pull/13456 that added it to > `typing.__all__`. I don't have any particular opinion on this, but if you > don't object, I think it would make sense to add a short section about this > to the docs, since it may be exposed at runtime, e.g. in `List['Cls']`. > > ---------- > nosy: +gvanrossum > > _______________________________________ > Python tracker > > _______________________________________ > -- --Guido (mobile) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 17:15:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Jun 2019 21:15:11 +0000 Subject: [issue37126] test_threading is leaking references In-Reply-To: <1559408448.65.0.831974411649.issue37126@roundup.psfhosted.org> Message-ID: <1559510111.92.0.185852963375.issue37126@roundup.psfhosted.org> STINNER Victor added the comment: Thanks. commit 3caf4de6f05f68c3a175f4d8ce870d7a0016622a Author: Pablo Galindo Date: Sun Jun 2 21:52:49 2019 +0100 Call PyObject_GC_UnTrack in structseq dealloc (GH-13751) -- FYI I also fixed test_threading: commit cdce0574d03005e27b843fc110c54c99c7a76412 Author: Victor Stinner Date: Sun Jun 2 23:08:41 2019 +0200 bpo-36829: test_threading: Fix a ref cycle (GH-13752) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 17:18:37 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 02 Jun 2019 21:18:37 +0000 Subject: [issue35621] asyncio.create_subprocess_exec() only works with main event loop In-Reply-To: <1546210778.19.0.43686311162.issue35621@roundup.psfhosted.org> Message-ID: <1559510317.74.0.759636456347.issue35621@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- pull_requests: +13635 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/13754 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 17:20:11 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 02 Jun 2019 21:20:11 +0000 Subject: [issue35621] asyncio.create_subprocess_exec() only works with main event loop In-Reply-To: <1546210778.19.0.43686311162.issue35621@roundup.psfhosted.org> Message-ID: <1559510411.12.0.861182496932.issue35621@roundup.psfhosted.org> Andrew Svetlov added the comment: Thanks for the report! The failure depends on tests order execution (maybe you use -jN flag?). Before default child watcher was SafeChildWatcher, not it is ThreaderChildWather. The watcher is a global variable (a property of global event loop policy). The failed test doesn't make sense for default ThreadChildWatcher but still valuable for old default SafeChildWatcher. I've changed the test to use SafeChildWatcher explicitly. See https://github.com/python/cpython/pull/13754 for the fix ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 17:25:09 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Jun 2019 21:25:09 +0000 Subject: [issue35621] asyncio.create_subprocess_exec() only works with main event loop In-Reply-To: <1546210778.19.0.43686311162.issue35621@roundup.psfhosted.org> Message-ID: <1559510709.22.0.537136125487.issue35621@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > The failure depends on tests order execution (maybe you use -jN flag?). Oh, I understand now! > See https://github.com/python/cpython/pull/13754 for the fix Thanks for the fix, Andrew! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 17:31:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Jun 2019 21:31:33 +0000 Subject: [issue20602] sys.flags and sys.float_info disappear at shutdown In-Reply-To: <1392146521.44.0.544055558433.issue20602@psf.upfronthosting.co.za> Message-ID: <1559511093.73.0.193946823485.issue20602@roundup.psfhosted.org> STINNER Victor added the comment: Honestly, I'm not sure that this issue is really a major bug. I don't think that it's worth it to backport the change. It's more a subtle change in Python finalization which is super fragile code. I prefer to only change the master branch, so I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 17:34:15 2019 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 02 Jun 2019 21:34:15 +0000 Subject: [issue19184] dis module has incorrect docs for RAISE_VARARGS In-Reply-To: <1381078012.05.0.236677780468.issue19184@psf.upfronthosting.co.za> Message-ID: <1559511255.19.0.796714014564.issue19184@roundup.psfhosted.org> Ezio Melotti added the comment: New changeset e1179a5096fb12297ececd7a1c79969aa5747e28 by Ezio Melotti (Michele Angrisano) in branch 'master': bpo-19184: Update the documentation of dis module. (GH-13652) https://github.com/python/cpython/commit/e1179a5096fb12297ececd7a1c79969aa5747e28 ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 17:35:15 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 02 Jun 2019 21:35:15 +0000 Subject: [issue19184] dis module has incorrect docs for RAISE_VARARGS In-Reply-To: <1381078012.05.0.236677780468.issue19184@psf.upfronthosting.co.za> Message-ID: <1559511315.63.0.75431632102.issue19184@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13636 pull_request: https://github.com/python/cpython/pull/13755 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 17:36:37 2019 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 02 Jun 2019 21:36:37 +0000 Subject: [issue37014] [First easy issue] fileinput module should document that openhook and mode are ignored when reading from stdin In-Reply-To: <1558545967.04.0.906137299955.issue37014@roundup.psfhosted.org> Message-ID: <1559511397.54.0.493297848972.issue37014@roundup.psfhosted.org> Ezio Melotti added the comment: New changeset 6bd438e137a0618b8db949a4751304f541b6674d by Ezio Melotti (Miss Islington (bot)) in branch '3.7': bpo-37014: Update docstring and Documentation of fileinput.FileInput(). (GH-13545) (GH-13753) https://github.com/python/cpython/commit/6bd438e137a0618b8db949a4751304f541b6674d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 17:43:10 2019 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 02 Jun 2019 21:43:10 +0000 Subject: [issue37014] fileinput module should document that openhook and mode are ignored when reading from stdin In-Reply-To: <1558545967.04.0.906137299955.issue37014@roundup.psfhosted.org> Message-ID: <1559511790.12.0.693011678582.issue37014@roundup.psfhosted.org> Ezio Melotti added the comment: Fixed, thanks for the report and the PRs! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: [First easy issue] fileinput module should document that openhook and mode are ignored when reading from stdin -> fileinput module should document that openhook and mode are ignored when reading from stdin type: -> enhancement versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 17:44:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Jun 2019 21:44:36 +0000 Subject: [issue37100] test_coroutine.test_unawaited_warning_when_module_broken fails on -Werror In-Reply-To: <1559221025.29.0.0441448239991.issue37100@roundup.psfhosted.org> Message-ID: <1559511876.4.0.700197282725.issue37100@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13637 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13756 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 17:46:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Jun 2019 21:46:40 +0000 Subject: [issue37100] test_coroutine.test_unawaited_warning_when_module_broken fails on -Werror In-Reply-To: <1559221025.29.0.0441448239991.issue37100@roundup.psfhosted.org> Message-ID: <1559512000.18.0.41262088187.issue37100@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PR 13756 which fix the test. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 17:52:22 2019 From: report at bugs.python.org (Petr Viktorin) Date: Sun, 02 Jun 2019 21:52:22 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1559512342.86.0.773521778948.issue36974@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset fb9423fd0a85f06affb8c3a8f25dd598a649aa42 by Petr Viktorin in branch 'master': bpo-36974: Make tp_call=PyVectorcall_Call work for inherited types (GH-13699) https://github.com/python/cpython/commit/fb9423fd0a85f06affb8c3a8f25dd598a649aa42 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 17:59:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Jun 2019 21:59:27 +0000 Subject: [issue32573] All sys attributes (.argv, ...) should exist in embedded environments In-Reply-To: <1516131988.33.0.467229070634.issue32573@psf.upfronthosting.co.za> Message-ID: <1559512767.7.0.85770304316.issue32573@roundup.psfhosted.org> STINNER Victor added the comment: The issue has been fixed in Python 3.8. See PEP 587 and http://docs.python.org/dev/c-api/init_config.html for the larger scope. For Python 3.7, the fix is trivial: don't add the following 2 lines in your application: if not hasattr(sys, 'argv'): sys.argv = [''] Python 3.7 Release Manager, Ned Deily, was opposed to change the behavior in a minor release: https://github.com/python/cpython/pull/13553#issuecomment-496768319 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 18:04:04 2019 From: report at bugs.python.org (Michele Angrisano) Date: Sun, 02 Jun 2019 22:04:04 +0000 Subject: [issue37074] os.stat() does not work for NUL and CON In-Reply-To: <1559029061.14.0.328684807212.issue37074@roundup.psfhosted.org> Message-ID: <1559513044.92.0.878206552247.issue37074@roundup.psfhosted.org> Change by Michele Angrisano : ---------- nosy: -mangrisano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 18:04:23 2019 From: report at bugs.python.org (Michele Angrisano) Date: Sun, 02 Jun 2019 22:04:23 +0000 Subject: [issue36986] tarfile: unexpected IsADirectoryError on extraction In-Reply-To: <1558422809.19.0.381089325981.issue36986@roundup.psfhosted.org> Message-ID: <1559513063.11.0.467847412137.issue36986@roundup.psfhosted.org> Change by Michele Angrisano : ---------- nosy: -mangrisano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 18:05:00 2019 From: report at bugs.python.org (Michele Angrisano) Date: Sun, 02 Jun 2019 22:05:00 +0000 Subject: [issue37086] time.sleep error message misleading In-Reply-To: <1559126222.88.0.100290912588.issue37086@roundup.psfhosted.org> Message-ID: <1559513100.17.0.120417368633.issue37086@roundup.psfhosted.org> Change by Michele Angrisano : ---------- nosy: -mangrisano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 18:24:25 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 02 Jun 2019 22:24:25 +0000 Subject: [issue35814] Syntax quirk with variable annotations In-Reply-To: <1548308739.94.0.144807070146.issue35814@roundup.psfhosted.org> Message-ID: <1559514265.03.0.135600723236.issue35814@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- pull_requests: +13638 pull_request: https://github.com/python/cpython/pull/13757 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 18:34:38 2019 From: report at bugs.python.org (Petr Viktorin) Date: Sun, 02 Jun 2019 22:34:38 +0000 Subject: [issue36027] Support negative exponents in pow() where a modulus is specified. In-Reply-To: <1550520659.43.0.126744170658.issue36027@roundup.psfhosted.org> Message-ID: <1559514878.72.0.0198774645276.issue36027@roundup.psfhosted.org> Petr Viktorin added the comment: I will fix the compiler warning along with another one that I just introduced. ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 18:39:01 2019 From: report at bugs.python.org (Petr Viktorin) Date: Sun, 02 Jun 2019 22:39:01 +0000 Subject: [issue36027] Support negative exponents in pow() where a modulus is specified. In-Reply-To: <1550520659.43.0.126744170658.issue36027@roundup.psfhosted.org> Message-ID: <1559515141.52.0.56084084864.issue36027@roundup.psfhosted.org> Change by Petr Viktorin : ---------- pull_requests: +13639 pull_request: https://github.com/python/cpython/pull/13758 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 18:39:01 2019 From: report at bugs.python.org (Petr Viktorin) Date: Sun, 02 Jun 2019 22:39:01 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1559515141.66.0.667228853091.issue36974@roundup.psfhosted.org> Change by Petr Viktorin : ---------- pull_requests: +13640 pull_request: https://github.com/python/cpython/pull/13758 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 18:45:56 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 02 Jun 2019 22:45:56 +0000 Subject: [issue35621] asyncio.create_subprocess_exec() only works with main event loop In-Reply-To: <1546210778.19.0.43686311162.issue35621@roundup.psfhosted.org> Message-ID: <1559515556.74.0.915401354201.issue35621@roundup.psfhosted.org> miss-islington added the comment: New changeset c6789d6c85a290a35f3839efb52a3d34536dcebe by Miss Islington (bot) (Andrew Svetlov) in branch 'master': bpo-35621: Fix tests when SafeChildWatcher is expected instead of ThreadedChildWatcher (GH-13754) https://github.com/python/cpython/commit/c6789d6c85a290a35f3839efb52a3d34536dcebe ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 18:54:17 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Jun 2019 22:54:17 +0000 Subject: [issue37135] test_multiprocessing_spawn segfaults on AMD64 FreeBSD CURRENT Shared 3.x Message-ID: <1559516057.97.0.679920443323.issue37135@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : test_import (test.test_multiprocessing_spawn._TestImportStar) ... ok ---------------------------------------------------------------------- Ran 352 tests in 322.667s OK (skipped=34) Warning -- files was modified by test_multiprocessing_spawn Before: [] After: ['python.core'] 0:11:39 load avg: 4.96 [202/423/1] test_winconsoleio skipped test_winconsoleio skipped -- test only relevant on win32 https://buildbot.python.org/all/#/builders/168/builds/1124/steps/5/logs/stdio ---------- components: Interpreter Core, Tests keywords: buildbot messages: 344332 nosy: pablogsal priority: high severity: normal status: open title: test_multiprocessing_spawn segfaults on AMD64 FreeBSD CURRENT Shared 3.x type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 19:00:08 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Jun 2019 23:00:08 +0000 Subject: [issue37135] test_multiprocessing_spawn segfaults on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559516057.97.0.679920443323.issue37135@roundup.psfhosted.org> Message-ID: <1559516408.22.0.571361990737.issue37135@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 19:00:23 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Jun 2019 23:00:23 +0000 Subject: [issue37135] test_multiprocessing_spawn segfaults on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559516057.97.0.679920443323.issue37135@roundup.psfhosted.org> Message-ID: <1559516423.45.0.982816671147.issue37135@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 19:07:11 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 02 Jun 2019 23:07:11 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1559516831.69.0.843338703772.issue33694@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- pull_requests: +13642 pull_request: https://github.com/python/cpython/pull/13754 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 19:08:17 2019 From: report at bugs.python.org (Petr Viktorin) Date: Sun, 02 Jun 2019 23:08:17 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1559516897.63.0.454676636599.issue36974@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset e584cbff1ea78e700cf9943d50467e3b58301ccc by Petr Viktorin in branch 'master': bpo-36027 bpo-36974: Fix "incompatible pointer type" compiler warnings (GH-13758) https://github.com/python/cpython/commit/e584cbff1ea78e700cf9943d50467e3b58301ccc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 19:08:17 2019 From: report at bugs.python.org (Petr Viktorin) Date: Sun, 02 Jun 2019 23:08:17 +0000 Subject: [issue36027] Support negative exponents in pow() where a modulus is specified. In-Reply-To: <1550520659.43.0.126744170658.issue36027@roundup.psfhosted.org> Message-ID: <1559516897.71.0.23063972971.issue36027@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset e584cbff1ea78e700cf9943d50467e3b58301ccc by Petr Viktorin in branch 'master': bpo-36027 bpo-36974: Fix "incompatible pointer type" compiler warnings (GH-13758) https://github.com/python/cpython/commit/e584cbff1ea78e700cf9943d50467e3b58301ccc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 19:18:53 2019 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 02 Jun 2019 23:18:53 +0000 Subject: [issue19184] dis module has incorrect docs for RAISE_VARARGS In-Reply-To: <1381078012.05.0.236677780468.issue19184@psf.upfronthosting.co.za> Message-ID: <1559517533.76.0.105112291366.issue19184@roundup.psfhosted.org> Ezio Melotti added the comment: New changeset 9390e98c3ed9eb9fa414030a2feec1926193af94 by Ezio Melotti (Miss Islington (bot)) in branch '3.7': bpo-19184: Update the documentation of dis module. (GH-13652) (GH-13755) https://github.com/python/cpython/commit/9390e98c3ed9eb9fa414030a2feec1926193af94 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 19:19:46 2019 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 02 Jun 2019 23:19:46 +0000 Subject: [issue19184] dis module has incorrect docs for RAISE_VARARGS In-Reply-To: <1381078012.05.0.236677780468.issue19184@psf.upfronthosting.co.za> Message-ID: <1559517586.5.0.421036728531.issue19184@roundup.psfhosted.org> Ezio Melotti added the comment: Fixed, thanks for the report and the PRs! ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 19:31:15 2019 From: report at bugs.python.org (Petr Viktorin) Date: Sun, 02 Jun 2019 23:31:15 +0000 Subject: [issue37012] Possible crash due to PyType_FromSpecWithBases() In-Reply-To: <1558533850.59.0.459054292807.issue37012@roundup.psfhosted.org> Message-ID: <1559518275.4.0.231132705534.issue37012@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset 7f4ae1b2cc60cb69938e7c88793b9e9a2dd36d93 by Petr Viktorin in branch 'master': bpo-37012: Clean up special cases in PyType_FromSpecWithBases slot assignments (GH-13496) https://github.com/python/cpython/commit/7f4ae1b2cc60cb69938e7c88793b9e9a2dd36d93 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 19:35:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Jun 2019 23:35:40 +0000 Subject: [issue37100] test_coroutine.test_unawaited_warning_when_module_broken fails on -Werror In-Reply-To: <1559221025.29.0.0441448239991.issue37100@roundup.psfhosted.org> Message-ID: <1559518540.29.0.815635366903.issue37100@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 3cf7ea1272fbc921a89acdbe40ca152813028cb5 by Victor Stinner in branch 'master': bpo-37100: Fix test_coroutines with -Werror (GH-13756) https://github.com/python/cpython/commit/3cf7ea1272fbc921a89acdbe40ca152813028cb5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 19:37:29 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 02 Jun 2019 23:37:29 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1559518649.63.0.322569582954.issue33694@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- pull_requests: +13643 pull_request: https://github.com/python/cpython/pull/13745 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 19:43:16 2019 From: report at bugs.python.org (Petr Viktorin) Date: Sun, 02 Jun 2019 23:43:16 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1559518996.45.0.743103822319.issue36974@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset 9e3e06e582accec82eb29cf665c3b4c7d84d2eb0 by Petr Viktorin (Jeroen Demeyer) in branch 'master': bpo-36974: document PEP 590 (GH-13450) https://github.com/python/cpython/commit/9e3e06e582accec82eb29cf665c3b4c7d84d2eb0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 19:49:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Jun 2019 23:49:06 +0000 Subject: [issue37069] regrtest: log unraisable exceptions and uncaught thread exceptions In-Reply-To: <1558997484.87.0.618934402283.issue37069@roundup.psfhosted.org> Message-ID: <1559519346.19.0.827015270672.issue37069@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13644 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13759 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 19:49:39 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 02 Jun 2019 23:49:39 +0000 Subject: [issue35814] Syntax quirk with variable annotations In-Reply-To: <1548308739.94.0.144807070146.issue35814@roundup.psfhosted.org> Message-ID: <1559519379.06.0.407515816508.issue35814@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +13645 pull_request: https://github.com/python/cpython/pull/13760 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 19:57:25 2019 From: report at bugs.python.org (Petr Viktorin) Date: Sun, 02 Jun 2019 23:57:25 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1559519845.42.0.448775282002.issue36974@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset be718c33f06b3496faa61142df24fb071fd5d1f1 by Petr Viktorin (Jeroen Demeyer) in branch 'master': bpo-36974: add some assertions for PEP 590 (GH-13682) https://github.com/python/cpython/commit/be718c33f06b3496faa61142df24fb071fd5d1f1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 20:00:33 2019 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 03 Jun 2019 00:00:33 +0000 Subject: [issue36027] Support negative exponents in pow() where a modulus is specified. In-Reply-To: <1550520659.43.0.126744170658.issue36027@roundup.psfhosted.org> Message-ID: <1559520033.66.0.818552862505.issue36027@roundup.psfhosted.org> Change by Petr Viktorin : ---------- pull_requests: +13646 pull_request: https://github.com/python/cpython/pull/13761 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 20:00:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 00:00:46 +0000 Subject: [issue37069] regrtest: log unraisable exceptions and uncaught thread exceptions In-Reply-To: <1558997484.87.0.618934402283.issue37069@roundup.psfhosted.org> Message-ID: <1559520046.67.0.851554432849.issue37069@roundup.psfhosted.org> STINNER Victor added the comment: I wrote a minimum implementation: PR 13759 marks a test as "altered the execution environment" (ENV_CHANGED) if sys.unraisablehook() is called at least once. This this PR, 9 tests fail: * test_urllib: see bpo-36918 * test_io: see bpo-18748 * test_thread: test_save_exception_state_on_error() * test_yield_from: test_broken_getattr_handling() * test_coroutines: test_fatal_coro_warning() * test_cprofile: test_bad_counter_during_dealloc() * test_raise: test_3611() * test_ssl: test_sni_callback_raising() and test_sni_callback_wrong_return_type() * test_generators: I'm not sure, it's maybe caused by doctests? multiple tests? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 20:05:00 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Mon, 03 Jun 2019 00:05:00 +0000 Subject: [issue37005] bz2 module doesn't write end-of-stream marker In-Reply-To: <1558496168.36.0.56962236665.issue37005@roundup.psfhosted.org> Message-ID: <1559520300.04.0.892428580907.issue37005@roundup.psfhosted.org> Jeffrey Kintscher added the comment: The bz2 library and the bzip2 utility generate identical files. For example: >>> import bz2 >>> with bz2.open('bz2test.txt.bz2', mode='wb') as f: ... f.write(b'foobar') ... 6 generates this file: $ hexdump bz2test.txt.bz2 0000000 42 5a 68 39 31 41 59 26 53 59 52 c0 3d c1 00 00 0000010 01 01 80 31 00 90 00 20 00 21 83 41 9a 09 88 1c 0000020 5d c9 14 e1 42 41 4b 00 f7 04 000002a and $ echo -n 'foobar' | bzip2 -c > bzip2test.txt.bz2 generates this file: $ hexdump bzip2test.txt.bz2 0000000 42 5a 68 39 31 41 59 26 53 59 52 c0 3d c1 00 00 0000010 01 01 80 31 00 90 00 20 00 21 83 41 9a 09 88 1c 0000020 5d c9 14 e1 42 41 4b 00 f7 04 000002a The StreamFooter is there, it is just difficult to see because it isn't byte-aligned. It starts at byte 0x20 bit 6. If you take 0x5dc914e14241 and shift it right two bits, you get the StreamFooter FooterMagic value: 0x177245385090. It is followed by a 32-bit CRC and two zero-bits of padding to byte-align the end of the file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 20:12:27 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 03 Jun 2019 00:12:27 +0000 Subject: [issue27432] Support unittest assertion truncation of repr in error messages In-Reply-To: <1467365269.89.0.517880663648.issue27432@psf.upfronthosting.co.za> Message-ID: <1559520747.84.0.820069513694.issue27432@roundup.psfhosted.org> Gregory P. Smith added the comment: I spent a while looking at this and what it'd take to wind up with a TestCase.maxReprLength style implementation to limit the length of unittest assertion failure reprs. I don't see a nice path forward via safe_repr as is (as the PR started with). adding max_length as the PR does is easy enough... but plumbing everything through is rather gross. mostly mechanical changes I started in a client before abandoning the work: 1 change all TestCase method safe_repr calls to self._safe_repr method calls so that the method could pass self.maxReprLength in via max_length=. 2 realize that this is mostly pointless without also updating unittest.util._common_shorten_repr which calls safe_repr in a similar manner. do that... 3 and notice how we have many calls of safe_repr on safe_repr'ed things and the nesting between _common_shorten_repr and safe_repr which makes for messy uninformative potentially misleading error messages when maxReprLength was actually set to a value. Overall I think we should backup and reconsider what we want our unittest assertions to do and how if we're going to add error message length constraining as a feature. shoehorning it in via the existing repr implementations doesn't feel right. So I closed that PR. unittest.safe_repr (aka unittest.util.safe_repr) remains an undocumented API. future to be determined. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 20:12:40 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 03 Jun 2019 00:12:40 +0000 Subject: [issue27432] Support unittest assertion truncation of repr in error messages In-Reply-To: <1467365269.89.0.517880663648.issue27432@psf.upfronthosting.co.za> Message-ID: <1559520760.55.0.0483831246081.issue27432@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- assignee: gregory.p.smith -> stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 20:14:50 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Mon, 03 Jun 2019 00:14:50 +0000 Subject: [issue37005] bz2 module doesn't write end-of-stream marker In-Reply-To: <1558496168.36.0.56962236665.issue37005@roundup.psfhosted.org> Message-ID: <1559520890.45.0.367020738574.issue37005@roundup.psfhosted.org> Jeffrey Kintscher added the comment: Sorry, the StreamFooter starts at byte 0x1f bit 1, not 0x20 bit 6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 20:28:32 2019 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 03 Jun 2019 00:28:32 +0000 Subject: [issue36027] Support negative exponents in pow() where a modulus is specified. In-Reply-To: <1550520659.43.0.126744170658.issue36027@roundup.psfhosted.org> Message-ID: <1559521712.97.0.708236752868.issue36027@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset 1e375c6269e9de4f3d05d4aa6d6d74e00f522d63 by Petr Viktorin in branch 'master': bpo-36027: Really fix "incompatible pointer type" compiler warning (GH-13761) https://github.com/python/cpython/commit/1e375c6269e9de4f3d05d4aa6d6d74e00f522d63 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 20:33:29 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Mon, 03 Jun 2019 00:33:29 +0000 Subject: [issue37030] Lib/cmd.py: Hide undocumented commands in help and completenames In-Reply-To: <1558682753.85.0.407660629596.issue37030@roundup.psfhosted.org> Message-ID: <1559522009.02.0.581734026567.issue37030@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: How to add a label 'awaiting core review' to pull request? tirkarthi: "Left comment for doc and test. But in general would like to hear from a core dev on this." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 20:34:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 00:34:28 +0000 Subject: [issue37069] regrtest: log unraisable exceptions and uncaught thread exceptions In-Reply-To: <1558997484.87.0.618934402283.issue37069@roundup.psfhosted.org> Message-ID: <1559522068.49.0.115051301567.issue37069@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13647 pull_request: https://github.com/python/cpython/pull/13762 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 20:37:05 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 03 Jun 2019 00:37:05 +0000 Subject: [issue5680] Simulate command-line arguments for program run in IDLE In-Reply-To: <1238798556.38.0.28468201552.issue5680@psf.upfronthosting.co.za> Message-ID: <1559522225.63.0.411077825966.issue5680@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: +13648 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13763 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 20:43:06 2019 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 03 Jun 2019 00:43:06 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1559522586.35.0.59942252056.issue33694@roundup.psfhosted.org> Change by Petr Viktorin : ---------- pull_requests: +13649 pull_request: https://github.com/python/cpython/pull/13761 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 20:43:24 2019 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 03 Jun 2019 00:43:24 +0000 Subject: [issue36896] clarify in types.rst that FunctionTypes & co constructors don't have stable signature In-Reply-To: <1557698610.19.0.556381141599.issue36896@roundup.psfhosted.org> Message-ID: <1559522604.98.0.518027465992.issue36896@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset 13136e83a637a9f1cfbada7e93097005296659b4 by Petr Viktorin (Matthias Bussonnier) in branch 'master': bpo-36896: Clarify that some types constructors are unstable (GH-13271) https://github.com/python/cpython/commit/13136e83a637a9f1cfbada7e93097005296659b4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 20:47:58 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 03 Jun 2019 00:47:58 +0000 Subject: [issue5680] Simulate command-line arguments for program run in IDLE In-Reply-To: <1238798556.38.0.28468201552.issue5680@psf.upfronthosting.co.za> Message-ID: <1559522878.45.0.13321574005.issue5680@roundup.psfhosted.org> Cheryl Sabella added the comment: I've added a minimal change for running a module in the editor with command line arguments. Some notes: 1. The shortcut key (F7) can be entered while on the shell window. As of now, any of the Run menu shortcuts can be entered, so I didn't fix that bug as part of this issue. 2. I'm not saving the arguments in any way. 3. I didn't (yet) make the change to print the command line arguments in the shell or to add it to the status bar. 4. I didn't make a change to get the sys.argv values from startup. 5. I added a single menu entry and not a cascade of different custom run options. ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 20:53:11 2019 From: report at bugs.python.org (MrValdez) Date: Mon, 03 Jun 2019 00:53:11 +0000 Subject: [issue21110] Slowdown and high memory usage when adding a new module in embedded Python 3.4 on 64bit Windows In-Reply-To: <1396262123.2.0.239412802273.issue21110@psf.upfronthosting.co.za> Message-ID: <1559523191.25.0.960256733218.issue21110@roundup.psfhosted.org> MrValdez added the comment: I couldn't replicate since my old dev machine didn't have rubenvb. Since this issue has been around for 5 years already, rubenvb isn't maintained and I couldn't replicate, I think its fine to close this issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 20:55:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 00:55:10 +0000 Subject: [issue37100] test_coroutine.test_unawaited_warning_when_module_broken fails on -Werror In-Reply-To: <1559221025.29.0.0441448239991.issue37100@roundup.psfhosted.org> Message-ID: <1559523310.14.0.298323615405.issue37100@roundup.psfhosted.org> STINNER Victor added the comment: It's now fixed, thanks for the report! ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 20:58:04 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 03 Jun 2019 00:58:04 +0000 Subject: [issue5680] Simulate command-line arguments for program run in IDLE In-Reply-To: <1238798556.38.0.28468201552.issue5680@psf.upfronthosting.co.za> Message-ID: <1559523484.79.0.825554186872.issue5680@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks. Those seem reasonable for a first pass. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 21:09:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 01:09:22 +0000 Subject: [issue37136] Travis CI: Documentation tests fails with Sphinx 2.1 Message-ID: <1559524162.91.0.6239630561.issue37136@roundup.psfhosted.org> New submission from STINNER Victor : Travis CI: "Documentation tests" failed with: Successfully installed Jinja2-2.10.1 MarkupSafe-1.1.1 Pygments-2.4.2 Sphinx-2.1.0 alabaster-0.7.12 babel-2.7.0 blurb-1.0.7 certifi-2019.3.9 chardet-3.0.4 docutils-0.14 idna-2.8 imagesize-1.1.0 packaging-19.0 pyparsing-2.4.0 python-docs-theme-2018.7 pytz-2019.1 requests-2.22.0 six-1.12.0 snowballstemmer-1.2.1 sphinxcontrib-applehelp-1.0.1 sphinxcontrib-devhelp-1.0.1 sphinxcontrib-htmlhelp-1.0.2 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.2 sphinxcontrib-serializinghtml-1.1.3 urllib3-1.25.3 (...) Warning, treated as error: duplicate object description of email.message, other instance in library/email.message, use :noindex: for one of them https://travis-ci.org/python/cpython/jobs/540532864 ref: https://github.com/python/cpython/pull/13762 -- Sphinx 2.1 was released yesterday: https://www.sphinx-doc.org/en/master/changes.html#release-2-1-0-released-jun-02-2019 ---------- components: Build messages: 344352 nosy: lukasz.langa, mdk, vstinner priority: release blocker severity: normal status: open title: Travis CI: Documentation tests fails with Sphinx 2.1 versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 21:12:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 01:12:40 +0000 Subject: [issue37136] Travis CI: Documentation tests fails with Sphinx 2.1 In-Reply-To: <1559524162.91.0.6239630561.issue37136@roundup.psfhosted.org> Message-ID: <1559524360.08.0.118744543009.issue37136@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13650 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13764 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 21:18:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 01:18:08 +0000 Subject: [issue37137] test_asyncio: test_cancel_gather_2() dangling thread Message-ID: <1559524688.39.0.485790490316.issue37137@roundup.psfhosted.org> New submission from STINNER Victor : s390x RHEL 3.x buildbot: https://buildbot.python.org/all/#/builders/21/builds/3150 test_cancel_gather_1 (test.test_asyncio.test_tasks.CTaskSubclass_PyFuture_Tests) Ensure that a gathering future refuses to be cancelled once all ... ok test_cancel_gather_2 (test.test_asyncio.test_tasks.CTaskSubclass_PyFuture_Tests) ... Warning -- threading_cleanup() failed to cleanup -1 threads (count: 0, dangling: 1) Dangling thread: <_MainThread(MainThread, started 4396153272064)> ok test_cancel_inner_future (test.test_asyncio.test_tasks.CTaskSubclass_PyFuture_Tests) ... ok test_cancel_task_catching (test.test_asyncio.test_tasks.CTaskSubclass_PyFuture_Tests) ... ok -- AMD64 FreeBSD 10-STABLE Non-Debug 3.x: https://buildbot.python.org/all/#/builders/167/builds/1181 test_cancel_gather_2 (test.test_asyncio.test_tasks.CTaskSubclass_PyFuture_Tests) ... Warning -- threading_cleanup() failed to cleanup -1 threads (count: 0, dangling: 1) ---------- components: Tests messages: 344353 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: test_asyncio: test_cancel_gather_2() dangling thread versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 21:23:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 01:23:03 +0000 Subject: [issue37135] test_multiprocessing_spawn segfaults on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559516057.97.0.679920443323.issue37135@roundup.psfhosted.org> Message-ID: <1559524983.02.0.0713877708369.issue37135@roundup.psfhosted.org> STINNER Victor added the comment: New coredump: https://buildbot.python.org/all/#builders/168/builds/1129 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 21:24:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 01:24:36 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1559525076.43.0.00273395745062.issue33608@roundup.psfhosted.org> STINNER Victor added the comment: > So far so good. :) I'll keep an eye on things and if the buildbots are still happy then I'll add back _PyEval_FinishPendingCalls() in _Py_FinalizeEx() in a few days. I have no idea if it's related, but we started to see coredumps on FreeBSD: https://bugs.python.org/issue37135 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 21:25:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 01:25:18 +0000 Subject: [issue37135] test_multiprocessing_spawn segfaults on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559516057.97.0.679920443323.issue37135@roundup.psfhosted.org> Message-ID: <1559525118.29.0.455671107945.issue37135@roundup.psfhosted.org> STINNER Victor added the comment: Maybe it's related to bpo-33608. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 21:26:50 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 03 Jun 2019 01:26:50 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559525210.09.0.622282845708.issue37134@roundup.psfhosted.org> Raymond Hettinger added the comment: Do we really want to do this? ISTM, this would be a regression in the readability of the docs. 100% of the users of the docs will be confronted with this syntax which is mostly irrelevant to them. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 21:26:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 01:26:58 +0000 Subject: [issue37137] test_asyncio: test_cancel_gather_2() dangling thread In-Reply-To: <1559524688.39.0.485790490316.issue37137@roundup.psfhosted.org> Message-ID: <1559525218.4.0.932993860997.issue37137@roundup.psfhosted.org> STINNER Victor added the comment: Another similar error on "ARMv7 Debian buster 3.x" buildbot: https://buildbot.python.org/all/#/builders/176/builds/664 test_proc_exited (test.test_asyncio.test_subprocess.SubprocessTransportTests) ... Warning -- threading_cleanup() failed to cleanup -1 threads (count: 0, dangling: 1) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 21:28:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 01:28:35 +0000 Subject: [issue37137] test_asyncio: test_cancel_gather_2() dangling thread In-Reply-To: <1559524688.39.0.485790490316.issue37137@roundup.psfhosted.org> Message-ID: <1559525315.55.0.942157732907.issue37137@roundup.psfhosted.org> STINNER Victor added the comment: AMD64 Ubuntu Shared 3.x: https://buildbot.python.org/all/#/builders/141/builds/1912 test_proc_exited (test.test_asyncio.test_subprocess.SubprocessTransportTests) ... Warning -- threading_cleanup() failed to cleanup -1 threads (count: 0, dangling: 1) test_close (test.test_asyncio.test_unix_events.SafeChildWatcherTests) ... /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/asyncio/base_events.py:646: ResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False> _warn(f"unclosed event loop {self!r}", ResourceWarning, source=self) ResourceWarning: Enable tracemalloc to get the object allocation traceback ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 21:32:02 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 03 Jun 2019 01:32:02 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559525522.67.0.195577237352.issue37134@roundup.psfhosted.org> Raymond Hettinger added the comment: Guido, was it your intention that this show-up everywhere in the docs. I had thought the primary motivation was to make it possible to write pure python code that exactly matched a C API. ISTM, there is no need to confront every single user of the docs with a notation that is known to be confusing. From a teacher's point of view, pushing this notation everywhere in the docs changes the priority of the topic. Formerly, it was an optional intermediate/advanced topic. But if it is visible everywhere, it becomes an unavoidable day one topic for every single learner (that is if we want them to be able to read and understand the docs). ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 21:39:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 01:39:03 +0000 Subject: [issue37136] Travis CI: Documentation tests fails with Sphinx 2.1 In-Reply-To: <1559524162.91.0.6239630561.issue37136@roundup.psfhosted.org> Message-ID: <1559525943.36.0.816768463659.issue37136@roundup.psfhosted.org> STINNER Victor added the comment: I tried but I failed to reproduce the issue using: git clean -fdx ./configure CFLAGS="-O0" make cd Doc make venv PYTHON=../python # Successfully installed Jinja2-2.10.1 MarkupSafe-1.1.1 Pygments-2.4.2 Sphinx-2.1.0 alabaster-0.7.12 babel-2.7.0 blurb-1.0.7 certifi-2019.3.9 chardet-3.0.4 docutils-0.14 idna-2.8 imagesize-1.1.0 packaging-19.0 pyparsing-2.4.0 python-docs-theme-2018.7 pytz-2019.1 requests-2.22.0 six-1.12.0 snowballstemmer-1.2.1 sphinxcontrib-applehelp-1.0.1 sphinxcontrib-devhelp-1.0.1 sphinxcontrib-htmlhelp-1.0.2 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.2 sphinxcontrib-serializinghtml-1.1.3 urllib3-1.25.3 # I added "LANG=" to ignore my French locale # LANG= PATH=./venv/bin:$PATH sphinx-build -b doctest -d build/doctrees -D latex_elements.papersize= -q -W -j4 -W . build/doctest LANG= make PYTHON=../python SPHINXOPTS="-q -W -j4" doctest ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 21:42:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 01:42:59 +0000 Subject: [issue37136] Travis CI: Documentation tests fails with Sphinx 2.1 In-Reply-To: <1559524162.91.0.6239630561.issue37136@roundup.psfhosted.org> Message-ID: <1559526179.91.0.0496769368238.issue37136@roundup.psfhosted.org> STINNER Victor added the comment: Tests passed on my PR 13764, so I remove the release blocker status. It might be something wrong specific to my PR 13762. ---------- nosy: -lukasz.langa priority: release blocker -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 21:51:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 01:51:25 +0000 Subject: [issue37136] Travis CI: Documentation tests fails with Sphinx 2.1 In-Reply-To: <1559524162.91.0.6239630561.issue37136@roundup.psfhosted.org> Message-ID: <1559526685.39.0.711551672492.issue37136@roundup.psfhosted.org> STINNER Victor added the comment: Ok, it's very strange. The test passed when run again manually on Travis CI. I close the issue.... ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 21:51:34 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 03 Jun 2019 01:51:34 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1559526694.86.0.182655182519.issue27987@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 8766cb74e186d3820db0a855ccd780d6d84461f7 by Gregory P. Smith (Inada Naoki) in branch '3.7': [3.7] bpo-27987: align PyGC_Head to alignof(long double) (GH-13335) (GH-13581) https://github.com/python/cpython/commit/8766cb74e186d3820db0a855ccd780d6d84461f7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 21:51:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 01:51:45 +0000 Subject: [issue37069] regrtest: log unraisable exceptions and uncaught thread exceptions In-Reply-To: <1558997484.87.0.618934402283.issue37069@roundup.psfhosted.org> Message-ID: <1559526705.65.0.783713257279.issue37069@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 0025350294959594e7f57aef4fc9579c77a0ed1c by Victor Stinner in branch 'master': bpo-37069: tests use catch_unraisable_exception() (GH-13762) https://github.com/python/cpython/commit/0025350294959594e7f57aef4fc9579c77a0ed1c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 21:59:53 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 03 Jun 2019 01:59:53 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559527193.76.0.127445663463.issue35431@roundup.psfhosted.org> Raymond Hettinger added the comment: Here are a few other data points. There is no consensus but either returning 0 or erroring out seem reasonable. MS Excel's COMBIN: If number < 0, number_chosen < 0, or number < number_chosen, COMBIN returns the #NUM! error value. Scipy.misc.comb: If k > N, N < 0, or k < 0, then a 0 is returned. Matlib.nchoose: Error: K must an integer between 0 and N. Maple.numbcomb: Unclear from the docs what this does Wolfram alpha: Returns 0 https://www.wolframalpha.com/input/?i=10+choose+12 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 22:02:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 02:02:46 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1559527366.82.0.165019292103.issue27987@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: wont fix -> fixed versions: -Python 2.7, Python 3.6, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 22:13:08 2019 From: report at bugs.python.org (Windson Yang) Date: Mon, 03 Jun 2019 02:13:08 +0000 Subject: [issue26468] shutil.copy2 raises OSError if filesystem doesn't support chmod In-Reply-To: <1456910519.95.0.44073308632.issue26468@psf.upfronthosting.co.za> Message-ID: <1559527988.13.0.22826070604.issue26468@roundup.psfhosted.org> Change by Windson Yang : ---------- keywords: +patch pull_requests: +13651 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13765 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 22:14:54 2019 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 03 Jun 2019 02:14:54 +0000 Subject: [issue33569] dataclasses InitVar does not maintain any type info In-Reply-To: <1526647195.4.0.682650639539.issue33569@psf.upfronthosting.co.za> Message-ID: <1559528094.45.0.954275507221.issue33569@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset 01ee12ba35a333e8a6a25c4153c4a21838e9585c by Eric V. Smith (Augusto Hack) in branch 'master': bpo-33569 Preserve type information with dataclasses.InitVar (GH-8927) https://github.com/python/cpython/commit/01ee12ba35a333e8a6a25c4153c4a21838e9585c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 22:15:21 2019 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 03 Jun 2019 02:15:21 +0000 Subject: [issue33569] dataclasses InitVar does not maintain any type info In-Reply-To: <1526647195.4.0.682650639539.issue33569@psf.upfronthosting.co.za> Message-ID: <1559528121.62.0.0546384944779.issue33569@roundup.psfhosted.org> Eric V. Smith added the comment: Thanks for the PR! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 22:19:20 2019 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 03 Jun 2019 02:19:20 +0000 Subject: [issue35761] Allow dataclasses to be updated in place In-Reply-To: <1547734989.68.0.404239918534.issue35761@roundup.psfhosted.org> Message-ID: <1559528360.64.0.607190634343.issue35761@roundup.psfhosted.org> Eric V. Smith added the comment: I'm going to reject this. There's nothing special about dataclasses that would require a feature like this. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 22:27:43 2019 From: report at bugs.python.org (Tim Peters) Date: Mon, 03 Jun 2019 02:27:43 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559528863.09.0.855921596654.issue35431@roundup.psfhosted.org> Tim Peters added the comment: I'm going to repeat part of an earlier comment :-) """ Please resist pointless feature creep. The original report was about comb(n, k) for integer n and k with 0 <= k <= n and that's all. Everyone who commented appeared to agree they'd find that useful. """ Why can't we take universal agreement for an initial answer? ;-) Looking at what other packages do doesn't really interest me, unless they differ on the cases everyone agreed would be useful - they have different audiences than Python has. Guess what Wolfram returns for (-4) choose (-5) Go ahead. That's right: -4. Sheesh - I don't care who their audience is, _any_ code calling `choose` with those arguments would be far better served if the function complained. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 22:32:22 2019 From: report at bugs.python.org (David Radcliffe) Date: Mon, 03 Jun 2019 02:32:22 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1559527193.76.0.127445663463.issue35431@roundup.psfhosted.org> Message-ID: David Radcliffe added the comment: I understand that pure mathematics is not the primary use case. But I would expect that math.comb() would be used to implement mathematical formulas. As a simple example, the number of edges in a complete graph on n vertices is binomial(n, 2), and this should be valid if n < 2. Polynomial interpolation is another problem where this can occur. However, I do agree that binomial coefficients with negative arguments are relatively unimportant. On Sun, Jun 2, 2019 at 8:59 PM Raymond Hettinger wrote: > > Raymond Hettinger added the comment: > > Here are a few other data points. There is no consensus but either > returning 0 or erroring out seem reasonable. > > MS Excel's COMBIN: If number < 0, number_chosen < 0, or number < > number_chosen, COMBIN returns the #NUM! error value. > > Scipy.misc.comb: If k > N, N < 0, or k < 0, then a 0 is returned. > > Matlib.nchoose: Error: K must an integer between 0 and N. > > Maple.numbcomb: Unclear from the docs what this does > > Wolfram alpha: Returns 0 > https://www.wolframalpha.com/input/?i=10+choose+12 > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 22:38:23 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Mon, 03 Jun 2019 02:38:23 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1559529503.64.0.392700800359.issue33608@roundup.psfhosted.org> Kubilay Kocak added the comment: Again, happy to provide ssh access to the koobs-freebsd-current worker to help analysis, just PM me ssh public keys on IRC (koobs @ #python-dev freenode) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 22:47:11 2019 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 03 Jun 2019 02:47:11 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559530031.47.0.963150288096.issue37134@roundup.psfhosted.org> Guido van Rossum added the comment: Please don?t call on just me. If you really don?t want this, call on the Steering Council. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 23:42:58 2019 From: report at bugs.python.org (Windson Yang) Date: Mon, 03 Jun 2019 03:42:58 +0000 Subject: [issue37086] time.sleep error message misleading In-Reply-To: <1559126222.88.0.100290912588.issue37086@roundup.psfhosted.org> Message-ID: <1559533378.93.0.387289844128.issue37086@roundup.psfhosted.org> Windson Yang added the comment: I just create a PR for it. ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 23:43:22 2019 From: report at bugs.python.org (Windson Yang) Date: Mon, 03 Jun 2019 03:43:22 +0000 Subject: [issue37086] time.sleep error message misleading In-Reply-To: <1559126222.88.0.100290912588.issue37086@roundup.psfhosted.org> Message-ID: <1559533402.49.0.142042322578.issue37086@roundup.psfhosted.org> Change by Windson Yang : ---------- keywords: +patch pull_requests: +13652 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13768 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 23:45:17 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 03 Jun 2019 03:45:17 +0000 Subject: [issue36546] Add quantiles() to the statistics module In-Reply-To: <1554585736.61.0.903931747573.issue36546@roundup.psfhosted.org> Message-ID: <1559533517.59.0.215093185601.issue36546@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +13653 pull_request: https://github.com/python/cpython/pull/13769 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 23:46:26 2019 From: report at bugs.python.org (Tim Peters) Date: Mon, 03 Jun 2019 03:46:26 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559533586.05.0.733130515448.issue35431@roundup.psfhosted.org> Tim Peters added the comment: I'm not fatally opposed to relaxing k <= n. David makes some good points about it, and - as Raymond already noted - "0" is consistent with the behavior of itertools.combinations(). The docs would need to change, though, because the factorial "definition" would no longer make sense. Defining it in terms of the falling factorial would, but that's too obscure for Python's audience. Probably a combinatorial definition would be best: `comb(n, k) is the number of k-element subsets of an n-element set". Then it's clear that n and k are cardinals (integers >= 0), and that the result is 0 when k > n. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 2 23:52:54 2019 From: report at bugs.python.org (Dobatymo) Date: Mon, 03 Jun 2019 03:52:54 +0000 Subject: [issue37005] bz2 module doesn't write end-of-stream marker In-Reply-To: <1558496168.36.0.56962236665.issue37005@roundup.psfhosted.org> Message-ID: <1559533974.53.0.138646595759.issue37005@roundup.psfhosted.org> Dobatymo added the comment: Sorry, I forgot about the bit alignment when I was checking for the footer. This can be closed then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 00:07:49 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 03 Jun 2019 04:07:49 +0000 Subject: [issue36546] Add quantiles() to the statistics module In-Reply-To: <1554585736.61.0.903931747573.issue36546@roundup.psfhosted.org> Message-ID: <1559534869.77.0.355353051426.issue36546@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset cba9f84725353455b0995bd47d0fa8cb1724464b by Raymond Hettinger in branch 'master': bpo-36546: Add design notes to aid future discussions (GH-13769) https://github.com/python/cpython/commit/cba9f84725353455b0995bd47d0fa8cb1724464b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 00:16:10 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 03 Jun 2019 04:16:10 +0000 Subject: [issue37138] PEP 590 method_vectorcall calls memcpy with NULL src Message-ID: <1559535370.56.0.947989437279.issue37138@roundup.psfhosted.org> New submission from Gregory P. Smith : The undefined behavior sanitizer buildbot is flagging a bunch of issues in master (3.8) of late: AssertionError: 'Objects/classobject.c:74:29: runtime erro[139 chars]re\n' != '' - Objects/classobject.c:74:29: runtime error: null pointer passed as argument 2, which is declared to never be null - /usr/include/string.h:43:28: note: nonnull attribute specified here (see https://buildbot.python.org/all/#/builders/135/builds/1937/steps/5/logs/stdio) This appears to be coming from a relatively new classobject.c:method_vectorcall() function method_vectorcall(PyObject *method, PyObject *const *args, size_t nargsf, PyObject *kwnames) Which looks like it is probably being called with NULL args value and thus winds up calling memcpy() with src=NULL. This was introduced in https://github.com/python/cpython/commit/aacc77fbd77640a8f03638216fa09372cc21673d for the PEP 590 implementation. ---------- assignee: Mark.Shannon components: Interpreter Core messages: 344378 nosy: Mark.Shannon, gregory.p.smith priority: normal severity: normal stage: needs patch status: open title: PEP 590 method_vectorcall calls memcpy with NULL src type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 00:20:45 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 03 Jun 2019 04:20:45 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559535645.74.0.780137588903.issue37134@roundup.psfhosted.org> Raymond Hettinger added the comment: Sorry, I thought that as the BDFL delegate for PEP 570, you would be the person to ask. Adding the Steering Council members to the nosy list. ---------- nosy: +barry, brett.cannon, ncoghlan, willingc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 00:22:09 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 03 Jun 2019 04:22:09 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1559535729.43.0.673688893102.issue33694@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +13654 pull_request: https://github.com/python/cpython/pull/13769 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 00:51:43 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 03 Jun 2019 04:51:43 +0000 Subject: [issue35070] test_getgrouplist may fail on macOS if user in too many groups In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1559537503.57.0.334509540436.issue35070@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the analysis and the PR! It turns out the problem is not new to 10.14; as you discovered, it's simply a matter of how may groups a particular user is in and, with all the system-generated groups, that number may vary from release to release and from user to user - which explains why the problem is not always reproducible. I've added a few review comments to the PR. ---------- title: test_posix fails on macOS 10.14 Mojave -> test_getgrouplist may fail on macOS if user in too many groups versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 00:56:45 2019 From: report at bugs.python.org (Tim Peters) Date: Mon, 03 Jun 2019 04:56:45 +0000 Subject: [issue37132] Add a module for integer related math functions In-Reply-To: <1559472897.43.0.110105466613.issue37132@roundup.psfhosted.org> Message-ID: <1559537805.48.0.33779647737.issue37132@roundup.psfhosted.org> Tim Peters added the comment: Ya, I'm mostly with Raymond. `math` was originally a very thin wrapper around C's libm, but we've been moving away from that more and more for decades, and it's no longer the case anyway that the vast bulk of new Python programmers are intimately familiar with C. If I were coming new to Python now, I'd expect math functions to ... be in `math` ;-) Whether integer or float. I expect this will work fine if the docs are - as Raymond suggests - reworked to make it clear. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 00:59:16 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 03 Jun 2019 04:59:16 +0000 Subject: [issue5680] Simulate command-line arguments for program run in IDLE In-Reply-To: <1238798556.38.0.28468201552.issue5680@psf.upfronthosting.co.za> Message-ID: <1559537956.91.0.22818412698.issue5680@roundup.psfhosted.org> Terry J. Reedy added the comment: Two design issues: 1. As I said 2017-06-20, msg296499, I expect to add more alternatives to the standard run to this menu option and dialog. (Cheryl, I should have pointed you to this post as well as the later ones.) I want to add just one new option to have only 1 new key to learn. I already cannot remember all of them and I expect I am not the only one. They need to be together on one dialog so that uses can conveniently pick multiple options when that makes sense. Running in a console with args is completely sensible. And exclusionary logic, such as 'Cannot supply arguments if no restart' should be easier on one dialog. The configuration and pseudoevent names, perhaps 'run-custom', should be changed to reflect that now. For the menu, I am less sure. Perhaps 'Run Custom', 'Run Setup', 'Run with Alternatives', 'Alternate Runs'? 2. I am pretty sure I prefer shift-F5 for the key. (But cannot be sure until I try it.) Easier to learn I think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 01:12:08 2019 From: report at bugs.python.org (Ma Lin) Date: Mon, 03 Jun 2019 05:12:08 +0000 Subject: [issue21872] LZMA library sometimes fails to decompress a file In-Reply-To: <1403720935.87.0.990494824612.issue21872@psf.upfronthosting.co.za> Message-ID: <1559538728.9.0.196774309883.issue21872@roundup.psfhosted.org> Change by Ma Lin : ---------- nosy: +Ma Lin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 01:59:52 2019 From: report at bugs.python.org (Friedel Wolff) Date: Mon, 03 Jun 2019 05:59:52 +0000 Subject: [issue37029] PyObject_Free is O(N) where N = # of arenas In-Reply-To: <1558676037.99.0.0721055204531.issue37029@roundup.psfhosted.org> Message-ID: <1559541592.31.0.953716586323.issue37029@roundup.psfhosted.org> Friedel Wolff added the comment: I had a bit of time and access to a pretty big machine, so I ran the remove-arena-search branch with the same number of iterations, but also 2x and 4x as many. I attach the output in case it is interesting. The timings seem to be growing linearly with the number of strings. The teardown finishes within minutes. ---------- nosy: +fwolff Added file: https://bugs.python.org/file48385/free_arenas.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 02:15:52 2019 From: report at bugs.python.org (Roundup Robot) Date: Mon, 03 Jun 2019 06:15:52 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1559542552.23.0.424680836557.issue30458@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +13655 pull_request: https://github.com/python/cpython/pull/13771 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 02:46:54 2019 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 03 Jun 2019 06:46:54 +0000 Subject: [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1559544414.65.0.445712205612.issue17576@roundup.psfhosted.org> Mark Dickinson added the comment: > Can we at least switch to PyLong_CheckExact? +1 > I am not sure that converting to an exact int in low-level C API functions is the best option. I am sure. :-) The number of naturally-occurring cases where we're actually passing a subtype of `int` that's not exactly `int` should be tiny. So long as there's a PyLong_CheckExact fast path, I don't think there are really any performance concerns here. And we definitely shouldn't let performance concerns dictate API; get the API right first, _then_ see what can be done about performance without changing the API. It's clear to me that `operator.index(obj)` _should_ give the exact same results as `obj.__index__()`. I'll split my PR up into two pieces, one for turning the deprecated behaviour into TypeErrors, and a second one that just makes the PyLong_CheckExact change. (I likely won't have time before feature freeze, though. OTOH, the PyLong_CheckExact change could be considered a bugfix.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 02:52:40 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 03 Jun 2019 06:52:40 +0000 Subject: [issue37135] test_multiprocessing_spawn segfaults on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559516057.97.0.679920443323.issue37135@roundup.psfhosted.org> Message-ID: <1559544760.78.0.915210857966.issue37135@roundup.psfhosted.org> Antoine Pitrou added the comment: Would be nice if someone could post a gdb backtrace of the core dump. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 03:10:51 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Jun 2019 07:10:51 +0000 Subject: [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1559545851.95.0.630272206643.issue17576@roundup.psfhosted.org> Serhiy Storchaka added the comment: > Can we at least switch to PyLong_CheckExact? This is a behavior change and as such should be preceded by a period of warning. If we go this way I propose to add a FutureWarning for int subclasses with overridden __index__. As for turning the deprecated behaviour into TypeErrors, we added yet few deprecation warnings in 3.8. Would not be better to turn all of them into TypeErrors at the same time? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 03:13:59 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Jun 2019 07:13:59 +0000 Subject: [issue37132] Add a module for integer related math functions In-Reply-To: <1559472897.43.0.110105466613.issue37132@roundup.psfhosted.org> Message-ID: <1559546039.69.0.713602988224.issue37132@roundup.psfhosted.org> Serhiy Storchaka added the comment: Well, then closing this. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 03:33:29 2019 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 03 Jun 2019 07:33:29 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1559547209.39.0.173553333594.issue33694@roundup.psfhosted.org> Change by Yury Selivanov : ---------- nosy: -yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 03:34:31 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 03 Jun 2019 07:34:31 +0000 Subject: [issue35814] Syntax quirk with variable annotations In-Reply-To: <1548308739.94.0.144807070146.issue35814@roundup.psfhosted.org> Message-ID: <1559547271.52.0.545339452107.issue35814@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 8565f6b6db0fa9f65449b532a5056a98bad3dc37 by Pablo Galindo in branch 'master': bpo-35814: Allow unpacking in r.h.s of annotated assignment expressions (GH-13760) https://github.com/python/cpython/commit/8565f6b6db0fa9f65449b532a5056a98bad3dc37 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 03:49:34 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 03 Jun 2019 07:49:34 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1559548174.89.0.706524577362.issue33694@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +13656 pull_request: https://github.com/python/cpython/pull/13760 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 03:51:50 2019 From: report at bugs.python.org (jpic) Date: Mon, 03 Jun 2019 07:51:50 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1559416833.73.0.0656305198822.issue34155@roundup.psfhosted.org> Message-ID: jpic added the comment: Thanks for your explanation, but in perspective with other invalid domains, such as "foo." currently resulting in an empty string too: >>> email.message_from_string('From: a at foo.',policy=email.policy.default)['from'].addresses[0].domain '' Do you think this should also change the value of domain to "foo." ? Also yes with parseaddr it seems that domain is an empty string if it didn't find a valid domain at all, which is pretty safe in case of malicious injection attempt - if that's what we're trying to save python programs from, a clarification of the objective of the patch would be welcome. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 04:08:03 2019 From: report at bugs.python.org (Batuhan) Date: Mon, 03 Jun 2019 08:08:03 +0000 Subject: [issue31006] typing.NamedTuple should add annotations to its constructor (__new__) parameters. In-Reply-To: <1500887267.27.0.393959457135.issue31006@psf.upfronthosting.co.za> Message-ID: <1559549283.64.0.231306437643.issue31006@roundup.psfhosted.org> Batuhan added the comment: IMHO this issue can be closed with this commit (https://github.com/python/typing/commit/435b29470c7d3e87055531f65681bee9746ab999) ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 04:26:16 2019 From: report at bugs.python.org (=?utf-8?b?5p6X6Ieq5Z2H?=) Date: Mon, 03 Jun 2019 08:26:16 +0000 Subject: [issue34763] Python lacks 0x4E17 In-Reply-To: <1537543820.35.0.956365154283.issue34763@psf.upfronthosting.co.za> Message-ID: <1559550376.23.0.323125663527.issue34763@roundup.psfhosted.org> ??? added the comment: "?" means "30" in Japanese. However, it is a variant Chinese character to "?", where "?" means "world" in Chinese. I'm not sure if this information makes any difference. ---------- nosy: +johnlinp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 04:52:55 2019 From: report at bugs.python.org (Louis Abraham) Date: Mon, 03 Jun 2019 08:52:55 +0000 Subject: [issue37139] Inconsistent behavior of email.header.decode_header Message-ID: <1559551975.38.0.600668913696.issue37139@roundup.psfhosted.org> New submission from Louis Abraham : Hi, (this is my first issue btw) I think has a broken behavior. It returns a list of `(decoded_string, charset)` pairs. However, `decoded_string` can be either a string or bytes. I have no preference but it should really be of one type. ---------- messages: 344392 nosy: louis.abraham at yahoo.fr priority: normal severity: normal status: open title: Inconsistent behavior of email.header.decode_header _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 04:57:17 2019 From: report at bugs.python.org (Oleksandr Pavliuk) Date: Mon, 03 Jun 2019 08:57:17 +0000 Subject: [issue34788] ipaddress module fails on rfc4007 scoped IPv6 addresses In-Reply-To: <1537799403.03.0.956365154283.issue34788@psf.upfronthosting.co.za> Message-ID: <1559552237.36.0.465126824746.issue34788@roundup.psfhosted.org> Change by Oleksandr Pavliuk : ---------- keywords: +patch pull_requests: +13657 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13772 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 05:18:31 2019 From: report at bugs.python.org (Bruce Merry) Date: Mon, 03 Jun 2019 09:18:31 +0000 Subject: [issue32052] Provide access to buffer of asyncio.StreamReader In-Reply-To: <1510859388.33.0.213398074469.issue32052@psf.upfronthosting.co.za> Message-ID: <1559553511.94.0.157541915907.issue32052@roundup.psfhosted.org> Bruce Merry added the comment: Ok, I'll open a separate issue to allow a tuple of possible separators. ---------- nosy: +bmerry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 05:21:37 2019 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 03 Jun 2019 09:21:37 +0000 Subject: [issue37140] ctypes change made clang fail to build Message-ID: <1559553697.78.0.201685591504.issue37140@roundup.psfhosted.org> New submission from Petr Viktorin : Hello, I haven't investigated this fully yet, and won't be able to find time today. I'm forwarding the report here in case someone familiar with the code wants to take a look. On Fedora, "clang" fails to build with Python 3.8, probably due this change (which was supposed to be Windows-only): https://github.com/python/cpython/commit/32119e10b792ad7ee4e5f951a2d89ddbaf111cc5#diff-998bfefaefe2ab83d5f523e18f158fa4R413 According to serge_sans_paille: if ``self->b_ptr`` contains pointer, the ``memcpy`` creates sharing, and this is dangerous: if a ``__del__`` happens to free the original pointer, we end up with a dangling reference in ``new_ptr``. As far as I can tell, this is what happens in the clang bindings code. Fedora discussion with link to logs: https://bugzilla.redhat.com/show_bug.cgi?id=1715016 ---------- components: ctypes messages: 344394 nosy: petr.viktorin priority: normal severity: normal status: open title: ctypes change made clang fail to build versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 05:22:13 2019 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 03 Jun 2019 09:22:13 +0000 Subject: [issue35947] Update libffi_msvc to current version of libffi In-Reply-To: <1549665646.45.0.12391127948.issue35947@roundup.psfhosted.org> Message-ID: <1559553733.36.0.944675169576.issue35947@roundup.psfhosted.org> Petr Viktorin added the comment: Possible regression caused by this change: https://bugs.python.org/issue37140 ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 05:30:24 2019 From: report at bugs.python.org (SilentGhost) Date: Mon, 03 Jun 2019 09:30:24 +0000 Subject: [issue37139] Inconsistent behavior of email.header.decode_header In-Reply-To: <1559551975.38.0.600668913696.issue37139@roundup.psfhosted.org> Message-ID: <1559554224.65.0.174350962354.issue37139@roundup.psfhosted.org> SilentGhost added the comment: This seem like a duplicate of #24797. I hope the answer given there applies. ---------- components: +email nosy: +SilentGhost, barry, r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> email.header.decode_header return type is not consistent type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 05:32:31 2019 From: report at bugs.python.org (Bruce Merry) Date: Mon, 03 Jun 2019 09:32:31 +0000 Subject: [issue37141] Allow multiple separators in StreamReader.readuntil Message-ID: <1559554350.7.0.981137522594.issue37141@roundup.psfhosted.org> New submission from Bruce Merry : Text-based protocols sometimes allow a choice of newline separator - I work with one that allows either \r or \n. Unfortunately that doesn't work with StreamReader.readuntil, which only accepts a single separator, so I've had to do some hacky things to obtain lines without having to >From discussion in issue 32052, it sounded like extending StreamReader.readuntil to support a tuple of separators would be feasible. ---------- components: asyncio messages: 344397 nosy: asvetlov, bmerry, yselivanov priority: normal severity: normal status: open title: Allow multiple separators in StreamReader.readuntil type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 05:51:07 2019 From: report at bugs.python.org (serge-sans-paille) Date: Mon, 03 Jun 2019 09:51:07 +0000 Subject: [issue37140] ctypes change made clang fail to build In-Reply-To: <1559553697.78.0.201685591504.issue37140@roundup.psfhosted.org> Message-ID: <1559555467.72.0.46586555372.issue37140@roundup.psfhosted.org> Change by serge-sans-paille : ---------- nosy: +serge-sans-paille _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 06:00:56 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Jun 2019 10:00:56 +0000 Subject: [issue37141] Allow multiple separators in StreamReader.readuntil In-Reply-To: <1559554350.7.0.981137522594.issue37141@roundup.psfhosted.org> Message-ID: <1559556056.95.0.89725013544.issue37141@roundup.psfhosted.org> Andrew Svetlov added the comment: Would you make a PR? I guess to modify Stream.readuntil() StreamReader is deprecated, I'm not sure if we should add new functionality to this class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 06:02:11 2019 From: report at bugs.python.org (Tom Hale) Date: Mon, 03 Jun 2019 10:02:11 +0000 Subject: [issue36656] Race conditions due to os.link and os.symlink POSIX specification In-Reply-To: <1555577087.92.0.769196427693.issue36656@roundup.psfhosted.org> Message-ID: <1559556131.25.0.976043024039.issue36656@roundup.psfhosted.org> Change by Tom Hale : ---------- title: Allow os.symlink(src, target, force=True) to prevent race conditions -> Race conditions due to os.link and os.symlink POSIX specification _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 06:06:38 2019 From: report at bugs.python.org (Bruce Merry) Date: Mon, 03 Jun 2019 10:06:38 +0000 Subject: [issue37141] Allow multiple separators in StreamReader.readuntil In-Reply-To: <1559554350.7.0.981137522594.issue37141@roundup.psfhosted.org> Message-ID: <1559556398.85.0.16884467632.issue37141@roundup.psfhosted.org> Bruce Merry added the comment: I wasn't aware of that deprecation - it doesn't seem to be mentioned at https://docs.python.org/3.8/library/asyncio-stream.html. What is the replacement? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 06:08:43 2019 From: report at bugs.python.org (Louis Abraham) Date: Mon, 03 Jun 2019 10:08:43 +0000 Subject: [issue37139] Inconsistent behavior of email.header.decode_header In-Reply-To: <1559551975.38.0.600668913696.issue37139@roundup.psfhosted.org> Message-ID: <1559556523.78.0.412403070062.issue37139@roundup.psfhosted.org> Louis Abraham added the comment: Indeed, this is exactly the same (I should have researched more, my bad). The problem is that I'm using mailbox.Maildir which uses the Compat32 API. Do you think I should create an issue for Maildir to support the new EmailMessage API? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 06:08:56 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Jun 2019 10:08:56 +0000 Subject: [issue34467] No mechanism to abort created coroutine or suppress not-awaited warning In-Reply-To: <1534975363.12.0.56676864532.issue34467@psf.upfronthosting.co.za> Message-ID: <1559556536.43.0.271929587629.issue34467@roundup.psfhosted.org> Andrew Svetlov added the comment: Could you consider passing (async_func, args, kwargs) tuple instead async_func(*args, **kwargs) coroutine? Looks like it solves your problem and doesn't require asyncio changes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 06:16:07 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 03 Jun 2019 10:16:07 +0000 Subject: [issue36231] no "proper" header files on macOS 10.14 Mojave In-Reply-To: <1552039427.3.0.599611853277.issue36231@roundup.psfhosted.org> Message-ID: <1559556967.09.0.832380830229.issue36231@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +13658 pull_request: https://github.com/python/cpython/pull/13773 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 06:18:39 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 03 Jun 2019 10:18:39 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559557119.18.0.263430903274.issue37134@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thank you, Raymond, for sharing your concerns regarding this. I am sorry you disagree with this change. I would want to expose the reasons I think this is important and justified, but please, don't read this as a way of dismissing your concerns; I really respect your opinion and judgment (as an example, I am waiting until you are happy with the API in issue17005 even if that meant waiting 2 years until the next release). 1) The docstrings for these functions already show the "/". As Matthias Bussonnier from IPython and Jupyter has expressed multiple times, there are a ton of users that do not read html documentation and rely solely on the output from help (either in Jupyter, IPython or CPython). These users find very strange that the signatures of the docstrings differ when they actually check the html docs. Some examples of the docstrings: >>> help(zlib.decompress) decompress(data, /, wbits=15, bufsize=16384) Returns a bytes object containing the uncompressed data. >> help(codecs.register) register(search_function, /) Register a codec search function. 2) This communicates the users more explicitly how to call the function and what to expect when this happens, which is the purpose of documenting signatures in the documentation. We are already documenting keyword-only parameters for the same reasons. 3) This PR is not changing any of the signatures, is just documenting and informing users what the signature is and how it will behave. Is just expressing information. The documentation must be user-friendly, but also needs to be technical. 4) We are already documenting positional-only arguments in multiple other functions in the documentation. This PR just continues doing that. Some examples of the many cases: https://docs.python.org/3.8/library/functools.html#functools.partialmethod https://docs.python.org/3.8/library/threading.html#threading.excepthook https://docs.python.org/3.8/library/inspect.html#inspect.getcallargs ... 5) I give training sessions to different levels (people that are starting to program, Juniors and Seniors) and they are always confused when the signature of the function in the documentation does not match the docstring or the actual way of calling the function. This also includes when we use constructs like f(x, ...), f(x, [y=None,]), f(K) -> V or similar because they are not valid Python signatures and they do not appear elsewhere. In general, my experience is that people want the signature documented as close as possible to the real signature in the technical documentation. I wished we could have iterate over this together having a good discussion before involving the steering council, and I am sorry if you were afraid that your concerns would have not been listened to. Sadly, I have not answered before because it was 1:26 in the morning here when you posted your message. I have left the PR open and opened an issue because is the normal workflow and because this allows people to express here their opinion. I think this change is important, but I also think of working together and respecting and understanding everyone's point of view is much more important. If you think me pushing for this change will impact somehow our ability to work together I will close the PR and the issue. For now, I won't do anything before the steering council decides what to do. I apologize to everyone or the wall of text. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 06:20:47 2019 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 03 Jun 2019 10:20:47 +0000 Subject: [issue36048] Deprecate implicit truncating when convert Python numbers to C integers: use __index__, not __int__ In-Reply-To: <1550644985.32.0.26417547244.issue36048@roundup.psfhosted.org> Message-ID: <1559557247.34.0.0359267455435.issue36048@roundup.psfhosted.org> Change by Mark Dickinson : ---------- pull_requests: +13659 pull_request: https://github.com/python/cpython/pull/13740 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 06:26:01 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Jun 2019 10:26:01 +0000 Subject: [issue37141] Allow multiple separators in StreamReader.readuntil In-Reply-To: <1559554350.7.0.981137522594.issue37141@roundup.psfhosted.org> Message-ID: <1559557561.38.0.450219241541.issue37141@roundup.psfhosted.org> Andrew Svetlov added the comment: Docs will be updated soon. The change has landed a week ago, I had no time for docs update before 3.8 beta. Sorry for that. The idea is: StreamReader and StreamWriter are merged into just Stream, open_connection() is replaced with connect() etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 06:28:35 2019 From: report at bugs.python.org (Bruce Merry) Date: Mon, 03 Jun 2019 10:28:35 +0000 Subject: [issue37141] Allow multiple separators in StreamReader.readuntil In-Reply-To: <1559554350.7.0.981137522594.issue37141@roundup.psfhosted.org> Message-ID: <1559557715.71.0.92157064219.issue37141@roundup.psfhosted.org> Bruce Merry added the comment: Ok. Does the new Stream still have a similar interface for readuntil i.e. is this still a relevant request against the new API? I'm happy to let deprecated APIs stay as-is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 06:33:13 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Jun 2019 10:33:13 +0000 Subject: [issue37141] Allow multiple separators in StreamReader.readuntil In-Reply-To: <1559554350.7.0.981137522594.issue37141@roundup.psfhosted.org> Message-ID: <1559557993.47.0.508678693785.issue37141@roundup.psfhosted.org> Andrew Svetlov added the comment: Yes, Stream supports all StreamReader and StreamWriter methods ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 06:34:46 2019 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 03 Jun 2019 10:34:46 +0000 Subject: [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1559558086.46.0.701396640952.issue17576@roundup.psfhosted.org> Mark Dickinson added the comment: I've closed the PR. Reassigning back to Ethan. ---------- assignee: mark.dickinson -> ethan.furman nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 06:34:51 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 03 Jun 2019 10:34:51 +0000 Subject: [issue36231] no "proper" header files on macOS 10.14 Mojave In-Reply-To: <1552039427.3.0.599611853277.issue36231@roundup.psfhosted.org> Message-ID: <1559558091.75.0.285897112793.issue36231@roundup.psfhosted.org> Ned Deily added the comment: New changeset 0288dd6a5192074fcd5aa0db5d3513c3880209ca by Ned Deily in branch 'master': bpo-36231: Support building on macOS without /usr/include (GH-13773) https://github.com/python/cpython/commit/0288dd6a5192074fcd5aa0db5d3513c3880209ca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 06:35:23 2019 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 03 Jun 2019 10:35:23 +0000 Subject: [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1559558123.74.0.82715217827.issue17576@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: -mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 06:36:04 2019 From: report at bugs.python.org (Tom Hale) Date: Mon, 03 Jun 2019 10:36:04 +0000 Subject: [issue36656] Race conditions due to os.link and os.symlink POSIX specification In-Reply-To: <1555577087.92.0.769196427693.issue36656@roundup.psfhosted.org> Message-ID: <1559558164.8.0.968470115752.issue36656@roundup.psfhosted.org> Tom Hale added the comment: Serhiy wrote > Detected problem is better than non-detected problem. I agree. I also assert that no problem (via a shutil wrapper) is better than a detected problem which may not be handled. While it's up to the programmer to handle exceptions, it's only systems programmers who will realise that there is a sometimes-occurring exception which should be handled. So most people won't handle it. They don't know that they need to. The shutil os.link and os.symlink wrappers under discussion on python-ideas prevent non-system-programmers from needing to know about the race-condition case (and correctly handling it). If something is difficult to get right, then let's put it in shutil and save everyone reinventing the wheel. 3 specific cases in which an atomic link replacement would be useful are listed here: https://code.activestate.com/lists/python-ideas/56195/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 06:38:04 2019 From: report at bugs.python.org (Bruce Merry) Date: Mon, 03 Jun 2019 10:38:04 +0000 Subject: [issue37141] Allow multiple separators in Stream.readuntil In-Reply-To: <1559554350.7.0.981137522594.issue37141@roundup.psfhosted.org> Message-ID: <1559558284.69.0.660876627928.issue37141@roundup.psfhosted.org> Bruce Merry added the comment: Ok, I've changed the issue title to refer to Stream. Since this would be a new feature, I assume it's off the table for 3.8, but I'll see if I get time to implement a PR in time for 3.9 (and get someone at work to sign off on the contributor agreement, which might be the harder part). Thanks for the quick and helpful responses. ---------- title: Allow multiple separators in StreamReader.readuntil -> Allow multiple separators in Stream.readuntil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 06:43:28 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 03 Jun 2019 10:43:28 +0000 Subject: [issue37135] test_multiprocessing_spawn segfaults on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559516057.97.0.679920443323.issue37135@roundup.psfhosted.org> Message-ID: <1559558608.68.0.305040516381.issue37135@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I am unable to reproduce this locally, will post here a backtrace if I manage to do so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 07:21:43 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 03 Jun 2019 11:21:43 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1559560903.03.0.922107332822.issue33694@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +13660 pull_request: https://github.com/python/cpython/pull/13773 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 07:23:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 11:23:39 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559561019.18.0.525385349287.issue37134@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-37116. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 07:23:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 11:23:47 +0000 Subject: [issue37116] Use PEP 570 syntax for positional-only parameters In-Reply-To: <1559314061.29.0.391357031696.issue37116@roundup.psfhosted.org> Message-ID: <1559561027.0.0.592374087951.issue37116@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-37134. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 07:27:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 11:27:33 +0000 Subject: [issue37116] Use PEP 570 syntax for positional-only parameters In-Reply-To: <1559314061.29.0.391357031696.issue37116@roundup.psfhosted.org> Message-ID: <1559561253.01.0.196060727183.issue37116@roundup.psfhosted.org> STINNER Victor added the comment: > New changeset 2085bd0877e17ad4d98a4586d5eabb6faecbb190 by Serhiy Storchaka in branch 'master': > bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-13700) > https://github.com/python/cpython/commit/2085bd0877e17ad4d98a4586d5eabb6faecbb190 Oh thanks, this change is really nice! It shows that PEP 570 is really useful! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 07:40:50 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 03 Jun 2019 11:40:50 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1559528863.09.0.855921596654.issue35431@roundup.psfhosted.org> Message-ID: <20190603114029.GX4221@ando.pearwood.info> Steven D'Aprano added the comment: For what its worth, there are concrete, practical applications for binomial coefficients with negative arguments. They are used in fractional calculus https://nrich.maths.org/1365 which in turn has applications in physics, chemistry and other sciences: https://en.wikipedia.org/wiki/Fractional_calculus#Applications Take that however you see fit :-) My own preference is for a comb() function that returns 0 for out of bounds values (e.g. "choose 5 items from 4"), and a seperate binomial() function that accepts any positive or negative integer values. Even I think that fractional and complex arguments are probably a bit too exotic for the std lib -- that's Mathematica territory. And yes, Mathematica does accept fractional and complex arguments to the choose() function. https://www.wolframalpha.com/input/?i=choose%28sqr%28-3.5%29,+sqrt%28-4%2Bi%29%29 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:23:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:23:44 +0000 Subject: [issue37142] test_asyncio timed out on AMD64 FreeBSD CURRENT Shared 3.x Message-ID: <1559564624.91.0.895932729881.issue37142@roundup.psfhosted.org> New submission from STINNER Victor : https://buildbot.python.org/all/#/builders/168/builds/1135 running: test_asyncio (23 min 23 sec) running: test_asyncio (23 min 53 sec) running: test_asyncio (24 min 23 sec) running: test_asyncio (24 min 53 sec) 0:38:48 load avg: 0.32 [423/423/1] test_asyncio crashed (Exit code 1) Timeout (0:25:00)! Thread 0x0000000800ac3000 (most recent call first): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/selectors.py", line 558 in select File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncio/base_events.py", line 1808 in _run_once File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncio/base_events.py", line 563 in run_forever File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncio/base_events.py", line 595 in run_until_complete File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_asyncio/test_streams.py", line 1531 in test_stream_server_abort File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/case.py", line 628 in _callTestMethod File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/case.py", line 671 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/case.py", line 731 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/runner.py", line 176 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/support/__init__.py", line 1984 in _run_suite File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/support/__init__.py", line 2080 in run_unittest File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest.py", line 203 in _test_module File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest.py", line 228 in _runtest_inner2 File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest.py", line 264 in _runtest_inner File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest.py", line 135 in _runtest File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest.py", line 187 in runtest File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest_mp.py", line 66 in run_tests_worker File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/main.py", line 611 in _main File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/main.py", line 588 in main File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/main.py", line 663 in main File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/regrtest.py", line 46 in _main File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/regrtest.py", line 50 in File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/runpy.py", line 85 in _run_code File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/runpy.py", line 192 in _run_module_as_main == Tests result: FAILURE == ... ====================================================================== ERROR: test_stdin_stdout (test.test_asyncio.test_subprocess.SubprocessMultiLoopWatcherTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_asyncio/test_subprocess.py", line 130, in test_stdin_stdout exitcode, stdout = self.loop.run_until_complete(task) File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncio/base_events.py", line 608, in run_until_complete return future.result() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncio/tasks.py", line 464, in wait_for raise exceptions.TimeoutError() asyncio.exceptions.TimeoutError ---------- components: Tests messages: 344415 nosy: vstinner priority: normal severity: normal status: open title: test_asyncio timed out on AMD64 FreeBSD CURRENT Shared 3.x versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:23:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:23:52 +0000 Subject: [issue37142] test_asyncio timed out on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559564624.91.0.895932729881.issue37142@roundup.psfhosted.org> Message-ID: <1559564632.73.0.0234673671632.issue37142@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:27:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:27:45 +0000 Subject: [issue37143] multiprocessing crashed with EXCEPTION_ACCESS_VIOLATION on Python on x86 Windows7 3.x Message-ID: <1559564865.07.0.954701975633.issue37143@roundup.psfhosted.org> New submission from STINNER Victor : Maybe it's related to bpo-33608: https://bugs.python.org/issue33608#msg340143 https://buildbot.python.org/all/#/builders/58/builds/2558 0:42:36 load avg: 5.63 [299/423/1] test_venv crashed (Exit code 1) Timeout (0:35:00)! Thread 0x00000e00 (most recent call first): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 1332 in _readerthread File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 865 in run File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 923 in _bootstrap_inner File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 885 in _bootstrap Thread 0x00000150 (most recent call first): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 1332 in _readerthread File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 865 in run File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 923 in _bootstrap_inner File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 885 in _bootstrap Thread 0x00000d40 (most recent call first): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 1015 in _wait_for_tstate_lock File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 999 in join File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 1361 in _communicate File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 999 in communicate File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_venv.py", line 40 in check_output File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_venv.py", line 327 in test_multiprocessing File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\case.py", line 628 in _callTestMethod File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\case.py", line 671 in run File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\case.py", line 731 in __call__ File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 122 in run File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 84 in __call__ File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 122 in run File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 84 in __call__ File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 122 in run File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 84 in __call__ File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\runner.py", line 176 in run File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 1984 in _run_suite File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 2080 in run_unittest File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 203 in _test_module File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 228 in _runtest_inner2 File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 264 in _runtest_inner File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 135 in _runtest File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 187 in runtest File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\runtest_mp.py", line 66 in run_tests_worker File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\main.py", line 611 in _main File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\main.py", line 588 in main File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\main.py", line 663 in main File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\regrtest.py", line 46 in _main File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\regrtest.py", line 50 in File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\runpy.py", line 85 in _run_code File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\runpy.py", line 192 in _run_module_as_main ... ERROR: test_multiprocessing (test.test_venv.BasicTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_venv.py", line 327, in test_multiprocessing out, err = check_output([envpy, '-c', File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_venv.py", line 42, in check_output raise subprocess.CalledProcessError( subprocess.CalledProcessError: Command '['d:\\temp\\tmpf38yk5w1\\Scripts\\python_d.exe', '-c', 'from multiprocessing import Pool; print(Pool(1).apply_async("Python".lower).get(3))']' returned non-zero exit status 3221225477. where 3221225477 = 0xc0000005 = EXCEPTION_ACCESS_VIOLATION ---------- components: Tests messages: 344416 nosy: vstinner priority: normal severity: normal status: open title: multiprocessing crashed with EXCEPTION_ACCESS_VIOLATION on Python on x86 Windows7 3.x versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:28:34 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 03 Jun 2019 12:28:34 +0000 Subject: [issue37142] test_asyncio timed out on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559564624.91.0.895932729881.issue37142@roundup.psfhosted.org> Message-ID: <1559564914.99.0.670844392032.issue37142@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- components: +asyncio nosy: +asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:28:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:28:44 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1559564924.27.0.741484220333.issue33608@roundup.psfhosted.org> STINNER Victor added the comment: > So far so good. :) I'll keep an eye on things and if the buildbots are still happy then I'll add back _PyEval_FinishPendingCalls() in _Py_FinalizeEx() in a few days. Another crash, on Windows: https://bugs.python.org/issue37143 It sounds like the exactly same bug is back: same crash on same buildbots. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:31:12 2019 From: report at bugs.python.org (Inada Naoki) Date: Mon, 03 Jun 2019 12:31:12 +0000 Subject: [issue26219] implement per-opcode cache in ceval In-Reply-To: <1453918500.26.0.0886095278127.issue26219@psf.upfronthosting.co.za> Message-ID: <1559565072.24.0.898940906066.issue26219@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 91234a16367b56ca03ee289f7c03a34d4cfec4c8 by Inada Naoki in branch 'master': bpo-26219: per opcode cache for LOAD_GLOBAL (GH-12884) https://github.com/python/cpython/commit/91234a16367b56ca03ee289f7c03a34d4cfec4c8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:39:50 2019 From: report at bugs.python.org (Inada Naoki) Date: Mon, 03 Jun 2019 12:39:50 +0000 Subject: [issue26219] implement per-opcode cache in ceval In-Reply-To: <1453918500.26.0.0886095278127.issue26219@psf.upfronthosting.co.za> Message-ID: <1559565590.81.0.521600564869.issue26219@roundup.psfhosted.org> Inada Naoki added the comment: I committed cache only for LOAD_GLOBAL, which is much simpler than LOAD_ATTR or LOAD_METHOD. Caches for other instructions will be implemented 3.9 or later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:45:41 2019 From: report at bugs.python.org (Inada Naoki) Date: Mon, 03 Jun 2019 12:45:41 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1559565941.0.0.230597546668.issue33694@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +13661 pull_request: https://github.com/python/cpython/pull/12884 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:53:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:53:59 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566439.73.0.705262992187.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -11628 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:54:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:54:01 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566441.27.0.47191238298.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -11627 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:54:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:54:03 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566443.18.0.369942598853.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -11626 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:54:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:54:20 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566460.59.0.128395007995.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -11593 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:54:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:54:22 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566462.46.0.617483618505.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -11594 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:54:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:54:24 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566464.39.0.00334576304772.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -11595 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:54:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:54:57 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566497.49.0.295671336661.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -10918 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:54:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:54:58 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566498.98.0.0627050584367.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -10917 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:55:09 2019 From: report at bugs.python.org (Inada Naoki) Date: Mon, 03 Jun 2019 12:55:09 +0000 Subject: [issue26219] implement per-opcode cache in ceval In-Reply-To: <1453918500.26.0.0886095278127.issue26219@psf.upfronthosting.co.za> Message-ID: <1559566509.69.0.243016939011.issue26219@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +13662 pull_request: https://github.com/python/cpython/pull/13775 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:55:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:55:10 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566510.96.0.494992803061.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -11249 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:55:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:55:12 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566512.82.0.846412366583.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -11248 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:55:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:55:28 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566528.81.0.269868404809.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -11335 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:55:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:55:30 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566530.71.0.095876794098.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -11334 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:55:49 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:55:49 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566549.4.0.81464597852.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -11257 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:55:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:55:51 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566551.14.0.112725204528.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -11258 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:56:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:56:04 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566564.5.0.136917281485.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -11583 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:56:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:56:06 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566566.41.0.762807699551.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -11584 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:56:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:56:20 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566580.55.0.725548713026.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -11523 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:56:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:56:22 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566582.31.0.566613662672.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -11524 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:56:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:56:37 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566597.97.0.65618508417.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -11263 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:56:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:56:39 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566599.89.0.961301477137.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -11264 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:56:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:56:54 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566614.97.0.292917103067.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -11586 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:56:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:56:57 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566617.42.0.595341068457.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -11587 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 08:57:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 12:57:16 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559566636.17.0.949548675566.issue35537@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -11476 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 09:31:15 2019 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 03 Jun 2019 13:31:15 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559568675.87.0.917697017005.issue35431@roundup.psfhosted.org> Mark Dickinson added the comment: Given that (a) we're right up against feature freeze, and (b) the discussions about API already happened in plenty of good time some months ago, leading to agreement on the initial API, I think we should avoid any last-minute changes and stick with what we have for 3.8. Then we can have a more relaxed discussion about what, if anything, should be changed for 3.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 09:34:34 2019 From: report at bugs.python.org (Inada Naoki) Date: Mon, 03 Jun 2019 13:34:34 +0000 Subject: [issue26219] implement per-opcode cache in ceval In-Reply-To: <1453918500.26.0.0886095278127.issue26219@psf.upfronthosting.co.za> Message-ID: <1559568874.83.0.888527692095.issue26219@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 395420e2a35937fa9777fc3c8b0086629db95e27 by Inada Naoki in branch 'master': bpo-26219: remove unused code (GH-13775) https://github.com/python/cpython/commit/395420e2a35937fa9777fc3c8b0086629db95e27 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 09:52:41 2019 From: report at bugs.python.org (Inada Naoki) Date: Mon, 03 Jun 2019 13:52:41 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1559569961.77.0.557234123361.issue33694@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +13663 pull_request: https://github.com/python/cpython/pull/13775 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 10:25:40 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 03 Jun 2019 14:25:40 +0000 Subject: [issue37030] Lib/cmd.py: Hide undocumented commands in help and completenames In-Reply-To: <1558682753.85.0.407660629596.issue37030@roundup.psfhosted.org> Message-ID: <1559571940.71.0.467310617539.issue37030@roundup.psfhosted.org> R?mi Lapeyre added the comment: It will be done automatically after someone validated the PR. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 10:54:20 2019 From: report at bugs.python.org (DM) Date: Mon, 03 Jun 2019 14:54:20 +0000 Subject: [issue37144] tarfile.open: improper handling of path-like object Message-ID: <1559573660.5.0.124771167649.issue37144@roundup.psfhosted.org> New submission from DM : According to the documentation, tarfile.open accepts a path-like object since Python 3.6 However, it is not the case when writing a compressed gzip (w|gz). See the attached file for minimal POC Note 1: tested on 3.6 and 3.7 Note 2: https://docs.python.org/3.6/library/tarfile.html#tarfile.open ---------- components: Library (Lib) files: poc.py messages: 344423 nosy: dm priority: normal severity: normal status: open title: tarfile.open: improper handling of path-like object type: behavior versions: Python 3.6, Python 3.7 Added file: https://bugs.python.org/file48386/poc.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 10:58:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 14:58:17 +0000 Subject: [issue37143] multiprocessing crashed with EXCEPTION_ACCESS_VIOLATION on Python on x86 Windows7 3.x In-Reply-To: <1559564865.07.0.954701975633.issue37143@roundup.psfhosted.org> Message-ID: <1559573897.5.0.178537895838.issue37143@roundup.psfhosted.org> STINNER Victor added the comment: On Windows 10, I ran "python -m test test_venv -m test_multiprocessing -F" for 8 min, and "python -m test test_multiprocessing_spawn" in parallel. I failed to reproduce the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 10:59:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 14:59:27 +0000 Subject: [issue37135] test_multiprocessing_spawn segfaults on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559516057.97.0.679920443323.issue37135@roundup.psfhosted.org> Message-ID: <1559573967.61.0.120774119564.issue37135@roundup.psfhosted.org> STINNER Victor added the comment: https://bugs.python.org/issue33608#msg340075: > My procedure to reproduce the crash on FreeBSD: > https://bugs.python.org/issue36114#msg337092 I ran this test for 20 min on the FreeBSD CURRENT buildbot: I failed to reproduce the bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 11:04:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 15:04:03 +0000 Subject: [issue37137] test_asyncio: test_cancel_gather_2() dangling thread In-Reply-To: <1559524688.39.0.485790490316.issue37137@roundup.psfhosted.org> Message-ID: <1559574243.82.0.247681040865.issue37137@roundup.psfhosted.org> STINNER Victor added the comment: https://buildbot.python.org/all/#/builders/167/builds/1188 Variant: test_cancel_both_task_and_inner_future (test.test_asyncio.test_tasks.CTaskSubclass_PyFuture_Tests) ... ok test_cancel_current_task (test.test_asyncio.test_tasks.CTaskSubclass_PyFuture_Tests) ... ok test_cancel_gather_1 (test.test_asyncio.test_tasks.CTaskSubclass_PyFuture_Tests) Ensure that a gathering future refuses to be cancelled once all ... Warning -- threading_cleanup() failed to cleanup -1 threads (count: 0, dangling: 1) Dangling thread: <_MainThread(MainThread, started 34389124096)> ok test_cancel_gather_2 (test.test_asyncio.test_tasks.CTaskSubclass_PyFuture_Tests) ... ok test_cancel_inner_future (test.test_asyncio.test_tasks.CTaskSubclass_PyFuture_Tests) ... ok test_cancel_task_catching (test.test_asyncio.test_tasks.CTaskSubclass_PyFuture_Tests) ... ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 11:16:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 15:16:50 +0000 Subject: [issue37137] test_asyncio: test_cancel_gather_2() dangling thread In-Reply-To: <1559524688.39.0.485790490316.issue37137@roundup.psfhosted.org> Message-ID: <1559575010.04.0.209564295674.issue37137@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-34037: "asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 11:22:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 15:22:36 +0000 Subject: [issue37137] test_asyncio: test_cancel_gather_2() dangling thread In-Reply-To: <1559524688.39.0.485790490316.issue37137@roundup.psfhosted.org> Message-ID: <1559575356.03.0.376390400608.issue37137@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13664 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13779 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 11:26:02 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 03 Jun 2019 15:26:02 +0000 Subject: [issue37135] test_multiprocessing_spawn segfaults on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559516057.97.0.679920443323.issue37135@roundup.psfhosted.org> Message-ID: <1559575562.25.0.533457942974.issue37135@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Adding the release manager to consider this ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 11:30:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 15:30:54 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1559575854.11.0.0265370242236.issue33608@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13665 pull_request: https://github.com/python/cpython/pull/13780 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 11:31:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 15:31:54 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1559575914.8.0.780293241694.issue33608@roundup.psfhosted.org> STINNER Victor added the comment: > It sounds like the exactly same bug is back: same crash on same buildbots. Since it became clear to me that the change broke multiple buildbots and nobody is able to investigate the issue, I wrote PR 13780 to revert the change: https://pythondev.readthedocs.io/ci.html#revert-on-fail ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 11:35:37 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 03 Jun 2019 15:35:37 +0000 Subject: [issue34763] Treat U+4E17 as a numeric value In-Reply-To: <1537543820.35.0.956365154283.issue34763@psf.upfronthosting.co.za> Message-ID: <1559576137.05.0.108781846107.issue34763@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- title: Python lacks 0x4E17 -> Treat U+4E17 as a numeric value _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 11:39:28 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 03 Jun 2019 15:39:28 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1559576368.27.0.517924181077.issue36974@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +13666 pull_request: https://github.com/python/cpython/pull/13781 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 11:43:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 15:43:42 +0000 Subject: [issue37087] Adding native id support for openbsd In-Reply-To: <1559147565.3.0.574292103957.issue37087@roundup.psfhosted.org> Message-ID: <1559576622.92.0.954364313222.issue37087@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 0b9956e9162d8723c2a30ff316ecc25e54459fb1 by Victor Stinner (David Carlier) in branch 'master': bpo-37087: Adding native ID support for OpenBSD (GH-13654) https://github.com/python/cpython/commit/0b9956e9162d8723c2a30ff316ecc25e54459fb1 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 11:44:34 2019 From: report at bugs.python.org (Abhilash Raj) Date: Mon, 03 Jun 2019 15:44:34 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1559576674.83.0.516404321395.issue34155@roundup.psfhosted.org> Abhilash Raj added the comment: I agree that we currently abandon parsing (raise `HeaderParseError`) when we encounter a unexpected token when parsing domain (expected token is dot-atom-text). However, that mechanism is meant to signal the higher level parser that we should look for a different type of token. In case of domain, we don't fallback to anything. I believe we should fallback to `get_unstructured` when we do encounter an invalid domain (either `foo.` or `foo at exaomple` or `foo at example.com`) and register defect. But, the `.domain` attribute on the address class should be None if the domain is invalid. My proposed solution of `get_unstrucutured` is perhaps not a great idea either since we would end up parsing more than we should (maybe we should parse until `>`?) in case of AddrList or something. I would love to know what David and Barry think about this one? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 11:46:14 2019 From: report at bugs.python.org (Abhilash Raj) Date: Mon, 03 Jun 2019 15:46:14 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1559576774.06.0.110426553557.issue34155@roundup.psfhosted.org> Abhilash Raj added the comment: slight typo in the previous message: s/fallback to `get_unstructured` /fallback to *something*/g ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 11:49:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 15:49:09 +0000 Subject: [issue37137] test_asyncio: test_cancel_gather_2() dangling thread In-Reply-To: <1559524688.39.0.485790490316.issue37137@roundup.psfhosted.org> Message-ID: <1559576949.48.0.989738976517.issue37137@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 49a7e347976c9b39149ac7505b11ad6e9e2bdeec by Victor Stinner in branch 'master': bpo-37137: Fix test_asyncio: use TestCase.set_event_loop() (GH-13779) https://github.com/python/cpython/commit/49a7e347976c9b39149ac7505b11ad6e9e2bdeec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 11:52:22 2019 From: report at bugs.python.org (Eric Snow) Date: Mon, 03 Jun 2019 15:52:22 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1559577142.76.0.6866795475.issue33608@roundup.psfhosted.org> Eric Snow added the comment: Please wait on reverting. I'm going to investigate. @koobs, yeah, I'll send you a key. Thanks! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 11:58:28 2019 From: report at bugs.python.org (Eric Snow) Date: Mon, 03 Jun 2019 15:58:28 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1559577508.9.0.898215631372.issue33608@roundup.psfhosted.org> Eric Snow added the comment: FWIW, the failures before were in test_io and test_multiprocessing_spawn, not test_asyncio. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 11:58:49 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 03 Jun 2019 15:58:49 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559577529.47.0.394012053166.issue35431@roundup.psfhosted.org> Raymond Hettinger added the comment: I don't have a preference one way or the other (both ways have plausible arguments, error checking vs utility beyond simple combinatorics, and both ways have ample precedents). That said, if we're going to ultimately relax the constraints, it would be better to do it now before the API is released. Even if we were already in feature freeze, it would be okay to change it (the purpose of a beta is to elicit end-user feedback which is what David has just given). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 11:59:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 15:59:41 +0000 Subject: [issue37087] Adding native id support for openbsd In-Reply-To: <1559147565.3.0.574292103957.issue37087@roundup.psfhosted.org> Message-ID: <1559577581.09.0.814874150291.issue37087@roundup.psfhosted.org> STINNER Victor added the comment: Thanks David Carlier :-) ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 12:08:00 2019 From: report at bugs.python.org (Eric Snow) Date: Mon, 03 Jun 2019 16:08:00 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1559578080.59.0.731812705036.issue33608@roundup.psfhosted.org> Eric Snow added the comment: I had really hoped to get this in for 3.8, as I may need it. However, realistically I doubt it will take just a few minutes to resolve this. With the beta 1 targeted for today it makes sense to revert my change. :( (I may still try to convince our fearless RM to allow it in beta 2, but we'll see.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 12:09:16 2019 From: report at bugs.python.org (SilentGhost) Date: Mon, 03 Jun 2019 16:09:16 +0000 Subject: [issue37139] Inconsistent behavior of email.header.decode_header In-Reply-To: <1559551975.38.0.600668913696.issue37139@roundup.psfhosted.org> Message-ID: <1559578156.41.0.578913340145.issue37139@roundup.psfhosted.org> SilentGhost added the comment: There seems to be some work started in #32975. Perhaps, you'd like to revive it or contribute otherwise? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 12:12:08 2019 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 03 Jun 2019 16:12:08 +0000 Subject: [issue34763] Treat U+4E17 as a numeric value In-Reply-To: <1537543820.35.0.956365154283.issue34763@psf.upfronthosting.co.za> Message-ID: <1559578328.76.0.569134806298.issue34763@roundup.psfhosted.org> Xiang Zhang added the comment: unicode.org doesn't list "?" as numeric so I think there is nothing we can do. ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 12:13:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 16:13:34 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1559577508.9.0.898215631372.issue33608@roundup.psfhosted.org> Message-ID: STINNER Victor added the comment: > FWIW, the failures before were in test_io and test_multiprocessing_spawn, not test_asyncio. I am not aware of a test_asyncio issue related to this issue, only crashes in multiprocessing. I bet on a similar crash than the previous attempt, during shutdown. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 12:14:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 16:14:39 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1559578479.84.0.515771407081.issue33608@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e225bebc1409bcf68db74a35ed3c31222883bf8f by Victor Stinner in branch 'master': Revert "bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). (gh-13714)" (GH-13780) https://github.com/python/cpython/commit/e225bebc1409bcf68db74a35ed3c31222883bf8f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 12:23:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 16:23:20 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1559579000.5.0.722072175899.issue33608@roundup.psfhosted.org> STINNER Victor added the comment: What annoy me the most in this issue is that I am unable to reproduce it. Even directly on the FreeBSD CURRENT buildbot, I failed to reproduce rhe crash even when I stressed the buildbot and the test. On the other side, when the CI runs the test suite, crashes are likely!? These bugs are the worst. IMHO we must make multiprocessing more deterministic. Python 3.8 is better, but there are still many known issues. https://pythondev.readthedocs.io/unstable_tests.html test_venv multiprocessing test misuses the multiprocessing issue, it emirs a ResourceWarning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 12:40:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 16:40:31 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1559580031.59.0.10279239492.issue33608@roundup.psfhosted.org> STINNER Victor added the comment: My bet is that multiprocessing triggers a bug in daemon threads. Multiprocessing is using and abusing daemon threads. For example, as I wrote, test_venv misuses the multiprocessing API and implicitly let Python release (or maybe not!) "resources" where "resources" can be processes and threads, likely including daemon threads. Eric: I would love to give you access to a VM where I can reproduce the bug but... I failed to reproduce the bug today :-( I would suggest to write a stress test for daemon threads: * spawn daemon threads: 4x times threads than CPU to stress the system * each thread would sleep a random number of milliseconds and then execute a few pure Python instructions * spawns these threads, wait a random number of milliseconds, and then "exit Python" The race condition is that daemon threads may or maybe run during Python finalization depending on the delay. Maybe you can make the crash more likely by adding a sleep of a few *seconds* before the final exit. For example, at the exit of Py_RunMain(). Last time I saw the crash, it was a thread which uses a Python structure whereas the memory of the structure was freed (filled with a random pattern by debug hooks on memory allocators). Ah, either use a debug build of Python, or use PYTHONMALLOC=debug, or -X dev command line option, to fill freed memory with a specific pattern, to trigger the crash. ... Good luck. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 12:46:14 2019 From: report at bugs.python.org (Eric Snow) Date: Mon, 03 Jun 2019 16:46:14 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1559580374.4.0.883655005135.issue33608@roundup.psfhosted.org> Eric Snow added the comment: Well, for this PR I actually disabled the execution of pending calls during runtime finialization. I'd hoped it would help, but it did not. :( Regardless, I'll need to look even more closely at what is different during runtime finalization with my PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 12:47:07 2019 From: report at bugs.python.org (Eric Snow) Date: Mon, 03 Jun 2019 16:47:07 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1559580427.24.0.451912462309.issue33608@roundup.psfhosted.org> Eric Snow added the comment: Also, thanks for the suggestions, Victor! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 12:48:36 2019 From: report at bugs.python.org (Geoffrey Sneddon) Date: Mon, 03 Jun 2019 16:48:36 +0000 Subject: [issue37145] collections.abc.MappingView mixins rely on undocumented _mapping Message-ID: <1559580516.49.0.942559591286.issue37145@roundup.psfhosted.org> New submission from Geoffrey Sneddon : The mixin methods on MappingView and its subclasses all rely on the undocumented MappingView._mapping (set in the undocumented MappingView.__init__). This should probably be documented at least insofar as Set._from_iterable is. ---------- assignee: docs at python components: Documentation messages: 344447 nosy: docs at python, gsnedders priority: normal severity: normal status: open title: collections.abc.MappingView mixins rely on undocumented _mapping type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 12:56:29 2019 From: report at bugs.python.org (Tim Peters) Date: Mon, 03 Jun 2019 16:56:29 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559580989.34.0.288545352228.issue35431@roundup.psfhosted.org> Tim Peters added the comment: Python needs a benevolent dictator ;-) I'd be happy for Mark, Raymond, or me to play that role here. If it were me, I'd drop the k <= n requirement: both arguments must be non-negative integers. Because a combinatorial (not factorial-, and certainly not gamma-, based) definition of `comb()` is best suited for Python's general audience, and "number of ways to pick k things out of n without regard to order" makes clear sense for any pair of non-negative k and n. But anything beyond that does not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 13:00:53 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 03 Jun 2019 17:00:53 +0000 Subject: [issue37145] collections.abc.MappingView mixins rely on undocumented _mapping In-Reply-To: <1559580516.49.0.942559591286.issue37145@roundup.psfhosted.org> Message-ID: <1559581253.53.0.513811619606.issue37145@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +rhettinger versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 13:04:35 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 03 Jun 2019 17:04:35 +0000 Subject: [issue37135] test_multiprocessing_spawn segfaults on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559516057.97.0.679920443323.issue37135@roundup.psfhosted.org> Message-ID: <1559581475.64.0.227296603442.issue37135@roundup.psfhosted.org> ?ukasz Langa added the comment: FTR Victor reverted GH-13714 that triggers this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 13:13:13 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 03 Jun 2019 17:13:13 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559581993.2.0.360030024896.issue35431@roundup.psfhosted.org> Raymond Hettinger added the comment: > If it were me, I'd drop the k <= n requirement +1 from me. ---------- versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 13:16:22 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 03 Jun 2019 17:16:22 +0000 Subject: [issue37145] collections.abc.MappingView mixins rely on undocumented _mapping In-Reply-To: <1559580516.49.0.942559591286.issue37145@roundup.psfhosted.org> Message-ID: <1559582182.77.0.155063201001.issue37145@roundup.psfhosted.org> Raymond Hettinger added the comment: The _mapping attribute is a private implementation detail and should remain undocumented. A user of mapping views creates that attribute via the __init__() method. In contrast, _from_iterable is explicitly meant to be overridden because it is the only way to control object creation. Thank you for the suggestion. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 13:23:12 2019 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 03 Jun 2019 17:23:12 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559582592.88.0.288562615321.issue35431@roundup.psfhosted.org> Mark Dickinson added the comment: Fine by me. The same change should be applied to `math.perm`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 13:26:54 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 03 Jun 2019 17:26:54 +0000 Subject: [issue37135] test_multiprocessing_spawn segfaults on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559516057.97.0.679920443323.issue37135@roundup.psfhosted.org> Message-ID: <1559582814.98.0.843754876357.issue37135@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > FTR Victor reverted GH-13714 that triggers this. Given the nature of the bugs, I would recommend to watch the buildbots ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 13:27:29 2019 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 03 Jun 2019 17:27:29 +0000 Subject: [issue36027] Support negative exponents in pow() where a modulus is specified. In-Reply-To: <1550520659.43.0.126744170658.issue36027@roundup.psfhosted.org> Message-ID: <1559582849.25.0.616961377507.issue36027@roundup.psfhosted.org> Mark Dickinson added the comment: @Petr: Thanks for the quick fix! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 13:28:02 2019 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 03 Jun 2019 17:28:02 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559582882.98.0.60696020178.issue37134@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 14:10:25 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 03 Jun 2019 18:10:25 +0000 Subject: [issue37081] Test with OpenSSL 1.1.1c In-Reply-To: <1559058292.64.0.780398663722.issue37081@roundup.psfhosted.org> Message-ID: <1559585425.57.0.429661738032.issue37081@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 06651ee418b5e4e013195d6b702763a1220706a7 by Christian Heimes in branch 'master': bpo-37081: Test with OpenSSL 1.1.1c (GH-13631) https://github.com/python/cpython/commit/06651ee418b5e4e013195d6b702763a1220706a7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 14:10:40 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 03 Jun 2019 18:10:40 +0000 Subject: [issue37081] Test with OpenSSL 1.1.1c In-Reply-To: <1559058292.64.0.780398663722.issue37081@roundup.psfhosted.org> Message-ID: <1559585440.46.0.768209031008.issue37081@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13667 pull_request: https://github.com/python/cpython/pull/13782 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 14:16:17 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 03 Jun 2019 18:16:17 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1559585777.71.0.765290698471.issue37111@roundup.psfhosted.org> Steve Dower added the comment: I agree with Paul. Consistency with open() is the most important aspect here, and when we investigated changing that to UTF-8 it was decided to be too disruptive. That said, I'm not opposed to adding encoding/errors to basicConfig if someone wants to do that (and the logging specialists are okay with it). ---------- resolution: not a bug -> stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 14:30:40 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 03 Jun 2019 18:30:40 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559586640.34.0.956339020378.issue37134@roundup.psfhosted.org> Raymond Hettinger added the comment: > If you think me pushing for this change will impact somehow > our ability to work together I will close the PR and the issue. Not at all. I always enjoy working with you and appreciate the depth of thinking you bring to every task :-) Here, we just disagree on whether changing the docs will be a net aid or net detriment to end users. My belief is that the docs will be less usable, less intuitive, and less approachable. People using the docs are already alone and in need of help. Cryptic notation doesn't make this task easier. While a person can be trained to read this notation, it is my belief that a person shouldn't have to have training to read the docs. Unlike other decisions where predicting the future is uncertain, we already have some user testing results because the \ notation was exposed in help() via the argument clinic. The results have not been favorable. AFAICT not one single user has benefitted from seeing something like this output from help(len): len(obj, /) Return the number of items in a container. The / is a stumbling block. My unscientific twitter poll had mostly WTF reactions from end-users. This wasn't limited to beginners -- Steve Holden and David Beazley have both found this notation detrimental to communication. This week I joined a twitter thread where I needed to defend the existing docs. The contention was that docs aren't very usable for end-users and that the existing core devs lacked writing skills and were too interested in technical details rather than plain communication. (I mostly disagree with this, but there is another core dev consistently giving this message in talks all around the world). The essential point here is that there are already usability concerns with the documentation. My belief is that this PR will make the situation worse. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 14:40:01 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 03 Jun 2019 18:40:01 +0000 Subject: [issue37081] Test with OpenSSL 1.1.1c In-Reply-To: <1559058292.64.0.780398663722.issue37081@roundup.psfhosted.org> Message-ID: <1559587201.17.0.868268981535.issue37081@roundup.psfhosted.org> miss-islington added the comment: New changeset 3344197040fe1b05a3244bdb16d429f4647f35b8 by Miss Islington (bot) in branch '3.7': [3.7] bpo-37081: Test with OpenSSL 1.1.1c (GH-13631) (GH-13782) https://github.com/python/cpython/commit/3344197040fe1b05a3244bdb16d429f4647f35b8 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 14:40:18 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 03 Jun 2019 18:40:18 +0000 Subject: [issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILE In-Reply-To: <1532867889.16.0.56676864532.issue34271@psf.upfronthosting.co.za> Message-ID: <1559587218.39.0.789296996288.issue34271@roundup.psfhosted.org> Christian Heimes added the comment: New changeset e35d1ba9eab07a59b98b700c5e18ceb13b2561a6 by Christian Heimes in branch 'master': bpo-34271: Fix compatibility with 1.0.2 (GH-13728) https://github.com/python/cpython/commit/e35d1ba9eab07a59b98b700c5e18ceb13b2561a6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 14:48:29 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 03 Jun 2019 18:48:29 +0000 Subject: [issue34001] LibreSSL does not tolerate setting minimum_version greater than maximum_version In-Reply-To: <1530288553.74.0.56676864532.issue34001@psf.upfronthosting.co.za> Message-ID: <1559587709.47.0.416238322285.issue34001@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +13668 pull_request: https://github.com/python/cpython/pull/13783 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 14:51:30 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 03 Jun 2019 18:51:30 +0000 Subject: [issue36868] New behavior of OpenSSL hostname verification not exposed, incorrectly documented In-Reply-To: <1557425747.49.0.948212766878.issue36868@roundup.psfhosted.org> Message-ID: <1559587890.98.0.151328836607.issue36868@roundup.psfhosted.org> miss-islington added the comment: New changeset 47eb2234061524562a4b484e3a395f4fdd6c1b76 by Miss Islington (bot) (Christian Heimes) in branch 'master': bpo-36868: Fix what's new for SSLContext.hostname_checks_common_name (GH-13248) https://github.com/python/cpython/commit/47eb2234061524562a4b484e3a395f4fdd6c1b76 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 14:51:40 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 03 Jun 2019 18:51:40 +0000 Subject: [issue36868] New behavior of OpenSSL hostname verification not exposed, incorrectly documented In-Reply-To: <1557425747.49.0.948212766878.issue36868@roundup.psfhosted.org> Message-ID: <1559587900.2.0.531972251256.issue36868@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch pull_requests: +13669 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13784 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 14:57:15 2019 From: report at bugs.python.org (Paul Monson) Date: Mon, 03 Jun 2019 18:57:15 +0000 Subject: [issue37140] ctypes change made clang fail to build In-Reply-To: <1559553697.78.0.201685591504.issue37140@roundup.psfhosted.org> Message-ID: <1559588235.44.0.514695211159.issue37140@roundup.psfhosted.org> Paul Monson added the comment: The change causing the build failure comes from this commit. https://github.com/python/cpython/pull/3806/commits/ea8a0dcea68409d37f3ad9e60e42777c76ad903b The commit comment says: "Fix copy of structures when passed by value." Steve, do you recall what this change fixed? ---------- nosy: +Paul Monson, steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 14:58:59 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 03 Jun 2019 18:58:59 +0000 Subject: [issue37130] pathlib.with_name() doesn't like unnamed files. In-Reply-To: <1559438292.33.0.601764456145.issue37130@roundup.psfhosted.org> Message-ID: <1559588339.78.0.495909885096.issue37130@roundup.psfhosted.org> Brett Cannon added the comment: The inconsistency is a bit weird. Looking at https://github.com/python/cpython/blob/master/Lib/pathlib.py#L825 the question is why is self.name not being set for '.' but it is for '..'. I suspect there's special-casing for '.' somewhere that sets self.name to '' for '.' but leaves it alone in all other instances. Based on what with_name() is supposed to do I would argue that '..' shouldn't work since without a filename the with_name() method makes no sense. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 14:59:07 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 03 Jun 2019 18:59:07 +0000 Subject: [issue37130] pathlib.with_name() doesn't like unnamed files. In-Reply-To: <1559438292.33.0.601764456145.issue37130@roundup.psfhosted.org> Message-ID: <1559588347.34.0.967041767793.issue37130@roundup.psfhosted.org> Change by Brett Cannon : ---------- stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 15:00:13 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 03 Jun 2019 19:00:13 +0000 Subject: [issue37120] Provide knobs to disable session ticket generation on TLS 1.3 In-Reply-To: <1559365529.23.0.311490427939.issue37120@roundup.psfhosted.org> Message-ID: <1559588413.39.0.302399787338.issue37120@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 78c7d527799dacca91b9ed67057cb996efe526b0 by Christian Heimes in branch 'master': bpo-37120: Add SSLContext.num_tickets (GH-13719) https://github.com/python/cpython/commit/78c7d527799dacca91b9ed67057cb996efe526b0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 15:01:15 2019 From: report at bugs.python.org (Tim Peters) Date: Mon, 03 Jun 2019 19:01:15 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559588475.0.0.766825791794.issue37134@roundup.psfhosted.org> Tim Peters added the comment: I haven't looked at anything in this PR, so just popping in to confirm that the first time I saw stuff like: len(obj, /) in the docs I had no idea at all what it was trying to say. I thought it was a typo. Also the second, third, fourth, ..., times I saw it. However, because Python didn't _accept_ that syntax in my own function definitions, that may well have made it extraordinarily hard to figure out. If the syntax is going to be accepted now, that does change things to my eyes. It becomes a question of discoverability then. I'll note that Googling on python slash in formal argument list turns up an excellent Stackoverflow explanation as its top hit for me today, although not if "slash" is replaced with "/". ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 15:02:14 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 03 Jun 2019 19:02:14 +0000 Subject: [issue36868] New behavior of OpenSSL hostname verification not exposed, incorrectly documented In-Reply-To: <1557425747.49.0.948212766878.issue36868@roundup.psfhosted.org> Message-ID: <1559588534.68.0.531655245365.issue36868@roundup.psfhosted.org> miss-islington added the comment: New changeset cad4ff65eb12649cd650059b15d8e12f2ae951ef by Miss Islington (bot) in branch '3.7': bpo-36868: Fix what's new for SSLContext.hostname_checks_common_name (GH-13248) https://github.com/python/cpython/commit/cad4ff65eb12649cd650059b15d8e12f2ae951ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 15:02:50 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 03 Jun 2019 19:02:50 +0000 Subject: [issue37120] Provide knobs to disable session ticket generation on TLS 1.3 In-Reply-To: <1559365529.23.0.311490427939.issue37120@roundup.psfhosted.org> Message-ID: <1559588570.73.0.91791689035.issue37120@roundup.psfhosted.org> Christian Heimes added the comment: I have merged the PR to land the feature in time for the feature freeze. Regarding your comment on client_context.num_ticket getter: IMHO it's not a good idea to raise an exception on attribute access. It may break introspection. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 15:03:03 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 03 Jun 2019 19:03:03 +0000 Subject: [issue37120] Provide knobs to disable session ticket generation on TLS 1.3 In-Reply-To: <1559365529.23.0.311490427939.issue37120@roundup.psfhosted.org> Message-ID: <1559588583.26.0.254517466849.issue37120@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> commit review status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 15:24:57 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 03 Jun 2019 19:24:57 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559589897.01.0.522570745757.issue37134@roundup.psfhosted.org> Brett Cannon added the comment: FYI when Guido said "call on the steering council" I think he meant open an issue at https://github.com/python/steering-council/issues as this will get lost otherwise (i.e. Guido already removed himself from the nosy list so this already doesn't have the whole council participating). Anyway, from my personal view, I think we should use the syntax. It's officially part of the language at this point and so avoiding it in the docs seems odd, like we're saying that we're ashamed of this syntax and you should pretend it doesn't exist when it does and it isn't going anywhere. Otherwise aren't we're forcing users to realize that the function definition in the docs deviates from what is definable in this one instance and that one has to read the full text to know that something is doable syntactically but we're leaving it out of the docs? It adds inconsistency in what the definition line means IMO based on how we have usually chosen to try and express things in that 'def' line in the docs as succinctly as possible to communicate the semantics of calling that function. And I realize that Raymond's "unscientific twitter poll had mostly WTF reactions from end-users", but that's also sampling from people who have probably never used the syntax in real life or read docs regularly that use it. I've actually been wanting to use the syntax to say "the name isn't important here" as I've had to already close a PR that wanted to tweak documentation for name consistency where it actually didn't matter because the code used positional-only parameters but they weren't explicitly documented as such. Going back and saying "positional-only" to communicate that everywhere that it applies versus using the syntax we have to express that seems unnecessary to me. Or put another way, how would you want to update: len(obj) Return the number of items in a container. to properly reflect the fact that *obj* is positional-only which is now an official concept in the language? We've been glazing over this for ages in the docs because we didn't have a way of expressing it succinctly and it only touched C-implemented code and we lacked a way to state it in Python, but now we have a way to state this fact. You could add a "The **obj** parameter is positional-only.", but to me that requires unnecessary reading of the text body if all I'm doing is checking the parameter order (and maybe the first sentence). And I realize we have gotten away with this until now, but as the concept of positional-only parameters grows that will become more of an issue. Not using / also means that we're deviating from what help() emits, which could cause its own confusion as more people learn about the new syntax. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 15:27:08 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 03 Jun 2019 19:27:08 +0000 Subject: [issue36964] `python3 -m venv NAME`: virtualenv is not portable In-Reply-To: <1558267639.25.0.0700835222258.issue36964@roundup.psfhosted.org> Message-ID: <1559590028.14.0.914141375483.issue36964@roundup.psfhosted.org> Brett Cannon added the comment: Changing VIRTUAL_ENV will break code, so I'm not sure if it's worth changing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 16:34:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 20:34:43 +0000 Subject: [issue37146] opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting Message-ID: <1559594083.93.0.475089830437.issue37146@roundup.psfhosted.org> New submission from STINNER Victor : opcode cache for LOAD_GLOBAL introduced false alarm in memory leak hunting (python3 -m test -R 3:3 ...). => opcache: bpo-26219. Before the change: $ git checkout 91234a16367b56ca03ee289f7c03a34d4cfec4c8^ $ make && ./python -m test -R 3:3 test_pprint ... Tests result: SUCCESS After the change: $ git checkout 91234a16367b56ca03ee289f7c03a34d4cfec4c8 $ make && ./python -m test -R 3:3 test_pprint ... test_pprint leaked [4, 2, 4] memory blocks, sum=10 ... The problem is that at each iteration of regrtest -R 3:3 (6 iterations), a few more code objects get this opcache allocated. There are different solutions to fix regrtest -R 3:3. (*) Always optimize: diff --git a/Python/ceval.c b/Python/ceval.c index 411ba3d73c..6cd148efba 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -103,7 +103,7 @@ static long dxp[256]; #endif /* per opcode cache */ -#define OPCACHE_MIN_RUNS 1024 /* create opcache when code executed this time */ +#define OPCACHE_MIN_RUNS 1 /* create opcache when code executed this time */ #define OPCACHE_STATS 0 /* Enable stats */ #if OPCACHE_STATS $ make && ./python -m test -R 3:3 test_pprint ... Tests result: SUCCESS (*) Never optimmize: disable opcache until a better fix can be found diff --git a/Python/ceval.c b/Python/ceval.c index 411ba3d73c..3c85df6fea 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1230,6 +1230,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag) f->f_stacktop = NULL; /* remains NULL unless yield suspends frame */ f->f_executing = 1; +#if 0 if (co->co_opcache_flag < OPCACHE_MIN_RUNS) { co->co_opcache_flag++; if (co->co_opcache_flag == OPCACHE_MIN_RUNS) { @@ -1244,6 +1245,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag) #endif } } +#endif #ifdef LLTRACE lltrace = _PyDict_GetItemId(f->f_globals, &PyId___ltrace__) != NULL; $ make && ./python -m test -R 3:3 test_pprint ... Tests result: SUCCESS (*) Find a way to explicitly deoptimize all code objects Modules/gcmodule.c has a clear_freelists() function called by collect() if generation == NUM_GENERATIONS-1: on when gc.collect() is collected explicitly for example. Lib/test/libregrtest/refleak.py also has a dash_R_cleanup() function which clears many caches. Problem: currently, code objects are not explicitly tracked (for example, they are not tracked in a double linked list). (*) Add way more warmup iterations to regrtest in buildbots. I dislike this option. A build on a refleak buildbot worker already takes 2 to 3 hours. Adding more warmup would make a build even way more slower. ---------- components: Interpreter Core messages: 344469 nosy: inada.naoki, vstinner, yselivanov priority: normal severity: normal status: open title: opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 16:35:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 20:35:16 +0000 Subject: [issue26219] implement per-opcode cache in ceval In-Reply-To: <1453918500.26.0.0886095278127.issue26219@psf.upfronthosting.co.za> Message-ID: <1559594116.57.0.972403853357.issue26219@roundup.psfhosted.org> STINNER Victor added the comment: The opcode cache introduced an issue in reference leak hunting: see bpo-37146. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 16:38:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 20:38:32 +0000 Subject: [issue37137] test_asyncio: test_cancel_gather_2() dangling thread In-Reply-To: <1559524688.39.0.485790490316.issue37137@roundup.psfhosted.org> Message-ID: <1559594312.81.0.825744185457.issue37137@roundup.psfhosted.org> STINNER Victor added the comment: My change didn't fix the issue: https://buildbot.python.org/all/#/builders/176/builds/680 test_proc_exited (test.test_asyncio.test_subprocess.SubprocessTransportTests) ... Warning -- threading_cleanup() failed to cleanup -1 threads (count: 0, dangling: 1) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 16:45:13 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 03 Jun 2019 20:45:13 +0000 Subject: [issue37124] test_msilib is potentially leaking references and memory blocks In-Reply-To: <1559405726.45.0.528544648803.issue37124@roundup.psfhosted.org> Message-ID: <1559594713.05.0.165947930713.issue37124@roundup.psfhosted.org> Steve Dower added the comment: I have no idea. I don't ever use msilib, but there are a few people who do that don't have any way to get bugs fixed, so I'll help merge. If it's just the test leak, probably it's in the test. I don't recall the change having any impact on resource usage. But at worst, removing the test completely is fine by me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 16:49:18 2019 From: report at bugs.python.org (Carol Willing) Date: Mon, 03 Jun 2019 20:49:18 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559594958.24.0.689891356934.issue37134@roundup.psfhosted.org> Carol Willing added the comment: Tim's message resonated with me. Confusing users is something that I believe that we wish to minimize. I confess that I had a similar reaction as Tim when I saw functions with a trailing `/`. What I did find helpful was adding to the middle of the parameter list as was done in Serihy's earlier PRs. Since we are balancing technical accuracy with user confusion (docs and docstrings), I propose the following: 1. Remove the trailing / from 3.8 documentation but leave the / if it occurs in the middle of the parameter list. This increases technical accuracy from pre-3.8 and gives users more time to get comfortable with the change (since end users have found this a confusing area with args kwargs *). 2. Add to the documentation in 3.8 section on positional only parameters a note box that describes that in many/all cases where a / is not specified at the end and no * is found in the parameter list that a trailing slash would be accurate. 3. Give users time to absorb the positional only change in 3.8. Perhaps writing a blog post that explains in detail. 4. Add the trailing / in 3.9 documentation to make consistent with docstrings or improve/create a better directive for function that provides a better accuracy and less confusion. A Sphinx extension may also be made to show a simple user-friendly view and with a click the fully accurate view. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 16:51:08 2019 From: report at bugs.python.org (Tim Peters) Date: Mon, 03 Jun 2019 20:51:08 +0000 Subject: [issue37029] PyObject_Free is O(N) where N = # of arenas In-Reply-To: <1558676037.99.0.0721055204531.issue37029@roundup.psfhosted.org> Message-ID: <1559595068.96.0.0750225134751.issue37029@roundup.psfhosted.org> Tim Peters added the comment: Thank you, Friedl! I appreciate the extra confirmation - and especially on even bigger test cases :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 16:58:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 20:58:20 +0000 Subject: [issue37137] test_asyncio: test_cancel_gather_2() dangling thread In-Reply-To: <1559524688.39.0.485790490316.issue37137@roundup.psfhosted.org> Message-ID: <1559595500.81.0.61766889989.issue37137@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13670 pull_request: https://github.com/python/cpython/pull/13786 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 17:00:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 21:00:25 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1559595625.47.0.800064744294.issue34037@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PR 13786 to fix this issue. ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 17:09:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 21:09:09 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1559596149.75.0.111730442538.issue34037@roundup.psfhosted.org> STINNER Victor added the comment: "executor.shutdown(wait=False)" was added by this change: commit 4ca7355901049ff9a873cf236091e6780d7a8126 Author: Antoine Pitrou Date: Sun Oct 20 00:54:10 2013 +0200 Issue #19299: fix refleak test failures in test_asyncio Guido van Rossum proposed to wait for the executor. Guido proposed " executor.shutdown(wait=False)", but he didn't comment why wait=False: https://bugs.python.org/issue19299#msg200508 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 17:31:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 21:31:27 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1559597487.42.0.954478265449.issue34037@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 0f0a30f4da4b529e0f7df857b9f575b231b32758 by Victor Stinner in branch 'master': bpo-34037, asyncio: add BaseEventLoop.wait_executor_on_close (GH-13786) https://github.com/python/cpython/commit/0f0a30f4da4b529e0f7df857b9f575b231b32758 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 17:31:37 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 03 Jun 2019 21:31:37 +0000 Subject: [issue36707] The "m" ABI flag of SOABI for pymalloc is no longer needed In-Reply-To: <1556065645.57.0.820338293941.issue36707@roundup.psfhosted.org> Message-ID: <1559597497.39.0.586201144706.issue36707@roundup.psfhosted.org> Miro Hron?ok added the comment: It's usually just custom ugly-hardcoded autotools/cmake. Nothing severe enough. However, this change still is not documented anywhere in https://docs.python.org/dev/whatsnew/3.8.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 17:32:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 21:32:26 +0000 Subject: [issue37137] test_asyncio: test_cancel_gather_2() dangling thread In-Reply-To: <1559524688.39.0.485790490316.issue37137@roundup.psfhosted.org> Message-ID: <1559597546.13.0.216713911629.issue37137@roundup.psfhosted.org> STINNER Victor added the comment: I push a fix in asyncio, instead of trying to fix individual asyncio tests: New changeset 0f0a30f4da4b529e0f7df857b9f575b231b32758 by Victor Stinner in branch 'master': bpo-34037, asyncio: add BaseEventLoop.wait_executor_on_close (GH-13786) https://github.com/python/cpython/commit/0f0a30f4da4b529e0f7df857b9f575b231b32758 See https://bugs.python.org/issue34037#msg344476 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 17:35:29 2019 From: report at bugs.python.org (Geoffrey Sneddon) Date: Mon, 03 Jun 2019 21:35:29 +0000 Subject: [issue37145] collections.abc.MappingView mixins rely on undocumented _mapping In-Reply-To: <1559580516.49.0.942559591286.issue37145@roundup.psfhosted.org> Message-ID: <1559597729.08.0.293471881106.issue37145@roundup.psfhosted.org> Geoffrey Sneddon added the comment: How do you use ItemsView without: * relying on __init__ and _mapping, which are both private implementation details, or * reimplementing __len__, __contains__, and __iter__? Given you can't use the mixin implementations of __len__, __contains__, and __iter__ without relying on private implementation details, should they actually be considered mixin implementations? Shouldn't they just be abstract methods given you can't actually use them? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 17:40:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 21:40:55 +0000 Subject: [issue37137] test_asyncio: test_cancel_gather_2() dangling thread In-Reply-To: <1559524688.39.0.485790490316.issue37137@roundup.psfhosted.org> Message-ID: <1559598055.54.0.571941195503.issue37137@roundup.psfhosted.org> STINNER Victor added the comment: My second attempt isn't fully successful :-( test_asyncio still fails with ENV_CHANGED :-( https://buildbot.python.org/all/#/builders/185/builds/488 test_current_task_no_running_loop_implicit (test.test_asyncio.test_tasks.CCurrentLoopTests) ... Warning -- threading_cleanup() failed to cleanup -1 threads (count: 0, dangling: 1) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 17:56:55 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 03 Jun 2019 21:56:55 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559599015.5.0.326741084989.issue37134@roundup.psfhosted.org> Gregory P. Smith added the comment: I agree with Brett and Carol here. This is part of the language syntax. We can educate people to that effect more if desired (I like the blog post idea). People will figure it out. We've already got high ranked stackoverflow answers related to this when you search: https://stackoverflow.com/questions/24735311/python-what-does-the-slash-mean-in-help-output/ https://stackoverflow.com/questions/28243832/what-is-the-meaning-of-a-forward-slash-in-a-python-method-signature-as-show/ Today, we don't document what is positional only, adding this notation is an improvement because it communicates that detail to anyone interested in understanding it without adding a pile of text to all sorts of function signatures. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 18:19:57 2019 From: report at bugs.python.org (Inada Naoki) Date: Mon, 03 Jun 2019 22:19:57 +0000 Subject: [issue37146] opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting In-Reply-To: <1559594083.93.0.475089830437.issue37146@roundup.psfhosted.org> Message-ID: <1559600397.63.0.372584536089.issue37146@roundup.psfhosted.org> Change by Inada Naoki : ---------- keywords: +patch pull_requests: +13671 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13787 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 18:20:59 2019 From: report at bugs.python.org (Tim Burke) Date: Mon, 03 Jun 2019 22:20:59 +0000 Subject: [issue37093] http.client aborts header parsing upon encountering non-ASCII header names In-Reply-To: <1559172729.29.0.908018369806.issue37093@roundup.psfhosted.org> Message-ID: <1559600459.73.0.503020187226.issue37093@roundup.psfhosted.org> Change by Tim Burke : ---------- keywords: +patch pull_requests: +13672 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/13788 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 18:24:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 22:24:18 +0000 Subject: [issue36707] The "m" ABI flag of SOABI for pymalloc is no longer needed In-Reply-To: <1556065645.57.0.820338293941.issue36707@roundup.psfhosted.org> Message-ID: <1559600658.77.0.0474082768011.issue36707@roundup.psfhosted.org> STINNER Victor added the comment: > It's usually just custom ugly-hardcoded autotools/cmake. Nothing severe enough. However, this change still is not documented anywhere in https://docs.python.org/dev/whatsnew/3.8.html I concur that it should be documented. It's on my TODO list. But I'm not sure of what are the things impacting by ABIFLAGS="" rather than ABIFLAGS="m". Someone has to propose a PR to document that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 18:27:26 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 03 Jun 2019 22:27:26 +0000 Subject: [issue37146] opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting In-Reply-To: <1559594083.93.0.475089830437.issue37146@roundup.psfhosted.org> Message-ID: <1559600846.09.0.989719348715.issue37146@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +13673 pull_request: https://github.com/python/cpython/pull/13789 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 18:28:34 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 03 Jun 2019 22:28:34 +0000 Subject: [issue36707] The "m" ABI flag of SOABI for pymalloc is no longer needed In-Reply-To: <1556065645.57.0.820338293941.issue36707@roundup.psfhosted.org> Message-ID: <1559600914.91.0.763076336491.issue36707@roundup.psfhosted.org> Miro Hron?ok added the comment: I'm not sure either. So far most affected buildscripts are confused by: /usr/include/python3.Xm -> /usr/include/python3.X /usr/lib64/libpython3.Xm -> /usr/lib64/libpython3.X extension.cpython-3Xm-arch-linux-gnu.so -> extension.cpython-3X-arch-linux-gnu.so However this is pretty much Linux specific, so I wouldn't know how to explain this in an OS agnostic way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 18:36:47 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Jun 2019 22:36:47 +0000 Subject: [issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream In-Reply-To: <1557598514.53.0.379470651864.issue36889@roundup.psfhosted.org> Message-ID: <1559601407.1.0.772108367855.issue36889@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- pull_requests: +13674 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/13790 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 18:38:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 22:38:13 +0000 Subject: [issue37146] opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting In-Reply-To: <1559594083.93.0.475089830437.issue37146@roundup.psfhosted.org> Message-ID: <1559601493.12.0.983659322915.issue37146@roundup.psfhosted.org> STINNER Victor added the comment: New changeset eddef861b49f1635222a9e1771231c34a807debf by Victor Stinner (Inada Naoki) in branch 'master': bpo-37146: disable opcache when Py_DEBUG is defined (GH-13787) https://github.com/python/cpython/commit/eddef861b49f1635222a9e1771231c34a807debf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 18:41:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 22:41:07 +0000 Subject: [issue37146] opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting In-Reply-To: <1559594083.93.0.475089830437.issue37146@roundup.psfhosted.org> Message-ID: <1559601667.51.0.433890899055.issue37146@roundup.psfhosted.org> STINNER Victor added the comment: INADA-san wrote PR 13787 to disable opcache when Python is compiled in debug mode. Pablo and me approved the change, so I merged it. Pablo wrote a more robust solution, PR 13789, to disable opcache only in regrtest, to look for memory leaks. But INADA-san had a good argument against this approach: https://github.com/python/cpython/pull/13789#issuecomment-498449735 "The code object will be optimized only when ++co->co_opcache_flag == opcacheminruns. So decreasing min_runs by _setopcacheminruns()will cause some hot codes will be not optimized forever. I don't want to expose such switch." I would prefer to keep this issue until a long term approach is designed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 18:48:57 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 03 Jun 2019 22:48:57 +0000 Subject: [issue5680] Simulate command-line arguments for program run in IDLE In-Reply-To: <1238798556.38.0.28468201552.issue5680@psf.upfronthosting.co.za> Message-ID: <1559602137.19.0.825765877205.issue5680@roundup.psfhosted.org> Cheryl Sabella added the comment: I've pushed a change for a more generic dialog for a 'Run Custom' option and I changed the keybinding to Shift-F5. Sorry for not doing that on the initial commit; I didn't fully understand the difference between what you were asking for and the minimal version I had committed. For this change, I also added a 'Restart shell' checkbox to the dialog, more as a proof-of-concept than anything else (although I did hook it up, so it should be functional). Is this the type of dialog you had in mind? I made some comments on the PR as to some of the decisions I've run into so far with the design. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 19:08:50 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 03 Jun 2019 23:08:50 +0000 Subject: [issue35763] IDLE calltips: make positional note less obtrusive In-Reply-To: <1547755288.11.0.42128686161.issue35763@roundup.psfhosted.org> Message-ID: <1559603330.49.0.995466012422.issue35763@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +13675 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/13791 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 19:13:59 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Jun 2019 23:13:59 +0000 Subject: [issue37137] test_asyncio: test_cancel_gather_2() dangling thread In-Reply-To: <1559524688.39.0.485790490316.issue37137@roundup.psfhosted.org> Message-ID: <1559603639.32.0.361195472309.issue37137@roundup.psfhosted.org> Andrew Svetlov added the comment: I suspect that I've added this dangling thread by https://github.com/python/cpython/blob/master/Lib/asyncio/unix_events.py#L1248-L1251 :( ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 19:18:13 2019 From: report at bugs.python.org (Inada Naoki) Date: Mon, 03 Jun 2019 23:18:13 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1559603893.33.0.24013222837.issue33694@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +13676 pull_request: https://github.com/python/cpython/pull/13787 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 19:21:47 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Jun 2019 23:21:47 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1559604107.14.0.340763927483.issue33694@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- nosy: -asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 19:26:55 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 03 Jun 2019 23:26:55 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1559604415.41.0.184302737223.issue33694@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: -pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 19:27:57 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Jun 2019 23:27:57 +0000 Subject: [issue37137] test_asyncio: test_cancel_gather_2() dangling thread In-Reply-To: <1559524688.39.0.485790490316.issue37137@roundup.psfhosted.org> Message-ID: <1559604477.02.0.0641895076493.issue37137@roundup.psfhosted.org> Andrew Svetlov added the comment: Working on PR ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 19:30:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 23:30:01 +0000 Subject: [issue37137] test_asyncio: test_cancel_gather_2() dangling thread In-Reply-To: <1559524688.39.0.485790490316.issue37137@roundup.psfhosted.org> Message-ID: <1559604601.27.0.803880982396.issue37137@roundup.psfhosted.org> STINNER Victor added the comment: > I suspect that I've added this dangling thread by https://github.com/python/cpython/blob/master/Lib/asyncio/unix_events.py#L1248-L1251 :( Can you please try to revert commit 13ed07998ad93dbdd94991ba0451b9b559f07972? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 19:33:44 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Jun 2019 23:33:44 +0000 Subject: [issue37137] test_asyncio: test_cancel_gather_2() dangling thread In-Reply-To: <1559524688.39.0.485790490316.issue37137@roundup.psfhosted.org> Message-ID: <1559604824.85.0.196699064375.issue37137@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- pull_requests: +13677 pull_request: https://github.com/python/cpython/pull/13792 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 19:35:06 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Jun 2019 23:35:06 +0000 Subject: [issue37137] test_asyncio: test_cancel_gather_2() dangling thread In-Reply-To: <1559524688.39.0.485790490316.issue37137@roundup.psfhosted.org> Message-ID: <1559604906.38.0.951370902084.issue37137@roundup.psfhosted.org> Andrew Svetlov added the comment: We have two options: 1. Apply https://github.com/python/cpython/pull/13792 to wait for dangling threads 2. Revert added watchers entirely What do you prefer? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 19:38:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 23:38:33 +0000 Subject: [issue37137] test_asyncio: test_cancel_gather_2() dangling thread In-Reply-To: <1559524688.39.0.485790490316.issue37137@roundup.psfhosted.org> Message-ID: <1559605113.31.0.731847053599.issue37137@roundup.psfhosted.org> STINNER Victor added the comment: > 2. Revert added watchers entirely I prefer this option just because we must fix all bugs as soon as possible to get the beta1 released, and this bug is just one bug in a list of bugs. I might try to help you *later* to fix the change to prevent this bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 19:42:22 2019 From: report at bugs.python.org (Paul Monson) Date: Mon, 03 Jun 2019 23:42:22 +0000 Subject: [issue37140] ctypes change made clang fail to build In-Reply-To: <1559553697.78.0.201685591504.issue37140@roundup.psfhosted.org> Message-ID: <1559605342.18.0.856674823246.issue37140@roundup.psfhosted.org> Paul Monson added the comment: If I undo the changes to StructUnionType_paramfunc then test_pass_by_value (ctypes.test.test_structures.StructureTestCase) fails on x64 on Windows. Looking at the code I don't think this is specific to Windows. This is a test for fixing this issue: https://bugs.python.org/issue29565 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 19:45:51 2019 From: report at bugs.python.org (Dino Viehland) Date: Mon, 03 Jun 2019 23:45:51 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559605551.66.0.732780590111.issue36839@roundup.psfhosted.org> Dino Viehland added the comment: The 20MB of savings is actually the amount of byte code that exists in the IG code base. I was just measuring the web site code, and not the other various Python code in the process (e.g. no std lib code, no 3rd party libraries, etc...). The IG code base is pretty monolithic and starting up the site requires about half of the code to get imported. So I think the 20MB per process is a pretty realistic number. I've also created a C extension and the object implementing the buffer protocol looks like: typedef struct { PyObject_HEAD const char* data; size_t size; Py_ssize_t hash; CIceBreaker *breaker; size_t exports; PyObject* code_obj; /* borrowed reference, the code object keeps us alive */ } CIceBreakerCode; All of the modules are currently getting compiled into a single memory mapped file and then these objects get created which implement the buffer protocol for each function. So the overhead it just takes a byte code w/ 16 opcodes before it breaks even, so it is significantly lighter weight than using a memoryview object. It's certainly true that the byte code isn't the #1 source of memory here (the code objects themselves are pretty big), but in the serialized state it ends up representing 25% of the serialized data. I would expect when you add in ref counts and typing information it's not quite as good, but reducing the overhead of code by 20% is still a pretty nice win. I can't make any promises about open sourcing the import system, but I can certainly look into that as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 19:46:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jun 2019 23:46:21 +0000 Subject: [issue37135] test_multiprocessing_spawn segfaults on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559516057.97.0.679920443323.issue37135@roundup.psfhosted.org> Message-ID: <1559605581.09.0.462001272741.issue37135@roundup.psfhosted.org> STINNER Victor added the comment: > FTR Victor reverted GH-13714 that triggers this. Sadly, this revert wasn't enough. New fresh coredump on "AMD64 FreeBSD CURRENT Shared 3.x": https://buildbot.python.org/all/#builders/168/builds/1145 Warning -- Dangling processes: {} Warning -- Dangling processes: {} Warning -- multiprocessing.process._dangling was modified by test_multiprocessing_spawn Before: set() After: {} Warning -- files was modified by test_multiprocessing_spawn Before: [] After: ['python.core'] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 19:46:42 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 03 Jun 2019 23:46:42 +0000 Subject: [issue31006] typing.NamedTuple should add annotations to its constructor (__new__) parameters. In-Reply-To: <1500887267.27.0.393959457135.issue31006@psf.upfronthosting.co.za> Message-ID: <1559605602.07.0.00145917221993.issue31006@roundup.psfhosted.org> Ivan Levkivskyi added the comment: Thanks! It looks like this was fixed in typing and then forward ported to CPython. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 19:50:01 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Jun 2019 23:50:01 +0000 Subject: [issue35621] asyncio.create_subprocess_exec() only works with main event loop In-Reply-To: <1546210778.19.0.43686311162.issue35621@roundup.psfhosted.org> Message-ID: <1559605801.24.0.240766213596.issue35621@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- pull_requests: +13678 pull_request: https://github.com/python/cpython/pull/13793 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 19:50:23 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Jun 2019 23:50:23 +0000 Subject: [issue37137] test_asyncio: test_cancel_gather_2() dangling thread In-Reply-To: <1559524688.39.0.485790490316.issue37137@roundup.psfhosted.org> Message-ID: <1559605823.1.0.0346693277895.issue37137@roundup.psfhosted.org> Andrew Svetlov added the comment: Got you. https://github.com/python/cpython/pull/13793 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 19:55:05 2019 From: report at bugs.python.org (Paul Monson) Date: Mon, 03 Jun 2019 23:55:05 +0000 Subject: [issue37140] ctypes change made clang fail to build In-Reply-To: <1559553697.78.0.201685591504.issue37140@roundup.psfhosted.org> Message-ID: <1559606105.2.0.647903219408.issue37140@roundup.psfhosted.org> Paul Monson added the comment: Reading the related bugs more carefully I think the struct/union passing conventions are different on Windows x64 and Linux. I have a fix which works for Windows but preserves the prior code for Linux. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 19:57:24 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 03 Jun 2019 23:57:24 +0000 Subject: [issue37135] test_multiprocessing_spawn segfaults on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559516057.97.0.679920443323.issue37135@roundup.psfhosted.org> Message-ID: <1559606244.93.0.275160634371.issue37135@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: CURRENT-amd64% lldb ./python -c python.core (lldb) target create "./python" --core "python.core" Core file '/home/pablo/cpython/python.core' (x86_64) was loaded. (lldb) bt * thread #1, name = 'python', stop reason = signal SIGBUS * frame #0: 0x000000000035cfad python`take_gil(tstate=0x0000000802b34010) at ceval_gil.h:216:13 frame #1: 0x000000000035d499 python`PyEval_RestoreThread(tstate=0x0000000802b34010) at ceval.c:281:5 frame #2: 0x000000000040c045 python frame #3: 0x000000000047cc51 python frame #4: 0x000000000034f59c python`_PyMethodDef_RawFastCallKeywords(method=0x0000000802b34010, self=0x00000008011c1578, args=0x0000000000000092, nargs=2, kwnames=) at call.c:653:18 frame #5: 0x000000000034e549 python`_PyCFunction_FastCallKeywords(func=0x00000008011c8280, args=, nargs=, kwnames=) at call.c:732:14 frame #6: 0x000000000036d850 python`call_function(pp_stack=0x00007fffdfbfbcc8, oparg=, kwnames=) at ceval.c:4673:9 frame #7: 0x0000000000368d09 python`_PyEval_EvalFrameDefault(f=, throwflag=) at ceval.c:3294:19 frame #8: 0x000000000036e59c python`_PyEval_EvalCodeWithName [inlined] PyEval_EvalFrameEx(f=, throwflag=0) at ceval.c:624:12 frame #9: 0x000000000036e586 python`_PyEval_EvalCodeWithName(_co=, globals=, locals=, args=, argcount=2, kwnames=0x0000000000000000, kwargs=0x000000080266e5f8, kwcount=0, kwstep=1, defs=0x0000000802533558, defcount=1, kwdefs=0x0000000000000000, closure=0x0000000000000000, name=0x00000008017355f0, qualname=0x0000000802524d60) at ceval.c:4035 frame #10: 0x000000000034e438 python`_PyFunction_FastCallKeywords(func=, stack=, nargs=, kwnames=) at call.c:435:12 frame #11: 0x000000000036d9c7 python`call_function(pp_stack=0x00007fffdfbfc020, oparg=, kwnames=) at ceval.c:4721:17 frame #12: 0x0000000000368bae python`_PyEval_EvalFrameDefault(f=, throwflag=) at ceval.c:3280:23 frame #13: 0x000000000034ebaa python`function_code_fastcall(co=, args=, nargs=2, globals=) at call.c:285:14 frame #14: 0x000000000036d9c7 python`call_function(pp_stack=0x00007fffdfbfc230, oparg=, kwnames=) at ceval.c:4721:17 frame #15: 0x0000000000368bae python`_PyEval_EvalFrameDefault(f=, throwflag=) at ceval.c:3280:23 frame #16: 0x000000000036e59c python`_PyEval_EvalCodeWithName [inlined] PyEval_EvalFrameEx(f=, throwflag=0) at ceval.c:624:12 frame #17: 0x000000000036e586 python`_PyEval_EvalCodeWithName(_co=, globals=, locals=, args=, argcount=2, kwnames=0x0000000000000000, kwargs=0x000000080271eb58, kwcount=0, kwstep=1, defs=0x000000080251dbd8, defcount=2, kwdefs=0x0000000000000000, closure=0x0000000000000000, name=0x000000080187fd60, qualname=0x0000000802522340) at ceval.c:4035 frame #18: 0x000000000034e438 python`_PyFunction_FastCallKeywords(func=, stack=, nargs=, kwnames=) at call.c:435:12 frame #19: 0x000000000036d9c7 python`call_function(pp_stack=0x00007fffdfbfc520, oparg=, kwnames=) at ceval.c:4721:17 frame #20: 0x0000000000368bae python`_PyEval_EvalFrameDefault(f=, throwflag=) at ceval.c:3280:23 frame #21: 0x000000000034ebaa python`function_code_fastcall(co=, args=, nargs=2, globals=) at call.c:285:14 frame #22: 0x000000000036d9c7 python`call_function(pp_stack=0x00007fffdfbfc730, oparg=, kwnames=) at ceval.c:4721:17 frame #23: 0x0000000000368bae python`_PyEval_EvalFrameDefault(f=, throwflag=) at ceval.c:3280:23 frame #24: 0x000000000034ebaa python`function_code_fastcall(co=, args=, nargs=2, globals=) at call.c:285:14 frame #25: 0x000000000034f934 python`_PyObject_Call_Prepend(callable=0x00000008025b4100, obj=0x0000000801878b30, args=, kwargs=0x000000080267e980) at call.c:906:14 frame #26: 0x000000000034e75f python`PyObject_Call(callable=0x00000008021008d8, args=0x00000008017a7cb0, kwargs=0x000000080267e980) at call.c:247:18 frame #27: 0x00000000003690a9 python`_PyEval_EvalFrameDefault [inlined] do_call_core(func=, callargs=, kwdict=0x000000080267e980) at ceval.c:4775:12 frame #28: 0x000000000036907e python`_PyEval_EvalFrameDefault(f=, throwflag=) at ceval.c:3353 frame #29: 0x000000000034ebaa python`function_code_fastcall(co=, args=, nargs=1, globals=) at call.c:285:14 frame #30: 0x000000000036d9c7 python`call_function(pp_stack=0x00007fffdfbfcba0, oparg=, kwnames=) at ceval.c:4721:17 frame #31: 0x0000000000368bae python`_PyEval_EvalFrameDefault(f=, throwflag=) at ceval.c:3280:23 frame #32: 0x000000000034ebaa python`function_code_fastcall(co=, args=, nargs=1, globals=) at call.c:285:14 frame #33: 0x000000000036d9c7 python`call_function(pp_stack=0x00007fffdfbfcdb0, oparg=, kwnames=) at ceval.c:4721:17 frame #34: 0x0000000000368bae python`_PyEval_EvalFrameDefault(f=, throwflag=) at ceval.c:3280:23 frame #35: 0x000000000034ebaa python`function_code_fastcall(co=, args=, nargs=1, globals=) at call.c:285:14 frame #36: 0x000000000034f934 python`_PyObject_Call_Prepend(callable=0x000000080152ff70, obj=0x0000000802681a10, args=, kwargs=0x0000000000000000) at call.c:906:14 frame #37: 0x000000000034e75f python`PyObject_Call(callable=0x0000000802aa4a10, args=0x000000080106c050, kwargs=0x0000000000000000) at call.c:247:18 frame #38: 0x00000000004b35e8 python frame #39: 0x00000000004049b9 python frame #40: 0x000000080059774b libthr.so.3`thread_start(curthread=0x0000000802b34010) at thr_create.c:291:16 (lldb) debug2: client_check_window_change: changed debug2: channel 0: request window-change confirm 0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 20:09:22 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 04 Jun 2019 00:09:22 +0000 Subject: [issue35621] asyncio.create_subprocess_exec() only works with main event loop In-Reply-To: <1546210778.19.0.43686311162.issue35621@roundup.psfhosted.org> Message-ID: <1559606962.73.0.34634583734.issue35621@roundup.psfhosted.org> miss-islington added the comment: New changeset 9535aff9421f0a5639f6e4c4bb0f07a743ea8dba by Miss Islington (bot) (Andrew Svetlov) in branch 'master': Revert "bpo-35621: Support running subprocesses in asyncio when loop is executed in non-main thread (#13630)" (GH-13793) https://github.com/python/cpython/commit/9535aff9421f0a5639f6e4c4bb0f07a743ea8dba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 20:13:26 2019 From: report at bugs.python.org (Robert Collins) Date: Tue, 04 Jun 2019 00:13:26 +0000 Subject: [issue36656] Please add race-free os.link and os.symlink wrapper / helper In-Reply-To: <1555577087.92.0.769196427693.issue36656@roundup.psfhosted.org> Message-ID: <1559607206.76.0.526045612485.issue36656@roundup.psfhosted.org> Robert Collins added the comment: I'd like to add a few notes; please do consider Windows interactions here - Windows does not have the same model for inode replacement that Posix has. Secondly, I note that the thread model discussed here hasn't been particular well articulated. In particular the vagaries of directories with the sticky bit set are quite different to those where attacker and victim share group permissions : TOCTTOU attacks do imply that post-atomic operation attacks will be possible, and I disagree with the analysis by Serhiy suggesting that they are necessarily so. However I also agree with Toshio that the os module is not the right place to provide a more secure API: we have to have the basic primitive exposed to Python code somewhere, otherwise the higher level APIs such as you'd like to use are not creatable. My suggestion is that you put a module up on PyPI that provides the secure behaviour necessary, get some feedback on that, get some cross-platform experience, and then, if desired, propose it for inclusion in shutil or similar in the stdlib. I'm also going to retitle this - because actually, os.link and os.symlink aren't racy *per se* on Posix - its how they are used that is racy: and the very fact that a secure variant can be written (however ugly) is demonstration of that. ---------- nosy: +rbcollins title: Race conditions due to os.link and os.symlink POSIX specification -> Please add race-free os.link and os.symlink wrapper / helper _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 20:27:15 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 00:27:15 +0000 Subject: [issue37135] test_multiprocessing_spawn segfaults on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559516057.97.0.679920443323.issue37135@roundup.psfhosted.org> Message-ID: <1559608035.12.0.595445308292.issue37135@roundup.psfhosted.org> STINNER Victor added the comment: I looked at the coredump with Pablo. In short, the main thread is calling Py_Exit() to exit the process and so released memory, and a daemon thread does crash on calling PyEval_RestoreThread() because tstate memory was freed. The question is now if this bug is a regression compared to Python 3.7 or not. I'm trying to reproduce it on Linux by adding "sleep(1)" before exit, but my attempts are unsuccessful so far. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 20:29:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 00:29:01 +0000 Subject: [issue37143] multiprocessing crashed with EXCEPTION_ACCESS_VIOLATION on Python on x86 Windows7 3.x In-Reply-To: <1559564865.07.0.954701975633.issue37143@roundup.psfhosted.org> Message-ID: <1559608141.68.0.639362409181.issue37143@roundup.psfhosted.org> STINNER Victor added the comment: New fresh crash on x86 Windows7 3.x, even after the revert: https://buildbot.python.org/all/#/builders/58/builds/2566 ====================================================================== ERROR: test_multiprocessing (test.test_venv.BasicTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_venv.py", line 327, in test_multiprocessing out, err = check_output([envpy, '-c', File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_venv.py", line 42, in check_output raise subprocess.CalledProcessError( subprocess.CalledProcessError: Command '['d:\\temp\\tmp1rikh6ck\\Scripts\\python_d.exe', '-c', 'from multiprocessing import Pool; print(Pool(1).apply_async("Python".lower).get(3))']' returned non-zero exit status 3221225477. Same on FreeBSD: https://bugs.python.org/issue37135#msg344495 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 20:29:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 00:29:28 +0000 Subject: [issue37143] multiprocessing crashed with EXCEPTION_ACCESS_VIOLATION on Python on x86 Windows7 3.x In-Reply-To: <1559564865.07.0.954701975633.issue37143@roundup.psfhosted.org> Message-ID: <1559608168.01.0.476588802672.issue37143@roundup.psfhosted.org> STINNER Victor added the comment: I mark this issue as a duplicate of bpo-37135. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 20:30:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 00:30:53 +0000 Subject: [issue37135] test_multiprocessing_spawn segfaults on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559516057.97.0.679920443323.issue37135@roundup.psfhosted.org> Message-ID: <1559608253.42.0.17653829765.issue37135@roundup.psfhosted.org> STINNER Victor added the comment: I marked bpo-37143 "multiprocessing crashed with EXCEPTION_ACCESS_VIOLATION on Python on x86 Windows7 3.x" as a duplicate of this issue. Even if bpo-37143 looks very different (crash in a different file, on a different operating system), I'm now quite sure that it has the same root cause. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 20:31:00 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 04 Jun 2019 00:31:00 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1559605551.66.0.732780590111.issue36839@roundup.psfhosted.org> Message-ID: Inada Naoki added the comment: On Tue, Jun 4, 2019 at 8:45 AM Dino Viehland wrote: > > The 20MB of savings is actually the amount of byte code that exists in the IG code base. Wait, do you expect you can reduce 100% saving of co_code object? co_code takes 0byte? You said "the overhead it just takes a byte code w/ 16 opcodes before it breaks even" later. So I believe you must understand there is overhead. > I was just measuring the web site code, and not the other various Python code in the process (e.g. no std lib code, no 3rd party libraries, etc...). The IG code base is pretty monolithic and starting up the site requires about half of the code to get imported. So I think the 20MB per process is a pretty realistic number. How many MBs your application takes? 20MB of 200MB is attractive. 20MB of 20GB is not attractive. Absolute number is not important here. You should use ratio. > > It's certainly true that the byte code isn't the #1 source of memory here (the code objects themselves are pretty big), but in the serialized state it ends up representing 25% of the serialized data. "25% of the serialized data" is misleading information. You are trying to reduce memory usage, not serialized data size. You should use ratio of total RAM usage, not serialized data size. > I can't make any promises about open sourcing the import system, but I can certainly look into that as well. Open sourcing is not necessary. Try it by yourself and share the real number, instead of number of your estimation. How much RSS is used by Python, and how much of it you can reduce by this system, actually? Regards, -- Inada Naoki ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 20:33:12 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 04 Jun 2019 00:33:12 +0000 Subject: [issue33416] Add endline and endcolumn to every AST node In-Reply-To: <1525342525.55.0.682650639539.issue33416@psf.upfronthosting.co.za> Message-ID: <1559608392.27.0.410461711622.issue33416@roundup.psfhosted.org> Ivan Levkivskyi added the comment: So what was the conclusion about PyCode_New()? Situation is quite similar here (except that these functions are used less often). Should we just document the changes in What's New? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 20:40:08 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 04 Jun 2019 00:40:08 +0000 Subject: [issue37135] test_multiprocessing_spawn segfaults on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559516057.97.0.679920443323.issue37135@roundup.psfhosted.org> Message-ID: <1559608808.08.0.538168085891.issue37135@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Note that the core dump that we are talking about is something that we produced afterwards when trying to reproduce the issue. The core that is produced as part of the tests could be different. I am trying to get access to the test files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 20:41:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 00:41:14 +0000 Subject: [issue37135] test_multiprocessing_spawn segfaults on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559516057.97.0.679920443323.issue37135@roundup.psfhosted.org> Message-ID: <1559608874.2.0.605419885371.issue37135@roundup.psfhosted.org> Change by STINNER Victor : Added file: https://bugs.python.org/file48387/stress.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 20:42:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 00:42:44 +0000 Subject: [issue37135] test_multiprocessing_spawn segfaults on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559516057.97.0.679920443323.issue37135@roundup.psfhosted.org> Message-ID: <1559608964.41.0.352513501499.issue37135@roundup.psfhosted.org> STINNER Victor added the comment: If you apply attached sleep_at_exit.patch and run attach stress.py, you should quickly get a crash: $ git apply sleep_at_exit.patch $ make && ./python stress.py Segmentation fault (core dumped) That's a simplified example of the multiprocessing crash. ---------- keywords: +patch Added file: https://bugs.python.org/file48388/sleep_at_exit.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 20:44:20 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 04 Jun 2019 00:44:20 +0000 Subject: [issue35814] Syntax quirk with variable annotations In-Reply-To: <1548308739.94.0.144807070146.issue35814@roundup.psfhosted.org> Message-ID: <1559609060.99.0.871668244649.issue35814@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- pull_requests: +13679 pull_request: https://github.com/python/cpython/pull/13794 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 20:56:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 00:56:00 +0000 Subject: [issue37135] test_multiprocessing_spawn segfaults on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559516057.97.0.679920443323.issue37135@roundup.psfhosted.org> Message-ID: <1559609760.61.0.102290176036.issue37135@roundup.psfhosted.org> STINNER Victor added the comment: I used git bisect and I found: commit 396e0a8d9dc65453cb9d53500d0a620602656cfe (refs/bisect/bad) Author: Eric Snow Date: Fri May 31 21:16:47 2019 -0600 bpo-36818: Add PyInterpreterState.runtime field. (gh-13129) stress.py starts to crash at this change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 20:59:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 00:59:06 +0000 Subject: [issue36818] Add PyInterpreterState.runtime. In-Reply-To: <1557168344.92.0.643564511932.issue36818@roundup.psfhosted.org> Message-ID: <1559609946.73.0.803523998906.issue36818@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13680 pull_request: https://github.com/python/cpython/pull/13795 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 21:01:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 01:01:52 +0000 Subject: [issue37135] test_multiprocessing_spawn segfaults on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559516057.97.0.679920443323.issue37135@roundup.psfhosted.org> Message-ID: <1559610112.23.0.552377526305.issue37135@roundup.psfhosted.org> STINNER Victor added the comment: > commit 396e0a8d9dc65453cb9d53500d0a620602656cfe (refs/bisect/bad) Extract of this change: static inline void -exit_thread_if_finalizing(_PyRuntimeState *runtime, PyThreadState *tstate) +exit_thread_if_finalizing(PyThreadState *tstate) { + _PyRuntimeState *runtime = tstate->interp->runtime; /* _Py_Finalizing is protected by the GIL */ if (runtime->finalizing != NULL && !_Py_CURRENTLY_FINALIZING(runtime, tstate)) { drop_gil(&runtime->ceval, tstate); @@ -236,7 +237,7 @@ PyEval_AcquireLock(void) Py_FatalError("PyEval_AcquireLock: current thread state is NULL"); } take_gil(ceval, tstate); - exit_thread_if_finalizing(runtime, tstate); + exit_thread_if_finalizing(tstate); } This change is fine for regular Python threads. But for daemon threads, tstate is likely already corrupted, so it's no longer possible to get interp from interp, and so also not possible to get 'runtime'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 21:06:07 2019 From: report at bugs.python.org (Windson Yang) Date: Tue, 04 Jun 2019 01:06:07 +0000 Subject: [issue15474] Differentiate decorator and decorator factory in docs In-Reply-To: <1343416207.69.0.71696747041.issue15474@psf.upfronthosting.co.za> Message-ID: <1559610367.53.0.164892989515.issue15474@roundup.psfhosted.org> Windson Yang added the comment: Hi, Andr?s Delfino. Are you still working on it? ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 21:14:05 2019 From: report at bugs.python.org (Paul Monson) Date: Tue, 04 Jun 2019 01:14:05 +0000 Subject: [issue37140] ctypes change made clang fail to build In-Reply-To: <1559553697.78.0.201685591504.issue37140@roundup.psfhosted.org> Message-ID: <1559610845.11.0.044212136975.issue37140@roundup.psfhosted.org> Change by Paul Monson : ---------- keywords: +patch pull_requests: +13681 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13796 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 21:15:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 01:15:11 +0000 Subject: [issue36818] Add PyInterpreterState.runtime. In-Reply-To: <1557168344.92.0.643564511932.issue36818@roundup.psfhosted.org> Message-ID: <1559610911.9.0.922085994702.issue36818@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 0fd2c300c2a85b3b227a907b2a39ef79fa86d850 by Victor Stinner in branch 'master': Revert "bpo-36818: Add PyInterpreterState.runtime field. (gh-13129)" (GH-13795) https://github.com/python/cpython/commit/0fd2c300c2a85b3b227a907b2a39ef79fa86d850 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 21:19:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 01:19:05 +0000 Subject: [issue36818] Add PyInterpreterState.runtime. In-Reply-To: <1557168344.92.0.643564511932.issue36818@roundup.psfhosted.org> Message-ID: <1559611145.56.0.869137171786.issue36818@roundup.psfhosted.org> STINNER Victor added the comment: This change introduced a regression: https://bugs.python.org/issue37135#msg344511 I had to revert the change to fix Python for 3.8 beta1 release. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 21:21:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 01:21:32 +0000 Subject: [issue36818] Add PyInterpreterState.runtime. In-Reply-To: <1557168344.92.0.643564511932.issue36818@roundup.psfhosted.org> Message-ID: <1559611292.93.0.330736115799.issue36818@roundup.psfhosted.org> STINNER Victor added the comment: By the way, I have questions about the rationale of this change. > Currently we use the _PyRuntime static global to access the runtime state in various places. At the same time, in thread contexts we get access to the thread state from Thread-Local Storage and the interpreter state by indirection from there. We should do the same for the runtime state instead of using the global directly. Right now I'm confused. _PyRuntimeState contains scatted states: things which should be moved to PyInterpreterState or even PyThreadState, and things which should remain in _PyRuntimeState. My notes on this topic: https://pythoncapi.readthedocs.io/runtime.html Is PyInterpreterState.runtime a temporary fix until things are moved? Or do you plan to never access _PyRuntime directly, and always through interp->runtime? It seems like in the short term, we must continue to access "_PyRuntime" through a separated "runtime" pointer passed to functions, to handle daemon threads during Python shutdown. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 21:29:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 01:29:46 +0000 Subject: [issue37137] test_asyncio: test_cancel_gather_2() dangling thread In-Reply-To: <1559524688.39.0.485790490316.issue37137@roundup.psfhosted.org> Message-ID: <1559611786.96.0.272988158522.issue37137@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Andrew! Sorry that you had to revert your change :-( We can reconsider to merge again your change after beta1 (if our release manager is fine with that). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 21:44:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 01:44:37 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559612677.72.0.972234050603.issue37134@roundup.psfhosted.org> STINNER Victor added the comment: A first enhancement would be to add an index entry for "/" at: https://docs.python.org/dev/genindex-Symbols.html > I'll note that Googling on: "python slash in formal argument list" ... We have to find a cute name for the "/ operator" in function definition! Like the "walrus operator" for "x := 1" :-D Nobody is able to find "/" in Google. And I'm not sure that "slash" is accurate enough, since it has multiple meaning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 21:52:56 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 04 Jun 2019 01:52:56 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559613176.0.0.465204820753.issue37134@roundup.psfhosted.org> Raymond Hettinger added the comment: I respectfully disagree with logic, "the language now permits this, so we should change all the docs to display it everywhere". That moves it from optional knowledge to mandatory knowledge, from a day ten lesson to a day one lesson, from "once in a while, a user may benefit from being able to mark arguments as positional-only" to the category of "every single user will see this every time they see the docs". There is a huge difference. My almost daily experience with end-users regarding the \ annotation has been decidedly negative. And my experience as a professional tech writer teaches that "people will just have to figure it out" is not a phrase to live by when it comes to documentation (it is an anti-pattern). There is no reason that we have to do this to the docs. Please at least go with Carol's suggestion to defer all the trailing \ annotations for at least another release so that you can get more user feedback. I know some regard The Zen of Python as just poetry, but the "readability counts" and "beautiful is better than ugly" parts mean something. Those key attractors to the language should not be discarded lightly. And while a blog post might be nice, the odds are that fewer than 1% of Python users will ever see it. Python has millions of users and blog posts are rarely seen by more than tens of thousands. Even then, blog post knowledge is transient and quickly becomes yesterday's news. The entire notion of training away the problem is specious; you really shouldn't have to have training to read documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 22:38:22 2019 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 04 Jun 2019 02:38:22 +0000 Subject: [issue33416] Add endline and endcolumn to every AST node In-Reply-To: <1525342525.55.0.682650639539.issue33416@psf.upfronthosting.co.za> Message-ID: <1559615902.87.0.840798153126.issue33416@roundup.psfhosted.org> Guido van Rossum added the comment: It seems we're keeping the new PyCode_New() signature, so we can do the same here. Just document it; a versionchanged (if there isn't one yet) and a mention in What's New sound appropriate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 22:45:52 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 04 Jun 2019 02:45:52 +0000 Subject: [issue37130] pathlib.with_name() doesn't like unnamed files. In-Reply-To: <1559438292.33.0.601764456145.issue37130@roundup.psfhosted.org> Message-ID: <1559616352.04.0.177638616761.issue37130@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 3 22:46:07 2019 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 04 Jun 2019 02:46:07 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559616367.27.0.957650702029.issue37134@roundup.psfhosted.org> Paul Ganssle added the comment: > I respectfully disagree with logic, "the language now permits this, so we should change all the docs to display it everywhere". That moves it from optional knowledge to mandatory knowledge, from a day ten lesson to a day one lesson, from "once in a while, a user may benefit from being able to mark arguments as positional-only" to the category of "every single user will see this every time they see the docs". There is a huge difference. A decent part of the reasoning for the PEP was actually to create a standard way to document when arguments to a function are positional-only. By adopting the notation (already used in the numpy documentation IIRC), it makes a concise documentation clear. Another part of the PEP's reasoning was that this notation is difficult to understand at least partially because it is rarely encountered, so "people don't understand it" as a reason to exclude it from the documentation becomes a bit of a self-fulfilling prophecy. I am not really an expert in documentation and front-end design, but maybe it would be possible to have some sort of unobtrusive tooltip that activates on signatures that contain positional-only arguments? ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 00:19:48 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Tue, 04 Jun 2019 04:19:48 +0000 Subject: [issue36707] The "m" ABI flag of SOABI for pymalloc is no longer needed In-Reply-To: <1556065645.57.0.820338293941.issue36707@roundup.psfhosted.org> Message-ID: <1559621988.32.0.129347058882.issue36707@roundup.psfhosted.org> Kubilay Kocak added the comment: For FreeBSD Python language ports, the change doesn't have a big negative impact for the Python language/interpreter ports themselves We have the following block in lang/python3? ports: .if ${PORT_OPTIONS:MPYMALLOC} ABIFLAGS:= m${ABIFLAGS} .endif .if ${PORT_OPTIONS:MDEBUG} ABIFLAGS:= d${ABIFLAGS} .endif We then use the variable to substitute the correct suffix into the pkg-plist items: .if !empty(ABIFLAGS) PLIST_FILES+= bin/python${PYTHON_VER}${ABIFLAGS} \ bin/python${PYTHON_VER}${ABIFLAGS}-config \ libdata/pkgconfig/python-${PYTHON_VER}${ABIFLAGS}.pc ${INSTALL_DATA} ${WRKSRC}/Tools/gdb/libpython.py \ ${STAGEDIR}${PREFIX}/lib/libpython${PYTHON_VER}${ABIFLAGS}.so.1.0-gdb.py One question I have is, can/does SOABI flag removal affect any third party package/extension builds in any way, particularly affecting the names of files they produce? We have a ton of python packages/extensions in the ports tree, so anything that affected their builds, particularly when it comes to setuptools --record output changes, would be a blocker for supporting 3.8 For example, we had to produce custom ports framework code to account for PEP488 [1] and PEP3147 [2] filename suffixes, for these filename differences, which was painful at the time: # PEP 0488 (https://www.python.org/dev/peps/pep-0488/) .if ${PYTHON_REL} < 3500 PYTHON_PYOEXTENSION= pyo .else PYTHON_PYOEXTENSION= opt-1.pyc .endif .if ${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST) # When Python version is 3.2+ we rewrite all the filenames # of TMPPLIST that end with .py[co], so that they conform # to PEP 3147 (see https://www.python.org/dev/peps/pep-3147/) PYMAGICTAG= ${PYTHON_CMD} -c 'import sys; print(sys.implementation.cache_tag)' _USES_stage+= 935:add-plist-python add-plist-python: @${AWK} '\ /\.py[co]$$/ && !($$0 ~ "/" pc "/") {id = match($$0, /\/[^\/]+\.py[co]$$/); if (id != 0) {d = substr($$0, 1, RSTART - 1); dirs[d] = 1}; sub(/\.pyc$$/, "." mt "&"); sub(/\.pyo$$/, "." mt "." pyo); sub(/[^\/]+\.py[co]$$/, pc "/&"); print; next} \ /^@dirrm / {d = substr($$0, 8); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \ /^@dirrmtry / {d = substr($$0, 11); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \ {print} \ ' \ pc="__pycache__" mt="$$(${PYMAGICTAG})" pyo="opt-1.pyc" \ ${TMPPLIST} > ${TMPPLIST}.pyc_tmp @${MV} ${TMPPLIST}.pyc_tmp ${TMPPLIST} [1] https://www.python.org/dev/peps/pep-0488/ [2] https://www.python.org/dev/peps/pep-3147/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 00:20:03 2019 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 04 Jun 2019 04:20:03 +0000 Subject: [issue21492] email.header.decode_header sometimes returns bytes, sometimes str In-Reply-To: <1399972085.94.0.85314895463.issue21492@psf.upfronthosting.co.za> Message-ID: <1559622003.39.0.829008804188.issue21492@roundup.psfhosted.org> Ezio Melotti added the comment: If we can't fix the behavior, it should at least be documented. Currently the docs says "This function returns a list of (decoded_string, charset) pairs containing each of the decoded parts of the header.". One could assume that this means that a Unicode string is returned, but and as far as I can tell, "decoded_string" means decoded from the format used by the header, not from bytes -- in fact the example below shows a byte string. #24797 suggest an alternative solution, but there is no indications about it in the docs except an easy-to-miss note about the new API at the top. Coincidentally as I was reporting this issue I also found the recently opened #37139. There are also a few other reports: #24797, #37139, #32975, #6302, #4661. If this method is not actually deprecated, I would document the current behavior (i.e. sometimes it returns bytes, sometimes unicode -- bonus points if there's a simple rule to predict which one), explain that it exists for legacy/backward-compatibility reasons, and point to the alternatives. FWIW here are 3 more samples that show the inconsistency. >>> from email.header import decode_header >>> # str + None >>> h = '\x80SOKCrGxsbw===== '; decode_header(h) [('\x80SOKCrGxsbw===== ', None)] >>> # bytes + '', bytes + None >>> h = '=??b?SOKCrGxsbw=====?= '; decode_header(h) [(b'H\xe2\x82\xacllo', ''), (b' ', None)] >>> # bytes + 'utf8', bytes + None >>> h = '=?utf8?b?SOKCrGxsbw==?= '; decode_header(h) [(b'H\xe2\x82\xacllo', 'utf8'), (b' ', None)] ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, ezio.melotti, louis.abraham at yahoo.fr resolution: duplicate -> stage: resolved -> needs patch status: closed -> open type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 00:29:06 2019 From: report at bugs.python.org (Marco Sulla) Date: Tue, 04 Jun 2019 04:29:06 +0000 Subject: [issue36964] `python3 -m venv NAME`: virtualenv is not portable In-Reply-To: <1558267639.25.0.0700835222258.issue36964@roundup.psfhosted.org> Message-ID: <1559622546.34.0.107552276669.issue36964@roundup.psfhosted.org> Marco Sulla added the comment: > Changing VIRTUAL_ENV will break code VIRTUAL_ENV it's the same if you don't move the venv. Moving it will be an unofficial unsupported bonus, and if you coded bad and it doesn't work, it's your fault. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 00:47:05 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 04 Jun 2019 04:47:05 +0000 Subject: [issue36707] The "m" ABI flag of SOABI for pymalloc is no longer needed In-Reply-To: <1556065645.57.0.820338293941.issue36707@roundup.psfhosted.org> Message-ID: <1559623625.64.0.0441436820219.issue36707@roundup.psfhosted.org> Ned Deily added the comment: > One question I have is, can/does SOABI flag removal affect any third party package/extension builds in any way, particularly affecting the names of files they produce? Yep, the default file names of C extension modules differ on most/all? Unix-y platforms (certainly vanilla Linux and macOS) because the SOABI is included in the file name. $ /tmp/py38/bin/python3.7 -m pip install --no-binary :all: psutil $ ls /tmp/py37/lib/python3.7/site-packages/psutil/*.so /tmp/py37/lib/python3.7/site-packages/psutil/_psutil_linux.cpython-37m-i386-linux-gnu.so /tmp/py37/lib/python3.7/site-packages/psutil/_psutil_posix.cpython-37m-i386-linux-gnu.so $ /tmp/py38/bin/python3.8 -m pip install --no-binary :all: psutil $ ls /tmp/py38/lib/python3.8/site-packages/psutil/*.so /tmp/py38/lib/python3.8/site-packages/psutil/_psutil_linux.cpython-38-i386-linux-gnu.so /tmp/py38/lib/python3.8/site-packages/psutil/_psutil_posix.cpython-38-i386-linux-gnu.so ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 00:54:26 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 04 Jun 2019 04:54:26 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559624066.55.0.923492034736.issue37134@roundup.psfhosted.org> Raymond Hettinger added the comment: > Another part of the PEP's reasoning was that this notation > is difficult to understand at least partially because it > is rarely encountered, so "people don't understand it" as > a reason to exclude it from the documentation becomes a > bit of a self-fulfilling prophecy We know that isn't true because people already see it frequently in the tooltips for C functions. What I've observed is that after repeated exposures, users learn to treat it as noise and tune it out. I've not found a single instance where a user found it to be helpful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 01:00:31 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 04 Jun 2019 05:00:31 +0000 Subject: [issue36707] The "m" ABI flag of SOABI for pymalloc is no longer needed In-Reply-To: <1556065645.57.0.820338293941.issue36707@roundup.psfhosted.org> Message-ID: <1559624431.2.0.745365541237.issue36707@roundup.psfhosted.org> Ned Deily added the comment: Another user-visible difference: $ ls /tmp/py37/bin/python* /tmp/py37/bin/python3 /tmp/py37/bin/python3.7-config /tmp/py37/bin/python3.7m-config /tmp/py37/bin/python3.7 /tmp/py37/bin/python3.7m /tmp/py37/bin/python3-config $ ls /tmp/py38/bin/python* /tmp/py38/bin/python3 /tmp/py38/bin/python3.8-config /tmp/py38/bin/python3.8 /tmp/py38/bin/python3-config Granted, these differences aren't the end of the world but: "But I'm not sure of what are the things impacting by ABIFLAGS="" rather than ABIFLAGS="m"." Not to beat a dead horse but - we really should not make changes like this without first understanding what the impact will be. As it stands, this change potentially affects end-users, third-party distributors of Python, and package developers. And, for what reason? I don't wsee how this change provides any real value for anyone and it does cause people to have to change things, like creating conditional code for 3.7- and 3.8+. If we were starting from scratch today, sure - "m" is not needed. But just because we can change something doesn't mean we should. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 01:12:00 2019 From: report at bugs.python.org (Grant Jenks) Date: Tue, 04 Jun 2019 05:12:00 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559625120.95.0.604041061355.issue37134@roundup.psfhosted.org> Grant Jenks added the comment: FWIW, I would rather not see the docs littered with "/". I've taught Python to hundreds of professional software engineers over the last five years and in all that time nobody has ever asked when the args need to be positional. It's easy to experiment to find out and it's historically been an implementation detail. I think the number of times people are surprised is far less than the number of times people never notice at all. As Raymond described, this change will elevate the feature to a day-1 topic and it's pretty useless to a day-1 user. This is another step toward making what I see as an unfortunate implementation detail into formal semantics. ---------- nosy: +grantjenks _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 01:14:58 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Tue, 04 Jun 2019 05:14:58 +0000 Subject: [issue36707] The "m" ABI flag of SOABI for pymalloc is no longer needed In-Reply-To: <1556065645.57.0.820338293941.issue36707@roundup.psfhosted.org> Message-ID: <1559625298.29.0.476534812488.issue36707@roundup.psfhosted.org> Kubilay Kocak added the comment: Those script names would already have code to handle name changes based on existing abiflags/soabi string (as FreeBSD does), and would be trivial to modify for 'm' removal. For third party stuff: we use setuptools --record for 'everything', so as long as filenames are 'correct' for the files that are actually installed, and downstreams are clear what the scope of the changes are, 'm' removal is not an issue when it come so packaging third party packages/extensions. A new file extension format or substantially more complex magic would be, on the other hand. A new minor is a good time to make these changes, and there's nothing really blocking about a new python38 port/package, and nothing consumes it yet in downstream OS's ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 01:40:51 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 04 Jun 2019 05:40:51 +0000 Subject: [issue37141] Allow multiple separators in Stream.readuntil In-Reply-To: <1559554350.7.0.981137522594.issue37141@roundup.psfhosted.org> Message-ID: <1559626851.36.0.421556178481.issue37141@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 01:59:30 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 04 Jun 2019 05:59:30 +0000 Subject: [issue27513] email.utils.getaddresses does not handle Header objects In-Reply-To: <1468493411.01.0.0415400585896.issue27513@psf.upfronthosting.co.za> Message-ID: <1559627970.9.0.147883757201.issue27513@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +13682 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13797 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 02:01:40 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 04 Jun 2019 06:01:40 +0000 Subject: [issue27513] email.utils.getaddresses does not handle Header objects In-Reply-To: <1468493411.01.0.0415400585896.issue27513@psf.upfronthosting.co.za> Message-ID: <1559628100.32.0.469370544732.issue27513@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz versions: +Python 3.7, Python 3.8 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 02:16:04 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Jun 2019 06:16:04 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559628964.97.0.17260073898.issue36839@roundup.psfhosted.org> Serhiy Storchaka added the comment: Yet one consideration. The bytecode is actually a wordcode, a sequence of 16-bit words, and the start of the array must be properly aligned. There is no problem if it is a data of the bytes object, but if you have a mapping of the pyc file the alignment is not guarantied. You need to change also the marshal protocol or save the bytecode in other file. This is a large change. So you need to make several large changes (changes in the import system, change in the pyc file) for using this feature. Supporting the buffer protocol in code objects is minor change to this. If you need to patch other parts of Python it is not hard to patch also the code object in your custom build. Other Python users will not have benefit from this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 03:07:01 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 04 Jun 2019 07:07:01 +0000 Subject: [issue21872] LZMA library sometimes fails to decompress a file In-Reply-To: <1403720935.87.0.990494824612.issue21872@psf.upfronthosting.co.za> Message-ID: <1559632021.49.0.298779453278.issue21872@roundup.psfhosted.org> Jeffrey Kintscher added the comment: I adapted the example in msg221784: with open('22h_ticks_bad.bi5', 'rb') as f: infile = f.read() for i in range(1, 9000): decompressor = _lzma.LZMADecompressor() first_out = decompressor.decompress(infile[:i]) first_len = len(first_out) last_out = decompressor.decompress(infile[i:]) last_len = len(last_out) if not decompressor.eof: print(i, first_len, first_len + last_len, decompressor.eof) which outputs this using both 3.7.3 and 3.8.0a3+ on macOS 10.14.4: 648 2682 45479 False 1834 7442 45479 False 2766 11667 45473 False 2767 11668 45474 False 3591 15428 45473 False 5051 21743 45473 False 5052 21745 45475 False 5589 24387 45475 False 5590 24388 45476 False 6560 28823 45476 False 6561 28824 45477 False 7327 32325 45474 False 8192 36251 45473 False 8193 36253 45475 False 8368 37283 45475 False 8369 37285 45477 False So, yes, still an active bug. ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 03:49:37 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 04 Jun 2019 07:49:37 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559634577.83.0.808470480743.issue35431@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +13683 pull_request: https://github.com/python/cpython/pull/13798 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 04:23:26 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 04 Jun 2019 08:23:26 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559636606.65.0.488543054967.issue35431@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 963eb0f4738456455b9bef7eb531b46805415208 by Raymond Hettinger in branch 'master': bpo-35431: Drop the k <= n requirement (GH-13798) https://github.com/python/cpython/commit/963eb0f4738456455b9bef7eb531b46805415208 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 04:39:59 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 04 Jun 2019 08:39:59 +0000 Subject: [issue37145] collections.abc.MappingView mixins rely on undocumented _mapping In-Reply-To: <1559580516.49.0.942559591286.issue37145@roundup.psfhosted.org> Message-ID: <1559637599.29.0.153939588139.issue37145@roundup.psfhosted.org> Raymond Hettinger added the comment: The __init__ method is public. Here is how to use ItemsView: >>> from collections.abc import ItemsView >>> d = dict(python='snake', ruby='gem', go='board game', c='speed of light') >>> iv = ItemsView(d) >>> ('python', 'snake') in iv True >>> list(iv) [('python', 'snake'), ('ruby', 'gem'), ('go', 'board game'), ('c', 'speed of light')] >>> len(iv) 4 >>> d['python'] = 'language' >>> list(iv) [('python', 'language'), ('ruby', 'gem'), ('go', 'board game'), ('c', 'speed of light')] Note, there is no direct access to _mapping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 04:54:23 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Tue, 04 Jun 2019 08:54:23 +0000 Subject: [issue37147] f-string debugging f"{x=[}" adds [filename:lineno] as prefix Message-ID: <1559638463.74.0.509291608796.issue37147@roundup.psfhosted.org> New submission from Aldwin Pollefeyt : >From this idea [0] by Karthikeyan Singaravelan and added to his code in hack [1]. name = "karthikeyan" print(f"{name =[}") print(f"{name=[}") print(f"{age = [}") print(f"{age= [}") [prog.py:2] name ='karthikeyan' [prog.py:3] name='karthikeyan' [prog.py:4] name = 'karthikeyan' [prog.py:5] name= 'karthikeyan' [0] https://tirkarthi.github.io/programming/2019/05/08/f-string-debugging.html [1] https://github.com/tirkarthi/cpython/commit/d0fcbe67f6bb8ad60744b0a4973c4dc69fda65a9 ---------- messages: 344533 nosy: aldwinaldwin, xtreak priority: normal severity: normal status: open title: f-string debugging f"{x=[}" adds [filename:lineno] as prefix type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 04:59:04 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Tue, 04 Jun 2019 08:59:04 +0000 Subject: [issue37147] f-string debugging f"{x=[}" adds [filename:lineno] as prefix In-Reply-To: <1559638463.74.0.509291608796.issue37147@roundup.psfhosted.org> Message-ID: <1559638744.59.0.308107897596.issue37147@roundup.psfhosted.org> Change by Aldwin Pollefeyt : ---------- keywords: +patch pull_requests: +13684 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13799 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 05:22:27 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 04 Jun 2019 09:22:27 +0000 Subject: [issue37147] f-string debugging f"{x=[}" adds [filename:lineno] as prefix In-Reply-To: <1559638463.74.0.509291608796.issue37147@roundup.psfhosted.org> Message-ID: <1559640147.13.0.380009499376.issue37147@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I created a post about it for discussion [0]. There is no consensus on the format and to modify the existing debugging notation. There were also suggestions to include a builtin function (dbg) like breakpoint() that does this. I guess implementation can be discussed once the idea is accepted to avoid work being wasted. It certainly can go only in 3.9 if accepted given 3.8 beta release. [0] https://discuss.python.org/t/filename-and-line-number-in-f-string-debugging-output/1650/8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 05:25:41 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Tue, 04 Jun 2019 09:25:41 +0000 Subject: [issue37147] f-string debugging f"{x=[}" adds [filename:lineno] as prefix In-Reply-To: <1559638463.74.0.509291608796.issue37147@roundup.psfhosted.org> Message-ID: <1559640341.31.0.500797428851.issue37147@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: Ok, didn't know about discuss.python.org. Searching on all PR and bpo's there was no reference to your hack. Will investigate this discuss.python.org. Ai ai ai, more info to read. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 05:40:36 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Tue, 04 Jun 2019 09:40:36 +0000 Subject: [issue37147] f-string debugging f"{x=[}" adds [filename:lineno] as prefix In-Reply-To: <1559638463.74.0.509291608796.issue37147@roundup.psfhosted.org> Message-ID: <1559641236.55.0.615278250181.issue37147@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: Can use: import logging l = logging.Logger("") h = logging.StreamHandler() f = logging.Formatter(fmt="[{filename}:{lineno}] {msg}", style="{") h.setFormatter(f) l.addHandler(h) l.info("Hello") Output: >py .\t.py [t.py:8] Hello ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 06:00:03 2019 From: report at bugs.python.org (Antony Lee) Date: Tue, 04 Jun 2019 10:00:03 +0000 Subject: [issue31006] typing.NamedTuple should add annotations to its constructor (__new__) parameters. In-Reply-To: <1500887267.27.0.393959457135.issue31006@psf.upfronthosting.co.za> Message-ID: <1559642403.37.0.106816363302.issue31006@roundup.psfhosted.org> Change by Antony Lee : ---------- nosy: -Antony.Lee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 06:08:45 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 04 Jun 2019 10:08:45 +0000 Subject: [issue37148] test_asyncio fails on refleaks buildbots Message-ID: <1559642925.13.0.289383724886.issue37148@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : https://buildbot.python.org/all/#/builders/1/builds/609/steps/5/logs/stdio ===================================================================== FAIL: test_stream_reader_create_warning (test.test_asyncio.test_streams.StreamTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/test_asyncio/test_streams.py", line 1233, in test_stream_reader_create_warning asyncio.StreamReader AssertionError: DeprecationWarning not triggered ====================================================================== FAIL: test_stream_writer_create_warning (test.test_asyncio.test_streams.StreamTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/test_asyncio/test_streams.py", line 1237, in test_stream_writer_create_warning asyncio.StreamWriter AssertionError: DeprecationWarning not triggered The problem is that when the test is repeated using the -R, asyncio has cached already StreamReader and StreamWriter into globals, not triggering the warning again. ---------- components: Tests, asyncio keywords: buildbot messages: 344537 nosy: asvetlov, lukasz.langa, pablogsal, vstinner, yselivanov priority: normal severity: normal stage: needs patch status: open title: test_asyncio fails on refleaks buildbots type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 06:10:00 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 04 Jun 2019 10:10:00 +0000 Subject: [issue37148] test_asyncio fails on refleaks buildbots In-Reply-To: <1559642925.13.0.289383724886.issue37148@roundup.psfhosted.org> Message-ID: <1559643000.49.0.909866577738.issue37148@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +13686 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13800 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 06:16:19 2019 From: report at bugs.python.org (Stefan Krah) Date: Tue, 04 Jun 2019 10:16:19 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559643379.7.0.54033521601.issue36839@roundup.psfhosted.org> Stefan Krah added the comment: 720MB <= "3-4 dozen" * 20 MB <= 960MB. Per server. It has all been said. :-) I don't understand the objections about alignment. malloc() and obmalloc() are at least 8-byte aligned, mmap() with NULL as the first parameter is page-aligned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 06:18:41 2019 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Tue, 04 Jun 2019 10:18:41 +0000 Subject: [issue15474] Differentiate decorator and decorator factory in docs In-Reply-To: <1343416207.69.0.71696747041.issue15474@psf.upfronthosting.co.za> Message-ID: <1559643521.14.0.533601676138.issue15474@roundup.psfhosted.org> Andr?s Delfino added the comment: Hi Windson Yang! Yes, I'm still working on it. I'll have it ready by the end of June. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 06:19:36 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 04 Jun 2019 10:19:36 +0000 Subject: [issue37148] test_asyncio fails on refleaks buildbots In-Reply-To: <1559642925.13.0.289383724886.issue37148@roundup.psfhosted.org> Message-ID: <1559643576.35.0.761198246149.issue37148@roundup.psfhosted.org> Andrew Svetlov added the comment: I'm curious if collections.__getattr__ suffers from the same problem? asyncio uses basically the same technique for deprecating global names on import. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 06:24:16 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 04 Jun 2019 10:24:16 +0000 Subject: [issue37148] test_asyncio fails on refleaks buildbots In-Reply-To: <1559642925.13.0.289383724886.issue37148@roundup.psfhosted.org> Message-ID: <1559643856.08.0.530478366454.issue37148@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > I'm curious if collections.__getattr__ suffers from the same problem? Very likely, the problem is that there is no test in test_collections for the deprecation warning, so this situation never happens. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 06:26:25 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 04 Jun 2019 10:26:25 +0000 Subject: [issue37148] test_asyncio fails on refleaks buildbots In-Reply-To: <1559642925.13.0.289383724886.issue37148@roundup.psfhosted.org> Message-ID: <1559643985.48.0.18063734696.issue37148@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 4cdbc452ce308bb55523e53963cabdc988e3f44b by Pablo Galindo in branch 'master': bpo-37148: Fix asyncio test that check for warning when running the test suite with huntleaks (GH-13800) https://github.com/python/cpython/commit/4cdbc452ce308bb55523e53963cabdc988e3f44b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 06:26:33 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 04 Jun 2019 10:26:33 +0000 Subject: [issue37148] test_asyncio fails on refleaks buildbots In-Reply-To: <1559642925.13.0.289383724886.issue37148@roundup.psfhosted.org> Message-ID: <1559643993.7.0.349549255281.issue37148@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 06:30:48 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 04 Jun 2019 10:30:48 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559644248.91.0.426764284377.issue35431@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +13687 pull_request: https://github.com/python/cpython/pull/13801 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 06:42:22 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 04 Jun 2019 10:42:22 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1559643379.7.0.54033521601.issue36839@roundup.psfhosted.org> Message-ID: Inada Naoki added the comment: > Stefan Krah added the comment: > > 720MB <= "3-4 dozen" * 20 MB <= 960MB. Per server. > > It has all been said. :-) I don't understand what message you are replying. I'm not interested in the number. Who asked MBs / server? Absolute number is not important when optimizing. "I can reduce 3sec" is not important, unless total time is given. 3.5s -> 0.5s is great. But 60 hours -> 59h59m57s is not great. Hi didn't write anything about how much memory used by process. Additionally, he measured serialized size, not memory usage. It doesn't make any sense. I don't trust even 20MB/process saving. It is only in his mind. This proposal is based on fantasy, not based on pragmatic survey. I think we should not take more time to discuss, until he proof the idea by actually saving 20MB / process and provide detailed report. > > I don't understand the objections about alignment. malloc() and obmalloc() > are at least 8-byte aligned, mmap() with NULL as the first parameter > is page-aligned. > I think Serhiy meant alignment in pyc file. bytes object in pyc file is not aligned. So it's bad idea to use mmap for pyc files. But Instagram may use original serialize format instead of pyc files, and it may align bytes object. So it may be not a problem. No one other than Instagrammer knows, because there is no detailed information. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 06:43:42 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 04 Jun 2019 10:43:42 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1559645022.48.0.324291229572.issue34037@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- keywords: +patch pull_requests: +13688 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13802 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 06:47:48 2019 From: report at bugs.python.org (Stefan Krah) Date: Tue, 04 Jun 2019 10:47:48 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559645268.09.0.440817334764.issue36839@roundup.psfhosted.org> Stefan Krah added the comment: There's no point discussing unless people develop reading skills. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 06:48:02 2019 From: report at bugs.python.org (Stefan Krah) Date: Tue, 04 Jun 2019 10:48:02 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559645282.15.0.586562502828.issue36839@roundup.psfhosted.org> Change by Stefan Krah : ---------- nosy: -skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 07:03:36 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 04 Jun 2019 11:03:36 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1559646216.27.0.863301302144.issue34037@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 7f9a2ae78051877f4d966119e2fcd27ec77eda1d by ?ukasz Langa in branch 'master': Revert "bpo-34037, asyncio: add BaseEventLoop.wait_executor_on_close (GH-13786)" (#13802) https://github.com/python/cpython/commit/7f9a2ae78051877f4d966119e2fcd27ec77eda1d ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 07:09:30 2019 From: report at bugs.python.org (Geoffrey Sneddon) Date: Tue, 04 Jun 2019 11:09:30 +0000 Subject: [issue37145] collections.abc.MappingView mixins rely on undocumented _mapping In-Reply-To: <1559580516.49.0.942559591286.issue37145@roundup.psfhosted.org> Message-ID: <1559646570.89.0.961776035166.issue37145@roundup.psfhosted.org> Geoffrey Sneddon added the comment: Then I guess what I consider a bug is "__init__ is undocumented". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 07:50:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 11:50:37 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1559649037.91.0.578697527832.issue34037@roundup.psfhosted.org> STINNER Victor added the comment: ?ukasz Langa reverted my change (PR 13786). I pushed my change without any review to try to fix https://bugs.python.org/issue37137 which blocked the Python 3.8 beta1. Sadly, my change didn't fix this issue. The root cause was differently (and it's now fixed). Andrew Svetlov asked to make some changes on my API. Yury Selivanov added "I don't like this last minute api decision. Please don't merge this.". See PR 13786 for the discussion. In short, my change was reverted because of the API. But I still consider that calling executor.shutdown(wait=False) in loop.close() in wrong: we must wait until it finishes. Otherwise, the code "leaks" threads which continue to run and so can cause troubles. I would prefer to wait by default. Andrew, Yury: Would you be interested to rewrite my change in the "asyncio way"? IMHO this change can wait Python 3.9, it's not a critical bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 07:58:42 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 04 Jun 2019 11:58:42 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1559649522.3.0.688847544417.issue34037@roundup.psfhosted.org> Andrew Svetlov added the comment: I still think that this is a valuable change but we need to discuss public API. In fact, in my job we used to override default executor and wait for its shutdown with explicit waiting to make the system robust. The problem is that loop.close() can "hang" for minutes if there are pending background jobs or slow DNS resolution requests. We controlled our tasks running in the thread pool carefully and used aiodns for DNS resolving. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 07:59:26 2019 From: report at bugs.python.org (Guilloux) Date: Tue, 04 Jun 2019 11:59:26 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! Message-ID: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> New submission from Guilloux : On the page https://docs.python.org/3/library/tkinter.html there is a link to "Tkinter reference: a GUI for Python" which is "https://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html". BIG PROBLEM : Since several days this link doesn't work any more !!! It's really important to fix it because most of official online documentation about tkinter was provided by this way !!! Fortunately i have a copy of the documentation (cf pdf file). I have downloaded this file thanks to the website above just before the link was failed ! (Yes, i know, i'm lucky...) Unfortunately I can't send you this pdf because I have a message "request entity too large" :-( ---------- assignee: docs at python components: Documentation, Tkinter messages: 344549 nosy: docs at python, xameridu priority: normal severity: normal status: open title: link to official documentation tkinter failed !!! versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 08:00:27 2019 From: report at bugs.python.org (Guilloux) Date: Tue, 04 Jun 2019 12:00:27 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1559649627.89.0.733806384821.issue37149@roundup.psfhosted.org> Guilloux added the comment: On the page https://docs.python.org/3/library/tkinter.html there is a link to "Tkinter reference: a GUI for Python" which is "https://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html". BIG PROBLEM : Since several days this link doesn't work any more !!! It's really important to fix it because most of official online documentation about tkinter was provided by this way !!! Fortunately i have a copy of the documentation (cf pdf file). I have downloaded this file thanks to the website above just before the link was failed ! (Yes, i know, i'm lucky...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 08:06:34 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 04 Jun 2019 12:06:34 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1559649994.81.0.98312190446.issue37149@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: A copy of the URL is present in archive.org [0] . Perhaps the docs could be updated with it. [0] https://web.archive.org/web/20190524140835/https://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html ---------- nosy: +xtreak versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 08:08:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 12:08:53 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1559650133.81.0.631887203366.issue34037@roundup.psfhosted.org> STINNER Victor added the comment: > The problem is that loop.close() can "hang" for minutes if there are pending background jobs or slow DNS resolution requests. Maybe concurrent.futures should be enhanced for that? Or from asyncio, is it possible to poll the executor and emit a warning if some threads take longer than ? It would be great if we could display repr() of the slow job in that case. Yury also asked for a timeout, but it's not supported by concurrent.futures yet, and I'm not sure what should be done in case of timeout? Retry? Log a warning? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 08:11:54 2019 From: report at bugs.python.org (Guilloux) Date: Tue, 04 Jun 2019 12:11:54 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1559650314.02.0.960487036883.issue37149@roundup.psfhosted.org> Guilloux added the comment: The comment of Karthikeyan Singaravelan seems to be a good idea. Question : is it possible to send a pdf (2.08 MB) to the python tracker ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 08:28:11 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Tue, 04 Jun 2019 12:28:11 +0000 Subject: [issue34521] Multiple tests (test_socket, test_multiprocessing_*) fail due to incorrect recvmsg(2) buffer lengths, causing failures on FreeBSD CURRENT In-Reply-To: <1535389978.32.0.56676864532.issue34521@psf.upfronthosting.co.za> Message-ID: <1559651291.1.0.982986404978.issue34521@roundup.psfhosted.org> Kubilay Kocak added the comment: Access to the buildbot has been restored (a while ago), and this issue being resolved (merge to 2.7) is the only test failing to get 2.7 back to green, which has been failing for months. Can we test with Victors proposed patch in msg330654 ? I don't believe the change/fix/merge will be difficult, given the very small change scope of the master commits. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 08:30:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 12:30:18 +0000 Subject: [issue35121] Cookie domain check returns incorrect results In-Reply-To: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> Message-ID: <1559651418.53.0.817364532845.issue35121@roundup.psfhosted.org> STINNER Victor added the comment: I added this issue to my security website: https://python-security.readthedocs.io/vuln/cookie-domain-check.html So it's fixed in Python 3.4.10, 3.5.7 and 3.7.3. Right now, 2.7 and 3.6 are vulnerable (but 3.6 branch is fixed). ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 08:37:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 12:37:47 +0000 Subject: [issue35121] Cookie domain check returns incorrect results In-Reply-To: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> Message-ID: <1559651867.12.0.326209540724.issue35121@roundup.psfhosted.org> STINNER Victor added the comment: Can someone try to backport the fix to Python 2.7? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 08:43:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 12:43:27 +0000 Subject: [issue37137] test_asyncio: test_cancel_gather_2() dangling thread In-Reply-To: <1559524688.39.0.485790490316.issue37137@roundup.psfhosted.org> Message-ID: <1559652207.4.0.544541967041.issue37137@roundup.psfhosted.org> STINNER Victor added the comment: The initial issue has been fixed. Let's continue the discussion on https://bugs.python.org/issue35621 to maybe reapply commit 13ed07998ad93dbdd94991ba0451b9b559f07972. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 08:43:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 12:43:35 +0000 Subject: [issue37137] test_asyncio: test_cancel_gather_2() dangling thread In-Reply-To: <1559524688.39.0.485790490316.issue37137@roundup.psfhosted.org> Message-ID: <1559652215.17.0.094189622024.issue37137@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 08:46:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 12:46:07 +0000 Subject: [issue36818] Add PyInterpreterState.runtime. In-Reply-To: <1557168344.92.0.643564511932.issue36818@roundup.psfhosted.org> Message-ID: <1559652367.0.0.680187903344.issue36818@roundup.psfhosted.org> STINNER Victor added the comment: See https://bugs.python.org/issue37135#msg344509 to reproduce https://bugs.python.org/issue37135 crash without multiprocessing: with this procedure, I reproduce the crash immediately on Linux. No need for a magic super slow buildbot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 08:46:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 12:46:17 +0000 Subject: [issue37135] test_multiprocessing_spawn segfaults on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559516057.97.0.679920443323.issue37135@roundup.psfhosted.org> Message-ID: <1559652377.4.0.529443215348.issue37135@roundup.psfhosted.org> STINNER Victor added the comment: The initial issue has been fixed by a revert. Let's continue the discussion on bpo-36818 to maybe reapply commit 396e0a8d9dc65453cb9d53500d0a620602656cfe. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 08:49:06 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 04 Jun 2019 12:49:06 +0000 Subject: [issue35121] Cookie domain check returns incorrect results In-Reply-To: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> Message-ID: <1559652546.87.0.644399723071.issue35121@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: > Can someone try to backport the fix to Python 2.7? The backport to 2.7 PR 13426 is open. It would be helpful if someone can review it. I am not sure of the commit review process and who needs to review and approve it since this is assigned to Benjamin Peterson. It's a fairly straightforward backport except that http.cookiejar is cookielib in Python 2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 08:50:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 12:50:40 +0000 Subject: [issue33529] [security] Infinite loop on folding email (_fold_as_ew()) if an header has no spaces In-Reply-To: <1526429548.63.0.682650639539.issue33529@psf.upfronthosting.co.za> Message-ID: <1559652640.0.0.744497292522.issue33529@roundup.psfhosted.org> STINNER Victor added the comment: Python 3.6, 3.5 and 2.7 are still vulnerable. Is there someone interested to backport the fix? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 08:58:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 12:58:25 +0000 Subject: [issue37142] test_asyncio timed out on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559564624.91.0.895932729881.issue37142@roundup.psfhosted.org> Message-ID: <1559653105.41.0.0444487350818.issue37142@roundup.psfhosted.org> STINNER Victor added the comment: Fixed by https://github.com/python/cpython/pull/13790 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 08:58:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 12:58:46 +0000 Subject: [issue37142] test_asyncio timed out on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559564624.91.0.895932729881.issue37142@roundup.psfhosted.org> Message-ID: <1559653126.2.0.0103694520114.issue37142@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 08:59:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 12:59:47 +0000 Subject: [issue36870] test_asyncio: test_drain_raises() fails randomly on Windows In-Reply-To: <1557449871.52.0.351453555458.issue36870@roundup.psfhosted.org> Message-ID: <1559653187.03.0.735622218133.issue36870@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 09:00:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 13:00:16 +0000 Subject: [issue36732] test_asyncio: test_huge_content_recvinto() fails randomly In-Reply-To: <1556264661.54.0.31283754406.issue36732@roundup.psfhosted.org> Message-ID: <1559653216.44.0.886902580761.issue36732@roundup.psfhosted.org> STINNER Victor added the comment: I didn't see this issue recently. I close it. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 09:01:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 13:01:52 +0000 Subject: [issue36724] Clear _PyRuntime at exit In-Reply-To: <1556223229.48.0.664845556761.issue36724@roundup.psfhosted.org> Message-ID: <1559653312.65.0.144779348628.issue36724@roundup.psfhosted.org> STINNER Victor added the comment: bpo-36818 caused a regression: https://bugs.python.org/issue37135#msg344511 We should be careful when we modify Python finalization, especially with daemon threads. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 09:10:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 13:10:34 +0000 Subject: [issue35647] Cookie path check returns incorrect results In-Reply-To: <1546502396.67.0.243403156352.issue35647@roundup.psfhosted.org> Message-ID: <1559653834.64.0.326798447127.issue35647@roundup.psfhosted.org> STINNER Victor added the comment: Python 2.7 is still affected, right? Is there someone interested to backport the fix? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 09:13:46 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 04 Jun 2019 13:13:46 +0000 Subject: [issue35647] Cookie path check returns incorrect results In-Reply-To: <1546502396.67.0.243403156352.issue35647@roundup.psfhosted.org> Message-ID: <1559654026.85.0.615373705631.issue35647@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: > Python 2.7 is still affected, right? Is there someone interested to backport the fix? PR 13427 fixes the issue in 2.7 :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 09:21:48 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 04 Jun 2019 13:21:48 +0000 Subject: [issue37142] test_asyncio timed out on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559564624.91.0.895932729881.issue37142@roundup.psfhosted.org> Message-ID: <1559654508.94.0.729356406059.issue37142@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This still seems to hang and timeout after 25 minutes : https://buildbot.python.org/all/#/builders/168/builds/1151/steps/5/logs/stdio ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 09:22:00 2019 From: report at bugs.python.org (Demid) Date: Tue, 04 Jun 2019 13:22:00 +0000 Subject: [issue37150] Do not allow to pass FileType class object instead of instance in add_argument Message-ID: <1559654520.68.0.135252915467.issue37150@roundup.psfhosted.org> New submission from Demid : There is a possibility that someone (like me) accidentally will omit parentheses with FileType arguments after FileType, and parser will contain wrong file until someone will try to use it. Example: parser = argparse.ArgumentParser() parser.add_argument('-x', type=argparse.FileType) ---------- components: Library (Lib) messages: 344568 nosy: zygocephalus priority: normal severity: normal status: open title: Do not allow to pass FileType class object instead of instance in add_argument type: enhancement versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 09:23:19 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 04 Jun 2019 13:23:19 +0000 Subject: [issue37142] test_asyncio timed out on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559564624.91.0.895932729881.issue37142@roundup.psfhosted.org> Message-ID: <1559654599.32.0.835556909198.issue37142@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 09:24:21 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 04 Jun 2019 13:24:21 +0000 Subject: [issue37142] test_asyncio timed out on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559564624.91.0.895932729881.issue37142@roundup.psfhosted.org> Message-ID: <1559654661.5.0.592108610362.issue37142@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +13689 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/13804 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 09:26:51 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 04 Jun 2019 13:26:51 +0000 Subject: [issue37142] test_asyncio timed out on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559564624.91.0.895932729881.issue37142@roundup.psfhosted.org> Message-ID: <1559654811.99.0.915886387876.issue37142@roundup.psfhosted.org> Andrew Svetlov added the comment: Follow-up for https://github.com/python/cpython/pull/13790 is ready ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 09:27:42 2019 From: report at bugs.python.org (Demid) Date: Tue, 04 Jun 2019 13:27:42 +0000 Subject: [issue37150] Do not allow to pass FileType class object instead of instance in add_argument In-Reply-To: <1559654520.68.0.135252915467.issue37150@roundup.psfhosted.org> Message-ID: <1559654862.31.0.300539850677.issue37150@roundup.psfhosted.org> Change by Demid : ---------- keywords: +patch pull_requests: +13690 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13805 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 09:28:24 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 04 Jun 2019 13:28:24 +0000 Subject: [issue37142] test_asyncio timed out on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559564624.91.0.895932729881.issue37142@roundup.psfhosted.org> Message-ID: <1559654904.76.0.544030429259.issue37142@roundup.psfhosted.org> Andrew Svetlov added the comment: I mean https://github.com/python/cpython/pull/13804 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 09:36:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 13:36:27 +0000 Subject: [issue37124] test_msilib is potentially leaking references and memory blocks In-Reply-To: <1559405726.45.0.528544648803.issue37124@roundup.psfhosted.org> Message-ID: <1559655387.36.0.147271790873.issue37124@roundup.psfhosted.org> STINNER Victor added the comment: Python 2.7 is still affected: https://buildbot.python.org/all/#/builders/33/builds/607 test_msilib leaked [1, 1, 1] references, sum=3 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 09:41:33 2019 From: report at bugs.python.org (Laurie Opperman) Date: Tue, 04 Jun 2019 13:41:33 +0000 Subject: [issue36964] `python3 -m venv NAME`: virtualenv is not portable In-Reply-To: <1558267639.25.0.0700835222258.issue36964@roundup.psfhosted.org> Message-ID: <1559655693.3.0.436396911022.issue36964@roundup.psfhosted.org> Laurie Opperman added the comment: If you're moving the virtual environment directory in Linux you'll also need to update the shebangs for the scripts/binaries ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 09:41:57 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 04 Jun 2019 13:41:57 +0000 Subject: [issue37150] Do not allow to pass FileType class object instead of instance in add_argument In-Reply-To: <1559654520.68.0.135252915467.issue37150@roundup.psfhosted.org> Message-ID: <1559655717.99.0.985702407607.issue37150@roundup.psfhosted.org> Change by SilentGhost : ---------- versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 09:44:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 13:44:57 +0000 Subject: [issue37142] test_asyncio timed out on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559564624.91.0.895932729881.issue37142@roundup.psfhosted.org> Message-ID: <1559655897.35.0.622838813187.issue37142@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8d561092d510670ce9c038701c90c913453eac90 by Victor Stinner (Andrew Svetlov) in branch 'master': bpo-37142: Make asyncio stream tests more robust again (GH-13804) https://github.com/python/cpython/commit/8d561092d510670ce9c038701c90c913453eac90 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 09:47:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 13:47:34 +0000 Subject: [issue37142] test_asyncio timed out on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559564624.91.0.895932729881.issue37142@roundup.psfhosted.org> Message-ID: <1559656054.63.0.621703190952.issue37142@roundup.psfhosted.org> STINNER Victor added the comment: Close again. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 10:14:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 14:14:04 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1559657643.99.0.502813994768.issue36778@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13692 pull_request: https://github.com/python/cpython/pull/13807 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 10:14:42 2019 From: report at bugs.python.org (Eryk Sun) Date: Tue, 04 Jun 2019 14:14:42 +0000 Subject: [issue36656] Please add race-free os.link and os.symlink wrapper / helper In-Reply-To: <1555577087.92.0.769196427693.issue36656@roundup.psfhosted.org> Message-ID: <1559657682.07.0.9983508434.issue36656@roundup.psfhosted.org> Eryk Sun added the comment: > I'd like to add a few notes; please do consider Windows interactions > here - Windows does not have the same model for inode replacement that > Posix has. Certainly Windows doesn't have the same model for inode replacement since it doesn't have inodes. ;-) Like POSIX, we can't create a symlink and replace it in one step in Windows. A reparse point can only be set on an existing file. WINAPI CreateSymbolicLink thus requires two system calls: NtCreateFile (file or directory) and NtFsControlFile: FSCTL_SET_REPARSE_POINT. Sensibly, CreateSymbolicLink does not support a flag to allow replacing an existing file or empty directory, since overall the operation isn't atomic. Like POSIX, we can do an atomic rename within a volume device. This supports replacing an existing file, but, for backward compatibility, we can't implement the replace semantics in os.rename in Windows. Instead we have os.replace. This is a single NtSetInformatonFile: FileRenameInformation system call, with ReplaceIfExists enabled. An important caveat is that this request cannot replace an open file, even if it was opened with delete-access sharing, since that would leave the replaced file nameless. To partially address this, NTFS (but not FAT32) in Windows 10 1709 supports a new FileRenameInformationEx request. This request can combine the flags FILE_RENAME_REPLACE_IF_EXISTS and FILE_RENAME_POSIX_SEMANTICS to allow replacing an open file, if and only if it's opened with delete-access sharing. The replaced file is still accessible for read and write data operations until it's closed. The requirement for delete-access sharing means this is still not quite POSIX semantics. (Most Windows programs do not open files with delete sharing, except for temp files.) But at least it's possible for aware programs and environments to implement POSIX semantics. Regarding os.link, WINAPI CreateHardLink is implemented via NtSetInformationFile: FileLinkInformation. This system call also supports ReplaceIfExists, but CreateHardLink doesn't expose an option or flag for this capability. Even if we supported the system call directly (unprecedented in Windows Python), the same problem exists with open files. NTFS in Windows 10 1809 supports a new FileLinkInformationEx request. The flags FILE_LINK_REPLACE_IF_EXISTS and FILE_LINK_POSIX_SEMANTICS behave as the corresponding flags for FileRenameInformationEx. It's unrelated, but just to round this discussion out, NTFS in Windows 10 1709 supports a new FileDispositionInformationEx request to set a file's delete disposition. With the flag FILE_DISPOSITION_POSIX_SEMANTICS, the deleted file is unlinked as soon as the requesting file reference is closed, even if the file has other references. This is in contrast to the classic FileDispositionInformation request for which the file is only unlinked once all references are closed. Again, it's not quit POSIX semantics overall since the shared delete access model still applies. But this new delete operation at least addresses the problem with malware scanners and similar programs that open files with shared delete access. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 10:22:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 14:22:23 +0000 Subject: [issue26826] Expose new copy_file_range() syscall in os module. In-Reply-To: <1461325239.41.0.30054024313.issue26826@psf.upfronthosting.co.za> Message-ID: <1559658143.19.0.817745455583.issue26826@roundup.psfhosted.org> STINNER Victor added the comment: shutil copy functions would definitively benefit of using copy_file_range() if available. Can someone please open a separated issue for shutil? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 10:40:44 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 04 Jun 2019 14:40:44 +0000 Subject: [issue37151] Calling code cleanup after PEP 590 Message-ID: <1559659244.35.0.514840211553.issue37151@roundup.psfhosted.org> New submission from Jeroen Demeyer : Now that PEP 590 has been implemented, a lot of old code can be cleaned up. In particular: - get rid of _PyMethodDef_RawFastCallXXX() functions and replace them by vectorcall functions for each calling convention - get rid of FastCallDict() implementations for specific types, but keep the generic _PyObject_FastCallDict() - get rid of some specific tp_call implementations: try to use tp_call=PyVectorcall_Call in more places ---------- components: Interpreter Core messages: 344577 nosy: Mark.Shannon, jdemeyer, petr.viktorin priority: normal severity: normal status: open title: Calling code cleanup after PEP 590 type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 10:41:03 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 04 Jun 2019 14:41:03 +0000 Subject: [issue36924] Simplify implementation of classmethod_descriptor.__call__ In-Reply-To: <1557921506.83.0.125634021475.issue36924@roundup.psfhosted.org> Message-ID: <1559659263.84.0.0877724978724.issue36924@roundup.psfhosted.org> Jeroen Demeyer added the comment: I opened a more general issue #37151 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 10:41:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 14:41:50 +0000 Subject: [issue26219] implement per-opcode cache in ceval In-Reply-To: <1453918500.26.0.0886095278127.issue26219@psf.upfronthosting.co.za> Message-ID: <1559659310.11.0.522928355851.issue26219@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13693 pull_request: https://github.com/python/cpython/pull/13809 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 10:43:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 14:43:53 +0000 Subject: [issue37140] ctypes change made clang fail to build In-Reply-To: <1559553697.78.0.201685591504.issue37140@roundup.psfhosted.org> Message-ID: <1559659433.45.0.118355556757.issue37140@roundup.psfhosted.org> STINNER Victor added the comment: > On Fedora, "clang" fails to build with Python 3.8 Would you mind to elaborate? It works for me on Fedora 30 with clang 8.0.0: $ ./configure CC=clang $ make $ ./python -m test -v test_ctypes ... Tests result: SUCCESS I tested the master branch of Python. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 10:46:31 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 04 Jun 2019 14:46:31 +0000 Subject: [issue26826] Expose new copy_file_range() syscall in os module. In-Reply-To: <1461325239.41.0.30054024313.issue26826@psf.upfronthosting.co.za> Message-ID: <1559659591.18.0.732109888133.issue26826@roundup.psfhosted.org> Giampaolo Rodola' added the comment: shutil.copyfile() already uses sendfile() which basically provides the same performances. sendfile() should be preferred though because it?s supported since Linux 2.6.33. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 10:47:10 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 04 Jun 2019 14:47:10 +0000 Subject: [issue37151] Calling code cleanup after PEP 590 In-Reply-To: <1559659244.35.0.514840211553.issue37151@roundup.psfhosted.org> Message-ID: <1559659630.26.0.306209384828.issue37151@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +13694 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13340 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 10:47:34 2019 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 04 Jun 2019 14:47:34 +0000 Subject: [issue37140] ctypes change made clang fail to build In-Reply-To: <1559553697.78.0.201685591504.issue37140@roundup.psfhosted.org> Message-ID: <1559659654.1.0.455653988879.issue37140@roundup.psfhosted.org> Petr Viktorin added the comment: The issue is with building clang using Python 3.8; not building Python 3.8 using clang :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 10:50:00 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 04 Jun 2019 14:50:00 +0000 Subject: [issue26826] Expose new copy_file_range() syscall in os module. In-Reply-To: <1461325239.41.0.30054024313.issue26826@psf.upfronthosting.co.za> Message-ID: <1559659800.66.0.575373214669.issue26826@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: But copy_file_rane can leverage more filesystem features like deduplication and copy offload stuff. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 10:50:54 2019 From: report at bugs.python.org (serge-sans-paille) Date: Tue, 04 Jun 2019 14:50:54 +0000 Subject: [issue37140] ctypes change made clang fail to build In-Reply-To: <1559553697.78.0.201685591504.issue37140@roundup.psfhosted.org> Message-ID: <1559659854.6.0.278772792744.issue37140@roundup.psfhosted.org> serge-sans-paille added the comment: @vstinner: to reproduce the issue ``` git clone https://github.com/llvm/llvm-project.git cd llvm-project mkdir _build cd _build cmake3 ../llvm -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install -DPYTHON_EXECUTABLE=$HOME/sources/cpython/_build/install/bin/python3 make -j4 ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 11:02:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 15:02:52 +0000 Subject: [issue26826] Expose new copy_file_range() syscall in os module. In-Reply-To: <1461325239.41.0.30054024313.issue26826@psf.upfronthosting.co.za> Message-ID: <1559660572.91.0.567927969254.issue26826@roundup.psfhosted.org> STINNER Victor added the comment: Giampaolo Rodola': > shutil.copyfile() already uses sendfile() which basically provides the same performances. sendfile() should be preferred though because it?s supported since Linux 2.6.33. Pablo Galindo Salgado: > But copy_file_rane can leverage more filesystem features like deduplication and copy offload stuff. We can use copy_file_range() if available, or fallback to sendfile(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 11:05:38 2019 From: report at bugs.python.org (carlo) Date: Tue, 04 Jun 2019 15:05:38 +0000 Subject: [issue37152] Add AF_LOCAL alias for AF_UNIX Message-ID: <1559660738.02.0.723341796578.issue37152@roundup.psfhosted.org> New submission from carlo : both mean the same thing and are used to reference local socket files if you do a `man socket` one of the lines says PF_LOCAL Host-internal protocols, formerly called PF_UNIX, (AF and PF mean the same thing here, but importantly it shows that PF_UNIX has been depreciated) this change gives users the option to type socket.AF_LOCAL as well as socket.AF_UNIX when specifying the address family for the socket. this is my first issue so lmk if there is anything I'm missing ) ---------- components: Library (Lib) messages: 344585 nosy: frosty00 priority: normal severity: normal status: open title: Add AF_LOCAL alias for AF_UNIX versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 11:07:02 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 04 Jun 2019 15:07:02 +0000 Subject: [issue26826] Expose new copy_file_range() syscall in os module. In-Reply-To: <1461325239.41.0.30054024313.issue26826@psf.upfronthosting.co.za> Message-ID: <1559660822.55.0.421342383266.issue26826@roundup.psfhosted.org> Giampaolo Rodola' added the comment: I think data deduplication / CoW / reflink copy is better implemented via FICLONE. "cp --reflink" uses it, I presume because it's older than copy_file_range(). I have a working patch adding CoW copy support for Linux and OSX (but not Windows). I think that should be exposed as a separate shutil.reflink() though, and copyfile() should just do a standard copy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 11:08:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 15:08:37 +0000 Subject: [issue26219] implement per-opcode cache in ceval In-Reply-To: <1453918500.26.0.0886095278127.issue26219@psf.upfronthosting.co.za> Message-ID: <1559660917.69.0.569989377588.issue26219@roundup.psfhosted.org> STINNER Victor added the comment: New changeset ea9f168957f7236aae2185f65e0dc608a9a7a37b by Victor Stinner in branch 'master': bpo-26219: Fix compiler warning in _PyCode_InitOpcache() (GH-13809) https://github.com/python/cpython/commit/ea9f168957f7236aae2185f65e0dc608a9a7a37b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 11:09:15 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 15:09:15 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1559660955.12.0.956500083787.issue36778@roundup.psfhosted.org> STINNER Victor added the comment: New changeset ca612a9728b83472d9d286bbea74972d426ed344 by Victor Stinner in branch 'master': bpo-36778: Remove outdated comment from CodePageTest (GH-13807) https://github.com/python/cpython/commit/ca612a9728b83472d9d286bbea74972d426ed344 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 11:09:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 15:09:47 +0000 Subject: [issue37140] ctypes change made clang fail to build In-Reply-To: <1559553697.78.0.201685591504.issue37140@roundup.psfhosted.org> Message-ID: <1559660987.98.0.462653868371.issue37140@roundup.psfhosted.org> STINNER Victor added the comment: It would be great to be able to write a reproducer and then convert it into a proper unit test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 11:11:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 15:11:44 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1559661104.07.0.836411959899.issue33725@roundup.psfhosted.org> STINNER Victor added the comment: Ned Deily: > No, it has *always* been unsafe. What's new as of 10.13/14 is that macOS tries much harder at runtime to detect such cases and more predictably cause an error rather than letter than let the process run on and possibly fail nondeterministically. Hum, in the doc, I wrote: .. versionchanged:: 3.8 On macOS, *spawn* start method is now the default: *fork* start method is no longer reliable on macOS, see :issue:`33725`. Should we change this text? Any proposition? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 11:12:27 2019 From: report at bugs.python.org (carlo) Date: Tue, 04 Jun 2019 15:12:27 +0000 Subject: [issue37152] Add AF_LOCAL alias for AF_UNIX In-Reply-To: <1559660738.02.0.723341796578.issue37152@roundup.psfhosted.org> Message-ID: <1559661147.15.0.100974450087.issue37152@roundup.psfhosted.org> Change by carlo : ---------- keywords: +patch pull_requests: +13695 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13810 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 11:15:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 15:15:23 +0000 Subject: [issue26219] implement per-opcode cache in ceval In-Reply-To: <1453918500.26.0.0886095278127.issue26219@psf.upfronthosting.co.za> Message-ID: <1559661323.31.0.57626323555.issue26219@roundup.psfhosted.org> STINNER Victor added the comment: I understand that the initial issue (add an opcode cache) has been implemented. Well done Yury and INADA-san! Please open new issues for follow-up like the new optimization ideas ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 11:18:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 15:18:17 +0000 Subject: [issue30699] Misleading class names in datetime.tzinfo usage examples In-Reply-To: <1497824156.09.0.152108719585.issue30699@psf.upfronthosting.co.za> Message-ID: <1559661497.52.0.513611841609.issue30699@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f0b5ae4567637b24035ecda93a3240efc96b6dd9 by Victor Stinner (Mario Corchero) in branch 'master': bpo-30699: Improve example on datetime tzinfo instances (GH-4290) https://github.com/python/cpython/commit/f0b5ae4567637b24035ecda93a3240efc96b6dd9 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 11:18:37 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 04 Jun 2019 15:18:37 +0000 Subject: [issue30699] Misleading class names in datetime.tzinfo usage examples In-Reply-To: <1497824156.09.0.152108719585.issue30699@psf.upfronthosting.co.za> Message-ID: <1559661517.08.0.584309406771.issue30699@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13697 pull_request: https://github.com/python/cpython/pull/13811 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 11:25:20 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 04 Jun 2019 15:25:20 +0000 Subject: [issue30699] Misleading class names in datetime.tzinfo usage examples In-Reply-To: <1497824156.09.0.152108719585.issue30699@psf.upfronthosting.co.za> Message-ID: <1559661920.42.0.525527111718.issue30699@roundup.psfhosted.org> miss-islington added the comment: New changeset 12c178799a23b47c5f8ebc072cbdf09a370649ae by Miss Islington (bot) in branch '3.7': bpo-30699: Improve example on datetime tzinfo instances (GH-4290) https://github.com/python/cpython/commit/12c178799a23b47c5f8ebc072cbdf09a370649ae ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 11:29:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 15:29:34 +0000 Subject: [issue30699] Misleading class names in datetime.tzinfo usage examples In-Reply-To: <1497824156.09.0.152108719585.issue30699@psf.upfronthosting.co.za> Message-ID: <1559662174.1.0.00318660985434.issue30699@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Mario Corchero for the doc enhancement, and Paul for the review! Python 2.7 is not affected: datetime has no timeinfo class. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 11:31:37 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 04 Jun 2019 15:31:37 +0000 Subject: [issue36742] urlsplit doesn't accept a NFKD hostname with a port number In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1559662297.55.0.62722139083.issue36742@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +13698 pull_request: https://github.com/python/cpython/pull/13812 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 11:44:53 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 04 Jun 2019 15:44:53 +0000 Subject: [issue37150] Do not allow to pass FileType class object instead of instance in add_argument In-Reply-To: <1559654520.68.0.135252915467.issue37150@roundup.psfhosted.org> Message-ID: <1559663093.19.0.45191866206.issue37150@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 11:55:52 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 04 Jun 2019 15:55:52 +0000 Subject: [issue36742] urlsplit doesn't accept a NFKD hostname with a port number In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1559663752.35.0.332378899834.issue36742@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13699 pull_request: https://github.com/python/cpython/pull/13813 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 11:56:00 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 04 Jun 2019 15:56:00 +0000 Subject: [issue36742] urlsplit doesn't accept a NFKD hostname with a port number In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1559663760.58.0.825534282833.issue36742@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 8d0ef0b5edeae52960c7ed05ae8a12388324f87e by ?ukasz Langa (Steve Dower) in branch 'master': bpo-36742: Corrects fix to handle decomposition in usernames (#13812) https://github.com/python/cpython/commit/8d0ef0b5edeae52960c7ed05ae8a12388324f87e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 11:56:05 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 04 Jun 2019 15:56:05 +0000 Subject: [issue36742] urlsplit doesn't accept a NFKD hostname with a port number In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1559663765.48.0.205924016326.issue36742@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13700 pull_request: https://github.com/python/cpython/pull/13814 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 12:04:20 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 04 Jun 2019 16:04:20 +0000 Subject: [issue36742] urlsplit doesn't accept a NFKD hostname with a port number In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1559664260.03.0.856802923298.issue36742@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +13701 pull_request: https://github.com/python/cpython/pull/13815 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 12:10:59 2019 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 04 Jun 2019 16:10:59 +0000 Subject: [issue36742] urlsplit doesn't accept a NFKD hostname with a port number In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1559664659.05.0.0387208459982.issue36742@roundup.psfhosted.org> Senthil Kumaran added the comment: Thanks for this engagement and pull requests, Steve. Thanks for reviews Karthikeyan. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 12:15:27 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 04 Jun 2019 16:15:27 +0000 Subject: [issue36742] urlsplit doesn't accept a NFKD hostname with a port number In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1559664927.34.0.769197672689.issue36742@roundup.psfhosted.org> miss-islington added the comment: New changeset 250b62acc59921d399f0db47db3b462cd6037e09 by Miss Islington (bot) in branch '3.7': bpo-36742: Corrects fix to handle decomposition in usernames (GH-13812) https://github.com/python/cpython/commit/250b62acc59921d399f0db47db3b462cd6037e09 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 12:18:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 16:18:11 +0000 Subject: [issue36421] A possible double decref in _ctypes.c's PyCArrayType_new() In-Reply-To: <1553484684.08.0.15989371051.issue36421@roundup.psfhosted.org> Message-ID: <1559665091.79.0.030233552216.issue36421@roundup.psfhosted.org> STINNER Victor added the comment: > just one question, how did you detect this bug? I bet that Zackery Spytz used Svace static analyzer: http://www.ispras.ru/en/technologies/svace/ See also: https://python-security.readthedocs.io/security.html#static-analysers-of-cpython-code-base ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 12:18:15 2019 From: report at bugs.python.org (Greg Lindahl) Date: Tue, 04 Jun 2019 16:18:15 +0000 Subject: [issue33762] temp file isn't IOBase In-Reply-To: <1528059185.23.0.592728768989.issue33762@psf.upfronthosting.co.za> Message-ID: <1559665095.75.0.494479575099.issue33762@roundup.psfhosted.org> Greg Lindahl added the comment: This is breaking aiohttp client file multipart uploads from temporary files. I'd be willing to bet that a lot of libraries do isinstance(foo, io.IOBase) deep in their guts. ---------- nosy: +wumpus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 12:30:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 16:30:09 +0000 Subject: [issue37153] test_venv: test_multiprocessing() hangs randomly on x86 Windows7 3.x Message-ID: <1559665809.74.0.244417716328.issue37153@roundup.psfhosted.org> New submission from STINNER Victor : x86 Windows7 3.x: https://buildbot.python.org/all/#/builders/58/builds/2573 0:42:21 load avg: 4.40 [283/423/1] test_venv crashed (Exit code 1) Timeout (0:35:00)! Thread 0x000000c0 (most recent call first): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 1332 in _readerthread File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 865 in run File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 923 in _bootstrap_inner File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 885 in _bootstrap Thread 0x00000c6c (most recent call first): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 1332 in _readerthread File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 865 in run File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 923 in _bootstrap_inner File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 885 in _bootstrap Thread 0x00000350 (most recent call first): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 1015 in _wait_for_tstate_lock File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 999 in join File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 1361 in _communicate File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 999 in communicate File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_venv.py", line 40 in check_output File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_venv.py", line 327 in test_multiprocessing File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\case.py", line 628 in _callTestMethod File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\case.py", line 671 in run File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\case.py", line 731 in __call__ File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 122 in run File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 84 in __call__ File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 122 in run File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 84 in __call__ File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 122 in run File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 84 in __call__ File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\runner.py", line 176 in run File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 1984 in _run_suite File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 2080 in run_unittest File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 203 in _test_module File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 228 in _runtest_inner2 File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 264 in _runtest_inner File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 135 in _runtest File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 187 in runtest File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\runtest_mp.py", line 66 in run_tests_worker File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\main.py", line 611 in _main File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\main.py", line 588 in main File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\main.py", line 663 in main File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\regrtest.py", line 46 in _main File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\regrtest.py", line 50 in File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\runpy.py", line 85 in _run_code File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\runpy.py", line 192 in _run_module_as_main (...) Re-running failed tests in verbose mode Re-running test_venv in verbose mode test_defaults (test.test_venv.BasicTest) ... ok test_executable (test.test_venv.BasicTest) ... ok test_executable_symlinks (test.test_venv.BasicTest) ... skipped 'Needs symlinks' test_isolation (test.test_venv.BasicTest) ... ok test_multiprocessing (test.test_venv.BasicTest) ... ok test_overwrite_existing (test.test_venv.BasicTest) ... ok test_prefixes (test.test_venv.BasicTest) ... ok test_prompt (test.test_venv.BasicTest) ... ok test_symlinking (test.test_venv.BasicTest) ... skipped 'Needs symlinks' test_unicode_in_batch_file (test.test_venv.BasicTest) ... ok test_unoverwritable_fails (test.test_venv.BasicTest) ... ok test_upgrade (test.test_venv.BasicTest) ... ok test_devnull (test.test_venv.EnsurePipTest) ... ok test_explicit_no_pip (test.test_venv.EnsurePipTest) ... ok test_no_pip_by_default (test.test_venv.EnsurePipTest) ... ok test_with_pip (test.test_venv.EnsurePipTest) ... ok ---------------------------------------------------------------------- Ran 16 tests in 59.907s OK (skipped=2) == Tests result: FAILURE then SUCCESS == (...) 1 re-run test: test_venv Total duration: 1 hour 6 min Tests result: FAILURE then SUCCESS Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 1006, in temp_dir yield path File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 1058, in temp_cwd yield cwd_dir File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\main.py", line 588, in main self._main(tests, kwargs) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\main.py", line 658, in _main sys.exit(0) SystemExit: 0 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 329, in _force_run return func(*args) PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\\cygwin\\home\\db3l\\buildarea\\3.x.bolen-windows7\\build\\build\\test_python_3040\\worker_3236' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\runpy.py", line 192, in _run_module_as_main return _run_code(code, main_globals, None, File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\__main__.py", line 2, in main() File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\main.py", line 663, in main Regrtest().main(tests=tests, **kwargs) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\main.py", line 588, in main self._main(tests, kwargs) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\contextlib.py", line 131, in __exit__ self.gen.throw(type, value, traceback) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 1058, in temp_cwd yield cwd_dir File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\contextlib.py", line 131, in __exit__ self.gen.throw(type, value, traceback) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 1011, in temp_dir rmtree(path) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 451, in rmtree _rmtree(path) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 392, in _rmtree _waitfor(_rmtree_inner, path, waitall=True) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 340, in _waitfor func(pathname) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 389, in _rmtree_inner _force_run(fullname, os.rmdir, fullname) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 335, in _force_run return func(*args) PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\\cygwin\\home\\db3l\\buildarea\\3.x.bolen-windows7\\build\\build\\test_python_3040\\worker_3236' ---------- components: Tests messages: 344600 nosy: vstinner priority: normal severity: normal status: open title: test_venv: test_multiprocessing() hangs randomly on x86 Windows7 3.x versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 12:32:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 16:32:01 +0000 Subject: [issue37153] test_venv: test_multiprocessing() hangs randomly on x86 Windows7 3.x In-Reply-To: <1559665809.74.0.244417716328.issue37153@roundup.psfhosted.org> Message-ID: <1559665921.55.0.448996160149.issue37153@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13702 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13816 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 12:32:39 2019 From: report at bugs.python.org (Demid) Date: Tue, 04 Jun 2019 16:32:39 +0000 Subject: [issue37144] tarfile.open: improper handling of path-like object In-Reply-To: <1559573660.5.0.124771167649.issue37144@roundup.psfhosted.org> Message-ID: <1559665959.37.0.993898554686.issue37144@roundup.psfhosted.org> Change by Demid : ---------- nosy: +zygocephalus -dm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 12:33:09 2019 From: report at bugs.python.org (Demid) Date: Tue, 04 Jun 2019 16:33:09 +0000 Subject: [issue37144] tarfile.open: improper handling of path-like object In-Reply-To: <1559573660.5.0.124771167649.issue37144@roundup.psfhosted.org> Message-ID: <1559665989.59.0.591858570055.issue37144@roundup.psfhosted.org> Change by Demid : ---------- nosy: +dm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 12:40:20 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 04 Jun 2019 16:40:20 +0000 Subject: [issue36742] urlsplit doesn't accept a NFKD hostname with a port number In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1559666420.86.0.298076497679.issue36742@roundup.psfhosted.org> Steve Dower added the comment: New changeset f61599b050c621386a3fc6bc480359e2d3bb93de by Steve Dower in branch '2.7': bpo-36742: Corrects fix to handle decomposition in usernames (GH-13812) https://github.com/python/cpython/commit/f61599b050c621386a3fc6bc480359e2d3bb93de ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 12:49:36 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 04 Jun 2019 16:49:36 +0000 Subject: [issue26826] Expose new copy_file_range() syscall in os module. In-Reply-To: <1461325239.41.0.30054024313.issue26826@psf.upfronthosting.co.za> Message-ID: <1559666976.15.0.146258116518.issue26826@roundup.psfhosted.org> Giampaolo Rodola' added the comment: Actually "man copy_file_range" claims it can do server-side copy, meaning no network traffic between client and server if *src* and *dst* live on the same network fs. So I agree copy_file_range() should be preferred over sendfile() after all. =) I have a wrapper for copy_file_range() similar to what I did in shutil in issue33671 which I can easily integrate, but I wanted to land this one first: https://bugs.python.org/issue37096 Also, I suppose we cannot land this in time for 3.8? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 12:49:50 2019 From: report at bugs.python.org (Demid) Date: Tue, 04 Jun 2019 16:49:50 +0000 Subject: [issue37144] tarfile.open: improper handling of path-like object In-Reply-To: <1559573660.5.0.124771167649.issue37144@roundup.psfhosted.org> Message-ID: <1559666990.3.0.852928609066.issue37144@roundup.psfhosted.org> Change by Demid : ---------- keywords: +patch pull_requests: +13703 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13817 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 12:55:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 16:55:02 +0000 Subject: [issue37154] test_utf8_mode: test_env_var() fails on AMD64 Fedora Rawhide Clang Installed 3.7 Message-ID: <1559667302.55.0.345195224781.issue37154@roundup.psfhosted.org> New submission from STINNER Victor : AMD64 Fedora Rawhide Clang Installed 3.7: https://buildbot.python.org/all/#/builders/195/builds/104 FAIL: test_env_var (test.test_utf8_mode.UTF8ModeTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.7.cstratak-fedora.installed/build/target/lib/python3.7/test/test_utf8_mode.py", line 93, in test_env_var self.assertEqual(out, '0') AssertionError: '1' != '0' - 1 + 0 On the buildbot: vstinner at python-builder-rawhide$ env|grep -E 'LC_|LANG' LANG=en_US.UTF-8 vstinner at python-builder-rawhide$ locale locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" (...) LC_ALL= Extract of the test: # Cannot test with the POSIX locale, since the POSIX locale enables # the UTF-8 mode if not self.posix_locale(): # PYTHONUTF8 should be ignored if -E is used out = self.get_output('-E', '-c', code, PYTHONUTF8='1') self.assertEqual(out, '0') The problem seems to be posix_locale() which fails if the C locale has been coerced by PEP 538: POSIX_LOCALES = ('C', 'POSIX') def posix_locale(self): loc = locale.setlocale(locale.LC_CTYPE, None) return (loc in POSIX_LOCALES) This code doesn't work if LC_CTYPE is already coerced. ---------- components: Tests messages: 344603 nosy: vstinner priority: normal severity: normal status: open title: test_utf8_mode: test_env_var() fails on AMD64 Fedora Rawhide Clang Installed 3.7 versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 12:57:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 16:57:16 +0000 Subject: [issue37154] test_utf8_mode: test_env_var() fails on AMD64 Fedora Rawhide Clang Installed 3.7 In-Reply-To: <1559667302.55.0.345195224781.issue37154@roundup.psfhosted.org> Message-ID: <1559667436.09.0.656458879488.issue37154@roundup.psfhosted.org> STINNER Victor added the comment: It seems like this buildbot has no locale, maybe they have been removed: vstinner at python-builder-rawhide$ locale -a locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_COLLATE to default locale: No such file or directory C C.utf8 POSIX ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 13:00:49 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 17:00:49 +0000 Subject: [issue37154] test_utf8_mode: test_env_var() fails on AMD64 Fedora Rawhide Clang Installed 3.7 In-Reply-To: <1559667302.55.0.345195224781.issue37154@roundup.psfhosted.org> Message-ID: <1559667649.18.0.498424085608.issue37154@roundup.psfhosted.org> STINNER Victor added the comment: glibc-all-langpacks was already installed, but glibc-langpack-en was not installed. I installed glibc-langpack-en: it worked around the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 13:03:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 17:03:16 +0000 Subject: [issue37153] test_venv: test_multiprocessing() hangs randomly on x86 Windows7 3.x In-Reply-To: <1559665809.74.0.244417716328.issue37153@roundup.psfhosted.org> Message-ID: <1559667796.31.0.42387069059.issue37153@roundup.psfhosted.org> STINNER Victor added the comment: New changeset bc6469f79ca13217b784fb47da7ec83484a3debe by Victor Stinner in branch 'master': bpo-37153: test_venv.test_mutiprocessing() calls pool.terminate() (GH-13816) https://github.com/python/cpython/commit/bc6469f79ca13217b784fb47da7ec83484a3debe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 13:06:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 17:06:41 +0000 Subject: [issue37154] test_utf8_mode: test_env_var() fails on AMD64 Fedora Rawhide Clang Installed 3.7 In-Reply-To: <1559667302.55.0.345195224781.issue37154@roundup.psfhosted.org> Message-ID: <1559668001.98.0.0629170633691.issue37154@roundup.psfhosted.org> STINNER Victor added the comment: Related failure on "AMD64 Fedora Rawhide Clang Installed 2.7": https://buildbot.python.org/all/#/builders/186/builds/23 ERROR: test_setlocale_unicode (test.test_locale.TestMiscellaneous) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/2.7.cstratak-fedora.installed/build/target/lib/python2.7/test/test_locale.py", line 500, in test_setlocale_unicode user_locale = locale.setlocale(locale.LC_CTYPE, '') File "/home/buildbot/buildarea/2.7.cstratak-fedora.installed/build/target/lib/python2.7/locale.py", line 581, in setlocale return _setlocale(category, locale) Error: unsupported locale setting ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 13:11:26 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 04 Jun 2019 17:11:26 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1559661104.07.0.836411959899.issue33725@roundup.psfhosted.org> Message-ID: Barry A. Warsaw added the comment: On Jun 4, 2019, at 08:11, STINNER Victor wrote: > Ned Deily: >> No, it has *always* been unsafe. What's new as of 10.13/14 is that macOS tries much harder at runtime to detect such cases and more predictably cause an error rather than letter than let the process run on and possibly fail nondeterministically. > > Hum, in the doc, I wrote: > > .. versionchanged:: 3.8 > > On macOS, *spawn* start method is now the default: *fork* start method is no > longer reliable on macOS, see :issue:`33725`. > > Should we change this text? Any proposition? Thanks Victor. I don?t think ?reliable? is strong enough, since this will definitely lead to core dumps under certain conditions. What about: On macOS, the *spawn* start method is now the default. The *fork* start method should be considered unsafe as it can lead to crashes of the subprocess. See :issue:`33725`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 13:13:12 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 04 Jun 2019 17:13:12 +0000 Subject: [issue36894] test_multiprocessing_spawn regression on Windows In-Reply-To: <1557680621.73.0.0423240629914.issue36894@roundup.psfhosted.org> Message-ID: <1559668392.64.0.0377795591909.issue36894@roundup.psfhosted.org> ?ukasz Langa added the comment: Can this be closed? ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 13:18:28 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 04 Jun 2019 17:18:28 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559668708.35.0.945132415815.issue37134@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thank you, everyone, for expressing clearly your different opinions and concerns. Without disregarding any of the arguments so far I want to make some further clarifications on some points and why I still think this is important. > FWIW, I would rather not see the docs littered with "/". Although I assume there is not the intention, there is absolutely no reason to be disrespectful to the people that think otherwise. You can express the same idea without implying that the feature is "litter". The same thing applies to "unfortunate implementation" in another of the sentences that was used. > This is another step toward making what I see as an unfortunate implementation detail into formal semantics. The feature has as much formal semantics as it is possible already: is an official part of the language. One of the things the PEP makes a lot of emphasis is the current status of the feature and how users see the syntax is precisely caused because of a lack of documentation, exposition and ultimately (and very important) because it was not valid Python syntax. The fact that many people were thinking that is a typo in the documentation or "noise" is precisely because of this and I think having it in the docs is crucial for discovery. Regarding the usefulness of having the syntax for users: is exactly as useful as knowing that some arguments are keyword-only and those are documented and we did not have any discussion about this. One can disagree and argue that the usefulness of the feature, when some users consider implementing functions that use both syntaxes, is much different between positional-only and keyword-only and that one solve more common problems that the other, but that is irrelevant for people reading the documentation: the relevant thing is that they tell you the restrictions when calling an existing function. And at that point, it does not matter how common something is or how common is fall into the error condition. Also, take into account that there is a serious difference between teaching someone how to react to the syntax (you cannot use keyword parameters for these arguments), which is done almost immediately, and teaching someone when they want to use the syntax themselves on their function. And I want to make clear that I acknowledge that there is a cognitive burden because there are more cases to remember. I think documenting the trailing "/" is especially important because now users will find very confusing the fact that functions only document the "/" in some places. They may start to believe that a trailing "/" is illegal syntax or that the "/" at the end is optional. This will lead to even more confusion IMHO. This will also perpetuate another thing that the PEP put a lot of focus on solving, which is removing the dissonance between the signature that appears in the documentation, the one in the help() and docstrings and the one that inspect.signature will return. Precisely failing to document all cases will make this even more confusing and will severely alter and bias any feedback that users could provide about any related aspect. It is possible that some users were thinking that the bare "*" for keyword-only arguments was a typo when it was introduced and maybe they were thinking that the author meant "*args", but we can all agree that that was not a problem. I don't see why this syntax needs to have special treatment regarding that. Another sentence of the ZEN of Python reads "Special cases aren't special enough to break the rules" and the rules at to this point is that there were absolutely no restrictions regarding using new syntax or terminology in the documentation. I understand the concerns and I take them into account, but for these reasons together with what other core devs are exposing, I think this syntax should be included into the documentation (including trailing "/") as this was one core motivation for the PEP. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 13:36:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 17:36:29 +0000 Subject: [issue36402] test_threading: test_threads_join_2() failed with "Fatal Python error: Py_EndInterpreter: not the last thread" on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1559669789.51.0.500715932088.issue36402@roundup.psfhosted.org> STINNER Victor added the comment: New failure: AMD64 FreeBSD CURRENT Shared 3.x: https://buildbot.python.org/all/#/builders/168/builds/1154 ... test_thread_leak (test.test_threading.PyRLockTests) ... ok test_timeout (test.test_threading.PyRLockTests) ... ok test_try_acquire (test.test_threading.PyRLockTests) ... ok test_try_acquire_contended (test.test_threading.PyRLockTests) ... ok test_weakref_deleted (test.test_threading.PyRLockTests) ... ok test_weakref_exists (test.test_threading.PyRLockTests) ... ok test_with (test.test_threading.PyRLockTests) ... ok test_acquire (test.test_threading.SemaphoreTests) ... ok test_acquire_contended (test.test_threading.SemaphoreTests) ... ok test_acquire_destroy (test.test_threading.SemaphoreTests) ... ok test_acquire_timeout (test.test_threading.SemaphoreTests) ... ok test_constructor (test.test_threading.SemaphoreTests) ... ok test_default_value (test.test_threading.SemaphoreTests) ... ok test_release_unacquired (test.test_threading.SemaphoreTests) ... ok test_try_acquire (test.test_threading.SemaphoreTests) ... ok test_try_acquire_contended (test.test_threading.SemaphoreTests) ... ok test_with (test.test_threading.SemaphoreTests) ... ok test_daemon_threads_fatal_error (test.test_threading.SubinterpThreadingTests) ... ok test_threads_join (test.test_threading.SubinterpThreadingTests) ... ok Fatal Python error: Py_EndInterpreter: not the last thread Current thread 0x0000000800ac3000 (most recent call first): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/support/__init__.py", line 2794 in run_in_subinterp File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_threading.py", line 923 in test_threads_join_2 test_threads_join_2 (test.test_threading.SubinterpThreadingTests) ... *** Signal 6 Stop. make: stopped in /usr/home/buildbot/python/3.x.koobs-freebsd-current/build File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/case.py", line 628 in _callTestMethod File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/case.py", line 671 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/case.py", line 731 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/runner.py", line 176 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/support/__init__.py", line 1984 in _run_suite File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/support/__init__.py", line 2080 in run_unittest File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest.py", line 203 in _test_module File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest.py", line 228 in _runtest_inner2 File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest.py", line 264 in _runtest_inner File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest.py", line 148 in _runtest File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest.py", line 187 in runtest File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/main.py", line 291 in rerun_failed_tests File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/main.py", line 646 in _main File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/main.py", line 588 in main File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/main.py", line 663 in main File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/__main__.py", line 2 in File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/runpy.py", line 85 in _run_code File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/runpy.py", line 192 in _run_module_as_main program finished with exit code 1 elapsedTime=3523.834729 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 13:38:15 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 17:38:15 +0000 Subject: [issue37155] test_asyncio: test_stdin_broken_pipe() failed on AMD64 FreeBSD CURRENT Shared 3.x Message-ID: <1559669895.88.0.0230112144047.issue37155@roundup.psfhosted.org> New submission from STINNER Victor : See also bpo-33531 and bpo-30382. AMD64 FreeBSD CURRENT Shared 3.x: https://buildbot.python.org/all/#/builders/168/builds/1154 ====================================================================== 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/build/Lib/test/test_asyncio/test_subprocess.py", line 243, in test_stdin_broken_pipe self.assertRaises((BrokenPipeError, ConnectionResetError), AssertionError: (, ) not raised by run_until_complete ---------- components: Tests messages: 344612 nosy: vstinner priority: normal severity: normal status: open title: test_asyncio: test_stdin_broken_pipe() failed on AMD64 FreeBSD CURRENT Shared 3.x versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 13:39:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 17:39:53 +0000 Subject: [issue36402] test_threading: test_threads_join_2() failed with "Fatal Python error: Py_EndInterpreter: not the last thread" on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1559669993.57.0.736746633073.issue36402@roundup.psfhosted.org> STINNER Victor added the comment: In the same build: https://buildbot.python.org/all/#builders/168/builds/1154 0:28:57 load avg: 12.93 [208/423/1] test_threading crashed (Exit code 1) -- running: test_lib2to3 (7 min 9 sec), test_multiprocessing_spawn (1 min 36 sec) Timeout (0:25:00)! Thread 0x0000000800ac3000 (most recent call first): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", line 1015 in _wait_for_tstate_lock File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", line 999 in join File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_threading.py", line 1287 in test_interrupt_main_subthread (...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 13:40:16 2019 From: report at bugs.python.org (paul j3) Date: Tue, 04 Jun 2019 17:40:16 +0000 Subject: [issue37150] Do not allow to pass FileType class object instead of instance in add_argument In-Reply-To: <1559654520.68.0.135252915467.issue37150@roundup.psfhosted.org> Message-ID: <1559670016.08.0.770399401281.issue37150@roundup.psfhosted.org> paul j3 added the comment: I don't see an easy way around this. FileType is a class, and thus is a callable. add_argument checks that the 'type' parameter is a callable (or a string in the registry). Otherwise it gives the programmer a lot of freedom regarding this parameter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 13:41:40 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 04 Jun 2019 17:41:40 +0000 Subject: [issue35805] email package folds msg-id identifiers using RFC2047 encoded words where it must not In-Reply-To: <1548161762.46.0.975813554813.issue35805@roundup.psfhosted.org> Message-ID: <1559670100.82.0.162803726906.issue35805@roundup.psfhosted.org> Barry A. Warsaw added the comment: New changeset 46d88a113142b26c01c95c93846a89318ba87ffc by Barry Warsaw (Abhilash Raj) in branch 'master': bpo-35805: Add parser for Message-ID email header. (GH-13397) https://github.com/python/cpython/commit/46d88a113142b26c01c95c93846a89318ba87ffc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 13:44:34 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 04 Jun 2019 17:44:34 +0000 Subject: [issue37144] tarfile.open: improper handling of path-like object In-Reply-To: <1559573660.5.0.124771167649.issue37144@roundup.psfhosted.org> Message-ID: <1559670274.35.0.36441033714.issue37144@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This was documented in c45cd167d403d7d98078d5fc4a37b16195dc7a35 but it seems a test for opening gzip file with 'w|gz' mode as in the original report was missing. ---------- nosy: +lars.gustaebel, serhiy.storchaka, xtreak versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 13:47:39 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 04 Jun 2019 17:47:39 +0000 Subject: [issue37145] collections.abc.MappingView mixins rely on undocumented _mapping In-Reply-To: <1559580516.49.0.942559591286.issue37145@roundup.psfhosted.org> Message-ID: <1559670459.35.0.826268802239.issue37145@roundup.psfhosted.org> Raymond Hettinger added the comment: > Then I guess what I consider a bug is "__init__ is undocumented". No, this just how Python works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 13:48:25 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 04 Jun 2019 17:48:25 +0000 Subject: [issue37153] test_venv: test_multiprocessing() hangs randomly on x86 Windows7 3.x In-Reply-To: <1559665809.74.0.244417716328.issue37153@roundup.psfhosted.org> Message-ID: <1559670505.41.0.160522994786.issue37153@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13705 pull_request: https://github.com/python/cpython/pull/13819 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 13:52:37 2019 From: report at bugs.python.org (Carol Willing) Date: Tue, 04 Jun 2019 17:52:37 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559670757.27.0.413115325353.issue37134@roundup.psfhosted.org> Carol Willing added the comment: I echo Pablo's comment about thoughtful discourse as this is discussed. For library maintainers that are writing APIs that involve workflows across multiple projects maintained by different people, better information and documentation is very important. We are balancing the needs of different user groups. An all or nothing approach to documenting / and positional only arguments will not serve the different groups well. What will serve them is coming up with an approach that will work (though not perfectly) for each group. In essence, balancing and compromising are critical. I suggested an approach earlier which I would appreciate folks give a closer look to its merit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 13:56:06 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 04 Jun 2019 17:56:06 +0000 Subject: [issue37145] collections.abc.MappingView mixins rely on undocumented _mapping In-Reply-To: <1559580516.49.0.942559591286.issue37145@roundup.psfhosted.org> Message-ID: <1559670966.97.0.567285398577.issue37145@roundup.psfhosted.org> Raymond Hettinger added the comment: Hit too early. In Python, the norm is that the class name is documented. When you call the class, the __init__() method gets called automatically (as documented in the language reference and in the tutorial). For example: >>> class A: def __init__(self, seq): self._seq = seq def __len__(self): return len(self._seq) >>> a = A('apple') >>> len(a) 5 In this example, we document that class "A" can be called with a sequence and that len() can be called on instances of A. The "dunder" methods are public, but are called and documented indirectly. The "_seq" attribute is marked as private and would not be documented, since it is an implementation detail and not intended to be accessed directly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 14:01:00 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 04 Jun 2019 18:01:00 +0000 Subject: [issue30835] AttributeError when parsing multipart email with invalid non-decodable Content-Transfer-Encoding In-Reply-To: <1499089023.06.0.76757916564.issue30835@psf.upfronthosting.co.za> Message-ID: <1559671260.25.0.103647934893.issue30835@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13706 pull_request: https://github.com/python/cpython/pull/13820 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 14:01:04 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 04 Jun 2019 18:01:04 +0000 Subject: [issue30835] AttributeError when parsing multipart email with invalid non-decodable Content-Transfer-Encoding In-Reply-To: <1499089023.06.0.76757916564.issue30835@psf.upfronthosting.co.za> Message-ID: <1559671264.74.0.648616322036.issue30835@roundup.psfhosted.org> Barry A. Warsaw added the comment: New changeset aa79707262f893428665ef45b5e879129abca4aa by Barry Warsaw (Abhilash Raj) in branch 'master': bpo-30835: email: Fix AttributeError when parsing invalid CTE (GH-13598) https://github.com/python/cpython/commit/aa79707262f893428665ef45b5e879129abca4aa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 14:01:10 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 04 Jun 2019 18:01:10 +0000 Subject: [issue30835] AttributeError when parsing multipart email with invalid non-decodable Content-Transfer-Encoding In-Reply-To: <1499089023.06.0.76757916564.issue30835@psf.upfronthosting.co.za> Message-ID: <1559671270.23.0.536166679984.issue30835@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13707 pull_request: https://github.com/python/cpython/pull/13821 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 14:03:42 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 04 Jun 2019 18:03:42 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559671422.98.0.374316766581.issue37134@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thank you Carol for your comment! Regarding your proposal, I find it it attractive as a compromise in order to make more gentle the introduction of the feature to users. I really appreciate the effort to balance all the different aspects and concerns. Ccould you extend your thoughts regarding this concern that I have with respect of not including the trailing / in 3.8 but doing it in 3.9: >I think documenting the trailing "/" is especially important because now users will find very confusing the fact that functions only document the "/" in some places. They may start to believe that a trailing "/" is illegal syntax or that the "/" at the end is optional. This will lead to even more confusion IMHO. Another minor concern that I have is the fear that we will have a similar discussion in the future when the PR adding the trailing / to 3.9 would be added. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 14:35:54 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 04 Jun 2019 18:35:54 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1559673354.34.0.495891633343.issue37149@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: +gpolo, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 14:43:37 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 04 Jun 2019 18:43:37 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559673817.6.0.166466507827.issue36839@roundup.psfhosted.org> Brett Cannon added the comment: Let's please keep this respectful. Saying people are basing things "on fantasy" or that "people need to develop reading skills" is not helpful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 14:44:00 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 04 Jun 2019 18:44:00 +0000 Subject: [issue36742] urlsplit doesn't accept a NFKD hostname with a port number In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1559673840.26.0.66777682953.issue36742@roundup.psfhosted.org> Ned Deily added the comment: New changeset fd1771dbdd28709716bd531580c40ae5ed814468 by Ned Deily (Miss Islington (bot)) in branch '3.6': bpo-36742: Corrects fix to handle decomposition in usernames (GH-13812) (GH-13814) https://github.com/python/cpython/commit/fd1771dbdd28709716bd531580c40ae5ed814468 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 15:02:22 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 04 Jun 2019 19:02:22 +0000 Subject: [issue36964] `python3 -m venv NAME`: virtualenv is not portable In-Reply-To: <1558267639.25.0.0700835222258.issue36964@roundup.psfhosted.org> Message-ID: <1559674942.74.0.438119791821.issue36964@roundup.psfhosted.org> Brett Cannon added the comment: "if you coded bad and it doesn't work, it's your fault." I disagree. Your request changes what VIRTUAL_ENV gets set to, correct? Changing it suddenly for users doesn't mean their code was bad, it means we changed something on them. Now we can do that with a good justification, but simply to make it easier to have "unofficial unsupported bonus" is not a good enough reason to upset people with requiring everyone to update their code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 15:03:44 2019 From: report at bugs.python.org (Paul Monson) Date: Tue, 04 Jun 2019 19:03:44 +0000 Subject: [issue37140] ctypes change made clang fail to build In-Reply-To: <1559553697.78.0.201685591504.issue37140@roundup.psfhosted.org> Message-ID: <1559675024.92.0.161215546289.issue37140@roundup.psfhosted.org> Paul Monson added the comment: I added a unittest to the PR that illustrates the problem. It doesn't pass yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 15:04:11 2019 From: report at bugs.python.org (Marco Sulla) Date: Tue, 04 Jun 2019 19:04:11 +0000 Subject: [issue36964] `python3 -m venv NAME`: virtualenv is not portable In-Reply-To: <1558267639.25.0.0700835222258.issue36964@roundup.psfhosted.org> Message-ID: <1559675051.71.0.0663173279568.issue36964@roundup.psfhosted.org> Marco Sulla added the comment: Well, I repeat, not with #!/usr/bin/env python3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 15:07:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 19:07:07 +0000 Subject: [issue37153] test_venv: test_multiprocessing() hangs randomly on x86 Windows7 3.x In-Reply-To: <1559665809.74.0.244417716328.issue37153@roundup.psfhosted.org> Message-ID: <1559675227.59.0.95970098759.issue37153@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 5f8443eec9d54e1f74b69aa547e6810da6afa90b by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-37153: test_venv.test_mutiprocessing() calls pool.terminate() (GH-13816) (GH-13819) https://github.com/python/cpython/commit/5f8443eec9d54e1f74b69aa547e6810da6afa90b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 15:07:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 19:07:40 +0000 Subject: [issue37153] test_venv: test_multiprocessing() hangs randomly on x86 Windows7 3.x In-Reply-To: <1559665809.74.0.244417716328.issue37153@roundup.psfhosted.org> Message-ID: <1559675260.94.0.48462991328.issue37153@roundup.psfhosted.org> STINNER Victor added the comment: I hope that my change will prevent the random failure. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 15:07:59 2019 From: report at bugs.python.org (Marco Sulla) Date: Tue, 04 Jun 2019 19:07:59 +0000 Subject: [issue36964] `python3 -m venv NAME`: virtualenv is not portable In-Reply-To: <1558267639.25.0.0700835222258.issue36964@roundup.psfhosted.org> Message-ID: <1559675279.59.0.687439535115.issue36964@roundup.psfhosted.org> Marco Sulla added the comment: The previous post was for Laurie Opperman "upset people with requiring everyone to update their code" I don't know why they have to be upset. Until now they can't move the folder. They want to move the folder? They have to change their code. Now they have no possibility at all to move it, so I don't know why they should be upset. And yes, I consider a code that depends from the path of the folder it resides a bad code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 15:10:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 19:10:07 +0000 Subject: [issue26826] Expose new copy_file_range() syscall in os module. In-Reply-To: <1559666976.15.0.146258116518.issue26826@roundup.psfhosted.org> Message-ID: STINNER Victor added the comment: Please open a new issue to discuss how it can used in shutil ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 15:10:35 2019 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 04 Jun 2019 19:10:35 +0000 Subject: [issue37089] `import Lib.os` works on windows (but shouldn't) In-Reply-To: <1559163159.15.0.0136841146516.issue37089@roundup.psfhosted.org> Message-ID: <1559675435.74.0.763505779549.issue37089@roundup.psfhosted.org> Guido van Rossum added the comment: I doubt it's meant as a feature. I don't recall anything about it. I suspect it's got to do with limitations of the Windows installer (at the time). Maybe there are other things that are siblings of "Lib" that must be importable, e.g. DLLs? I recommend taking this up with Steve Dower, who owns the Windows installers these days. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 15:10:41 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 04 Jun 2019 19:10:41 +0000 Subject: [issue36964] `python3 -m venv NAME`: virtualenv is not portable In-Reply-To: <1558267639.25.0.0700835222258.issue36964@roundup.psfhosted.org> Message-ID: <1559675441.76.0.0831452674713.issue36964@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 15:12:15 2019 From: report at bugs.python.org (Marco Sulla) Date: Tue, 04 Jun 2019 19:12:15 +0000 Subject: [issue36964] `python3 -m venv NAME`: virtualenv is not portable In-Reply-To: <1558267639.25.0.0700835222258.issue36964@roundup.psfhosted.org> Message-ID: <1559675535.27.0.622886204447.issue36964@roundup.psfhosted.org> Marco Sulla added the comment: Furthermore, if you destroy an old virtual env and recreate it with the new method, it continues to work as before, since VIRTUAL_ENV points to the same folder. We don't force to change the code if they continues to use the virtual environments as now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 15:19:55 2019 From: report at bugs.python.org (Geoffrey Sneddon) Date: Tue, 04 Jun 2019 19:19:55 +0000 Subject: [issue37145] collections.abc.MappingView mixins rely on undocumented _mapping In-Reply-To: <1559580516.49.0.942559591286.issue37145@roundup.psfhosted.org> Message-ID: <1559675995.93.0.709312136732.issue37145@roundup.psfhosted.org> Geoffrey Sneddon added the comment: You've missed my point: the arguments that MappingView.__init__ takes are undocumented. Nowhere mentions class MappingView(mapping), as I would expect from how initializers are documented elsewhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 15:20:29 2019 From: report at bugs.python.org (Geoffrey Sneddon) Date: Tue, 04 Jun 2019 19:20:29 +0000 Subject: [issue37145] collections.abc.MappingView mixins rely on undocumented _mapping In-Reply-To: <1559580516.49.0.942559591286.issue37145@roundup.psfhosted.org> Message-ID: <1559676029.9.0.23435885467.issue37145@roundup.psfhosted.org> Geoffrey Sneddon added the comment: Like, where in the documentation can I learn that MappingView's initializer takes an argument "mapping"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 15:27:19 2019 From: report at bugs.python.org (Michele Angrisano) Date: Tue, 04 Jun 2019 19:27:19 +0000 Subject: [issue37150] Do not allow to pass FileType class object instead of instance in add_argument In-Reply-To: <1559654520.68.0.135252915467.issue37150@roundup.psfhosted.org> Message-ID: <1559676438.99.0.552532886753.issue37150@roundup.psfhosted.org> Michele Angrisano added the comment: Reading the examples in the doc, it's clear the behavior when FileType takes an argument. What's the behavior of FileType when is called without any argument? ---------- nosy: +mangrisano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 15:35:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 19:35:08 +0000 Subject: [issue35047] Better error messages in unittest.mock In-Reply-To: <1540283736.06.0.788709270274.issue35047@psf.upfronthosting.co.za> Message-ID: <1559676908.18.0.842529427336.issue35047@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 001d63cefaa9d84d6d59aa9db8bac66040c8f0ee by Victor Stinner (Petter Strandmark) in branch 'master': bpo-35047: Update whatsnew/3.8 for better mock error message (GH-13746) https://github.com/python/cpython/commit/001d63cefaa9d84d6d59aa9db8bac66040c8f0ee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 16:08:49 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 04 Jun 2019 20:08:49 +0000 Subject: [issue37152] Add AF_LOCAL alias for AF_UNIX In-Reply-To: <1559660738.02.0.723341796578.issue37152@roundup.psfhosted.org> Message-ID: <1559678929.59.0.417528247321.issue37152@roundup.psfhosted.org> Christian Heimes added the comment: The socket type is known as AF_UNIX, AF_LOCAL, Unix domain socket, and IPC (inter process communication) socket. The man page unix(7) http://man7.org/linux/man-pages/man7/unix.7.html uses three of those four terms to explain the socket type: The AF_UNIX (also known as AF_LOCAL) socket family is used to communicate between processes on the same machine efficiently. Traditionally, UNIX domain sockets can be [...] The strace command also uses the name AF_UNIX and not AF_LOCAL. HTTP over AF_UNIX often uses http+unix:// or unix:// to refer to a socket file. I'm -1 to add the alias. It just adds to the confusion. It's also against the Zen of Python: "There should be one-- and preferably only one --obvious way to do it." ---------- nosy: +christian.heimes versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 16:20:58 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 04 Jun 2019 20:20:58 +0000 Subject: [issue37156] Fix libssl DLL tag in Tools/msi project Message-ID: <1559679658.46.0.279980896564.issue37156@roundup.psfhosted.org> New submission from Steve Dower : Mostly a note to self to fix the tag. Right now the x64 build gets an extra suffix, which is incorrect and causes installer builds to fail. ---------- assignee: steve.dower components: Windows messages: 344638 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Fix libssl DLL tag in Tools/msi project type: compile error versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 16:36:25 2019 From: report at bugs.python.org (Zachary Ware) Date: Tue, 04 Jun 2019 20:36:25 +0000 Subject: [issue34282] Enum._convert shadows members named _convert In-Reply-To: <1532972199.25.0.56676864532.issue34282@psf.upfronthosting.co.za> Message-ID: <1559680585.38.0.540614345511.issue34282@roundup.psfhosted.org> Change by Zachary Ware : ---------- pull_requests: +13708 pull_request: https://github.com/python/cpython/pull/13823 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 16:39:03 2019 From: report at bugs.python.org (Brian Skinn) Date: Tue, 04 Jun 2019 20:39:03 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559680743.89.0.945342506178.issue37134@roundup.psfhosted.org> Change by Brian Skinn : ---------- nosy: +bskinn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 16:44:14 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 04 Jun 2019 20:44:14 +0000 Subject: [issue37150] Do not allow to pass FileType class object instead of instance in add_argument In-Reply-To: <1559654520.68.0.135252915467.issue37150@roundup.psfhosted.org> Message-ID: <1559681054.56.0.259972330981.issue37150@roundup.psfhosted.org> Josh Rosenberg added the comment: The docs specify what argparse.FileType() does via the default parameters: https://docs.python.org/3/library/argparse.html#argparse.FileType If you mean what does it do when you fail to call it at all (passing type=argparse.FileType), the answer is the same as any other class: It tries to construct a FileType using the user provided argument as the sole positional argument. So if the user passes a valid mode string, it works, and returns a FileType object with that mode string, otherwise it barfs and dumps an error message for passing an invalid argument for FileType. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 16:58:40 2019 From: report at bugs.python.org (N.P. Khelili) Date: Tue, 04 Jun 2019 20:58:40 +0000 Subject: [issue37130] pathlib.with_name() doesn't like unnamed files. In-Reply-To: <1559438292.33.0.601764456145.issue37130@roundup.psfhosted.org> Message-ID: <1559681920.77.0.982904385542.issue37130@roundup.psfhosted.org> N.P. Khelili added the comment: in the definition of the name property https://github.com/python/cpython/blob/9ab2fb1c68a75115da92d51b8c40b74f60f88561/Lib/pathlib.py#L792 : if len(parts) == (1 if (self._drv or self._root) else 0): return '' could also become if self.parent == self return '' # why not None btw... As I said, I'm new to python and I'll make a few tries once I build the test suite ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 17:01:21 2019 From: report at bugs.python.org (Carol Willing) Date: Tue, 04 Jun 2019 21:01:21 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559682081.77.0.399531463004.issue37134@roundup.psfhosted.org> Carol Willing added the comment: > Could you extend your thoughts regarding this concern that I have with respect of not including the trailing / in 3.8 but doing it in 3.9: Pablo, Sure thing. I believe that a Sphinx extension (possibly existing sphinx-tabs as suggested by @bskinn in the Steering Council issue or one we develop/find) could give us both a "technically accurate" view and "simplified" view. I wasn't sure if this could/would be ready by 3.8. But I think that it is feasible for 3.9. If we can do it for 3.8, fantastic. If we do the 3.8/3.9 phased approach, I definitely think the 3.8 docs need to be explicit in stating the what/why/when of the / (still searching for a cute name - right now the best I have is "twig" from another name, virgule, for slash and its Latin derivation). Ultimately, 3.9 should either by Sphinx extension or edit contain the "technically accurate" version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 17:03:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 21:03:23 +0000 Subject: [issue34282] Enum._convert shadows members named _convert In-Reply-To: <1532972199.25.0.56676864532.issue34282@psf.upfronthosting.co.za> Message-ID: <1559682203.81.0.19281259457.issue34282@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 19a1e1eb86115db66c1faae5927f87e3a12692fc by Victor Stinner (Zachary Ware) in branch 'master': bpo-34282: Remove deprecated enum _convert method (GH-13823) https://github.com/python/cpython/commit/19a1e1eb86115db66c1faae5927f87e3a12692fc ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 17:05:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 21:05:39 +0000 Subject: [issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream In-Reply-To: <1557598514.53.0.379470651864.issue36889@roundup.psfhosted.org> Message-ID: <1559682339.39.0.0976524034088.issue36889@roundup.psfhosted.org> STINNER Victor added the comment: Can this issue be closed now? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 17:24:11 2019 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 04 Jun 2019 21:24:11 +0000 Subject: [issue15474] Differentiate decorator and decorator factory in docs In-Reply-To: <1343416207.69.0.71696747041.issue15474@psf.upfronthosting.co.za> Message-ID: <1559683451.88.0.863042129378.issue15474@roundup.psfhosted.org> Ezio Melotti added the comment: If you want some early feedback I believe you can already create a PR and mark it as work-in-progress/don't-merge. If you need some material you can find the slides of a talk about decorators that I did at https://www.pycon.it/media/conference/slides/understanding-decorators.pdf Feel free to take from it whatever you need :) ---------- versions: +Python 3.7, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 17:28:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 21:28:08 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559683688.64.0.720557853959.issue37134@roundup.psfhosted.org> STINNER Victor added the comment: Python has many parameter types: positional-only, positional-or-keyword, keyword only, etc. Even if we don't add "/", it would be nice to have hints when we put the mouse cursor on a function parameter. Something like: function: demo(arg1, *, arg2, arg3=None) arg1 hint: *arg1* is the first mandatory parameter (kind: positional-or-keyword) arg2 hint: *arg2* is the second mandatory parameter (kind: keyword-only) arg3 hint: *arg3* is an optional parameter (default: ``None``, kind: keyword-only) Maybe we can also add hints on '*': * hint: Marker for keyword-only parameter ... I have no idea how complex it would be to implement such Sphinx extenstion, or maybe even implement it in Sphinx. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 17:29:38 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 04 Jun 2019 21:29:38 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559683778.99.0.140892804306.issue37134@roundup.psfhosted.org> Raymond Hettinger added the comment: I don't think inclusion in 3.9 should be automatic. The purpose of the deferment is to evaluate the premise, "the only reason people have found this notation confusing was that it wasn't yet valid syntax available for use in their own code." If that premise turns out to be false, we should think seriously about whether this makes the docs less approachable for everyday users. This extensive edit of the docs will change the appearance and texture of language from day 1 of a person's exposure to the language. It warrants careful consideration of the costs and benefits. Despite what we might wish to be true, the cost side of the equation is definitely not zero. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 17:33:06 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 04 Jun 2019 21:33:06 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559683986.67.0.189124661675.issue37134@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Pablo, Sure thing. I believe that a Sphinx extension (possibly existing sphinx-tabs as suggested by @bskinn in the Steering Council issue or one we develop/find) could give us both a "technically accurate" view and "simplified" view. I wasn't sure if this could/would be ready by 3.8. But I think that it is feasible for 3.9. If we can do it for 3.8, fantastic. Thanks for the quick response and for clarifying that. This looks like a very interesting approach. Would the "simplify" view remove keyword-only argument markers as well? What other features should be hidden in this simplified view? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 17:36:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 21:36:40 +0000 Subject: [issue37157] shutil: add reflink=False to file copy functions to control clone/CoW copies (use copy_file_range) Message-ID: <1559684200.61.0.18008315195.issue37157@roundup.psfhosted.org> New submission from STINNER Victor : bpo-26826 added a new os.copy_file_range() function: https://docs.python.org/dev/library/os.html#os.copy_file_range As os.sendfile(), this new Linux syscall avoids memory copies between kernel space and user space. It matters for performance, especially since Meltdown vulnerability required Windows, Linux, FreeBSD, etc. to use a different address space for the kernel (like Linux Kernel page-table isolation, KPTI). shutil has been modified in Python 3.8 to use os.sendfile() on Linux: https://docs.python.org/dev/whatsnew/3.8.html#optimizations But according to Pablo Galindo Salgado, copy_file_range() goes further: "But copy_file_rane can leverage more filesystem features like deduplication and copy offload stuff." https://bugs.python.org/issue26826#msg344582 Giampaolo Rodola' added: "I think data deduplication / CoW / reflink copy is better implemented via FICLONE. "cp --reflink" uses it, I presume because it's older than copy_file_range(). I have a working patch adding CoW copy support for Linux and OSX (but not Windows). I think that should be exposed as a separate shutil.reflink() though, and copyfile() should just do a standard copy." "Actually "man copy_file_range" claims it can do server-side copy, meaning no network traffic between client and server if *src* and *dst* live on the same network fs. So I agree copy_file_range() should be preferred over sendfile() after all. =) I have a wrapper for copy_file_range() similar to what I did in shutil in issue33671 which I can easily integrate, but I wanted to land this one first: https://bugs.python.org/issue37096 Also, I suppose we cannot land this in time for 3.8?" https://bugs.python.org/issue26826#msg344586 -- There was already a discussion about switching shutil to copy-on-write: https://bugs.python.org/issue33671#msg317989 One problem is that modifying the "copied" file can suddenly become slower if it was copied using "cp --reflink". It seems like adding a new reflink=False parameter to file copy functions to control clone/CoW copies is required to prevent bad surprises. ---------- components: Library (Lib) messages: 344648 nosy: giampaolo.rodola, pablogsal, vstinner priority: normal severity: normal status: open title: shutil: add reflink=False to file copy functions to control clone/CoW copies (use copy_file_range) type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 17:37:49 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 21:37:49 +0000 Subject: [issue26826] Expose new copy_file_range() syscall in os module. In-Reply-To: <1461325239.41.0.30054024313.issue26826@psf.upfronthosting.co.za> Message-ID: <1559684269.48.0.192856902499.issue26826@roundup.psfhosted.org> STINNER Victor added the comment: I created bpo-37157: "shutil: add reflink=False to file copy functions to control clone/CoW copies (use copy_file_range)". -- The new os.copy_file_range() should be documented at: https://docs.python.org/dev/whatsnew/3.8.html#os ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 17:42:32 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 04 Jun 2019 21:42:32 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559684552.63.0.0326018985757.issue37134@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > If that premise turns out to be false, we should think seriously about whether this makes the docs less approachable for everyday users. We have not done such a thing for any other feature of the language. I think that since this is now a part of the language, it has all the right to be part of the documentation (possibly in some phased process). The contrary will be extremely unfair to the feature and to the PEP process: not a single other case had to fight separately to be included in the language and the documentation. And we even have an analogous case: keyword-only argument. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 17:51:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 21:51:31 +0000 Subject: [issue37157] shutil: add reflink=False to file copy functions to control clone/CoW copies (use copy_file_range) In-Reply-To: <1559684200.61.0.18008315195.issue37157@roundup.psfhosted.org> Message-ID: <1559685091.83.0.518908232506.issue37157@roundup.psfhosted.org> STINNER Victor added the comment: Random notes. Extract of Linux manual page of "cp": --reflink[=WHEN] control clone/CoW copies. See below When --reflink[=always] is specified, perform a lightweight copy, where the data blocks are copied only when modified. If this is not possible the copy fails, or if --reflink=auto is specified, fall back to a stan? dard copy. Use --reflink=never to ensure a standard copy is performed. -- "Why is cp --reflink=auto not the default behaviour?": https://unix.stackexchange.com/questions/80351/why-is-cp-reflink-auto-not-the-default-behaviour -- reflinks are supported by BTRFS and OCFS2. XFS seems to have an experimental support for reflink, 2 years old article: https://strugglers.net/~andy/blog/2017/01/10/xfs-reflinks-and-deduplication/ Linux version of ZFS doesn't support reflink yet: https://github.com/zfsonlinux/zfs/issues/405 -- Python binding using cffi to get reflink: https://gitlab.com/rubdos/pyreflink "Btrfs, XFS, OCFS2 reflink support. Btrfs is tested the most. Apple macOS APFS clonefile support. Little testing, be careful. It might eat data." -- "reflink for Windows": https://github.com/0xbadfca11/reflink "Windows Server 2016 introduce Block Cloning feature." => https://docs.microsoft.com/en-us/windows-server/storage/refs/block-cloning "ReFS v2 is only available in Windows Server 2016 and Windows 10 version 1703 (build 15063) or later. Windows 10 version 1607 (build 14393) and earlier Windows only can use ReFS v1." -- Linux has 2 ioctl: #include #include int ioctl(int dest_fd, FICLONERANGE, struct file_clone_range *arg); int ioctl(int dest_fd, FICLONE, int src_fd); http://man7.org/linux/man-pages/man2/ioctl_ficlonerange.2.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 17:57:29 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 04 Jun 2019 21:57:29 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559685449.2.0.451931870406.issue37134@roundup.psfhosted.org> Raymond Hettinger added the comment: Language features don't have rights. People do. :-) FWIW, there is precedent. We have type annotations in the language but don't use them throughout the docs. In the end, all that matters is usability. If a notion fails a usability test, then we should adapt accordingly. When it comes to documentation, we also try to minimize how much a person needs to know in order a mentally parse a piece in isolation. That is a core principle of documentation (the MS Excel docs are an excellent example; a counter-example is Wikipedia's use of the IPA pronunciation notation which is technically superior but is only readable/usable by very few of the readers.). P.S. I hope you don't come to personally identify with this patch. I'm a big admirer of your work and am already promoting the feature to my 50,000+ twitter follows. In this tracker issue, I hope for us a have a dispassionate, honest evaluation of what makes for the best documentation of the language. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 18:09:49 2019 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Tue, 04 Jun 2019 22:09:49 +0000 Subject: [issue15474] Differentiate decorator and decorator factory in docs In-Reply-To: <1343416207.69.0.71696747041.issue15474@psf.upfronthosting.co.za> Message-ID: <1559686189.76.0.809272589192.issue15474@roundup.psfhosted.org> Andr?s Delfino added the comment: Great! I'll definitely give it a look. I prefer not to make a PR until everything is in its place. You can check the status though: https://github.com/andresdelfino/cpython/tree/decorators-howto Fred was very helpful with his insight :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 18:18:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 22:18:05 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559686685.4.0.853641510405.issue37134@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: -easy title: [EASY] Use PEP570 syntax in the documentation -> Use PEP570 syntax in the documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 18:19:51 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 04 Jun 2019 22:19:51 +0000 Subject: [issue37134] [EASY] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559686791.66.0.0591085607455.issue37134@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > FWIW, there is precedent. We have type annotations in the language but don't use them throughout the docs. Although there is some distance between both cases, I think this is an extremely good point to take into account that I have not thought about. > P.S. I hope you don't come to personally identify with this patch. I'm a big admirer of your work and am already promoting the feature to my 50,000+ twitter follows. In this tracker issue, I hope for us a have a dispassionate, honest evaluation of what makes for the best documentation of the language. Not at all :). I will be happy whatever solution we end agreeing to, knowing that we are going through a very thorough discussion. But thank you very much for stopping the discussion to check. I actually apologize if any of my responses have been more passionate than it should have been. I (really!) appreciate your words here and the fact that even if you disagree with this change and the cost of the feature regarding the advantages, you are making a lot of effort to explain the feature to users. Thank you very much for caring about the language, users and having a healthy and productive discussion. ---------- keywords: +easy title: Use PEP570 syntax in the documentation -> [EASY] Use PEP570 syntax in the documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 18:20:06 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 04 Jun 2019 22:20:06 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559686806.16.0.297151646308.issue37134@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- title: [EASY] Use PEP570 syntax in the documentation -> Use PEP570 syntax in the documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 18:48:25 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 04 Jun 2019 22:48:25 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559688505.22.0.668817709249.issue37134@roundup.psfhosted.org> Julien Palard added the comment: FWIW here's my feedback (as a Python teacher and doc guy): I find that newcomers are good to ignore what they don't understand, so a newcomer exposed to "foo(a, b, /)" will no run away nor cry, he will just ignore the slash and understand that "foo takes two parameters, a and b" and be happy with it. Then I think that for more advanced people it's nice to have it: - It's a way to discover it's a valid syntax - It's a usefull information to use - It does not take a lot of space - It's the truth (I mean, displaying "foo(a, b)" for "foo(a, b, /)" is a kind of a lie, I don't like it) So I'm +1 for using PEP570 syntax in the documentation. ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 19:10:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jun 2019 23:10:35 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559689835.34.0.906374215653.issue37134@roundup.psfhosted.org> STINNER Victor added the comment: Tim Peters: "I haven't looked at anything in this PR, so just popping in to confirm that the first time I saw stuff like: len(obj, /) in the docs I had no idea at all what it was trying to say. I thought it was a typo. (...)" Carol Willing: "I confess that I had a similar reaction as Tim when I saw functions with a trailing `/`." I'm quite sure that many users have same reaction the first time they meet "@decorator", "*args", "def func(*, arg)", etc. PEP 570 introduces a syntax which was still illegal in Python 3.7, so it's normal to be surprised when we meet a new syntax. In a few years, people will be used to that, but will be surprised by yet another new syntax ;-) The best we can do is to enhance the documentation to properly document "/", directly in the reference documentation. Sphinx is a great help to add links. And we can maybe extend Sphinx to add even more inline hints. -- The "/" character was discussed in length in the PEP 570. Many people complained... but nobody succeed to came up with a better syntax. The PEP has been accepted and its now part of the *Python language*. As explained in length in the PEP 570, the "/" syntax is *not* new. For example, it is used for years in Python docstrings. Paul Ganssle also mentioned that this notation is "already used in the numpy documentation IIRC". -- I don't think that we must hide some syntax like "*args" or "def func(*, arg)" from the doc, just because people learning Python might be surprised at the first read. I don't think that the reference documentation should be used to learn Python. They are way better resources than that to learn Python. Moreover, it's not really written like a tutorial. We have some https://docs.python.org/dev/howto/ for that. >From my point of view, the *reference* documentation is more used by people who are already used to Python and so know the Python syntax. Trying to hide the real API in the *reference* documentation sounds weird (wrong) to me. The doc should document the real behavior. The PEP 570 makes is possible, whereas previously, the doc was lying. If you consider that "len(obj, /)" is a typo, maybe we must fix len to accept obj as a keyword parameter? But they are good reasons why it's a positional only parameter. I don't think that anyone wants to change that. The current trend is more the opposite: convert some positional-or-keyword parameters to positional-only parameters, especially for functions taking a single parameter. In short, I concur with Brett who wrote: > Anyway, from my personal view, I think we should use the syntax. It's officially part of the language at this point and so avoiding it in the docs seems odd, like we're saying that we're ashamed of this syntax and you should pretend it doesn't exist when it does and it isn't going anywhere. Otherwise aren't we're forcing users to realize that the function definition in the docs deviates from what is definable in this one instance and that one has to read the full text to know that something is doable syntactically but we're leaving it out of the docs? It adds inconsistency in what the definition line means IMO based on how we have usually chosen to try and express things in that 'def' line in the docs as succinctly as possible to communicate the semantics of calling that function. -- By the way, PR 13743 doesn't modify every single function of the documentation. Only a few files are modified, simply because only few functions accept positional-only parameters. My expectation is more that nobody will notice :-) ---------- keywords: -easy nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 19:35:16 2019 From: report at bugs.python.org (Michele Angrisano) Date: Tue, 04 Jun 2019 23:35:16 +0000 Subject: [issue37150] Do not allow to pass FileType class object instead of instance in add_argument In-Reply-To: <1559654520.68.0.135252915467.issue37150@roundup.psfhosted.org> Message-ID: <1559691316.95.0.971863145911.issue37150@roundup.psfhosted.org> Michele Angrisano added the comment: Yes, I meant that. Thanks! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 19:50:25 2019 From: report at bugs.python.org (Demid) Date: Tue, 04 Jun 2019 23:50:25 +0000 Subject: [issue37150] Do not allow to pass FileType class object instead of instance in add_argument In-Reply-To: <1559676438.99.0.552532886753.issue37150@roundup.psfhosted.org> Message-ID: Demid added the comment: If you will run `python test.py hello.txt, where test.py is: import argparse parser = argparse.ArgumentParser() parser.add_argument('echo', type=argparse.FileType) args = parser.parse_args() print(args.echo) You will receive: FileType('hello.txt') I think that can be confusing for someone who will forget to invoke FileType constructor. ??????? Original Message ??????? On Tuesday, June 4, 2019 10:27 PM, Michele Angrisano wrote: > > > Michele Angrisanomichele.angrisano at gmail.com added the comment: > > Reading the examples in the doc, it's clear the behavior when FileType takes an argument. What's the behavior of FileType when is called without any argument? > > ----------------------------------------------------------------------------------------------------------------------------------------------------------------- > > nosy: +mangrisano > > Python tracker report at bugs.python.org > https://bugs.python.org/issue37150 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 20:26:26 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jun 2019 00:26:26 +0000 Subject: [issue35763] IDLE calltips: make positional note less obtrusive In-Reply-To: <1547755288.11.0.42128686161.issue35763@roundup.psfhosted.org> Message-ID: <1559694386.88.0.624845081827.issue35763@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- type: enhancement -> behavior versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 20:36:30 2019 From: report at bugs.python.org (Laurie Opperman) Date: Wed, 05 Jun 2019 00:36:30 +0000 Subject: [issue36602] Recursive directory list with pathlib.Path.iterdir In-Reply-To: <1554980374.32.0.410571505677.issue36602@roundup.psfhosted.org> Message-ID: <1559694990.48.0.6223161019.issue36602@roundup.psfhosted.org> Change by Laurie Opperman : ---------- versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 20:37:10 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 05 Jun 2019 00:37:10 +0000 Subject: [issue37150] Do not allow to pass FileType class object instead of instance in add_argument In-Reply-To: <1559654520.68.0.135252915467.issue37150@roundup.psfhosted.org> Message-ID: <1559695030.66.0.680752208835.issue37150@roundup.psfhosted.org> Josh Rosenberg added the comment: Ah, right. It doesn't actually validate the mode string (it just stores it for when open is called, assuming open will validate it). So yeah, it silently accepts any string, not just valid mode strings. Not a contractual guarantee or anything, just how FileType.__init__ is implemented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 20:54:41 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 05 Jun 2019 00:54:41 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559696081.56.0.338578171228.issue36839@roundup.psfhosted.org> Inada Naoki added the comment: I'm sorry, I thought "fantasy" was good metaphor. I just meant "the estimation seems too optimistic and rough. discussion should not based on it". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 21:30:53 2019 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Wed, 05 Jun 2019 01:30:53 +0000 Subject: [issue36827] Overriding __new__ method with itself changes behaviour of the class In-Reply-To: <1557229328.38.0.306180402683.issue36827@roundup.psfhosted.org> Message-ID: <1559698253.09.0.0774094806428.issue36827@roundup.psfhosted.org> Vedran ?a?i? added the comment: The point is, constructing via __new__ and initializing via __init__ are two mechanisms that aren't really orthogonal, and various heuristics are trying to guess whether the arguments you call your class with are meant for __new__ or for __init__. [Usually, immutable objects are __new__able, and mutable ones are __init__able -- and crucially, objects are usually not both. For example, list is __init__able, but tuple is __new__able.] Those heuristics assume you won't have both __init__ and __new__ implemented on your object. It mostly works if you have a hierarchy of __new__able objects, or a hierarchy of __init__able objects, but as you noticed, it usually breaks if you have an __init__able class derived from a __new__able one, or vice versa. If you're really trying for a most general solution, please note that __init__ is redundant: everything __init__ does can be done with __new__ (but not vice versa). So, you should just have a hierarchy of __new__able classes. ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 21:55:41 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jun 2019 01:55:41 +0000 Subject: [issue35763] IDLE calltips: make positional note less obtrusive In-Reply-To: <1547755288.11.0.42128686161.issue35763@roundup.psfhosted.org> Message-ID: <1559699741.14.0.765729450519.issue35763@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 949fe976d5c62ae63ed505ecf729f815d0baccfc by Terry Jan Reedy in branch 'master': bpo-35763: Make IDLE calltip note about '/' less obtrusive (GH-13791) https://github.com/python/cpython/commit/949fe976d5c62ae63ed505ecf729f815d0baccfc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 21:56:01 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Jun 2019 01:56:01 +0000 Subject: [issue35763] IDLE calltips: make positional note less obtrusive In-Reply-To: <1547755288.11.0.42128686161.issue35763@roundup.psfhosted.org> Message-ID: <1559699761.41.0.432763016265.issue35763@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13709 pull_request: https://github.com/python/cpython/pull/13830 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 21:56:09 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Jun 2019 01:56:09 +0000 Subject: [issue35763] IDLE calltips: make positional note less obtrusive In-Reply-To: <1547755288.11.0.42128686161.issue35763@roundup.psfhosted.org> Message-ID: <1559699769.73.0.478544891507.issue35763@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13710 pull_request: https://github.com/python/cpython/pull/13831 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 22:11:47 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Jun 2019 02:11:47 +0000 Subject: [issue35763] IDLE calltips: make positional note less obtrusive In-Reply-To: <1547755288.11.0.42128686161.issue35763@roundup.psfhosted.org> Message-ID: <1559700707.93.0.73119107184.issue35763@roundup.psfhosted.org> miss-islington added the comment: New changeset 39346ff60ac14bb83521c7e4f87304d0ad6478c2 by Miss Islington (bot) in branch '3.8': bpo-35763: Make IDLE calltip note about '/' less obtrusive (GH-13791) https://github.com/python/cpython/commit/39346ff60ac14bb83521c7e4f87304d0ad6478c2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 22:15:54 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Jun 2019 02:15:54 +0000 Subject: [issue35763] IDLE calltips: make positional note less obtrusive In-Reply-To: <1547755288.11.0.42128686161.issue35763@roundup.psfhosted.org> Message-ID: <1559700954.18.0.523034995791.issue35763@roundup.psfhosted.org> miss-islington added the comment: New changeset 3d75bd15ac82575967db367c517d7e6e703a6de3 by Miss Islington (bot) in branch '3.7': bpo-35763: Make IDLE calltip note about '/' less obtrusive (GH-13791) https://github.com/python/cpython/commit/3d75bd15ac82575967db367c517d7e6e703a6de3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 4 22:37:44 2019 From: report at bugs.python.org (Eryk Sun) Date: Wed, 05 Jun 2019 02:37:44 +0000 Subject: [issue37089] `import Lib.os` works on windows (but shouldn't) In-Reply-To: <1559163159.15.0.0136841146516.issue37089@roundup.psfhosted.org> Message-ID: <1559702264.85.0.148348180632.issue37089@roundup.psfhosted.org> Eryk Sun added the comment: sys.prefix is usually argv0_path, but in a virtual environment argv0_path is set from "home" in pyvenv.cfg in order to find the standard library, and, if the site module is imported, sys.prefix is set to the virtual environment directory. Since for Windows site.getsitepackages() also includes sys.prefix, and since argv0_path and sys.prefix are different in this case, sys.path ends up with both of them. AFAIK, it needs neither of them. Adding argv0_path to sys.path is a vestige of the NT installation scheme in the 1990s. The old scheme had a "Bin" directory that contained "python.exe" and I presume the Python DLL and standard-library extension modules. The old setup.py installer [1] had the following code to set the value of the "PythonPath" registry key: path = [] pwd = nt.getcwd() for i in ["Bin", "Lib", "Lib\\win", "Lib\\tkinter", "Lib\\test", "Lib\\dos_8x3"]: i = pwd + "\\" + i path.append(i) sys.path[1:] = path pathvalue = strop.join(path, ";") #print "Setting PythonPath to", pathvalue win32api.RegSetValue(corehandle, "PythonPath", win32con.REG_SZ, pathvalue) Note the presence of the "Bin" directory in the list. Early NT releases used PC/getpath_nt.c [2], which was inconsistent with Modules/getpath.c in several ways. PC/getpathp.c was added in 1997. Early on, code was added to PC/getpathp.c to include the application directory in sys.path [3] in order to "make it work on NT". This was before it supported the registry "PythonPath" value that would have included the "Bin" directory. [1] https://github.com/python/cpython/blob/8f1b6519803ffa7aef45beb58bda654533cb1fa8/PC/setup_nt/setup.py [2] https://github.com/python/cpython/blob/8f1b6519803ffa7aef45beb58bda654533cb1fa8/PC/getpath_nt.c [3] https://github.com/python/cpython/commit/8f1b6519803ffa7aef45beb58bda654533cb1fa8 ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 00:01:19 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jun 2019 04:01:19 +0000 Subject: [issue35763] IDLE calltips: make positional note less obtrusive In-Reply-To: <1547755288.11.0.42128686161.issue35763@roundup.psfhosted.org> Message-ID: <1559707279.4.0.895517125935.issue35763@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 00:38:46 2019 From: report at bugs.python.org (Grant Jenks) Date: Wed, 05 Jun 2019 04:38:46 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559709526.92.0.659971555285.issue37134@roundup.psfhosted.org> Grant Jenks added the comment: Pablo, I never intended disrespect toward you personally. And I am sorry my words came across that way. I would rather the feature be one of Python's more esoteric qualities. I think Carol has described the most reasonable way forward. And in particular, I like this creative idea: > A Sphinx extension may also be made to show a simple user-friendly view and with a click the fully accurate view. I agree too with Raymond in this point: > I don't think inclusion in 3.9 should be automatic. As anecdata: I showed the PEP and feature to an intermediate class of 15 professional software engineers today. The first question I got was, "when should I use that in my Python code?" And I think the answer is rarely. We reviewed the motivating cases in the PEP and those made sense to them. But I was left feeling concern that if it were prominent and frequent in the docs then people will be likely to imitate, not least of which through simple copy/paste, what they see there without understanding the C-API and why it is that way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 01:02:24 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 05 Jun 2019 05:02:24 +0000 Subject: [issue37157] shutil: add reflink=False to file copy functions to control clone/CoW copies (use copy_file_range) In-Reply-To: <1559684200.61.0.18008315195.issue37157@roundup.psfhosted.org> Message-ID: <1559710944.6.0.337423483032.issue37157@roundup.psfhosted.org> Giampaolo Rodola' added the comment: I'm attaching an initial PoC using FICLONE on Linux and clonefile(3) on OSX. It is also possible to support Windows but it requires a ReFS partition to test against which I currently don't have. I opted for exposing reflink() as a separate function, mostly because: - conceptually standard copy and CoW copy are 2 different things - shutil already provides a distinction between copy functions (copy(), copy2(), copyfile()) which can be used as callbacks for copytree() and move(). As such one can follow the same approach and do: >>> copytree(src, dst, copy_function=reflink). This initial patch provides a callback=None parameter in case the CoW operation fails because not supported by the underlying filesystems but this is debatable because we can get different errors depending on the platform (which is not good). As such a more generic ReflinkNotSupportedError exception is probably a better choice. ---------- keywords: +patch Added file: https://bugs.python.org/file48390/cow.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 01:06:15 2019 From: report at bugs.python.org (Ma Lin) Date: Wed, 05 Jun 2019 05:06:15 +0000 Subject: [issue21872] LZMA library sometimes fails to decompress a file In-Reply-To: <1403720935.87.0.990494824612.issue21872@psf.upfronthosting.co.za> Message-ID: <1559711175.37.0.881605958892.issue21872@roundup.psfhosted.org> Ma Lin added the comment: fix-bug.diff fixes this bug, I will submit a PR after thoroughly understanding the problem. ---------- keywords: +patch Added file: https://bugs.python.org/file48391/fix-bug.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 01:07:05 2019 From: report at bugs.python.org (Tal Einat) Date: Wed, 05 Jun 2019 05:07:05 +0000 Subject: [issue36624] cleanup the stdlib and tests with regard to sys.platform usage In-Reply-To: <1555158343.77.0.950141438455.issue36624@roundup.psfhosted.org> Message-ID: <1559711225.35.0.689442897751.issue36624@roundup.psfhosted.org> Tal Einat added the comment: Michael, your willingness to help, and the work on this issue and PR, are greatly appreciated! Reading through the discussion here again, and the one referenced by Ned, I tend to agree with the point that having *yet another* spelling for OS checking is perhaps not a good idea. The point that needing to see exactly which check is done in certain edge-cases is another good point against adding such new constants. Moreover, regardless of my opinion, there isn't a consensus and at this point I don't think there will be. Considering the above, perhaps it would be better to use only a single, "canonical" idiom throughout the tests, or at least from this point forward (to avoid a codebase-wide change)? Steve Dower said he would "prefer sys.platform to be canonical". I do suffer from having all of os.name, sys.platform and platform.system() used in various places, and it not being clear when one should be used instead of another. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 01:24:04 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 05 Jun 2019 05:24:04 +0000 Subject: [issue37158] Speed-up statistics.fmean() Message-ID: <1559712244.32.0.839962107784.issue37158@roundup.psfhosted.org> New submission from Raymond Hettinger : fmean() can be sped-up by converting count() from a function to a generator and by using enumerate() to do the counting. -- Baseline --- $ ./python.exe -m timeit -r11 -s 'from statistics import fmean' -s 'data=list(map(float, range(1000)))' 'fmean(iter(data))' 2000 loops, best of 11: 108 usec per loop -- Patched -- $ ./python.exe -m timeit -r11 -s 'from statistics import fmean' -s 'data=list(map(float, range(1000)))' 'fmean(iter(data))' 5000 loops, best of 11: 73.1 usec per loop ---------- assignee: steven.daprano components: Library (Lib) messages: 344670 nosy: rhettinger, steven.daprano priority: normal severity: normal status: open title: Speed-up statistics.fmean() type: performance versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 01:24:51 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 05 Jun 2019 05:24:51 +0000 Subject: [issue37159] Have shutil.copyfile() use copy_file_range() Message-ID: <1559712291.98.0.707685827942.issue37159@roundup.psfhosted.org> New submission from Giampaolo Rodola' : This is a follow up of issue33639 (zero-copy via sendfile()) and issue26828 (os.copy_file_range()). On [Linux 4.5 / glib 2.27] shutil.copyfile() will use os.copy_file_range() instead of os.sendfile(). According to my benchmarks performances are the same but when dealing with NFS copy_file_range() is supposed to attempt doing a server-side copy, meaning there will be no exchange of data between client and server, making the copy operation an order of magnitude faster. Before proceeding unit-tests for big-file support should be added first (issue37096). We didn't hit the 3.8 deadline but I actually prefer to land this in 3.9 as I want to experiment with it a bit (copy_file_range() is quite new, issue26828 is still a WIP). ---------- components: Library (Lib) files: patch.diff keywords: patch messages: 344671 nosy: giampaolo.rodola priority: normal severity: normal status: open title: Have shutil.copyfile() use copy_file_range() type: performance versions: Python 3.9 Added file: https://bugs.python.org/file48392/patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 01:26:14 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 05 Jun 2019 05:26:14 +0000 Subject: [issue26826] Expose new copy_file_range() syscall in os module. In-Reply-To: <1461325239.41.0.30054024313.issue26826@psf.upfronthosting.co.za> Message-ID: <1559712374.9.0.782275497976.issue26826@roundup.psfhosted.org> Giampaolo Rodola' added the comment: > Please open a new issue to discuss how it can used in shutil ;-) Use copy_file_range() in shutil.copyfile(): https://bugs.python.org/issue37159 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 01:26:32 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 05 Jun 2019 05:26:32 +0000 Subject: [issue37159] Have shutil.copyfile() use copy_file_range() In-Reply-To: <1559712291.98.0.707685827942.issue37159@roundup.psfhosted.org> Message-ID: <1559712392.55.0.219674825103.issue37159@roundup.psfhosted.org> Change by Giampaolo Rodola' : ---------- nosy: +StyXman, desbma, facundobatista, martin.panter, ncoghlan, neologix, pablogsal, petr.viktorin, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 01:29:23 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 05 Jun 2019 05:29:23 +0000 Subject: [issue37159] Use copy_file_range() in shutil.copyfile() (server-side copy) In-Reply-To: <1559712291.98.0.707685827942.issue37159@roundup.psfhosted.org> Message-ID: <1559712563.22.0.161327850707.issue37159@roundup.psfhosted.org> Change by Giampaolo Rodola' : ---------- title: Have shutil.copyfile() use copy_file_range() -> Use copy_file_range() in shutil.copyfile() (server-side copy) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 01:31:44 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 05 Jun 2019 05:31:44 +0000 Subject: [issue37158] Speed-up statistics.fmean() In-Reply-To: <1559712244.32.0.839962107784.issue37158@roundup.psfhosted.org> Message-ID: <1559712704.13.0.133310269591.issue37158@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +13711 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13832 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 01:45:57 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Jun 2019 05:45:57 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1559713557.76.0.815910367205.issue36373@roundup.psfhosted.org> miss-islington added the comment: New changeset 6d64a8f49eb321116f585c4b036c81bb976d2d5c by Miss Islington (bot) (Emmanuel Arias) in branch 'master': bpo-36373: Deprecate explicit loop parameter in all public asyncio APIs [streams] (GH-13671) https://github.com/python/cpython/commit/6d64a8f49eb321116f585c4b036c81bb976d2d5c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 01:46:20 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Jun 2019 05:46:20 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1559713580.22.0.384383072476.issue36373@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13712 pull_request: https://github.com/python/cpython/pull/13833 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 01:48:55 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 05 Jun 2019 05:48:55 +0000 Subject: [issue34767] Optimize asyncio.Lock In-Reply-To: <1537545284.93.0.956365154283.issue34767@psf.upfronthosting.co.za> Message-ID: <1559713735.17.0.755194424702.issue34767@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +13713 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13834 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 02:01:04 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Jun 2019 06:01:04 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1559714464.77.0.960507449925.issue36373@roundup.psfhosted.org> miss-islington added the comment: New changeset 8899b11b95f08e2e03478f2acad336ad5933a2d1 by Miss Islington (bot) in branch '3.8': bpo-36373: Deprecate explicit loop parameter in all public asyncio APIs [streams] (GH-13671) https://github.com/python/cpython/commit/8899b11b95f08e2e03478f2acad336ad5933a2d1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 02:09:16 2019 From: report at bugs.python.org (orlnub123) Date: Wed, 05 Jun 2019 06:09:16 +0000 Subject: [issue36827] Overriding __new__ method with itself changes behaviour of the class In-Reply-To: <1557229328.38.0.306180402683.issue36827@roundup.psfhosted.org> Message-ID: <1559714956.91.0.681558422853.issue36827@roundup.psfhosted.org> orlnub123 added the comment: The comments in object's source explain the rationale behind this: /* You may wonder why object.__new__() only complains about arguments when object.__init__() is not overridden, and vice versa. Consider the use cases: 1. When neither is overridden, we want to hear complaints about excess (i.e., any) arguments, since their presence could indicate there's a bug. 2. When defining an Immutable type, we are likely to override only __new__(), since __init__() is called too late to initialize an Immutable object. Since __new__() defines the signature for the type, it would be a pain to have to override __init__() just to stop it from complaining about excess arguments. 3. When defining a Mutable type, we are likely to override only __init__(). So here the converse reasoning applies: we don't want to have to override __new__() just to stop it from complaining. 4. When __init__() is overridden, and the subclass __init__() calls object.__init__(), the latter should complain about excess arguments; ditto for __new__(). Use cases 2 and 3 make it unattractive to unconditionally check for excess arguments. The best solution that addresses all four use cases is as follows: __init__() complains about excess arguments unless __new__() is overridden and __init__() is not overridden (IOW, if __init__() is overridden or __new__() is not overridden); symmetrically, __new__() complains about excess arguments unless __init__() is overridden and __new__() is not overridden (IOW, if __new__() is overridden or __init__() is not overridden). However, for backwards compatibility, this breaks too much code. Therefore, in 2.6, we'll *warn* about excess arguments when both methods are overridden; for all other cases we'll use the above rules. */ ---------- nosy: +orlnub123 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 02:14:37 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Jun 2019 06:14:37 +0000 Subject: [issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream In-Reply-To: <1557598514.53.0.379470651864.issue36889@roundup.psfhosted.org> Message-ID: <1559715277.0.0.387562069343.issue36889@roundup.psfhosted.org> Andrew Svetlov added the comment: Please keep it until new streams will be documented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 02:33:51 2019 From: report at bugs.python.org (Nathaniel Smith) Date: Wed, 05 Jun 2019 06:33:51 +0000 Subject: [issue37120] Provide knobs to disable session ticket generation on TLS 1.3 In-Reply-To: <1559365529.23.0.311490427939.issue37120@roundup.psfhosted.org> Message-ID: <1559716431.43.0.172380615907.issue37120@roundup.psfhosted.org> Nathaniel Smith added the comment: > Regarding your comment on client_context.num_ticket getter: IMHO it's not a good idea to raise an exception on attribute access. It may break introspection. Hmm, I see what you mean. Basically my intuition is: it's a bit weird to make the attribute's existence "sort of" depend on whether it's a client or server context. It would make sense to me to have it entirely disappear on client contexts (from __dir__, read-access, and write-access), and it would make sense to me to have it always be present, just a no-op. But having it present, and almost the same as on server contexts, except that assigning to it fails... that feels a little weird. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 02:44:27 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Jun 2019 06:44:27 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559717067.0.0.0978745635766.issue37134@roundup.psfhosted.org> Serhiy Storchaka added the comment: You need to use the PEP 570 syntax if your function/method have a var-keyword parameter, takes arbitrary keyword arguments, and has other parameters beside the var-keyword parameter ("self" counts). And of course the minimal supported Python version should be 3.8. In PR 13700 the PEP 570 syntax was added in the documentation of functions that use it in the code (like partial() and getcallargs()) and also in the examples of user code where it is needed (like LRU, Callback and Namespace). PR 13743 adds it the documentation of functions which do not accept arbitrary keywords, but take some of arguments as positional only and others as positional or keyword. It may be surprising, so I think it is better to document this explicitly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 03:14:33 2019 From: report at bugs.python.org (David Carlier) Date: Wed, 05 Jun 2019 07:14:33 +0000 Subject: [issue37160] thread native id netbsd support Message-ID: <1559718873.81.0.214455069797.issue37160@roundup.psfhosted.org> Change by David Carlier : ---------- components: Interpreter Core nosy: David Carlier priority: normal pull_requests: 13714 severity: normal status: open title: thread native id netbsd support versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 03:29:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 07:29:41 +0000 Subject: [issue37159] Use copy_file_range() in shutil.copyfile() (server-side copy) In-Reply-To: <1559712291.98.0.707685827942.issue37159@roundup.psfhosted.org> Message-ID: <1559719781.8.0.449325522943.issue37159@roundup.psfhosted.org> STINNER Victor added the comment: Oh, I already created https://bugs.python.org/issue37157 Can we move the discussion there? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 03:32:06 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 05 Jun 2019 07:32:06 +0000 Subject: [issue37159] Use copy_file_range() in shutil.copyfile() (server-side copy) In-Reply-To: <1559712291.98.0.707685827942.issue37159@roundup.psfhosted.org> Message-ID: <1559719926.77.0.744003573309.issue37159@roundup.psfhosted.org> Giampaolo Rodola' added the comment: issue37157 is for reflink / CoW copy, this one is not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 03:39:45 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Jun 2019 07:39:45 +0000 Subject: [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1559720385.55.0.532067464244.issue17576@roundup.psfhosted.org> Serhiy Storchaka added the comment: Mark, I think you can reopen the PR and merge it in 3.9 now. As for my proposition to use the FutureWarning first, I think it is not necessary. The behavior change is very subtle and will affects only int subclasses with overridden __index__. Similar changes (preferring __index__ over __int__) have been made in 3.8 without preceding FutureWarning. And similar minor changes were made in the past. On other hand, I am not sure that __index__ should be used for int subclasses. We already have the int content, so we can create an exact int with _PyLong_Copy(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 04:24:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 08:24:31 +0000 Subject: [issue36894] test_multiprocessing_spawn regression on Windows In-Reply-To: <1557680621.73.0.0423240629914.issue36894@roundup.psfhosted.org> Message-ID: <1559723071.82.0.124194809565.issue36894@roundup.psfhosted.org> STINNER Victor added the comment: I close the issue. ---------- nosy: +vstinner resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 04:27:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 08:27:39 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1559723259.29.0.675485704763.issue35537@roundup.psfhosted.org> STINNER Victor added the comment: Python 3.8 beta 1 is released with this feature. I documented the change. Thnaks everybody who was involved to make this possible. I close the issue. Open new issues for follow-up. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 04:28:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 08:28:40 +0000 Subject: [issue37138] PEP 590 method_vectorcall calls memcpy with NULL src In-Reply-To: <1559535370.56.0.947989437279.issue37138@roundup.psfhosted.org> Message-ID: <1559723320.11.0.16841623089.issue37138@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 04:32:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 08:32:19 +0000 Subject: [issue37098] test_memfd_create() test failure In-Reply-To: <1559202482.0.0.225844714186.issue37098@roundup.psfhosted.org> Message-ID: <1559723539.96.0.0608423748621.issue37098@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 04:33:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 08:33:13 +0000 Subject: [issue26836] Add memfd_create to os module In-Reply-To: <1461506163.13.0.0180353008827.issue26836@psf.upfronthosting.co.za> Message-ID: <1559723593.25.0.243468637795.issue26836@roundup.psfhosted.org> STINNER Victor added the comment: It seems like this issue can now be closed, no? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 04:46:01 2019 From: report at bugs.python.org (Christian Heimes) Date: Wed, 05 Jun 2019 08:46:01 +0000 Subject: [issue26836] Add memfd_create to os module In-Reply-To: <1461506163.13.0.0180353008827.issue26836@psf.upfronthosting.co.za> Message-ID: <1559724361.1.0.125566181573.issue26836@roundup.psfhosted.org> Christian Heimes added the comment: Yes, the feature is implemented and buildbots are green. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 04:58:01 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Jun 2019 08:58:01 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1559725081.99.0.151400367792.issue34037@roundup.psfhosted.org> Andrew Svetlov added the comment: I prefer postponing to think about it until all required 3.8 tasks are done :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 05:30:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 09:30:35 +0000 Subject: [issue37154] test_utf8_mode: test_env_var() fails on AMD64 Fedora Rawhide Clang Installed 3.7 In-Reply-To: <1559667302.55.0.345195224781.issue37154@roundup.psfhosted.org> Message-ID: <1559727035.62.0.940653404219.issue37154@roundup.psfhosted.org> STINNER Victor added the comment: The locales disappeared from this buildbot because of a recent glibc change and it's a glibc bug (it's being fixed). https://bugzilla.redhat.com/show_bug.cgi?id=1716710 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 05:31:05 2019 From: report at bugs.python.org (daniel hahler) Date: Wed, 05 Jun 2019 09:31:05 +0000 Subject: [issue37011] pdb: restore original tracing function instead of sys.settrace(None) In-Reply-To: <1558529084.78.0.178705379805.issue37011@roundup.psfhosted.org> Message-ID: <1559727065.78.0.982396519935.issue37011@roundup.psfhosted.org> daniel hahler added the comment: Just for reference: I've just spent quite some time debugging missing coverage with pytest, and it turned out that part of it is because of this issue. Most of the pdb related tests run in a subprocess (via pexpect), but not all of them. I am using a wrapper now to restore this manually (https://github.com/pytest-dev/pytest/pull/5406). Even though I was aware of this issue, it took me quite a while, mainly because this started out with slash related issues for Windows only, and I was debugging this on/via CI only at first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 05:32:12 2019 From: report at bugs.python.org (Florian Weimer) Date: Wed, 05 Jun 2019 09:32:12 +0000 Subject: [issue37154] test_utf8_mode: test_env_var() fails on AMD64 Fedora Rawhide Clang Installed 3.7 In-Reply-To: <1559667302.55.0.345195224781.issue37154@roundup.psfhosted.org> Message-ID: <1559727132.03.0.48020356907.issue37154@roundup.psfhosted.org> Florian Weimer added the comment: Just to be clear: glibc-all-langpacks normally contains the data from glibc-langpack-en, but a packaging bug caused removal of the /usr/lib/locale/locale-archive file during upgrades. This only applies to upgrades. New installations are fine. Details here: https://bugzilla.redhat.com/show_bug.cgi?id=1716710 ---------- nosy: +fweimer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 05:33:29 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Jun 2019 09:33:29 +0000 Subject: [issue34767] Optimize asyncio.Lock In-Reply-To: <1537545284.93.0.956365154283.issue34767@psf.upfronthosting.co.za> Message-ID: <1559727209.85.0.89520126495.issue34767@roundup.psfhosted.org> miss-islington added the comment: New changeset 9aa78566fbeeb8cdaa669ad22f92cf63765f4135 by Miss Islington (bot) (Zackery Spytz) in branch 'master': bpo-34767: Do not always create a collections.deque() in asyncio.Lock() (GH-13834) https://github.com/python/cpython/commit/9aa78566fbeeb8cdaa669ad22f92cf63765f4135 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 05:33:51 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Jun 2019 09:33:51 +0000 Subject: [issue34767] Optimize asyncio.Lock In-Reply-To: <1537545284.93.0.956365154283.issue34767@psf.upfronthosting.co.za> Message-ID: <1559727231.46.0.551833260941.issue34767@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13715 pull_request: https://github.com/python/cpython/pull/13837 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 05:38:25 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 05 Jun 2019 09:38:25 +0000 Subject: [issue34767] Optimize asyncio.Lock In-Reply-To: <1537545284.93.0.956365154283.issue34767@psf.upfronthosting.co.za> Message-ID: <1559727505.23.0.205317852098.issue34767@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 05:46:58 2019 From: report at bugs.python.org (Dobatymo) Date: Wed, 05 Jun 2019 09:46:58 +0000 Subject: [issue37005] bz2 module doesn't write end-of-stream marker In-Reply-To: <1558496168.36.0.56962236665.issue37005@roundup.psfhosted.org> Message-ID: <1559728018.26.0.71120494402.issue37005@roundup.psfhosted.org> Change by Dobatymo : ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 05:53:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 09:53:20 +0000 Subject: [issue37159] Use copy_file_range() in shutil.copyfile() (server-side copy) In-Reply-To: <1559712291.98.0.707685827942.issue37159@roundup.psfhosted.org> Message-ID: <1559728400.08.0.852534631504.issue37159@roundup.psfhosted.org> STINNER Victor added the comment: > issue37157 is for reflink / CoW copy, this one is not. Oh sorry, it seems like I misunderstood copy_file_range(). So it doesn't use/support CoW? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 06:00:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 10:00:25 +0000 Subject: [issue37157] shutil: add reflink=False to file copy functions to control clone/CoW copies (use copy_file_range) In-Reply-To: <1559684200.61.0.18008315195.issue37157@roundup.psfhosted.org> Message-ID: <1559728825.05.0.0727633791363.issue37157@roundup.psfhosted.org> STINNER Victor added the comment: cow.diff: I'm not sure that attempt to call unlink() if FICLONE fails is a good idea. unlink() can raise a new exception which can be confusing. IMHO it's up to the caller to deal with that. Said differently, I dislike the *fallback* parameter of reflink(). Why not exposing clonefile() as os.clonefile() but os._clonefile()? +#if defined(MAC_OS_X_VERSION_10_12) +#include +#define HAVE_CLONEFILE +#endif Is Python compiled to target macOS 10.12 and newer? Mac/BuildScript/build-installer.py contains: # $MACOSX_DEPLOYMENT_TARGET -> minimum OS X level DEPTARGET = '10.5' But I don't know well macOS. "#if defined(MAC_OS_X_VERSION_10_12)" is a check at build time. Does it depend on DEPTARGET? Would it be possible to use a runtime check? You might open a dedicated issue to expose clonefile() since it seems like every tiny detail of this issue is very subtle and should be properly discussed ;-) (I like the idea of exposing native functions like clonefile() directly in the os module!) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 06:04:13 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 05 Jun 2019 10:04:13 +0000 Subject: [issue37159] Use copy_file_range() in shutil.copyfile() (server-side copy) In-Reply-To: <1559712291.98.0.707685827942.issue37159@roundup.psfhosted.org> Message-ID: <1559729053.9.0.676188238738.issue37159@roundup.psfhosted.org> Giampaolo Rodola' added the comment: Nope, it doesn't (see man page). We can simply use FICLONE (cp does the same). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 06:10:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 10:10:06 +0000 Subject: [issue37157] shutil: add reflink=False to file copy functions to control clone/CoW copies (use copy_file_range) In-Reply-To: <1559684200.61.0.18008315195.issue37157@roundup.psfhosted.org> Message-ID: <1559729406.28.0.429231954818.issue37157@roundup.psfhosted.org> STINNER Victor added the comment: > This initial patch provides a callback=None parameter in case the CoW operation fails because not supported by the underlying filesystems but this is debatable because we can get different errors depending on the platform (which is not good). As such a more generic ReflinkNotSupportedError exception is probably a better choice. (Oh, my laptop only uses btrfs. Hum, I created a loop device to test an ext4 partition :-)) On an ext4 partition, cp --reflink simply fails with an error: it doesn't fallback on a regular copy. vstinner at apu$ dd if=/dev/urandom of=urandom bs=1k count=1k 1024+0 records in 1024+0 records out 1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0123142 s, 85.2 MB/s vstinner at apu$ cp --reflink urandom urandom2 'urandom' -> 'urandom2' cp: failed to clone 'urandom2' from 'urandom': Operation not supported vstinner at apu$ file urandom2 urandom2: empty vstinner at apu$ stat urandom2 File: urandom2 Size: 0 Blocks: 2 IO Block: 1024 regular empty file Device: 700h/1792d Inode: 13 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 1000/vstinner) Gid: ( 1000/vstinner) Context: unconfined_u:object_r:unlabeled_t:s0 Access: 2019-06-05 12:08:23.000000000 +0200 Modify: 2019-06-05 12:08:23.000000000 +0200 Change: 2019-06-05 12:08:23.000000000 +0200 Birth: - Not only it fails, but it leaves an empty file. I suggest to mimick the Linux cp command: don't automatically fallback (there are too many error conditions, too many risks of raising a new error while handling the previous error) and don't try to remove the created empty file if reflink() fails. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 06:17:50 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Jun 2019 10:17:50 +0000 Subject: [issue34767] Optimize asyncio.Lock In-Reply-To: <1537545284.93.0.956365154283.issue34767@psf.upfronthosting.co.za> Message-ID: <1559729870.7.0.612199647077.issue34767@roundup.psfhosted.org> miss-islington added the comment: New changeset 87a865ec15fa899a1f12be81f41a4c5e649a2833 by Miss Islington (bot) in branch '3.8': bpo-34767: Do not always create a collections.deque() in asyncio.Lock() (GH-13834) https://github.com/python/cpython/commit/87a865ec15fa899a1f12be81f41a4c5e649a2833 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 06:18:33 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Jun 2019 10:18:33 +0000 Subject: [issue34767] Optimize asyncio.Lock In-Reply-To: <1537545284.93.0.956365154283.issue34767@psf.upfronthosting.co.za> Message-ID: <1559729913.18.0.192320635177.issue34767@roundup.psfhosted.org> Andrew Svetlov added the comment: Thanks, Zackery! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 06:19:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 10:19:25 +0000 Subject: [issue26836] Add memfd_create to os module In-Reply-To: <1461506163.13.0.0180353008827.issue26836@psf.upfronthosting.co.za> Message-ID: <1559729965.86.0.569763499176.issue26836@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13716 pull_request: https://github.com/python/cpython/pull/13838 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 06:22:17 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 05 Jun 2019 10:22:17 +0000 Subject: [issue37157] shutil: add reflink=False to file copy functions to control clone/CoW copies (use copy_file_range) In-Reply-To: <1559684200.61.0.18008315195.issue37157@roundup.psfhosted.org> Message-ID: <1559730137.72.0.105038405171.issue37157@roundup.psfhosted.org> Giampaolo Rodola' added the comment: > I'm not sure that attempt to call unlink() if FICLONE fails is a good idea Agreed. > I dislike the *fallback* parameter of reflink(). Me too. A specific exception is better. > Why not exposing clonefile() as os.clonefile() but os._clonefile()? Mmm... I'm not sure it's worth it. The only reason one may want to use clonefile() directly is for passing CLONE_NOFOLLOW and CLONE_NOOWNERCOPY flags (the only possible ones): - CLONE_NOFOLLOW can be exposed via "follow_symlinks=True" (like other shutil.* functions) and used internally - CLONE_NOOWNERCOPY should also be passed internally by default because all other functions of shutil do not copy ownership (there's a warning at the top of the doc), so I think it makes sense for reflink() to do the same. > +#if defined(MAC_OS_X_VERSION_10_12): Would it be possible to use a runtime check? Good point. It should definitively be loaded at runtime. I will look into that (but not soon). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 06:23:41 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Jun 2019 10:23:41 +0000 Subject: [issue30835] AttributeError when parsing multipart email with invalid non-decodable Content-Transfer-Encoding In-Reply-To: <1499089023.06.0.76757916564.issue30835@psf.upfronthosting.co.za> Message-ID: <1559730221.78.0.520422289001.issue30835@roundup.psfhosted.org> miss-islington added the comment: New changeset f62a372928fbf6a2ba722f12f069b75ca6ad16fb by Miss Islington (bot) in branch '3.7': bpo-30835: email: Fix AttributeError when parsing invalid CTE (GH-13598) https://github.com/python/cpython/commit/f62a372928fbf6a2ba722f12f069b75ca6ad16fb ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 06:24:55 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Jun 2019 10:24:55 +0000 Subject: [issue26836] Add memfd_create to os module In-Reply-To: <1461506163.13.0.0180353008827.issue26836@psf.upfronthosting.co.za> Message-ID: <1559730295.68.0.447481341943.issue26836@roundup.psfhosted.org> miss-islington added the comment: New changeset ccf0efbb21f6bbf6efd5f8cb560fed11079ce1a2 by Miss Islington (bot) (Victor Stinner) in branch 'master': bpo-26836: Document os.memfd_create() name parameter (GH-13838) https://github.com/python/cpython/commit/ccf0efbb21f6bbf6efd5f8cb560fed11079ce1a2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 06:25:22 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Jun 2019 10:25:22 +0000 Subject: [issue26836] Add memfd_create to os module In-Reply-To: <1461506163.13.0.0180353008827.issue26836@psf.upfronthosting.co.za> Message-ID: <1559730322.34.0.00772949155807.issue26836@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13717 pull_request: https://github.com/python/cpython/pull/13839 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 06:31:04 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Jun 2019 10:31:04 +0000 Subject: [issue37034] Argument Clinic omits name of keyword-only parameter on _PyArg_BadArgument() call In-Reply-To: <1558693785.23.0.512986851321.issue37034@roundup.psfhosted.org> Message-ID: <1559730664.6.0.285161539248.issue37034@roundup.psfhosted.org> Serhiy Storchaka added the comment: This is a bug. I intentionally committed the simpler code, but forgot to fix it later. ---------- type: -> behavior versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 06:40:49 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 05 Jun 2019 10:40:49 +0000 Subject: [issue37161] Pre-populate user editable text in input() Message-ID: <1559731249.86.0.916028878199.issue37161@roundup.psfhosted.org> New submission from Steven D'Aprano : When asking for user input, it is often very helpful to be able to pre-populate the user's input string and allow them to edit it, rather than expecting them to re-type the input from scratch. I propose that the input() built-in take a second optional argument, defaulting to the empty string. The first argument remains the prompt, the second argument is the initial value of the editable text. Example use-case: pathname = "~/Documents/untitled.txt" pathname = input("Save the file as...? ", pathname) On POSIX systems, this can be done with readline: import readline def myinput(prompt, initial=''): readline.set_startup_hook(lambda: readline.insert_text(initial)) try: response = input(prompt) finally: readline.set_startup_hook(None) return response but it requires readline (doesn't exist on Windows), and it clobbers any pre-existing startup hook the caller may have already installed. ---------- messages: 344701 nosy: steven.daprano priority: normal severity: normal status: open title: Pre-populate user editable text in input() type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 06:45:13 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 05 Jun 2019 10:45:13 +0000 Subject: [issue37157] shutil: add reflink=False to file copy functions to control clone/CoW copies (use copy_file_range) In-Reply-To: <1559684200.61.0.18008315195.issue37157@roundup.psfhosted.org> Message-ID: <1559731513.77.0.286993975828.issue37157@roundup.psfhosted.org> Giampaolo Rodola' added the comment: Adding a new patch (still a PoC, will create a PR when I have something more solid). ---------- Added file: https://bugs.python.org/file48393/cow2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 06:55:09 2019 From: report at bugs.python.org (Matthias Klose) Date: Wed, 05 Jun 2019 10:55:09 +0000 Subject: [issue37162] new importlib dependencies csv, email and zipfile Message-ID: <1559732109.6.0.0655643851833.issue37162@roundup.psfhosted.org> New submission from Matthias Klose : compared to 3.8 alpha4, beta1's importlib has three new dependencies csv, email and zipfile. Is this intended, or should the toplevel imports in importlib.metadata be moved into the functions where these are once used? ---------- components: Library (Lib) messages: 344703 nosy: brett.cannon, doko, eric.snow, ncoghlan priority: normal severity: normal status: open title: new importlib dependencies csv, email and zipfile versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 07:13:04 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Jun 2019 11:13:04 +0000 Subject: [issue37163] dataclasses.replace() fails with the field named "obj" Message-ID: <1559733184.92.0.103225044701.issue37163@roundup.psfhosted.org> New submission from Serhiy Storchaka : >>> from dataclasses import * >>> @dataclass ... class D: ... obj: object ... >>> replace(D(123), obj='abc') Traceback (most recent call last): File "", line 1, in TypeError: replace() got multiple values for argument 'obj' ---------- components: Library (Lib) messages: 344704 nosy: eric.smith, serhiy.storchaka priority: normal severity: normal status: open title: dataclasses.replace() fails with the field named "obj" type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 07:16:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 11:16:04 +0000 Subject: [issue26836] Add memfd_create to os module In-Reply-To: <1461506163.13.0.0180353008827.issue26836@psf.upfronthosting.co.za> Message-ID: <1559733364.05.0.673840646174.issue26836@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b496c2672131ea51a55b5a414aeda271562f18d3 by Victor Stinner (Miss Islington (bot)) in branch '3.8': bpo-26836: Document os.memfd_create() name parameter (GH-13838) (GH-13839) https://github.com/python/cpython/commit/b496c2672131ea51a55b5a414aeda271562f18d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 07:18:12 2019 From: report at bugs.python.org (Michael Felt) Date: Wed, 05 Jun 2019 11:18:12 +0000 Subject: [issue36624] cleanup the stdlib and tests with regard to sys.platform usage In-Reply-To: <1559711225.35.0.689442897751.issue36624@roundup.psfhosted.org> Message-ID: Michael Felt added the comment: On 05/06/2019 07:07, Tal Einat wrote: > Tal Einat added the comment: > > Michael, your willingness to help, and the work on this issue and PR, are greatly appreciated! > > Reading through the discussion here again, and the one referenced by Ned, I tend to agree with the point that having *yet another* spelling for OS checking is perhaps not a good idea. The point that needing to see exactly which check is done in certain edge-cases is another good point against adding such new constants. Moreover, regardless of my opinion, there isn't a consensus and at this point I don't think there will be. > > Considering the above, perhaps it would be better to use only a single, "canonical" idiom throughout the tests, or at least from this point forward (to avoid a codebase-wide change)? Steve Dower said he would "prefer sys.platform to be canonical". > > I do suffer from having all of os.name, sys.platform and platform.system() used in various places, and it not being clear when one should be used instead of another. >From experience, for AIX, and I think also for windows, not sure about darwin, oops - macos (or is that macOS) the confusion I faced was that sys.platform returns the value the system was built on, not what it is running on. If I was an application developer I would be more interested in the platform it is running on. "Lucky me!" - starting with Python3.8 sys.platform will say "aix" rather than aixX. Likely there could have been differences between aix3 and aix4 (e.g., the kernel changed from "static" to "dynamic" driver extensions) that might have influenced Python - but not since AIX5 - and AIX "binary compatibility" assurances when using shared libraries (from IBM, e.g. libc). More to the point - we all suffer - and some kind of direction is needed. Beyond my pay grade - so I'll accept whatever is decided (even if that is indecesion). As I said before - "lucky me", the core is "resolved" for AIX (platform.system() == 'AIX', and sys.platform == 'aix') - just as it is for "linux". This remains 'not resolved' for many other platforms. Further, imho - having it defined as a "constant" is not "yet another spelling". Instead, it moves us towards a "canonical" idiom. I have said before, and I'll say again - I am willing to do the manual backport, learn more about git as I do so (;P) - and I'll even "maintain" this, should this be any additional "help" is working towards a canonical/uniform (or should I say PEP) to establish the RUNNING platform. Regards, Michael > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 07:20:18 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 05 Jun 2019 11:20:18 +0000 Subject: [issue37162] new importlib dependencies csv, email and zipfile In-Reply-To: <1559732109.6.0.0655643851833.issue37162@roundup.psfhosted.org> Message-ID: <1559733618.53.0.133612225716.issue37162@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +barry, jaraco _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 07:21:59 2019 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 05 Jun 2019 11:21:59 +0000 Subject: [issue37163] dataclasses.replace() fails with the field named "obj" In-Reply-To: <1559733184.92.0.103225044701.issue37163@roundup.psfhosted.org> Message-ID: <1559733719.91.0.342346458088.issue37163@roundup.psfhosted.org> Eric V. Smith added the comment: Possibly a use for positional-only parameters. Backward compatibility is the question, of course. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 07:54:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 11:54:27 +0000 Subject: [issue37034] Argument Clinic omits name of keyword-only parameter on _PyArg_BadArgument() call In-Reply-To: <1558693785.23.0.512986851321.issue37034@roundup.psfhosted.org> Message-ID: <1559735667.22.0.691573568599.issue37034@roundup.psfhosted.org> STINNER Victor added the comment: > This is a bug. I intentionally committed the simpler code, but forgot to fix it later. I suggest to also apply the fix to 3.8 in that case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 07:58:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 11:58:37 +0000 Subject: [issue37157] shutil: add reflink=False to file copy functions to control clone/CoW copies (use copy_file_range) In-Reply-To: <1559684200.61.0.18008315195.issue37157@roundup.psfhosted.org> Message-ID: <1559735917.61.0.464346525501.issue37157@roundup.psfhosted.org> STINNER Victor added the comment: I'm curious: is it possible to query the filesystem to check if a copied is copied using CoW? I guess that it's possible, it will be non portable. So I guess that it's better to avoid checking that in unit tests. vstinner at apu$ dd if=/dev/urandom of=urandom bs=1k count=1k 1024+0 records in 1024+0 records out 1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0309671 s, 33.9 MB/s vstinner at apu$ cp --reflink urandom urandom2 'urandom' -> 'urandom2' vstinner at apu$ stat urandom File: urandom Size: 1048576 Blocks: 2048 IO Block: 4096 regular file Device: 31h/49d Inode: 16265363 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 1000/vstinner) Gid: ( 1000/vstinner) Context: unconfined_u:object_r:user_home_t:s0 Access: 2019-06-05 13:56:21.381196972 +0200 Modify: 2019-06-05 13:56:21.412197007 +0200 Change: 2019-06-05 13:56:21.412197007 +0200 Birth: 2019-06-05 13:56:21.381196972 +0200 vstinner at apu$ stat urandom2 File: urandom2 Size: 1048576 Blocks: 2048 IO Block: 4096 regular file Device: 31h/49d Inode: 16265364 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 1000/vstinner) Gid: ( 1000/vstinner) Context: unconfined_u:object_r:user_home_t:s0 Access: 2019-06-05 13:56:24.487200453 +0200 Modify: 2019-06-05 13:56:24.496200463 +0200 Change: 2019-06-05 13:56:24.496200463 +0200 Birth: 2019-06-05 13:56:24.487200453 +0200 Using stat command line tool, I don't see anything obvious saying that the two files share the same data on disk. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 08:01:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 12:01:39 +0000 Subject: [issue36624] cleanup the stdlib and tests with regard to sys.platform usage In-Reply-To: <1555158343.77.0.950141438455.issue36624@roundup.psfhosted.org> Message-ID: <1559736099.26.0.615413044679.issue36624@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 08:05:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 12:05:25 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1559736325.78.0.840350829652.issue33725@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13718 pull_request: https://github.com/python/cpython/pull/13841 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 08:05:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 12:05:53 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1559736353.92.0.615417429694.issue33725@roundup.psfhosted.org> STINNER Victor added the comment: > Thanks Victor. I don?t think ?reliable? is strong enough, since this will definitely lead to core dumps under certain conditions. What about: (...) That sounds better: I wrote PR 13841. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 08:07:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 12:07:33 +0000 Subject: [issue36935] bpo-35813 introduced usage of the deprecated PyErr_SetFromWindowsErrWithUnicodeFilename() function In-Reply-To: <1557983600.93.0.891686339403.issue36935@roundup.psfhosted.org> Message-ID: <1559736453.07.0.0886761881224.issue36935@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 08:08:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 12:08:54 +0000 Subject: [issue22117] Rewrite pytime.h to work on nanoseconds In-Reply-To: <1406848093.52.0.5184372094.issue22117@psf.upfronthosting.co.za> Message-ID: <1559736534.09.0.183930249899.issue22117@roundup.psfhosted.org> STINNER Victor added the comment: @Jeroen Demeyer: Both mentionned PRs are merged, so I understand that you found your answer. Commenting closed issues is not the most efficient way to get an answer ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 08:19:39 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 05 Jun 2019 12:19:39 +0000 Subject: [issue22117] Rewrite pytime.h to work on nanoseconds In-Reply-To: <1406848093.52.0.5184372094.issue22117@psf.upfronthosting.co.za> Message-ID: <1559737179.31.0.0277823142294.issue22117@roundup.psfhosted.org> Jeroen Demeyer added the comment: > Commenting closed issues is not the most efficient way to get an answer ;-) Serious question: why is that? I got an email from bugs.python.org with your comment, so why should commenting on closed issues be any worse than commenting on open issues? Especially if the people on the issue are still active core developers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 08:41:40 2019 From: report at bugs.python.org (Andrei Zene) Date: Wed, 05 Jun 2019 12:41:40 +0000 Subject: [issue28708] Low FD_SETSIZE limit on Windows In-Reply-To: <1479250358.07.0.768722440644.issue28708@psf.upfronthosting.co.za> Message-ID: <1559738500.35.0.551074724581.issue28708@roundup.psfhosted.org> Change by Andrei Zene : ---------- keywords: +patch pull_requests: +13719 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13842 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 08:42:00 2019 From: report at bugs.python.org (Andrei Zene) Date: Wed, 05 Jun 2019 12:42:00 +0000 Subject: [issue28708] Low FD_SETSIZE limit on Windows In-Reply-To: <1479250358.07.0.768722440644.issue28708@psf.upfronthosting.co.za> Message-ID: <1559738520.78.0.211268208271.issue28708@roundup.psfhosted.org> Andrei Zene added the comment: We would also need this limit to be raised. We are using a server that was implemented using tornado, and tornado uses select.select. > It looks like Modules/selectmodule.c already has the handling for when this gets large (and we really want to stop allocating the static array on the stack), which is a plus, but I'd want to see the performance cost to small selects if suddenly we're allocating 100s of KB on the heap rather than small and cheap stack allocations. I gave this a try. The code I used for the server and the client for taken from this page: https://steelkiwi.com/blog/working-tcp-sockets/. I just added some code to measure the time it stays in the "select" call. To measure the time I used time.process_time(). I then connected/disconnected only 1 client 10.000 times in a row, discarding the measurements of the first 1000 iterations (warm-up). Here are the results: FD_SETSIZE = 16384 bytes Time elapsed (avg ns): 20029.566224207087 Time elapsed (max ns): 15625000 Time elapsed (min ns): 0 FD_SETSIZE = 512 bytes Time elapsed (avg ns): 14671.361502347418 Time elapsed (max ns): 15625000 Time elapsed (min ns): 0 > However, I see no reason why this couldn't be totally dynamic, at least on Windows. Redefining that value just changes a static array definition, but the array size never gets passed in to the OS AFAICT, so there's no reason we couldn't stack allocate for small select()s and heap allocate for big select()s. That's considerably more work than anyone had in mind, I'd wager. I'm not sure this can be totally dynamic on Windows. The problem is the fd_set struct which is defined in Winsock2.h typedef struct fd_set { u_int fd_count; /* how many are SET? */ SOCKET fd_array[FD_SETSIZE]; /* an array of SOCKETs */ } fd_set; The heap-allocated pylists are converted into fd_set structs which are always allocated on the stack btw. The problem is there's no way to create a fd_set of a desired FD_SETSIZE at runtime. I have also submitted a PR with the change for convenience: https://github.com/python/cpython/pull/13842. ---------- nosy: +andzn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 08:42:33 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 05 Jun 2019 12:42:33 +0000 Subject: [issue36675] Doctest directives and comments missing from code samples In-Reply-To: <1555757030.56.0.8094269644.issue36675@roundup.psfhosted.org> Message-ID: <1559738553.4.0.370627563313.issue36675@roundup.psfhosted.org> Cheryl Sabella added the comment: ;tldr; There is a global configuration flag to show all the doctest directives for all the docs that are built. The default is to suppress the doctest directives. If a global setting isn't desired, then each doctest example will have to be changed individually. I've looked at the Sphinx documentation for this and there are a few points to reference. * `::` defines a Literal block in reST. [1] A literal block doesn't do anything special except from the last paragraph is this section of the docs: "Code highlighting can be enabled for these literal blocks on a document-wide basis using the `highlight` directive and on a project-wide basis using the `highlight_language` configuration option. The code-block directive can be used to set highlighting on a block-by-block basis. These directives are discussed later." CPython has the `highlight-language` set to python3. * A doctest block does not need to be in a Literal Block. [2] They are identified automatically. [3] According to the doc, doctest directives are suppressed from presentation: Also, you can give inline doctest options, like in doctest: >>> datetime.date.now() # doctest: +SKIP datetime.date(2008, 1, 1) They will be respected when the test is run, but stripped from presentation output. * Any section (doesn't need the single colon (`:`) can have the `code-block` directive on it. [4] The `code-block` directive can define the language for highlighting. Note that in the Sphinx doctest [4] documentation, there is a config option `trim_doctest_flags`, which is True by default. Setting this to False will show all the doctest directives for all the doctests in the documentation. The nice thing about the doc build recognizing a section as a doctest is that it adds the toggle in the upper right of the block to 'Hide the toggle and output' so that the example can be copy and pasted more easily. Changing it into something other than a doctest (like using a `code-block` directive, takes away this option. Using `trim_doctest_flags=False` retains the hide button. Options: 1. Change global setting to false to show all doctest directives. 2. Change only the blocks where the doctest directives need to be shown, but this makes them lose the 'Hide prompt and output' button. 3. Add a new option under 'code-block' to control the displaying of the doctest directives at the code-block level. This would override the global setting. I think this option could be added locally, but may need to be done upstream in Sphinx. [1] http://www.sphinx-doc.org/en/stable/usage/restructuredtext/basics.html#literal-blocks [2] http://www.sphinx-doc.org/en/stable/usage/restructuredtext/basics.html#doctest-blocks [3] http://www.sphinx-doc.org/en/stable/usage/extensions/doctest.html [4] http://www.sphinx-doc.org/en/stable/usage/restructuredtext/directives.html#showing-code-examples ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 08:44:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 12:44:38 +0000 Subject: [issue28708] Low FD_SETSIZE limit on Windows In-Reply-To: <1479250358.07.0.768722440644.issue28708@psf.upfronthosting.co.za> Message-ID: <1559738678.12.0.594760166342.issue28708@roundup.psfhosted.org> STINNER Victor added the comment: Would it be possible to make FD_SETSIZE configurable at runtime, at least on Windows? IMHO it would be a better approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 08:53:53 2019 From: report at bugs.python.org (Andrei Zene) Date: Wed, 05 Jun 2019 12:53:53 +0000 Subject: [issue28708] Low FD_SETSIZE limit on Windows In-Reply-To: <1479250358.07.0.768722440644.issue28708@psf.upfronthosting.co.za> Message-ID: <1559739233.13.0.969823738901.issue28708@roundup.psfhosted.org> Andrei Zene added the comment: > Would it be possible to make FD_SETSIZE configurable at runtime, at least on Windows? IMHO it would be a better approach. That would be awesome, but it doesn't look like it would be possible. As I have already pointed out in my previous comment: > I'm not sure this can be totally dynamic on Windows. The problem is the fd_set struct which is defined in Winsock2.h > > typedef struct fd_set { > u_int fd_count; /* how many are SET? */ > SOCKET fd_array[FD_SETSIZE]; /* an array of SOCKETs */ > } fd_set; > > The heap-allocated pylists are converted into fd_set structs which are always allocated on the stack btw. The problem is there's no way to create a fd_set of a desired FD_SETSIZE at runtime. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 09:14:00 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Jun 2019 13:14:00 +0000 Subject: [issue22117] Rewrite pytime.h to work on nanoseconds In-Reply-To: <1406848093.52.0.5184372094.issue22117@psf.upfronthosting.co.za> Message-ID: <1559740440.32.0.223322065547.issue22117@roundup.psfhosted.org> Serhiy Storchaka added the comment: Because this reduces the number of people which can notice your comment. Active core developers receive too much messages. Currently I have 473 unread messages from b.p.o (out of 22425) and 299 unread messages from GitHub (out of 20476). And this is only for open and recently closed issues (messages for closed issues are manually moved to other folders). There are also separate folders for other projects, mailing lists, etc. It is not surprising if I miss some messages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 09:18:48 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 05 Jun 2019 13:18:48 +0000 Subject: [issue22117] Rewrite pytime.h to work on nanoseconds In-Reply-To: <1406848093.52.0.5184372094.issue22117@psf.upfronthosting.co.za> Message-ID: <1559740728.47.0.848950875142.issue22117@roundup.psfhosted.org> Jeroen Demeyer added the comment: Right, but my question was very specifically about a test added for this issue. So asking it here first made sense to me. If nobody would reply, I could still ask somewhere else. In the end, Petr solved the problem anyway, so the question is irrelevant now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 09:19:44 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 05 Jun 2019 13:19:44 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1559740784.84.0.097752741837.issue37149@roundup.psfhosted.org> Cheryl Sabella added the comment: This reference was hosted at a university called New Mexico Tech. I've been trying to determine if this server is just offline or if it's being sunsetted. Many google search results still point to infohost.mnt.edu or redirect to that page (not just the tkinter link). Also, their main webpage (www.nmt.edu) also has a search that redirects results to infohost, so those links are all broken as well. It seems to me that they just haven't stood up the new site yet or else they haven't changed their redirect, so I would assume that once they find they have broken links, they will fix this. However, I also found an article that the creator of the tkinter docs has passed away [1]. If the infohost subdomain was his, then they might be moving all of it. Anyway, I think we should leave the docs as they are for now with the hope they the university will fix the redirect. If it doesn't get resolved, then we probably need to reach out to them. Since the author is deceased, I'm not sure how it would work to try to host it somewhere else. It would be a shame to lose this valuable reference and work. [1] https://www.nmt.edu/news/2019/nmt_dedicates_shipman_plaque.php ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 09:32:12 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Jun 2019 13:32:12 +0000 Subject: [issue28708] Low FD_SETSIZE limit on Windows In-Reply-To: <1479250358.07.0.768722440644.issue28708@psf.upfronthosting.co.za> Message-ID: <1559741532.55.0.236745660472.issue28708@roundup.psfhosted.org> Andrew Svetlov added the comment: I believe the number still can be configurable but requires more work. The idea is: FD_* macroses should be replaced with custom fd_set manipulation functions. on select.select() call we can calculate the number of the highest used socket and use this number plus 1 as fd_set structure size. Did not try to prototype it though. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 09:33:32 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 05 Jun 2019 13:33:32 +0000 Subject: [issue36624] cleanup the stdlib and tests with regard to sys.platform usage In-Reply-To: <1555158343.77.0.950141438455.issue36624@roundup.psfhosted.org> Message-ID: <1559741612.32.0.813817348938.issue36624@roundup.psfhosted.org> Steve Dower added the comment: The reason I'd prefer sys.platform in most cases is because it's a compile-time constant, based on the one that includes/excludes APIs near completely, and most of our tests ought to be switching on these. I personally don't see any need to switch on os.name, except perhaps in the tests for that module. But if we start skipping tests based on platform(), then we will miss out on seeing new failures on new platforms. This is a real concern, as I have colleagues currently adding Windows on ARM and ARM64 support, and since the API is the same we expect everything to work. It doesn't, of course, but that's what specific exclusions are for. If I were to propose a consistent scheme for this, I'd suggest: * include tests based on sys.platform * skip tests based on platform module So if some functionality only exists when MS_WINDOWS was defined, we check sys.platform == win32. But if it doesn't work on ARM, we check platform.platform == (whatever the value is). That way, adding new platforms will get the maximum amount of tests initially. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 09:38:07 2019 From: report at bugs.python.org (Ernest W. Durbin III) Date: Wed, 05 Jun 2019 13:38:07 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1559741887.89.0.573334822641.issue2771@roundup.psfhosted.org> Ernest W. Durbin III added the comment: test comment ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 09:47:43 2019 From: report at bugs.python.org (Ernest W. Durbin III) Date: Wed, 05 Jun 2019 13:47:43 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1559742463.04.0.336254695384.issue2771@roundup.psfhosted.org> Ernest W. Durbin III added the comment: test comment ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 10:09:46 2019 From: report at bugs.python.org (Demid) Date: Wed, 05 Jun 2019 14:09:46 +0000 Subject: [issue37150] Do not allow to pass FileType class object instead of instance in add_argument In-Reply-To: <1559695030.66.0.680752208835.issue37150@roundup.psfhosted.org> Message-ID: Demid added the comment: What if I will add mode check in FileType.__init__? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 10:22:27 2019 From: report at bugs.python.org (Guilloux) Date: Wed, 05 Jun 2019 14:22:27 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1559744547.96.0.269773967492.issue37149@roundup.psfhosted.org> Guilloux added the comment: I have read Cheryl Sabella's comment. So I have sent this e-mail : Objet: Request about a broken link on your website. Date: 2019-06-05 16:20 De: xavier at guilloux-fr.net ?: thomas.guengerich at nmt.edu, webmaster at nmt.edu, help at nmt.edu Hello, For several days the link "https://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html" has stopped working. But this link provided access to a prodigious technical documentation related to a Python language module (tkinter). Can you put this link back in working order (or place a redirect to the new link)? I draw your attention to the fact that this documentation contributes significantly to the international recognition of your university. Thanks a lot for the continuation that you will give to this request. Regards. Xavier Guilloux. (following is the same message but in my natural language - French -) Bonjour, Depuis plusieurs jours le lien "https://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html" ne fonctionne plus. Or ce lien permettait d'acc?der ? une prodigieuse documentation technique en rapport avec un module du langage Python (tkinter). Pouvez-vous remettre ce lien en ?tat de fonctionnement (ou placer une redirection vers le nouveau lien) ? J'attire votre attention sur le fait que cette documentation contribue de mani?re importante ? la reconnaissance internationale de votre universit?. Merci par avance pour la suite que vous donnerez ? cette requ?te. Cordialement. Xavier Guilloux. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 10:38:26 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 05 Jun 2019 14:38:26 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559745506.25.0.0675570615713.issue35431@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 10:40:00 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 05 Jun 2019 14:40:00 +0000 Subject: [issue37158] Speed-up statistics.fmean() In-Reply-To: <1559712244.32.0.839962107784.issue37158@roundup.psfhosted.org> Message-ID: <1559745600.83.0.648194948998.issue37158@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 6c01ebcc0dfc6be22950fabb46bdc10dcb6202c9 by Raymond Hettinger in branch 'master': bpo-37158: Simplify and speed-up statistics.fmean() (GH-13832) https://github.com/python/cpython/commit/6c01ebcc0dfc6be22950fabb46bdc10dcb6202c9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 10:40:07 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Jun 2019 14:40:07 +0000 Subject: [issue37158] Speed-up statistics.fmean() In-Reply-To: <1559712244.32.0.839962107784.issue37158@roundup.psfhosted.org> Message-ID: <1559745607.18.0.137241277801.issue37158@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13720 pull_request: https://github.com/python/cpython/pull/13843 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 10:41:10 2019 From: report at bugs.python.org (Guilloux) Date: Wed, 05 Jun 2019 14:41:10 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1559745670.65.0.646719479373.issue37149@roundup.psfhosted.org> Guilloux added the comment: I have received the answer : Objet: Re: Request about a broken link on your website. Date: 2019-06-05 16:39 De: New Mexico Tech ?: xavier at guilloux-fr.net Cc: thomas.guengerich at nmt.edu, webmaster at nmt.edu Hello, Unfortunately infohost.nmt.edu has been shut down and we will no longer be supporting that website. The website will not be coming back up. Sorry for the inconvenience. -Dorothy ITC-UC NMIMT Socorro, NM 87801 575-835-5700 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 10:43:36 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 05 Jun 2019 14:43:36 +0000 Subject: [issue37162] new importlib dependencies csv, email and zipfile In-Reply-To: <1559732109.6.0.0655643851833.issue37162@roundup.psfhosted.org> Message-ID: <1559745816.2.0.963156587558.issue37162@roundup.psfhosted.org> Jason R. Coombs added the comment: I imagine that importlib.metadata isn?t imported at bootstrap time, only after the import infrastructure is ready. I think an early failure to import one of those dependencies is desirable. What is the reasoning behind deferring the imports and why does it apply to this module? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 10:51:24 2019 From: report at bugs.python.org (Dane Howard) Date: Wed, 05 Jun 2019 14:51:24 +0000 Subject: [issue37164] dict creation with converted zip objects produces inconsistent behavior Message-ID: <1559746284.31.0.288092384603.issue37164@roundup.psfhosted.org> New submission from Dane Howard : confirmed on the following versions: 3.6.3 (Windows 10) 3.7.0 (Debian 9 & Windows 10) 3.7.1 (Debian 9) a dictionary created with the dict() function will not always return the appropriate dictionary object. The following code produces the bug on all stated versions except 3.6.3/Win10, which exhibits slightly different behavior. a = ['1','2','3'] b = [1,2,3] c = zip(a,b) print(dict(list(c))) #gives empty dict print(dict(list(zip(a,b)))) #gives {'1':1,'2':2,'3':3} d = zip(b,a) print(dict(list(d))) #gives {1:'1',':'2',3:'3'} ---------- components: Windows files: pybug.png messages: 344729 nosy: Dane Howard, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: dict creation with converted zip objects produces inconsistent behavior versions: Python 3.6, Python 3.7 Added file: https://bugs.python.org/file48394/pybug.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 11:00:03 2019 From: report at bugs.python.org (Paul Moore) Date: Wed, 05 Jun 2019 15:00:03 +0000 Subject: [issue37164] dict creation with converted zip objects produces inconsistent behavior In-Reply-To: <1559746284.31.0.288092384603.issue37164@roundup.psfhosted.org> Message-ID: <1559746803.65.0.153127331257.issue37164@roundup.psfhosted.org> Paul Moore added the comment: Works fine for me: Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> a = ['1','2','3'] >>> b = [1,2,3] >>> c = zip(a,b) >>> print(dict(list(c))) {'1': 1, '2': 2, '3': 3} >>> print(dict(list(zip(a,b)))) {'1': 1, '2': 2, '3': 3} >>> d = zip(b,a) >>> print(dict(list(d))) {1: '1', 2: '2', 3: '3'} Are you sure you didn't try to use c twice? If you do, it will start up from where it left off (at the end) and so generate no further values: >>> print(dict(list(c))) {} You need to remember that c is an iterator, and this is how iterators work. (If you're coming from Python 2, this is new behaviour in Python 3). ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 11:14:14 2019 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 05 Jun 2019 15:14:14 +0000 Subject: [issue37162] new importlib dependencies csv, email and zipfile In-Reply-To: <1559732109.6.0.0655643851833.issue37162@roundup.psfhosted.org> Message-ID: <1559747654.12.0.656723706746.issue37162@roundup.psfhosted.org> Anthony Sottile added the comment: at least for debian, the motivation is to provide a `pythonX.X-minimal` and a `pythonX.X` package -- the former ~mostly just contains the interpreter and the latter includes the stdlib (I'm interested as well, hit this packaging 3.8 for deadsnakes) ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 11:16:22 2019 From: report at bugs.python.org (Dane Howard) Date: Wed, 05 Jun 2019 15:16:22 +0000 Subject: [issue37164] dict creation with converted zip objects produces inconsistent behavior In-Reply-To: <1559746284.31.0.288092384603.issue37164@roundup.psfhosted.org> Message-ID: <1559747782.69.0.340861847468.issue37164@roundup.psfhosted.org> Dane Howard added the comment: Yes, that seems to be it - in every case I was checking the value of c with `list(c)` and assuming that wouldn't change anything. thanks! ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 11:18:26 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 05 Jun 2019 15:18:26 +0000 Subject: [issue37158] Speed-up statistics.fmean() In-Reply-To: <1559712244.32.0.839962107784.issue37158@roundup.psfhosted.org> Message-ID: <1559747906.62.0.96667870413.issue37158@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 9ddb77741e041966d64739353393bcba33cc3bdd by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-37158: Simplify and speed-up statistics.fmean() (GH-13832) (GH-13843) https://github.com/python/cpython/commit/9ddb77741e041966d64739353393bcba33cc3bdd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 11:22:38 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Jun 2019 15:22:38 +0000 Subject: [issue37116] Use PEP 570 syntax for positional-only parameters In-Reply-To: <1559314061.29.0.391357031696.issue37116@roundup.psfhosted.org> Message-ID: <1559748158.18.0.665646406696.issue37116@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 142566c028720934325f0b7fe28680afd046e00f by Serhiy Storchaka in branch 'master': [3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620) https://github.com/python/cpython/commit/142566c028720934325f0b7fe28680afd046e00f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 11:24:23 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Jun 2019 15:24:23 +0000 Subject: [issue37116] Use PEP 570 syntax for positional-only parameters In-Reply-To: <1559314061.29.0.391357031696.issue37116@roundup.psfhosted.org> Message-ID: <1559748263.1.0.11294253096.issue37116@roundup.psfhosted.org> Serhiy Storchaka added the comment: Separate issues should be open for remaining cases. For example issue37163 is open for dataclasses.replace(). ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 11:36:16 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 05 Jun 2019 15:36:16 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1559748976.01.0.362953378916.issue36974@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +13721 pull_request: https://github.com/python/cpython/pull/13844 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 11:36:57 2019 From: report at bugs.python.org (carlo) Date: Wed, 05 Jun 2019 15:36:57 +0000 Subject: [issue37152] Add AF_LOCAL alias for AF_UNIX In-Reply-To: <1559660738.02.0.723341796578.issue37152@roundup.psfhosted.org> Message-ID: <1559749017.67.0.489048926378.issue37152@roundup.psfhosted.org> carlo added the comment: > I'm -1 to add the alias. It just adds to the confusion. It's also against the Zen of Python: "There should be one-- and preferably only one --obvious way to do it." Agreed with the zen of python. This is my first PR / issue, thanks for the fast reply. You may close this issue ) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 11:39:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 15:39:04 +0000 Subject: [issue22117] Rewrite pytime.h to work on nanoseconds In-Reply-To: <1406848093.52.0.5184372094.issue22117@psf.upfronthosting.co.za> Message-ID: <1559749144.44.0.158258759286.issue22117@roundup.psfhosted.org> STINNER Victor added the comment: > Right, but my question was very specifically about a test added for this issue. This issue is about nanoseconds. I looked again and I found the commit https://hg.python.org/cpython/rev/b0b4c4d365b1 related to this issue. So to reply to your question, honestly, I don't recall why I had to replace sleep() with gmtime(): all I know is written in the comment. But Python internals changed *a lot* since 2015... My comment is more general: closed issues are hidden from bugs.python.org home page, so only people in the nosy list get a notification. The discussion is "hidden". Since issue is 4 years old, some people in the nosy list no longer contribute to Python. Moreover, the bug tracker is usually not a good place to ask a question. I prefer to only use it to discuss bugs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 11:39:27 2019 From: report at bugs.python.org (Christian Heimes) Date: Wed, 05 Jun 2019 15:39:27 +0000 Subject: [issue37152] Add AF_LOCAL alias for AF_UNIX In-Reply-To: <1559660738.02.0.723341796578.issue37152@roundup.psfhosted.org> Message-ID: <1559749167.63.0.399338120848.issue37152@roundup.psfhosted.org> Christian Heimes added the comment: You are welcome! :) ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 11:46:19 2019 From: report at bugs.python.org (Brian Skinn) Date: Wed, 05 Jun 2019 15:46:19 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559749579.78.0.427145892824.issue37134@roundup.psfhosted.org> Brian Skinn added the comment: First, for anyone interested, there are screenshots and links to docs versions at the SC GH issue (https://github.com/python/steering-council/issues/12#issuecomment-498856524, and following) where we're exploring what the tabbed approach to the PEP570 docs might look like. Second, I'd like to suggest an additional aspect of the docs situation for consideration. Regardless of which specific approach is decided upon here, it seems likely the consensus will be a course of action requiring touching the majority (entirety?) of the stdlib API docs. Currently, all of the API docs are manually curated in the .rst, at minimum for the reasons laid out by Victor in bpo25461 (https://bugs.python.org/issue25461#msg253381). If there's any chance that the balance of factors has changed such that using autodoc (or similar) *would* now be preferable, IWSTM that now is a good time to have that discussion, so that an autodoc conversion could be done at the same time as the PEP570 rework. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 11:56:42 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Jun 2019 15:56:42 +0000 Subject: [issue37162] new importlib dependencies csv, email and zipfile In-Reply-To: <1559732109.6.0.0655643851833.issue37162@roundup.psfhosted.org> Message-ID: <1559750202.09.0.180501198054.issue37162@roundup.psfhosted.org> Serhiy Storchaka added the comment: I have not found zipfile here. email is used for parsing METADATA and PKG-INFO. It replaces the rfc822 module. cvs is used for parsing RECORD and SOURCES.txt. Actually using it for for parsing SOURCES.txt is improper as it might contain double quotes or backslashes (unlikely but possible). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 12:01:35 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Jun 2019 16:01:35 +0000 Subject: [issue37163] dataclasses.replace() fails with the field named "obj" In-Reply-To: <1559733184.92.0.103225044701.issue37163@roundup.psfhosted.org> Message-ID: <1559750495.65.0.695454937456.issue37163@roundup.psfhosted.org> Serhiy Storchaka added the comment: I propose to add a deprecation warning in 3.8 and use the PEP 570 syntax in 3.9 (which means a TypeError if obj is passed by keyword argument). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 12:07:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 16:07:03 +0000 Subject: [issue28708] Low FD_SETSIZE limit on Windows In-Reply-To: <1479250358.07.0.768722440644.issue28708@psf.upfronthosting.co.za> Message-ID: <1559750823.83.0.956339657978.issue28708@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13722 pull_request: https://github.com/python/cpython/pull/13845 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 12:07:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 16:07:35 +0000 Subject: [issue28708] Low FD_SETSIZE limit on Windows In-Reply-To: <1479250358.07.0.768722440644.issue28708@psf.upfronthosting.co.za> Message-ID: <1559750855.79.0.339055475275.issue28708@roundup.psfhosted.org> STINNER Victor added the comment: I wrote a proof-of-concept: PR 13845. ... but now I'm confused. How does select() know the FD_SETSIZE? Is it hardcoded in select() ABI? Does this PR work? Or does it make no sense? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 12:17:07 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 05 Jun 2019 16:17:07 +0000 Subject: [issue34222] Email message serialization enters an infinite loop when folding non-ASCII headers with long words In-Reply-To: <1532523404.04.0.56676864532.issue34222@psf.upfronthosting.co.za> Message-ID: <1559751427.35.0.311439606829.issue34222@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> [security] Infinite loop on folding email (_fold_as_ew()) if an header has no spaces _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 12:17:36 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 05 Jun 2019 16:17:36 +0000 Subject: [issue34222] Email message serialization enters an infinite loop when folding non-ASCII headers with long words In-Reply-To: <1532523404.04.0.56676864532.issue34222@psf.upfronthosting.co.za> Message-ID: <1559751456.73.0.644117902282.issue34222@roundup.psfhosted.org> Cheryl Sabella added the comment: Thanks for the report, @maxking. ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 12:21:33 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 05 Jun 2019 16:21:33 +0000 Subject: [issue28708] Low FD_SETSIZE limit on Windows In-Reply-To: <1479250358.07.0.768722440644.issue28708@psf.upfronthosting.co.za> Message-ID: <1559751693.85.0.187275917436.issue28708@roundup.psfhosted.org> Steve Dower added the comment: > How does select() know the FD_SETSIZE? It doesn't have to. The actual number of descriptors is passed in, and the API presumably assumes that FD_SETSIZE is bigger than that (or else the caller would have crashed writing to invalid memory). I don't see why we'd make it a parameter though. If we have all the descriptors, just allocate a big enough array and pass it in? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 12:35:23 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 05 Jun 2019 16:35:23 +0000 Subject: [issue37089] `import Lib.os` works on windows (but shouldn't) In-Reply-To: <1559163159.15.0.0136841146516.issue37089@roundup.psfhosted.org> Message-ID: <1559752523.36.0.0179540553957.issue37089@roundup.psfhosted.org> Steve Dower added the comment: There are certainly people relying on sys.prefix being in sys.path (for .pth files and embedding), but probably not so many that we couldn't remove it in a major release. It is a bit strange in a venv, where there's typically nothing in the root of the environment (when we discovered this, we decided we could stop copying all the modules over, as they weren't being used anyway). I think in every supported distribution we make though, there's no need for it. But we'd probably have to just remove it and see what breaks - most of the people relying on it probably have no idea, but they're also probably bundling it in some way that makes it easy to detect and fix. All that said, I'm not particularly offended by this. It's namespace packages working as intended, and since it seems to be a highly complex interaction of configuration settings to get sys.prefix on sys.path in a variety of circumstances (we're not relying on registry settings here any more) I'd want to see changes and tests before assuming we can do it without regressing real scenarios. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 12:45:20 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 05 Jun 2019 16:45:20 +0000 Subject: [issue37158] Speed-up statistics.fmean() In-Reply-To: <1559712244.32.0.839962107784.issue37158@roundup.psfhosted.org> Message-ID: <1559753120.84.0.799594061968.issue37158@roundup.psfhosted.org> Steven D'Aprano added the comment: Nice! On my computer, I get about 30% speed up. Thanks Raymond. The two PRs are status "merged". Does this mean we can close this ticket or is there more to do? (The git workflow is still a mystery to me.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 12:49:57 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 05 Jun 2019 16:49:57 +0000 Subject: [issue37158] Speed-up statistics.fmean() In-Reply-To: <1559712244.32.0.839962107784.issue37158@roundup.psfhosted.org> Message-ID: <1559753397.17.0.219174164466.issue37158@roundup.psfhosted.org> Raymond Hettinger added the comment: I can close it now :-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 12:51:37 2019 From: report at bugs.python.org (hai shi) Date: Wed, 05 Jun 2019 16:51:37 +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: <1559753497.75.0.987184804675.issue18299@roundup.psfhosted.org> hai shi added the comment: >it's a pain to extend the API (I don't want to use yet another __xxx custom keyword) Adding __xxx in run_python_until_end function would increase the complexity but it looks like a unified function. ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 12:55:07 2019 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 05 Jun 2019 16:55:07 +0000 Subject: [issue35551] Encoding and alias issues In-Reply-To: <1545386892.27.0.788709270274.issue35551@psf.upfronthosting.co.za> Message-ID: <1559753707.55.0.70332311614.issue35551@roundup.psfhosted.org> Marc-Andre Lemburg added the comment: 1. Background for "tactis": https://github.com/python/cpython/commit/4fd73f0465ba11c22f0986d04cf91b387ed22c47 # The codecs for these encodings are not distributed with the # Python core, but are included here for reference, since the # locale module relies on having these aliases available. This codec was available as separate package at the time. Later the CJK codecs got added to the stdlib, but this codec was not. I guess it's fine to remove the alias. 2. If the mappings are identical, just leaving one and making the other an alias is fine. Same for aliases of those mapping names. 3. I think we had already resolved this some time ago. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 12:56:38 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 05 Jun 2019 16:56:38 +0000 Subject: [issue21315] email._header_value_parser does not recognise in-line encoding changes In-Reply-To: <1398009498.59.0.139606640186.issue21315@psf.upfronthosting.co.za> Message-ID: <1559753798.66.0.528861465556.issue21315@roundup.psfhosted.org> Barry A. Warsaw added the comment: New changeset 66c4f3f38b867d8329b28c032bb907fd1a2f22d2 by Barry Warsaw (Abhilash Raj) in branch 'master': bpo-21315: Fix parsing of encoded words with missing leading ws. (#13425) https://github.com/python/cpython/commit/66c4f3f38b867d8329b28c032bb907fd1a2f22d2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 12:56:45 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Jun 2019 16:56:45 +0000 Subject: [issue21315] email._header_value_parser does not recognise in-line encoding changes In-Reply-To: <1398009498.59.0.139606640186.issue21315@psf.upfronthosting.co.za> Message-ID: <1559753805.45.0.139310479752.issue21315@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13723 pull_request: https://github.com/python/cpython/pull/13846 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 13:11:49 2019 From: report at bugs.python.org (hai shi) Date: Wed, 05 Jun 2019 17:11:49 +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: <1559754709.18.0.614700368193.issue18299@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +13724 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13847 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 13:21:22 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 05 Jun 2019 17:21:22 +0000 Subject: [issue37163] dataclasses.replace() fails with the field named "obj" In-Reply-To: <1559733184.92.0.103225044701.issue37163@roundup.psfhosted.org> Message-ID: <1559755282.47.0.971022585161.issue37163@roundup.psfhosted.org> Brett Cannon added the comment: +1 for Serhiy's suggestion ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 13:26:01 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 05 Jun 2019 17:26:01 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559755561.51.0.78980068882.issue36839@roundup.psfhosted.org> Brett Cannon added the comment: "I'm sorry, I thought "fantasy" was good metaphor." No problem! Saying something is "fantasy" like "it's based on fantasy" -- in North America at least -- is like saying "you're fooling yourself" or "you're delusional". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 13:35:47 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 05 Jun 2019 17:35:47 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559756147.05.0.127952475429.issue37134@roundup.psfhosted.org> Brett Cannon added the comment: To help short-circuit this discussion and focus on the desired solution, the steering council came to a decision that can be seen at https://github.com/python/steering-council/issues/12#issuecomment-498874939 : - for Python 3.8 specifically, we think it makes sense to continue to leave the slashes out of the documentation for the all parameters are positional-only case (i.e. "... , /)") and the all parameters are positional-only & keyword-only case (i.e. "..., /, *, ..." and "..., /, *args, ..."). This question can then be revisited for Python 3.9. - however, we actively want to see them added for the cases where an API has a mixture of positional-only and positional-or-keyword args (i.e. "..., /, ...") - we'd like to see the rendered documentation for function signatures enhanced to use tooltips to name the positional-only (bare "/"), keyword-only (bare "*"), additional positional args (named "*"), and additional keyword args (named "**") notations (hyperlinking to a glossary entry could also be interesting, but may be too visually noisy based on how the hyperlinks get rendered) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 13:37:42 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 05 Jun 2019 17:37:42 +0000 Subject: [issue37162] new importlib dependencies csv, email and zipfile In-Reply-To: <1559732109.6.0.0655643851833.issue37162@roundup.psfhosted.org> Message-ID: <1559756262.68.0.278042086032.issue37162@roundup.psfhosted.org> Brett Cannon added the comment: The imports are on purpose but they are not required for import to run, just like importlib.resources isn't necessary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 13:58:03 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 05 Jun 2019 17:58:03 +0000 Subject: [issue37068] Emit SyntaxWarning for f-strings without expressions ? In-Reply-To: <1558984274.64.0.992654624102.issue37068@roundup.psfhosted.org> Message-ID: <1559757483.78.0.86224703594.issue37068@roundup.psfhosted.org> Raymond Hettinger added the comment: Adding my agreement that this is a feature, not a bug. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 13:58:31 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Jun 2019 17:58:31 +0000 Subject: [issue28708] Low FD_SETSIZE limit on Windows In-Reply-To: <1479250358.07.0.768722440644.issue28708@psf.upfronthosting.co.za> Message-ID: <1559757511.7.0.131052510553.issue28708@roundup.psfhosted.org> Andrew Svetlov added the comment: >From my understanding Steve is right. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 14:03:10 2019 From: report at bugs.python.org (Eryk Sun) Date: Wed, 05 Jun 2019 18:03:10 +0000 Subject: [issue28708] Low FD_SETSIZE limit on Windows In-Reply-To: <1479250358.07.0.768722440644.issue28708@psf.upfronthosting.co.za> Message-ID: <1559757790.46.0.285854545002.issue28708@roundup.psfhosted.org> Eryk Sun added the comment: > It doesn't have to. The actual number of descriptors is passed in, and To clarify, this is the fd_count in each fd_set, i.e. Winsock uses a counted SOCKET array instead of the bitmask that's found on other platforms. Winsock select() ignores nfds [1]. If Python's select module used a dynamic fd_set in Windows, this entails directly initializing fd_count and fd_array. The FD_SET macro can't be used since it's intended for the static definition and limited to FD_SETSIZE. FD_ZERO, FD_ISSET, and FD_CLR should still work. [1] https://docs.microsoft.com/en-us/windows/desktop/api/winsock2/nf-winsock2-select ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 14:04:19 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 05 Jun 2019 18:04:19 +0000 Subject: [issue28708] Low FD_SETSIZE limit on Windows In-Reply-To: <1479250358.07.0.768722440644.issue28708@psf.upfronthosting.co.za> Message-ID: <1559757859.1.0.67652704984.issue28708@roundup.psfhosted.org> Antoine Pitrou added the comment: > The actual number of descriptors is passed in Yes, but: """The nfds parameter is included only for compatibility with Berkeley sockets.""" ... according to https://docs.microsoft.com/en-us/windows/desktop/api/Winsock2/nf-winsock2-select So it's really FD_SETSIZE that matters, and it's a compile-time constant. Note that Anaconda has been doing this for a long time: https://github.com/AnacondaRecipes/python-feedstock/blob/master/recipe/0004-Win32-Change-FD_SETSIZE-from-512-to-2048.patch ---------- nosy: -eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 14:04:26 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 05 Jun 2019 18:04:26 +0000 Subject: [issue28708] Low FD_SETSIZE limit on Windows In-Reply-To: <1479250358.07.0.768722440644.issue28708@psf.upfronthosting.co.za> Message-ID: <1559757866.93.0.835777164303.issue28708@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 14:45:07 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 05 Jun 2019 18:45:07 +0000 Subject: [issue37165] Convert _collections._count_elements() to the Argument Clinic Message-ID: <1559760307.2.0.195086878247.issue37165@roundup.psfhosted.org> New submission from Raymond Hettinger : This lets _count_elements use METH_FASTCALL. ---------- components: Library (Lib) messages: 344759 nosy: rhettinger priority: normal severity: normal status: open type: performance versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 14:47:37 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 05 Jun 2019 18:47:37 +0000 Subject: [issue37165] Convert _collections._count_elements() to the Argument Clinic In-Reply-To: <1559760307.2.0.195086878247.issue37165@roundup.psfhosted.org> Message-ID: <1559760457.73.0.292025709767.issue37165@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +13725 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13848 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 14:56:16 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 05 Jun 2019 18:56:16 +0000 Subject: [issue28708] Low FD_SETSIZE limit on Windows In-Reply-To: <1479250358.07.0.768722440644.issue28708@psf.upfronthosting.co.za> Message-ID: <1559760976.42.0.0760552179314.issue28708@roundup.psfhosted.org> Steve Dower added the comment: > So it's really FD_SETSIZE that matters, and it's a compile-time constant. The only way this constant can matter is if the array has to end with an empty slot, which doesn't appear to be the case. The pre-compiled function can't tell how you compiled the code calling it, and the only place where FD_SETSIZE is used is in the macros to set them. Dynamic allocation ought to be just fine, and likely faster for big arrays. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 15:46:26 2019 From: report at bugs.python.org (Tim Hatch) Date: Wed, 05 Jun 2019 19:46:26 +0000 Subject: [issue37166] inspect.findsource doesn't handle shortened files gracefully Message-ID: <1559763986.42.0.903204336475.issue37166@roundup.psfhosted.org> New submission from Tim Hatch : inspect.findsource() can trigger IndexError when co_firstlineno is larger than len(linecache.getlines()). If you have a situation where the file that linecache finds doesn't match the imported module, then you're not guaranteed that co_firstlineno on the code objects makes any sense. We hit this in a special kind of par file, but it could be triggered by shortening the file, like doing a git checkout of an older version while it's running. a.py (3 lines): # line 1 # line 2 def foo(): pass # co_firstlineno=3 a.py.v2 (1 line): def foo(): pass repro: import a # modification happens, cp a.py.v2 a.py inspect.getsource(a.foo) Although linecache.getline() does bounds checking, `inspect.findsource()` (which is used by various other functions, including `inspect.stack()`) grabs all the lines and loops through them. The bug is in this section of `inspect.py`: if iscode(object): if not hasattr(object, 'co_firstlineno'): raise OSError('could not find function definition') lnum = object.co_firstlineno - 1 pat = re.compile(r'^(\s*def\s)|(\s*async\s+def\s)|(.*(? 0: if pat.match(lines[lnum]): break lnum = lnum - 1 return lines, lnum raise OSError('could not find code object') Found through future.utils.raise_from which actually doesn't need to be using `inspect.stack()`, it can switch to `sys._getframe(2)` or so. We should have a PR ready shortly, but wondering if this can be backported to at least 3.6? ---------- components: Library (Lib) messages: 344761 nosy: lisroach, thatch, vstinner priority: normal severity: normal status: open title: inspect.findsource doesn't handle shortened files gracefully versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 15:46:40 2019 From: report at bugs.python.org (Tim Hatch) Date: Wed, 05 Jun 2019 19:46:40 +0000 Subject: [issue37166] inspect.findsource doesn't handle shortened files gracefully In-Reply-To: <1559763986.42.0.903204336475.issue37166@roundup.psfhosted.org> Message-ID: <1559764000.45.0.0725032137712.issue37166@roundup.psfhosted.org> Change by Tim Hatch : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 15:59:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 19:59:58 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1559764798.06.0.569348980992.issue33725@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 1e77ab0a35cf95318bb4893f7253a30f73201163 by Victor Stinner in branch 'master': bpo-33725, multiprocessing doc: rephase warning against fork on macOS (GH-13841) https://github.com/python/cpython/commit/1e77ab0a35cf95318bb4893f7253a30f73201163 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 16:01:23 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Jun 2019 20:01:23 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1559764883.23.0.118092374148.issue33725@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13726 pull_request: https://github.com/python/cpython/pull/13849 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 16:07:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 20:07:09 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559765229.22.0.472944308929.issue37134@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 16:07:24 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Jun 2019 20:07:24 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1559765244.35.0.195461633281.issue33725@roundup.psfhosted.org> miss-islington added the comment: New changeset d74438b633184bbd8d775d7118d6f12f6f825a96 by Miss Islington (bot) in branch '3.8': bpo-33725, multiprocessing doc: rephase warning against fork on macOS (GH-13841) https://github.com/python/cpython/commit/d74438b633184bbd8d775d7118d6f12f6f825a96 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 16:08:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jun 2019 20:08:36 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559765316.91.0.44989629455.issue37134@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 16:09:53 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 05 Jun 2019 20:09:53 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559765393.74.0.621211616904.issue37134@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thank you very much, everyone, for sharing your comments, views and concerns and thanks to the steering council for helping to reach a conclusion. I have updated PR13743 to only modify the functions that fall into the second point of Brett's message as indicated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 16:16:45 2019 From: report at bugs.python.org (SilentGhost) Date: Wed, 05 Jun 2019 20:16:45 +0000 Subject: [issue37166] inspect.findsource doesn't handle shortened files gracefully In-Reply-To: <1559763986.42.0.903204336475.issue37166@roundup.psfhosted.org> Message-ID: <1559765805.83.0.0959606778233.issue37166@roundup.psfhosted.org> SilentGhost added the comment: 3.6 is in security-only mode, this doesn't look like a security issue to me ---------- nosy: +SilentGhost, yselivanov versions: +Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 16:24:31 2019 From: report at bugs.python.org (Carol Willing) Date: Wed, 05 Jun 2019 20:24:31 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559766271.59.0.556327300481.issue37134@roundup.psfhosted.org> Carol Willing added the comment: New changeset 54edb04aa688c8247570b4f59b5145e3fa417576 by Carol Willing (Pablo Galindo) in branch 'master': bpo-37134: Add PEP570 notation to the documentation (GH-13743) https://github.com/python/cpython/commit/54edb04aa688c8247570b4f59b5145e3fa417576 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 16:30:03 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jun 2019 20:30:03 +0000 Subject: [issue37167] Cannot build Windows python_d.exe in master branch Message-ID: <1559766603.61.0.264760022754.issue37167@roundup.psfhosted.org> New submission from Terry J. Reedy : In master, pcbuild/build -e -d (the 2nd run) gave the errors in build_errors.txt. Many or most were like f:\dev\3x\externals\xz-5.2.2\src\liblzma\common\block_encoder.h(1): error C2018 : unknown character '0x2' [F:\dev\3x\PCbuild\liblzma.vcxproj] >chkdsk found no problems. A fix is high priority for me because my most recent 3.8.0a4 build in master, on 6/2, no longer imports tkinter. Hence IDLE fails also. >>> import tkinter Traceback (most recent call last): File "", line 1, in File "F:\dev\3x\lib\tkinter\__init__.py", line 36, in import _tkinter # If this fails your Python may not be configured for Tk ImportError: Module use of python39_d.dll conflicts with this version of Python. Building python_d.exe for 3.8 and 3.7 had no problem. ---------- components: Build, Windows files: build_errors.txt messages: 344768 nosy: paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Cannot build Windows python_d.exe in master branch type: compile error versions: Python 3.9 Added file: https://bugs.python.org/file48395/build_errors.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 16:35:01 2019 From: report at bugs.python.org (YoSTEALTH) Date: Wed, 05 Jun 2019 20:35:01 +0000 Subject: [issue37129] Add RWF_APPEND flag Message-ID: <1559766901.38.0.639806424761.issue37129@roundup.psfhosted.org> Change by YoSTEALTH : ---------- nosy: +YoSTEALTH _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 16:36:00 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 05 Jun 2019 20:36:00 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559766960.05.0.660954041528.issue37134@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- nosy: -gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 16:47:25 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jun 2019 20:47:25 +0000 Subject: [issue37167] Cannot build Windows python_d.exe in master branch In-Reply-To: <1559766603.61.0.264760022754.issue37167@roundup.psfhosted.org> Message-ID: <1559767645.2.0.425348730073.issue37167@roundup.psfhosted.org> Terry J. Reedy added the comment: I looked more carefully and all the errors were for files in the external xz-5.2.2 directory. I deleted it to force a fresh download and a rebuild worked fine. Sorry for the noise. ---------- resolution: -> not a bug stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 16:57:56 2019 From: report at bugs.python.org (N.P. Khelili) Date: Wed, 05 Jun 2019 20:57:56 +0000 Subject: [issue37130] pathlib.with_name() doesn't like unnamed files. In-Reply-To: <1559438292.33.0.601764456145.issue37130@roundup.psfhosted.org> Message-ID: <1559768276.23.0.778816776197.issue37130@roundup.psfhosted.org> N.P. Khelili added the comment: The idea in my last post was quite bad, setting name to None breaks a lot of functions that expect name to be a string. Path('.').parent and Path('..').parent both return '.'. Even if it is not stupid (regarding them as special dirs pointing to somewhere else but still being inside the directory). I don't know why anyone would rely on such a behaviour... The tests expect Path('..').stem() to be '..' and expect Path('.').stem() to be '' Once again, I don't know why anyone should rely on it but I fear I can't do a lot without breaking this one part of the test. I'm working on it and posting something by the end of the Week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 17:45:06 2019 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 05 Jun 2019 21:45:06 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559771106.62.0.87592524915.issue37134@roundup.psfhosted.org> Guido van Rossum added the comment: IIUC sum() should also have a slash in the middle. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 17:59:36 2019 From: report at bugs.python.org (Michael Bejda) Date: Wed, 05 Jun 2019 21:59:36 +0000 Subject: [issue37166] inspect.findsource doesn't handle shortened files gracefully In-Reply-To: <1559763986.42.0.903204336475.issue37166@roundup.psfhosted.org> Message-ID: <1559771976.34.0.196276946352.issue37166@roundup.psfhosted.org> Change by Michael Bejda : ---------- keywords: +patch pull_requests: +13727 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13850 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 18:05:21 2019 From: report at bugs.python.org (Phil Frost) Date: Wed, 05 Jun 2019 22:05:21 +0000 Subject: [issue37168] Decimal divisions sometimes 10x or 100x too large Message-ID: <1559772321.45.0.42770583159.issue37168@roundup.psfhosted.org> New submission from Phil Frost : We've observed instances of Decimal divisions being incorrect a few times per day in a web application serving millions of requests daily. I've been unable to reproduce the issue but have been investigating core dumps which suggest either some issue in the C Python implementation or its execution environment. Python 2.7.15 on Alpine Linux Docker containers. A slightly modified decimal.py is attached. It's been modified to check that the answer is approximately correct and dumps core if not. It also has a few local variables added to provide additional insight. I've annotated the file with values from the core dump and my reasoning about what should happen. The crux of the problem is the loop at line 1389. There are 3 ways to determine how many times this loop executed: 1. the number of zeros removed from coeff 2. the number of times exp is incremented 3. the number of times division_counter is incremented Oddly, #1 and #3 indicate the loop happened 27 times, while #2 indicates the loop happened 28 times. One possible explanation (which makes about as much sense as any other) is that `exp += 1` sometimes adds 2 instead of 1. This means the loop happens 1 time fewer than it should, leaving `coeff` 10 times bigger than it should properly be. Or (very rarely) this happens twice and the result is 100 times bigger. I find it very odd that something as basic as `+= 1` should not work, but at the moment it is the best explanation I have. Unfortunately I can't share the core dump, as I've only been able to observe the issue in production so the core contains private information. But I'd welcome any ideas for further exploration. Or perhaps someone is aware of an existing bug that would explain this behavior. ---------- components: Interpreter Core files: decimal.py messages: 344772 nosy: Phil Frost priority: normal severity: normal status: open title: Decimal divisions sometimes 10x or 100x too large versions: Python 2.7 Added file: https://bugs.python.org/file48396/decimal.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 18:13:21 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Jun 2019 22:13:21 +0000 Subject: [issue37168] Decimal divisions sometimes 10x or 100x too large In-Reply-To: <1559772321.45.0.42770583159.issue37168@roundup.psfhosted.org> Message-ID: <1559772801.14.0.503924823032.issue37168@roundup.psfhosted.org> Change by Zachary Ware : ---------- nosy: +facundobatista, mark.dickinson, rhettinger, skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 18:18:14 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 05 Jun 2019 22:18:14 +0000 Subject: [issue35551] Encoding and alias issues In-Reply-To: <1545386892.27.0.788709270274.issue35551@psf.upfronthosting.co.za> Message-ID: <1559773094.54.0.754959524403.issue35551@roundup.psfhosted.org> Cheryl Sabella added the comment: New changeset c4c15ed7a2c7c2a1983e88b89c244d121eb3e512 by Cheryl Sabella (Ashwin Ramaswami) in branch 'master': bpo-35551: encodings update (GH-11446) https://github.com/python/cpython/commit/c4c15ed7a2c7c2a1983e88b89c244d121eb3e512 ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 18:20:09 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 05 Jun 2019 22:20:09 +0000 Subject: [issue35551] Encoding and alias issues In-Reply-To: <1545386892.27.0.788709270274.issue35551@psf.upfronthosting.co.za> Message-ID: <1559773209.37.0.870262636645.issue35551@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 18:36:25 2019 From: report at bugs.python.org (Phil Frost) Date: Wed, 05 Jun 2019 22:36:25 +0000 Subject: [issue37168] Decimal divisions sometimes 10x or 100x too large In-Reply-To: <1559772321.45.0.42770583159.issue37168@roundup.psfhosted.org> Message-ID: <1559774185.9.0.25903652602.issue37168@roundup.psfhosted.org> Phil Frost added the comment: I should note that while we do observe this issue with Decimal, my troubleshooting so far indicates the logic in decimal.py is fine. It seems instead the instructions in decimal.py aren't being correctly executed. I'm not sure if the problem is limited to only Decimal, or if we just notice it there because it's correlated with financial code, which when encountering the bug, introduces an error which is eventually caught by the accounting department. There could very well be errors happening at least frequently elsewhere which simply go unnoticed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 18:54:47 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 05 Jun 2019 22:54:47 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559775287.41.0.332341074072.issue37134@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +13728 pull_request: https://github.com/python/cpython/pull/13851 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 18:56:16 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Wed, 05 Jun 2019 22:56:16 +0000 Subject: [issue36422] tempfile.TemporaryDirectory() removes entire directory tree even if it's a mount-point In-Reply-To: <1553512605.72.0.860422023516.issue36422@roundup.psfhosted.org> Message-ID: <1559775376.06.0.0439714460756.issue36422@roundup.psfhosted.org> Jeffrey Kintscher added the comment: Only deleting from the local filesystem seems reasonable to me. In the context of a temporary directory tree, I don't see a semantic difference between "unmounting a mount point" and "removing a subdirectory entry" -- i.e. they both remove the offending subdirectory tree from the temporary directory tree. Internally, tempfile.TemporaryDirectory() calls shutil.rmtree() with a custom error handler. The handler tries to reset the permissions on the offending entry and calls os.unlink(). If this throws an error, it recursively calls shutil.rmtree() on the offending entry (ignoring the temp directory entry itself). This seems like where a mounted directory tree would get deleted. shutil.rmtree() follows the "rm -rf" semantics and refuses to delete a mount point. It seems reasonable to me to add special handling for mount points to the error handler in tempfile.TemporaryDirectory(). The high-level logic would be something like: if os.path.ismount(path): try: unmount_func(path) _shutil.rmtree(path) except FileNotFoundError: pass The tricky part is implementing unmount_func() in a portable manner since there is no such functionality currently implemented in the Python library. Also, what would be the appropriate behavior when unmount_func() fails (e.g. for a permission error)? Right now, any exceptions other than IsADirectoryError, IsADirectoryError, and FileNotFoundError are passed on to the caller. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 18:59:10 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Wed, 05 Jun 2019 22:59:10 +0000 Subject: [issue36422] tempfile.TemporaryDirectory() removes entire directory tree even if it's a mount-point In-Reply-To: <1553512605.72.0.860422023516.issue36422@roundup.psfhosted.org> Message-ID: <1559775550.63.0.871340966461.issue36422@roundup.psfhosted.org> Jeffrey Kintscher added the comment: (correcting typos) What would be the appropriate behavior when unmount_func() fails (e.g. for a permission error)? Right now, any exceptions other than IsADirectoryError, PermissionError, and FileNotFoundError are passed on to the caller. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 19:02:40 2019 From: report at bugs.python.org (Stefan Krah) Date: Wed, 05 Jun 2019 23:02:40 +0000 Subject: [issue37168] Decimal divisions sometimes 10x or 100x too large In-Reply-To: <1559772321.45.0.42770583159.issue37168@roundup.psfhosted.org> Message-ID: <1559775760.83.0.498403283445.issue37168@roundup.psfhosted.org> Stefan Krah added the comment: Thank you for the detailed report. So, in an attempt to summarize, this is the crucial passage: >>> ideal_exp = -1 >>> exp = -29 >>> coeff = 150000000000000000000000000000 >>> division_counter = 0 >>> while exp < ideal_exp and coeff % 10 == 0: ... coeff //= 10 ... exp += 1 ... division_counter += 1 ... >>> coeff 15L >>> exp -1 >>> division_counter 28 But you sometimes get coeff==150 and division_counter==27 instead. Is that correct? The first thing to consider is whether Alpine Linux uses a patched Python version or if you can reproduce this on Python 2.7.15 compiled from source. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 19:05:31 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 05 Jun 2019 23:05:31 +0000 Subject: [issue37165] Convert _collections._count_elements() to the Argument Clinic In-Reply-To: <1559760307.2.0.195086878247.issue37165@roundup.psfhosted.org> Message-ID: <1559775931.66.0.459604886801.issue37165@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset e985804207473796a1326585b3e1b9e18c764345 by Raymond Hettinger in branch 'master': bpo-37165: Convert _count_elements to the argument clinic (GH-13848) https://github.com/python/cpython/commit/e985804207473796a1326585b3e1b9e18c764345 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 19:05:54 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Jun 2019 23:05:54 +0000 Subject: [issue37165] Convert _collections._count_elements() to the Argument Clinic In-Reply-To: <1559760307.2.0.195086878247.issue37165@roundup.psfhosted.org> Message-ID: <1559775954.69.0.698547366322.issue37165@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13729 pull_request: https://github.com/python/cpython/pull/13853 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 19:11:49 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 05 Jun 2019 23:11:49 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559776309.24.0.801922161845.issue37134@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset c4c421d619baf2ff2f7e09f55b7ae22b8f863c7b by Pablo Galindo in branch 'master': bpo-37134: Use PEP570 syntax for sum() (GH-13851) https://github.com/python/cpython/commit/c4c421d619baf2ff2f7e09f55b7ae22b8f863c7b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 19:15:22 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Jun 2019 23:15:22 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559776522.19.0.647034523894.issue37134@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13730 pull_request: https://github.com/python/cpython/pull/13854 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 19:21:01 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Jun 2019 23:21:01 +0000 Subject: [issue37165] Convert _collections._count_elements() to the Argument Clinic In-Reply-To: <1559760307.2.0.195086878247.issue37165@roundup.psfhosted.org> Message-ID: <1559776861.04.0.688153720746.issue37165@roundup.psfhosted.org> miss-islington added the comment: New changeset 21ce2454de57caaa532d11d76544632608f4b86b by Miss Islington (bot) in branch '3.8': bpo-37165: Convert _count_elements to the argument clinic (GH-13848) https://github.com/python/cpython/commit/21ce2454de57caaa532d11d76544632608f4b86b ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 19:21:11 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 05 Jun 2019 23:21:11 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559776871.23.0.301769751057.issue37134@roundup.psfhosted.org> miss-islington added the comment: New changeset 23f41a64ea668296fa89e25f3cfa11f63026ecac by Miss Islington (bot) in branch '3.8': bpo-37134: Use PEP570 syntax for sum() (GH-13851) https://github.com/python/cpython/commit/23f41a64ea668296fa89e25f3cfa11f63026ecac ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 19:51:51 2019 From: report at bugs.python.org (Matej Cepl) Date: Wed, 05 Jun 2019 23:51:51 +0000 Subject: [issue37169] test_pyobject_is_freed_free fails with 3.8.0beta1 Message-ID: <1559778711.54.0.15966452891.issue37169@roundup.psfhosted.org> New submission from Matej Cepl : When building openSUSE package for Python-3.8.0b1 (on x86_64 build system with the latest openSUSE/Tumbleweed) in the package which previously worked all the way up to 3.8.0.a4, I get this test failing: [ 5771s] ====================================================================== [ 5771s] FAIL: test_pyobject_is_freed_free (test.test_capi.PyMemMallocDebugTests) [ 5771s] ---------------------------------------------------------------------- [ 5771s] Traceback (most recent call last): [ 5771s] File "/home/abuild/rpmbuild/BUILD/Python-3.8.0b1/Lib/test/test_capi.py", line 729, in test_pyobject_is_freed_free [ 5771s] self.check_pyobject_is_freed('pyobject_freed') [ 5771s] File "/home/abuild/rpmbuild/BUILD/Python-3.8.0b1/Lib/test/test_capi.py", line 720, in check_pyobject_is_freed [ 5771s] assert_python_ok('-c', code, PYTHONMALLOC=self.PYTHONMALLOC) [ 5771s] File "/home/abuild/rpmbuild/BUILD/Python-3.8.0b1/Lib/test/support/script_helper.py", line 157, in assert_python_ok [ 5771s] return _assert_python(True, *args, **env_vars) [ 5771s] File "/home/abuild/rpmbuild/BUILD/Python-3.8.0b1/Lib/test/support/script_helper.py", line 143, in _assert_python [ 5771s] res.fail(cmd_line) [ 5771s] File "/home/abuild/rpmbuild/BUILD/Python-3.8.0b1/Lib/test/support/script_helper.py", line 70, in fail [ 5771s] raise AssertionError("Process return code is %d\n" [ 5771s] AssertionError: Process return code is 1 [ 5771s] command line: ['/home/abuild/rpmbuild/BUILD/Python-3.8.0b1/python', '-X', 'faulthandler', '-c', '\nimport gc, os, sys, _testcapi\n# Disable the GC to avoid crash on GC collection\ngc.disable()\nobj = _testcapi.pyobject_freed()\nerror = (_testcapi.pyobject_is_freed(obj) == False)\n# Exit immediately to avoid a crash while deallocating\n# the invalid object\nos._exit(int(error))\n'] [ 5771s] [ 5771s] stdout: [ 5771s] --- [ 5771s] [ 5771s] --- [ 5771s] [ 5771s] stderr: [ 5771s] --- [ 5771s] [ 5771s] --- [ 5771s] [ 5771s] ---------------------------------------------------------------------- ---------- components: Interpreter Core messages: 344782 nosy: mcepl priority: normal severity: normal status: open title: test_pyobject_is_freed_free fails with 3.8.0beta1 versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 19:52:30 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Wed, 05 Jun 2019 23:52:30 +0000 Subject: [issue35669] tar symlink In-Reply-To: <1546765691.35.0.523415727187.issue35669@roundup.psfhosted.org> Message-ID: <1559778750.03.0.465683999999.issue35669@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 19:57:24 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Wed, 05 Jun 2019 23:57:24 +0000 Subject: [issue33010] os.path.isdir() returns True for broken directory symlinks or junctions In-Reply-To: <1520329654.61.0.467229070634.issue33010@psf.upfronthosting.co.za> Message-ID: <1559779044.7.0.821468511203.issue33010@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 20:06:25 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Thu, 06 Jun 2019 00:06:25 +0000 Subject: [issue24231] os.makedirs('/', exist_ok=True) fails on Darwin In-Reply-To: <1431969821.39.0.237201791785.issue24231@psf.upfronthosting.co.za> Message-ID: <1559779585.03.0.953433903747.issue24231@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 16:09:45 2019 From: report at bugs.python.org (Aaron Meurer) Date: Wed, 05 Jun 2019 20:09:45 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences In-Reply-To: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> Message-ID: <1559765385.64.0.571278581934.issue32912@roundup.psfhosted.org> Aaron Meurer added the comment: I agree with Raymond that third party libraries are not ready for this. My biggest issue is that the way Python warns about this makes it very difficult for library authors to fix this. Most won't even notice. The problem is the warnings are only shown once, when the file is compiled. So if you run the code in any way that causes Python to compile it, a further run of 'python -Wd' will show nothing. I don't know if it's reasonable, but it would be nice if Python recompiled when given -Wd, or somehow saved the warning so it could be shown if that flag is given later. As an anecdote, for SymPy's CI, we went through five (if I am counting correctly) iterations of trying to test this. Each of the first four were subtly incorrect, until we finally managed to find the correct one (for reference, 'python -We:invalid -m compileall -f -q module/'). So most library authors who will attempt to add tests against this will get it wrong. Simply adding -Wd as you would expect is wrong. If the code is already compiled (which it probably is, e.g., if you ran setup.py), it won't show the warnings. At the very least the "correct" way to test this should be documented. Things would probably be improved if the warnings were always shown, as at least then devs will see the error once (although most will probably be confused when the warning doesn't repeat). Another problem is the information in the warnings. It seems the line number of the string is now shown, which is an improvement (https://bugs.python.org/issue28128). It would be nice if it showed the actual line and column number in the file of the invalid escape. This is especially annoying when an escape appears in a docstring. It just shows """ as the offending line. We have a lot of LaTeX in our docstrings in SymPy, so we had quite a few of these to fix. SymPy doesn't have invalid escapes anymore because I was proactive about it, but from what I've seen, most library authors haven't been. By the way, this looks like a bug (python 3.8b1): $ cat test.py """ a \p """ $ python -We:invalid test.py File "test.py", line 2 ^ SyntaxError: invalid escape sequence \p $ It might not be possible to see in what I pasted, but it filled my terminal with spaces. ---------- nosy: +asmeurer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 22:31:27 2019 From: report at bugs.python.org (Brian Skinn) Date: Thu, 06 Jun 2019 02:31:27 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559788287.5.0.515673440062.issue37134@roundup.psfhosted.org> Brian Skinn added the comment: Brett, to be clear, this sounds like the tabbed solution is not going to be used at this point? If so, I'll pull down the tabbed docs I'm hosting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 23:14:56 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 06 Jun 2019 03:14:56 +0000 Subject: [issue32884] Adding the ability for getpass to print asterisks when passowrd is typed In-Reply-To: <1519122533.37.0.467229070634.issue32884@psf.upfronthosting.co.za> Message-ID: <1559790896.72.0.519682154379.issue32884@roundup.psfhosted.org> Steven D'Aprano added the comment: See also #36566. (Thanks Cheryl.) I think the usability improvement for this far outweigh the decrease in security. The days where somebody looking over your shoulder watching you type your password was the major threat are long gone. Hiding the length of the password against a shoulder-surfing adversary is so-1970s :-) For old-school Unix types we ought to default to hiding the password. But I'm +1 in allowing developers to choose to trade off a tiny decrease in security against a major increase in usability. The bottom line is that if you have a weak password, hiding the length won't save you; if you have a strong password, hiding the length doesn't add any appreciable difficulty to the attacker. ---------- nosy: +steven.daprano versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 23:26:25 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Thu, 06 Jun 2019 03:26:25 +0000 Subject: [issue36422] tempfile.TemporaryDirectory() removes entire directory tree even if it's a mount-point In-Reply-To: <1553512605.72.0.860422023516.issue36422@roundup.psfhosted.org> Message-ID: <1559791585.72.0.0854090884073.issue36422@roundup.psfhosted.org> Jeffrey Kintscher added the comment: Since tempfile.TemporaryDirectory() already returns some exceptions to the caller when it can't figure out how to delete a directory item, I don't see a problem with throwing PermissionError when encountering a mount point. This would preserve the 'rm -rf' semantics of the underlying shutil.rmtree() calls. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 5 23:35:55 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 06 Jun 2019 03:35:55 +0000 Subject: [issue35551] Encoding and alias issues In-Reply-To: <1545386892.27.0.788709270274.issue35551@psf.upfronthosting.co.za> Message-ID: <1559792155.0.0.0674789211425.issue35551@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +13731 pull_request: https://github.com/python/cpython/pull/13856 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 00:14:01 2019 From: report at bugs.python.org (Matthias Klose) Date: Thu, 06 Jun 2019 04:14:01 +0000 Subject: [issue37162] new importlib dependencies csv, email and zipfile In-Reply-To: <1559732109.6.0.0655643851833.issue37162@roundup.psfhosted.org> Message-ID: <1559794441.75.0.72393747308.issue37162@roundup.psfhosted.org> Matthias Klose added the comment: yes, that's for the minimal package. zipfile is found in Lib/importlib/_bootstrap_external.py Again, it's just a question here, having found an unmotivated distutils import before in one of the standard modules. ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 00:58:09 2019 From: report at bugs.python.org (Tim Peters) Date: Thu, 06 Jun 2019 04:58:09 +0000 Subject: [issue37168] Decimal divisions sometimes 10x or 100x too large In-Reply-To: <1559772321.45.0.42770583159.issue37168@roundup.psfhosted.org> Message-ID: <1559797089.2.0.884659781596.issue37168@roundup.psfhosted.org> Tim Peters added the comment: Also basic: run hardware CPU and memory stress diagnostics, and/or try running the same thing on a different machine. Hardware isn't infallible, and can fail in nearly arbitrary ways. For example, perhaps a smidgen of silicon has gone flaky, so that one time in a billion bit 0 "leaks" into bit 1 in a register. That can effectively change the integer 1 to the integer 2. Is that likely? No. But a loop doing mutually inconsistent things to the variables it's changing is impossible ;-) ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 01:39:04 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 06 Jun 2019 05:39:04 +0000 Subject: [issue35551] Encoding and alias issues In-Reply-To: <1545386892.27.0.788709270274.issue35551@psf.upfronthosting.co.za> Message-ID: <1559799544.33.0.141563062251.issue35551@roundup.psfhosted.org> Inada Naoki added the comment: New changeset cb65202520e7959196a2df8215692de155bf0cc8 by Inada Naoki in branch 'master': bpo-35551: remove mac_centeuro encoding (GH-13856) https://github.com/python/cpython/commit/cb65202520e7959196a2df8215692de155bf0cc8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 02:52:41 2019 From: report at bugs.python.org (Antti Haapala) Date: Thu, 06 Jun 2019 06:52:41 +0000 Subject: [issue37170] Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall Message-ID: <1559803961.74.0.856942246401.issue37170@roundup.psfhosted.org> New submission from Antti Haapala : Hi, while checking the longobject implementation for a Stack Overflow answer, I noticed that the functions `_PyLong_AsUnsignedLongLongMask` and `PyLong_AsUnsignedLongLongMask` erroneously return `(unsigned long)-1` on error when bad internal call is thrown. First case: https://github.com/python/cpython/blob/cb65202520e7959196a2df8215692de155bf0cc8/Objects/longobject.c#L1379 static unsigned long long _PyLong_AsUnsignedLongLongMask(PyObject *vv) { PyLongObject *v; unsigned long long x; Py_ssize_t i; int sign; if (vv == NULL || !PyLong_Check(vv)) { PyErr_BadInternalCall(); return (unsigned long) -1; <<<< } Second case: https://github.com/python/cpython/blob/cb65202520e7959196a2df8215692de155bf0cc8/Objects/longobject.c#L1407 They seem to have been incorrect for quite some time, the other one blames back to the SVN era. The bug seems to be in 2.7 alike: https://github.com/python/cpython/blob/20093b3adf6b06930fe994527670dfb3aee40cc7/Objects/longobject.c#L1025 The correct return value should of course be `(unsigned long long)-1` ---------- components: Interpreter Core messages: 344789 nosy: ztane priority: normal severity: normal status: open title: Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 02:54:48 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jun 2019 06:54:48 +0000 Subject: [issue37170] Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall In-Reply-To: <1559803961.74.0.856942246401.issue37170@roundup.psfhosted.org> Message-ID: <1559804088.48.0.772535483982.issue37170@roundup.psfhosted.org> STINNER Victor added the comment: -1 is documented: https://docs.python.org/dev/c-api/long.html#c.PyLong_AsUnsignedLongLongMask It's not a bug but a deliberate behavior. See also the general behavior described at: https://docs.python.org/dev/c-api/long.html#integer-objects ---------- nosy: +vstinner resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 02:56:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jun 2019 06:56:05 +0000 Subject: [issue37168] Decimal divisions sometimes 10x or 100x too large In-Reply-To: <1559772321.45.0.42770583159.issue37168@roundup.psfhosted.org> Message-ID: <1559804165.74.0.801128329185.issue37168@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 03:19:18 2019 From: report at bugs.python.org (Antti Haapala) Date: Thu, 06 Jun 2019 07:19:18 +0000 Subject: [issue37170] Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall In-Reply-To: <1559803961.74.0.856942246401.issue37170@roundup.psfhosted.org> Message-ID: <1559805558.03.0.913137767612.issue37170@roundup.psfhosted.org> Antti Haapala added the comment: Victor, as a friendly reminder, (unsigned long)-1 is not necessarily the same number as (unsigned long long)-1. The documentation means the latter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 03:56:55 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 06 Jun 2019 07:56:55 +0000 Subject: [issue37075] Error message improvement for AsyncMock In-Reply-To: <1559037010.51.0.223468847551.issue37075@roundup.psfhosted.org> Message-ID: <1559807815.55.0.269301372062.issue37075@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 04:22:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jun 2019 08:22:19 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1559809339.41.0.644212408649.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13732 pull_request: https://github.com/python/cpython/pull/13857 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 04:30:19 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 06 Jun 2019 08:30:19 +0000 Subject: [issue36848] autospec fails with AttributeError when mocked class has __signature__ non-writeable In-Reply-To: <1557298633.85.0.260410761482.issue36848@roundup.psfhosted.org> Message-ID: <1559809819.25.0.901314756589.issue36848@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: The jira issue in pyside2 is closed as fixed. I am closing this as third party. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 04:39:46 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 06 Jun 2019 08:39:46 +0000 Subject: [issue35022] MagicMock should support `__fspath__` In-Reply-To: <1539908991.05.0.788709270274.issue35022@psf.upfronthosting.co.za> Message-ID: <1559810386.89.0.327394532193.issue35022@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Closing this as resolved since this is merged for 3.8. Thank you all. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 04:45:14 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 06 Jun 2019 08:45:14 +0000 Subject: [issue32644] unittest.mock.call len() error In-Reply-To: <1516776758.4.0.467229070634.issue32644@psf.upfronthosting.co.za> Message-ID: <1559810714.58.0.68717092837.issue32644@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: call objects inherit from tuple and here the reported argument is a dict with 3 items returning len of 3. I am closing this as part of triaging since there is no additional information from @snakevil on reproducing this. Feel free to reopen this if there is more information on reproducing the issue. ./python.exe Python 3.9.0a0 (heads/master:cb65202520, Jun 6 2019, 11:15:04) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from unittest.mock import call >>> c = call('solution', 'foo', {'__spots__': {}, '__event__': None, '__solution__': None}) >>> len(c.args[2]) 3 >>> len(c) 3 >>> c.args ('solution', 'foo', {'__spots__': {}, '__event__': None, '__solution__': None}) >>> c.kwargs {} ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 04:47:03 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 06 Jun 2019 08:47:03 +0000 Subject: [issue37169] test_pyobject_is_freed_free fails with 3.8.0beta1 In-Reply-To: <1559778711.54.0.15966452891.issue37169@roundup.psfhosted.org> Message-ID: <1559810823.9.0.491055975748.issue37169@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 05:05:13 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 06 Jun 2019 09:05:13 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1559811913.01.0.19945429216.issue36974@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +13733 pull_request: https://github.com/python/cpython/pull/13858 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 05:52:06 2019 From: report at bugs.python.org (Dima Tisnek) Date: Thu, 06 Jun 2019 09:52:06 +0000 Subject: [issue37171] Documentation mismatch contextvars module vs PEP-567 Message-ID: <1559814726.03.0.917763473922.issue37171@roundup.psfhosted.org> New submission from Dima Tisnek : PEP-567 states that user "must call Context.run()" while `contextvars` docs don't mention `.run()` `contextvars.Context().run(arg)` exists, but there's no documentation, for example what the required argument is. ---------- components: asyncio messages: 344795 nosy: Dima.Tisnek, asvetlov, yselivanov priority: normal severity: normal status: open title: Documentation mismatch contextvars module vs PEP-567 versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 06:04:00 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 06 Jun 2019 10:04:00 +0000 Subject: [issue37171] Documentation mismatch contextvars module vs PEP-567 In-Reply-To: <1559814726.03.0.917763473922.issue37171@roundup.psfhosted.org> Message-ID: <1559815440.59.0.382909779123.issue37171@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Is this different from the docs at https://docs.python.org/3/library/contextvars.html#contextvars.Context.run? ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 06:13:13 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Jun 2019 10:13:13 +0000 Subject: [issue2661] Mapping tests cannot be passed by user implementations In-Reply-To: <1208642973.7.0.825847798287.issue2661@psf.upfronthosting.co.za> Message-ID: <1559815993.72.0.856789672896.issue2661@roundup.psfhosted.org> miss-islington added the comment: New changeset 6af230359e57122708247dac970e05e05529cde6 by Miss Islington (bot) (Walter D?rwald) in branch 'master': bpo-2661: Make mapping tests better usable for custom mapping classes. (GH-11157) https://github.com/python/cpython/commit/6af230359e57122708247dac970e05e05529cde6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 06:14:31 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 06 Jun 2019 10:14:31 +0000 Subject: [issue2661] Mapping tests cannot be passed by user implementations In-Reply-To: <1208642973.7.0.825847798287.issue2661@psf.upfronthosting.co.za> Message-ID: <1559816071.46.0.308970269005.issue2661@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 06:16:48 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 06 Jun 2019 10:16:48 +0000 Subject: [issue37170] Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall In-Reply-To: <1559803961.74.0.856942246401.issue37170@roundup.psfhosted.org> Message-ID: <1559816208.59.0.555832720462.issue37170@roundup.psfhosted.org> Change by Zackery Spytz : ---------- pull_requests: +13734 pull_request: https://github.com/python/cpython/pull/13860 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 06:29:59 2019 From: report at bugs.python.org (Dima Tisnek) Date: Thu, 06 Jun 2019 10:29:59 +0000 Subject: [issue37172] Odd error awating a Future Message-ID: <1559816999.36.0.898434753785.issue37172@roundup.psfhosted.org> New submission from Dima Tisnek : Let's start with correct code: import asyncio async def writer(): await asyncio.sleep(1) g1.set_result(41) async def reader(): await g1 async def test(): global g1 g1 = asyncio.Future() await asyncio.gather(reader(), writer()) asyncio.run(test()) No error, as expected. Now let's mess it up a bit: import asyncio g1 = asyncio.Future() async def writer(): await asyncio.sleep(1) g1.set_result(41) async def reader(): await g1 async def test(): await asyncio.gather(reader(), writer()) asyncio.run(test()) Fails with RuntimeError ... attached to a different loop The error makes sense, although it's sad that I can't create global futures / there was no even loop when Future was creates, it was not a *different* event loop / maybe I wish .run() didn't force a new event loop? A nit (IMO), but I can live with it. Let's mess the code up a bit more: import asyncio g1 = asyncio.Future() async def writer(): await asyncio.sleep(1) g1.set_result(41) async def reader(): await g1 async def test(): await asyncio.gather(reader(), reader(), writer()) asyncio.run(test()) RuntimeError: await wasn't used with future What? That's really confusing! The only difference is that there are now 2 readers running in parallel. The actual exception comes from asyncio.Future.__await__ after a yield. I'm not sure how to fix this... ---------- components: asyncio messages: 344798 nosy: Dima.Tisnek, asvetlov, yselivanov priority: normal severity: normal status: open title: Odd error awating a Future versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 06:39:08 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Jun 2019 10:39:08 +0000 Subject: [issue35082] Mock.__dir__ lists deleted attributes In-Reply-To: <1540637110.3.0.788709270274.issue35082@psf.upfronthosting.co.za> Message-ID: <1559817548.83.0.354698380556.issue35082@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13735 pull_request: https://github.com/python/cpython/pull/13859 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 06:40:24 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 06 Jun 2019 10:40:24 +0000 Subject: [issue35082] Mock.__dir__ lists deleted attributes In-Reply-To: <1540637110.3.0.788709270274.issue35082@psf.upfronthosting.co.za> Message-ID: <1559817624.93.0.64308049267.issue35082@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 06:40:30 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 06 Jun 2019 10:40:30 +0000 Subject: [issue35082] Mock.__dir__ lists deleted attributes In-Reply-To: <1540637110.3.0.788709270274.issue35082@psf.upfronthosting.co.za> Message-ID: <1559817630.59.0.684348222423.issue35082@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 07:08:14 2019 From: report at bugs.python.org (flying sheep) Date: Thu, 06 Jun 2019 11:08:14 +0000 Subject: [issue37173] inspect.getfile error names module instead of passed class Message-ID: <1559819294.25.0.844595961888.issue37173@roundup.psfhosted.org> New submission from flying sheep : Currently, inspect.getfile(str) will report nonsense: >>> inspect.getfile(str) TypeError: is a built-in class ---------- components: Library (Lib) messages: 344799 nosy: flying sheep priority: normal severity: normal status: open title: inspect.getfile error names module instead of passed class versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 07:08:35 2019 From: report at bugs.python.org (flying sheep) Date: Thu, 06 Jun 2019 11:08:35 +0000 Subject: [issue37173] inspect.getfile error names module instead of passed class In-Reply-To: <1559819294.25.0.844595961888.issue37173@roundup.psfhosted.org> Message-ID: <1559819315.31.0.582383358822.issue37173@roundup.psfhosted.org> Change by flying sheep : ---------- keywords: +patch pull_requests: +13736 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13861 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 07:10:52 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 06 Jun 2019 11:10:52 +0000 Subject: [issue37172] Odd error awating a Future In-Reply-To: <1559816999.36.0.898434753785.issue37172@roundup.psfhosted.org> Message-ID: <1559819452.43.0.437529408683.issue37172@roundup.psfhosted.org> Andrew Svetlov added the comment: Global future objects (and global asyncio objects in general) don't work with asyncio.run(). The lifecycle of these objects should be closer than loop but asyncio.run() creates a loop during execution. I think this is a good design, we have a plan to deprecate and eventually drop all old-times mess that allows confusions. All three of your problems are because you use a global future which is implicitly attached to the different loop. Also I'd like to note that futures are low-level API, which is very delicate and error-prone. Futures are crucial for libraries building (e.g. aiohttp uses them a lot) but working with futures in application code is an explicit sign of bad design. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 07:34:15 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 06 Jun 2019 11:34:15 +0000 Subject: [issue37102] Automatically dedent docstring constants by default In-Reply-To: <1559239200.57.0.0816589870282.issue37102@roundup.psfhosted.org> Message-ID: <1559820855.23.0.00632712682367.issue37102@roundup.psfhosted.org> Inada Naoki added the comment: How about do `inspect.cleandoc()` instead of just a dedent? Some method has docstring like this: """First line blah blah blah blah example code here ... """ In such docstring, dedent can not strip indent well. There is existing attempt (in Japanese): https://qiita.com/hhatto/items/3da6c6820817395f2c39#%E6%84%9A%E7%9B%B4%E3%81%AB%E5%AE%9F%E8%A3%85%E3%81%97%E3%81%9F%E3%82%B3%E3%83%BC%E3%83%89 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 07:43:08 2019 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 06 Jun 2019 11:43:08 +0000 Subject: [issue37170] Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall In-Reply-To: <1559803961.74.0.856942246401.issue37170@roundup.psfhosted.org> Message-ID: <1559821388.4.0.246804305076.issue37170@roundup.psfhosted.org> Eric V. Smith added the comment: As ztane says, the issue isn't the -1, it's the type of the cast. This looks like a legitimate issue to me. ---------- nosy: +eric.smith resolution: not a bug -> stage: resolved -> patch review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 07:57:57 2019 From: report at bugs.python.org (Dima Tisnek) Date: Thu, 06 Jun 2019 11:57:57 +0000 Subject: [issue37171] Documentation mismatch contextvars module vs PEP-567 In-Reply-To: <1559814726.03.0.917763473922.issue37171@roundup.psfhosted.org> Message-ID: <1559822277.74.0.832515663221.issue37171@roundup.psfhosted.org> Dima Tisnek added the comment: It seems I have been blind. I'll close this. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 08:06:26 2019 From: report at bugs.python.org (Maximilian Ernestus) Date: Thu, 06 Jun 2019 12:06:26 +0000 Subject: [issue37174] sched.py: run() is caught in delayfunc even if all events are cancelled. Message-ID: <1559822786.43.0.93146538102.issue37174@roundup.psfhosted.org> New submission from Maximilian Ernestus : When I remove all events from a scheduler while its run() is being executed (with blocking=True in another thread), run() continues to block for some time because it is caught in its delayfunc which is time.sleep by default. This issue can easily be solved by using the wait() function of a threading.Event as the delayfunc and setting the event whenever the queue becomes empty. The referenced pull request adds this functionality by default. I also added a cancel_all() method which should be far more efficient than iterating all events and deleting them individually. ---------- components: Library (Lib) messages: 344804 nosy: ernestum priority: normal pull_requests: 13738 severity: normal status: open title: sched.py: run() is caught in delayfunc even if all events are cancelled. type: enhancement versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 08:14:20 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 06 Jun 2019 12:14:20 +0000 Subject: [issue36624] cleanup the stdlib and tests with regard to sys.platform usage In-Reply-To: <1555158343.77.0.950141438455.issue36624@roundup.psfhosted.org> Message-ID: <1559823260.21.0.135262462578.issue36624@roundup.psfhosted.org> Tal Einat added the comment: Steve's suggestion sounds reasonable. Should we just add this to the devguide, then? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 08:22:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jun 2019 12:22:33 +0000 Subject: [issue37170] Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall In-Reply-To: <1559803961.74.0.856942246401.issue37170@roundup.psfhosted.org> Message-ID: <1559823753.97.0.972245837914.issue37170@roundup.psfhosted.org> STINNER Victor added the comment: > Victor, as a friendly reminder, (unsigned long)-1 is not necessarily the same number as (unsigned long long)-1. The documentation means the latter. Aaaah, I didn't notice that the function returns unsigned *long long*, sorry :-) Which platform is impacted? Windows 64-bit? Does it mean that we have zero unit test on this function? Or does it mean that (unsigned long)-1 is compiled correctly as (unsigned long long)-1 on Windows 64-bit? Is "long long" 8 bytes long and "long" 4 bytes long on Windows 64-bit? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 08:24:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jun 2019 12:24:36 +0000 Subject: [issue37169] test_pyobject_is_freed_free fails with 3.8.0beta1 In-Reply-To: <1559778711.54.0.15966452891.issue37169@roundup.psfhosted.org> Message-ID: <1559823876.52.0.750349484744.issue37169@roundup.psfhosted.org> STINNER Victor added the comment: > When building openSUSE package for Python-3.8.0b1 (on x86_64 build system with the latest openSUSE/Tumbleweed) How do you build Python? * configure command * C compiler * etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 08:25:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jun 2019 12:25:35 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1559823935.1.0.276867006043.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 013a18a65167725f140c0395211050ae03501b12 by Victor Stinner in branch 'master': bpo-36763, _testembed: enable assert() in release mode (GH-13857) https://github.com/python/cpython/commit/013a18a65167725f140c0395211050ae03501b12 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 08:26:12 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Jun 2019 12:26:12 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1559823972.2.0.539182643254.issue36763@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13739 pull_request: https://github.com/python/cpython/pull/13863 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 08:29:41 2019 From: report at bugs.python.org (Antti Haapala) Date: Thu, 06 Jun 2019 12:29:41 +0000 Subject: [issue37170] Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall In-Reply-To: <1559803961.74.0.856942246401.issue37170@roundup.psfhosted.org> Message-ID: <1559824181.87.0.286156736636.issue37170@roundup.psfhosted.org> Antti Haapala added the comment: Unsigned long long needs to be at least 64 bits wide, so it is probably all 32-bit platforms and 64-bit window at least. These functions are not used only in a few places within the CPython code and when they are they're guarded with `PyLong_Check`s or similar, as they probably should, but the other is part of public API ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 08:43:02 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Jun 2019 12:43:02 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1559824982.27.0.377838279349.issue36763@roundup.psfhosted.org> miss-islington added the comment: New changeset 406284173a43f5c34643133e2f132ae15a071a23 by Miss Islington (bot) in branch '3.8': bpo-36763, _testembed: enable assert() in release mode (GH-13857) https://github.com/python/cpython/commit/406284173a43f5c34643133e2f132ae15a071a23 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 09:00:35 2019 From: report at bugs.python.org (daniel hahler) Date: Thu, 06 Jun 2019 13:00:35 +0000 Subject: [issue36786] "make install" should run compileall in parallel In-Reply-To: <1556908628.98.0.810004261153.issue36786@roundup.psfhosted.org> Message-ID: <1559826035.84.0.18761960461.issue36786@roundup.psfhosted.org> daniel hahler added the comment: This can be closed as per https://github.com/python/cpython/commit/1a2dd82f56bd813aacc570e172cefe55a8a41504. ---------- nosy: +blueyed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 09:03:12 2019 From: report at bugs.python.org (daniel hahler) Date: Thu, 06 Jun 2019 13:03:12 +0000 Subject: [issue37175] make install: make compileall optional Message-ID: <1559826192.88.0.243223248459.issue37175@roundup.psfhosted.org> New submission from daniel hahler : I'd like to make running compileall optionally during installation, since it takes quite a while by itself (with lots of output), and gets a bit into the way when installing often (e.g. with git-bisect). AFAIK it should not be required, because the files would be compiled on demand as usual. I could imagine having an explicit target for this, or a make variable to control this, i.e. "make install COMPILEALL=0". ---------- components: Installation messages: 344812 nosy: blueyed priority: normal severity: normal status: open title: make install: make compileall optional type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 09:09:09 2019 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 06 Jun 2019 13:09:09 +0000 Subject: [issue37170] Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall In-Reply-To: <1559803961.74.0.856942246401.issue37170@roundup.psfhosted.org> Message-ID: <1559826549.19.0.996382342181.issue37170@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 09:09:35 2019 From: report at bugs.python.org (Andrei Zene) Date: Thu, 06 Jun 2019 13:09:35 +0000 Subject: [issue28708] Low FD_SETSIZE limit on Windows In-Reply-To: <1479250358.07.0.768722440644.issue28708@psf.upfronthosting.co.za> Message-ID: <1559826575.02.0.817418125101.issue28708@roundup.psfhosted.org> Andrei Zene added the comment: Awesome work Victor! Thanks! I'll give it a try. One thing I see mising though (if I understand well) is the allocation of three fd_sets (I posted a comment on github regarding that). Those fd_sets are currently allocated on stack and the array they contain is determined currently by FD_SETSIZE. We'll basically need a similar structure that we can allocate dynamically, and cast it to fd_set when passing it to the select call. I can go ahead and try implement the feedback and test it together with the changes in Victor's PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 09:15:52 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 06 Jun 2019 13:15:52 +0000 Subject: [issue36786] "make install" should run compileall in parallel In-Reply-To: <1556908628.98.0.810004261153.issue36786@roundup.psfhosted.org> Message-ID: <1559826952.72.0.274303894804.issue36786@roundup.psfhosted.org> Antoine Pitrou added the comment: Ah, I had forgotten to close this issue. Thanks. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 09:18:22 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 06 Jun 2019 13:18:22 +0000 Subject: [issue37151] Calling code cleanup after PEP 590 In-Reply-To: <1559659244.35.0.514840211553.issue37151@roundup.psfhosted.org> Message-ID: <1559827102.88.0.0725907160287.issue37151@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +13740 pull_request: https://github.com/python/cpython/pull/13864 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 09:54:33 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 06 Jun 2019 13:54:33 +0000 Subject: [issue36922] Implement Py_TPFLAGS_METHOD_DESCRIPTOR In-Reply-To: <1557909585.08.0.913937443168.issue36922@roundup.psfhosted.org> Message-ID: <1559829273.19.0.297976144245.issue36922@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +13741 pull_request: https://github.com/python/cpython/pull/13865 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 09:59:34 2019 From: report at bugs.python.org (Eryk Sun) Date: Thu, 06 Jun 2019 13:59:34 +0000 Subject: [issue28708] Low FD_SETSIZE limit on Windows In-Reply-To: <1479250358.07.0.768722440644.issue28708@psf.upfronthosting.co.za> Message-ID: <1559829574.3.0.110498561394.issue28708@roundup.psfhosted.org> Eryk Sun added the comment: > Those fd_sets are currently allocated on stack and the array they > contain is determined currently by FD_SETSIZE. We'll basically need > a similar structure that we can allocate dynamically, and cast it to > fd_set when passing it to the select call. This is possible in Windows. Other platforms are limited to a fixed FD_SETSIZE, in which case the old error should be retained: if (index >= (unsigned int)FD_SETSIZE) { PyErr_SetString(PyExc_ValueError, "too many file descriptors in select()"); goto finally; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 10:07:13 2019 From: report at bugs.python.org (daniel hahler) Date: Thu, 06 Jun 2019 14:07:13 +0000 Subject: [issue37032] Add CodeType.replace() method In-Reply-To: <1558689955.85.0.932624363868.issue37032@roundup.psfhosted.org> Message-ID: <1559830033.12.0.347689288505.issue37032@roundup.psfhosted.org> daniel hahler added the comment: Thanks for this great improvement! Was about to suggest having something more futureproof when noticing this with pdbpp, found this, and submitted PRs to use it for ipython and hypothesis also. ---------- nosy: +blueyed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 10:15:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jun 2019 14:15:03 +0000 Subject: [issue37032] Add CodeType.replace() method In-Reply-To: <1558689955.85.0.932624363868.issue37032@roundup.psfhosted.org> Message-ID: <1559830503.27.0.620915617397.issue37032@roundup.psfhosted.org> STINNER Victor added the comment: > submitted PRs to use it for ipython and hypothesis also Cool! Thank you for doing that ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 10:26:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jun 2019 14:26:02 +0000 Subject: [issue37170] Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall In-Reply-To: <1559803961.74.0.856942246401.issue37170@roundup.psfhosted.org> Message-ID: <1559831162.75.0.116221343456.issue37170@roundup.psfhosted.org> STINNER Victor added the comment: Python 2.7 - 3.9 are affected. Python 3.6 no longer accept bugfixes. ---------- versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 10:36:45 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 06 Jun 2019 14:36:45 +0000 Subject: [issue37102] Automatically dedent docstring constants by default In-Reply-To: <1559239200.57.0.0816589870282.issue37102@roundup.psfhosted.org> Message-ID: <1559831805.18.0.314192991425.issue37102@roundup.psfhosted.org> R?mi Lapeyre added the comment: This is the function I inlined and as far as I can tell, my approach as been similar to the one you linked. I'm still need to fix some issues as doctest was expecting to find the string before dedenting though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 10:56:47 2019 From: report at bugs.python.org (Matej Cepl) Date: Thu, 06 Jun 2019 14:56:47 +0000 Subject: [issue37169] test_pyobject_is_freed_free fails with 3.8.0beta1 In-Reply-To: <1559778711.54.0.15966452891.issue37169@roundup.psfhosted.org> Message-ID: <1559833007.16.0.705260332567.issue37169@roundup.psfhosted.org> Matej Cepl added the comment: Complete build log which shows all dependent libraries, compilation options, etc. If you want any other artifacts (config.log, Python.h) just let me know. ---------- Added file: https://bugs.python.org/file48397/log.txt.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 11:17:23 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 06 Jun 2019 15:17:23 +0000 Subject: [issue37156] Fix libssl DLL tag in Tools/msi project In-Reply-To: <1559679658.46.0.279980896564.issue37156@roundup.psfhosted.org> Message-ID: <1559834243.13.0.374105183854.issue37156@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +13742 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13866 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 11:30:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jun 2019 15:30:44 +0000 Subject: [issue37169] test_pyobject_is_freed_free fails with 3.8.0beta1 In-Reply-To: <1559778711.54.0.15966452891.issue37169@roundup.psfhosted.org> Message-ID: <1559835044.69.0.201177447538.issue37169@roundup.psfhosted.org> STINNER Victor added the comment: Matej provides me a link to the build logs on IRC: It's GCC 9.1.1 (gcc9-9.1.1+r271393-1.2) The compilation uses PGO and LTO. ./configure --host=x86_64-suse-linux-gnu --build=x86_64-suse-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/lib --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --disable-dependency-tracking --docdir=/usr/share/doc/packages/python --enable-ipv6 --enable-shared --with-ensurepip=no --with-system-ffi --with-system-expat --with-lto --enable-optimizations --enable-loadable-sqlite-extensions [ 44s] configure: WARNING: unrecognized options: --disable-dependency-tracking, --disable-dependency-tracking -- I'm unable to reproduce the issue on Fedora 30 using GCC 9.1.1: $ ./configure --host=x86_64-suse-linux-gnu --build=x86_64-suse-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/lib --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --disable-dependency-tracking --docdir=/usr/share/doc/packages/python --enable-ipv6 --enable-shared --with-ensurepip=no --with-system-ffi --with-system-expat --with-lto --enable-optimizations --enable-loadable-sqlite-extensions ... $ vim Makefile # replace "PROFILE_TASK=..." with "PROFILE_TASK=-c pass", just to make compilation faster ;-) $ make ... $ LD_LIBRARY_PATH=$PWD ./python -m test -v test_capi ... Tests result: SUCCESS ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 11:37:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jun 2019 15:37:05 +0000 Subject: [issue37169] test_pyobject_is_freed_free fails with 3.8.0beta1 In-Reply-To: <1559778711.54.0.15966452891.issue37169@roundup.psfhosted.org> Message-ID: <1559835425.33.0.0739593583207.issue37169@roundup.psfhosted.org> STINNER Victor added the comment: test_pyobject_is_freed_free() test can be simplified as attached is_freed.py using: $ LD_LIBRARY_PATH=$PWD PYTHONMALLOC=debug ./python is_freed.py; echo $? 0 0 means success: the test pass. 1 means failure: the test fails. (Again, I cannot reproduce this failure.) ---------- Added file: https://bugs.python.org/file48398/is_freed.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 11:39:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jun 2019 15:39:21 +0000 Subject: [issue37169] test_pyobject_is_freed_free fails with 3.8.0beta1 In-Reply-To: <1559778711.54.0.15966452891.issue37169@roundup.psfhosted.org> Message-ID: <1559835561.41.0.749918285161.issue37169@roundup.psfhosted.org> STINNER Victor added the comment: Oh wait, only PyMemMallocDebugTests fails: class PyMemMallocDebugTests(PyMemDebugTests): PYTHONMALLOC = 'malloc_debug' Logs: [ 2863s] test_pyobject_is_freed_free (test.test_capi.PyMemDebugTests) ... ok [ 2863s] test_pyobject_is_freed_free (test.test_capi.PyMemDefaultTests) ... skipped 'need Py_DEBUG' [ 2863s] test_pyobject_is_freed_free (test.test_capi.PyMemMallocDebugTests) ... FAIL [ 2863s] test_pyobject_is_freed_free (test.test_capi.PyMemPymallocDebugTests) ... ok So the correct line to reproduce the bug should be: $ LD_LIBRARY_PATH=$PWD PYTHONMALLOC=malloc_debug ./python is_freed.py; echo $? 0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 11:43:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jun 2019 15:43:05 +0000 Subject: [issue37169] test_pyobject_is_freed_free fails with 3.8.0beta1 In-Reply-To: <1559778711.54.0.15966452891.issue37169@roundup.psfhosted.org> Message-ID: <1559835785.94.0.380734261106.issue37169@roundup.psfhosted.org> STINNER Victor added the comment: I designed unit tests to be optimistic: expect that freed memory will be untouched during a few Python instructions: # create an object, free its memory obj = _testcapi.pyobject_freed() # check that the object memory is freed error = (_testcapi.pyobject_is_freed(obj) == False) Maybe calling _testcapi.pyobject_is_freed() reuse the memory which has just been freed. The test should be fully ritten in C to avoid this issue. I wrote the test using 2 Python functions just to make the test simpler to write, but it seems like *sometimes*, it can fail. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 11:52:04 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 06 Jun 2019 15:52:04 +0000 Subject: [issue37138] PEP 590 method_vectorcall calls memcpy with NULL src In-Reply-To: <1559535370.56.0.947989437279.issue37138@roundup.psfhosted.org> Message-ID: <1559836324.42.0.645145188259.issue37138@roundup.psfhosted.org> Jeroen Demeyer added the comment: That's entirely my fault. I was not aware of the fact that calling memcpy() with src=NULL and length 0 was undefined behaviour. I disagree that it should be undefined, but there is not much point in arguing against the C standard. ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 12:00:50 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 06 Jun 2019 16:00:50 +0000 Subject: [issue37138] PEP 590 method_vectorcall calls memcpy with NULL src In-Reply-To: <1559535370.56.0.947989437279.issue37138@roundup.psfhosted.org> Message-ID: <1559836850.43.0.66701757176.issue37138@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +13743 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13867 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 12:02:23 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 06 Jun 2019 16:02:23 +0000 Subject: [issue37165] Convert _collections._count_elements() to the Argument Clinic In-Reply-To: <1559760307.2.0.195086878247.issue37165@roundup.psfhosted.org> Message-ID: <1559836943.79.0.699606305612.issue37165@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 12:06:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jun 2019 16:06:09 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1559837169.22.0.0128602842953.issue30458@roundup.psfhosted.org> STINNER Victor added the comment: Note for myself: Python 2 urllib.urlopen(url) always quotes the URL and so is not vulnerable to HTTP Header Injection (at least, not to this issue ;-)). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 12:06:58 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 06 Jun 2019 16:06:58 +0000 Subject: [issue37176] super() docs don't say what super() does Message-ID: <1559837218.79.0.128349910274.issue37176@roundup.psfhosted.org> New submission from Jeroen Demeyer : The documentation for super() at https://docs.python.org/3.8/library/functions.html#super does not actually say what super() does. It only says "Return a proxy object that delegates method calls to a parent or sibling class of type" and then gives a bunch of use cases and examples. If there is one place where we should define exactly what super() does (as opposed to give guidance on how to use it), the stdlib reference should be it. ---------- assignee: docs at python components: Documentation messages: 344827 nosy: docs at python, jdemeyer priority: normal severity: normal status: open title: super() docs don't say what super() does type: enhancement versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 12:07:00 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 06 Jun 2019 16:07:00 +0000 Subject: [issue37156] Fix libssl DLL tag in Tools/msi project In-Reply-To: <1559679658.46.0.279980896564.issue37156@roundup.psfhosted.org> Message-ID: <1559837220.21.0.290902767175.issue37156@roundup.psfhosted.org> Steve Dower added the comment: New changeset e0c0c7e8c9f8153a54b92e43aa3d09e69a9fd0c0 by Steve Dower in branch 'master': bpo-37156: Fix libssl DLL tag in MSI sources (GH-13866) https://github.com/python/cpython/commit/e0c0c7e8c9f8153a54b92e43aa3d09e69a9fd0c0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 12:07:26 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Jun 2019 16:07:26 +0000 Subject: [issue37156] Fix libssl DLL tag in Tools/msi project In-Reply-To: <1559679658.46.0.279980896564.issue37156@roundup.psfhosted.org> Message-ID: <1559837246.29.0.141209646812.issue37156@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13744 pull_request: https://github.com/python/cpython/pull/13868 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 12:08:19 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 06 Jun 2019 16:08:19 +0000 Subject: [issue18355] Merge super() guide into documentation In-Reply-To: <1372901200.41.0.725969821731.issue18355@psf.upfronthosting.co.za> Message-ID: <1559837299.39.0.620347337533.issue18355@roundup.psfhosted.org> Jeroen Demeyer added the comment: I opened another doc issue about super(): #37176 ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 12:11:56 2019 From: report at bugs.python.org (Michael Felt) Date: Thu, 06 Jun 2019 16:11:56 +0000 Subject: [issue36624] cleanup the stdlib and tests with regard to sys.platform usage In-Reply-To: <1559823260.21.0.135262462578.issue36624@roundup.psfhosted.org> Message-ID: <43acebb0-04c2-7254-14f2-1a139c3ad0cb@felt.demon.nl> Michael Felt added the comment: On 06/06/2019 14:14, Tal Einat wrote: > Tal Einat added the comment: > > Steve's suggestion sounds reasonable. > > Should we just add this to the devguide, then? Well, as I said before - it was never about THIS being the solution. While that would have been nice (for my ego). Would it be worthwhile, assuming this moves to "devguide" status - for me to work through the tests - looking for the tests that do not follow these guidelines and "patch" those? Probably minor, but it is something I could do. Think of it as "self-documentation" rather than .rst files. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 12:18:48 2019 From: report at bugs.python.org (Cooper Lees) Date: Thu, 06 Jun 2019 16:18:48 +0000 Subject: [issue34971] add support for tls/ssl sessions in asyncio In-Reply-To: <1539420460.92.0.788709270274.issue34971@psf.upfronthosting.co.za> Message-ID: <1559837928.95.0.78459735298.issue34971@roundup.psfhosted.org> Change by Cooper Lees : ---------- nosy: +cooperlees _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 12:21:59 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 06 Jun 2019 16:21:59 +0000 Subject: [issue37177] IDLE: Search dialogs can be hidden behind the main window Message-ID: <1559838119.79.0.14038633601.issue37177@roundup.psfhosted.org> New submission from Tal Einat : This issue was brought up by Irv Kalb on the idle-dev mailing list. I haven't been able to reproduce it exactly as he described, but I have managed to do so otherwise, and remember it happening on occasion on other computers. This appears to happen because the dialog windows are not being made transient relative to the main window. I'll have a PR up with a fix in a bit. Following is what Irv Kalb sent to the mailing list: I teach Python classes using IDLE. The search dialog is a real a problem for new students and me as the teacher. My students and I often get into a scenario where the search dialog gets hidden behind a editing window. When that happens, then you try to make edits in code and nothing happens. This happens to very often. I have learned to look for the hidden search dialog window, but my students get very flustered. Simple steps to reproduce (I'm using Python 3.6.1 with IDLE): Open a new document. Enter any code (e.g., a = 1) Bring up the Search Dialog. If the Search Dialog is not over the rectangle of the editing window, move it anywhere over the editing window. (This step is specifically to reproduce the problem, but this happens very often as students move windows around.) Search for: a Click: Find Next Click in the editing window (with the intention to make some change) Results: Search Dialog is now hidden behind the editing window. Keystrokes are now ignored in the editing window, even though the editing window appears to have focus. User has no idea about how to get out of this situation - unless they have seen it before and know that the Search Dialog is still active behind the current window. ---------- assignee: terry.reedy components: IDLE messages: 344831 nosy: taleinat, terry.reedy priority: normal severity: normal status: open title: IDLE: Search dialogs can be hidden behind the main window _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 12:22:35 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 06 Jun 2019 16:22:35 +0000 Subject: [issue37177] IDLE: Search dialogs can be hidden behind the main window In-Reply-To: <1559838119.79.0.14038633601.issue37177@roundup.psfhosted.org> Message-ID: <1559838155.03.0.399755403592.issue37177@roundup.psfhosted.org> Change by Tal Einat : ---------- stage: -> needs patch type: -> behavior versions: +Python 2.7, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 12:26:01 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 06 Jun 2019 16:26:01 +0000 Subject: [issue37177] IDLE: Search dialogs can be hidden behind the main window In-Reply-To: <1559838119.79.0.14038633601.issue37177@roundup.psfhosted.org> Message-ID: <1559838361.06.0.191935593088.issue37177@roundup.psfhosted.org> Change by Tal Einat : ---------- keywords: +patch pull_requests: +13745 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13869 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 12:26:36 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 06 Jun 2019 16:26:36 +0000 Subject: [issue37177] IDLE: Search dialogs can be hidden behind the main window In-Reply-To: <1559838119.79.0.14038633601.issue37177@roundup.psfhosted.org> Message-ID: <1559838396.5.0.742503797028.issue37177@roundup.psfhosted.org> Tal Einat added the comment: See proposed fix in GH-13869. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 12:30:28 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 06 Jun 2019 16:30:28 +0000 Subject: [issue37178] One argument form of math.perm() Message-ID: <1559838628.34.0.228461842236.issue37178@roundup.psfhosted.org> New submission from Raymond Hettinger : The perm() function should have a one argument form and change its signature to ``perm(n, k=None)``. This matches what itertools: itertools.permutations(iterable, r=None) Return successive r length permutations of elements in the iterable. If r is not specified or is None, then r defaults to the length of the iterable and all possible full-length permutations are generated. ---------- components: Library (Lib) messages: 344833 nosy: mark.dickinson, rhettinger, serhiy.storchaka, tim.peters priority: normal severity: normal status: open title: One argument form of math.perm() versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 12:31:34 2019 From: report at bugs.python.org (Phil Frost) Date: Thu, 06 Jun 2019 16:31:34 +0000 Subject: [issue37168] Decimal divisions sometimes 10x or 100x too large In-Reply-To: <1559772321.45.0.42770583159.issue37168@roundup.psfhosted.org> Message-ID: <1559838694.4.0.262879807647.issue37168@roundup.psfhosted.org> Phil Frost added the comment: skrah: Yes, that's correct. Since I can only produce this bug in production it will take me some days to build and validate a source build. But absent any better ideas, I will try. tim.peters: I've observed this bug across hundreds of EC2 hosts, in dozens of code paths, with all kinds of inputs. Moreover, the hosts aren't displaying any other symptoms of hardware failure such as random segfaults or mysteriously corrupted data. I've also deeply investigated two cores now which show specifically that `exp` seems to get 2 added when it should have been 1. I have a hard time explaining how a hardware failure can cause precisely the same failure so reliably. So I doubt hardware is to blame. Although, it does seem the issue occurs in "clumps" on individual hosts. So we might go 10 hours without seeing the issue, then it may happen 5 times within 30 minutes on one host. We might observe 1 or 2 more such clumps on the same host until the next deploy of the application, at which point all the containers are replaced with fresh ones. So this suggests there is some ephemeral state within a host that creates a propensity for the issue. I've also been unable to reproduce the problem in a development environment, even when that development environment is using the same kernel, instance class, and docker container as production. So I suspect the bug is precipitated by some particular concurrency or interaction that I haven't been able to replicate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 12:36:49 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Jun 2019 16:36:49 +0000 Subject: [issue37178] One argument form of math.perm() In-Reply-To: <1559838628.34.0.228461842236.issue37178@roundup.psfhosted.org> Message-ID: <1559839009.35.0.867022422351.issue37178@roundup.psfhosted.org> Serhiy Storchaka added the comment: perm(n, n) = factorial(n) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 12:38:01 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Jun 2019 16:38:01 +0000 Subject: [issue37156] Fix libssl DLL tag in Tools/msi project In-Reply-To: <1559679658.46.0.279980896564.issue37156@roundup.psfhosted.org> Message-ID: <1559839081.97.0.643036160916.issue37156@roundup.psfhosted.org> miss-islington added the comment: New changeset 1c4084f4c13d7ec516abc0439288cbeb2c96489a by Miss Islington (bot) in branch '3.8': bpo-37156: Fix libssl DLL tag in MSI sources (GH-13866) https://github.com/python/cpython/commit/1c4084f4c13d7ec516abc0439288cbeb2c96489a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 12:41:31 2019 From: report at bugs.python.org (Tim Peters) Date: Thu, 06 Jun 2019 16:41:31 +0000 Subject: [issue37178] One argument form of math.perm() In-Reply-To: <1559838628.34.0.228461842236.issue37178@roundup.psfhosted.org> Message-ID: <1559839291.4.0.423584820917.issue37178@roundup.psfhosted.org> Tim Peters added the comment: I agree: perm(n) should return factorial(n). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 12:49:27 2019 From: report at bugs.python.org (Nathaniel Gaertner) Date: Thu, 06 Jun 2019 16:49:27 +0000 Subject: [issue36865] FileInput does not allow 'rt' mode, but all its existing delegates do In-Reply-To: <1557408143.65.0.0603138385641.issue36865@roundup.psfhosted.org> Message-ID: <1559839767.25.0.884285079773.issue36865@roundup.psfhosted.org> Nathaniel Gaertner added the comment: Hey sorry for the delay in responding. My thought with forcing 'rt' mode is that it would actually reduce the flexibility of the FileInput class. For 5758, I suspect the issue arose out of a confusion about what strings meant in python 2 vs 3. If I understand correctly, a "string" in 2 is actually an array of binary data, displayed as if it were ASCII encoded text. So when it prints the binary data from the gzip file in the example given on that issue, it's happy to say "aha this is ASCII encoded text, let's print it like a string." This leads to the case where 2 "works" (does not mark the printed data from gzip explicitly as binary). But in 3 strings and binary arrays are totally different kinds of objects! I am unfamiliar with the history of introducing 'rt', but I'm guessing it has to do with disambiguating 'r', since text is now stored in its own unique object type and goes through an explicit encoding process to get there. With the explicit 'rt' and 'rb' modes, 'r' becomes explicitly ambiguous (an oxymoron I know), so if a user provides 'r' they are expressing no preference between text and binary. If they have a preference 'rt' and 'rb' give them the ability to express it. I may be totally on the wrong track here, or missing some important backward compatibility issues, but that's my thoughts. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 12:49:32 2019 From: report at bugs.python.org (Stefan Krah) Date: Thu, 06 Jun 2019 16:49:32 +0000 Subject: [issue37168] Decimal divisions sometimes 10x or 100x too large In-Reply-To: <1559772321.45.0.42770583159.issue37168@roundup.psfhosted.org> Message-ID: <1559839772.27.0.686822647206.issue37168@roundup.psfhosted.org> Stefan Krah added the comment: There are lots of ideas still. :) As I said, on a Linux other than RedHat or Debian or such I'd first try to blame the shipped Python, then the libc (I had a glibc memmove issue once with similar inexplicable results). Alpine Linux apparently uses musl. Is that well supported and tested? Since you mention concurrency: Before the arrival of contextvars in 3.7 the decimal context is thread-safe, but not coroutine-safe. If the issue is really in that particular loop I can't see how that could be the cause, but perhaps the core dump is not accurate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 12:59:13 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 06 Jun 2019 16:59:13 +0000 Subject: [issue37156] Fix libssl DLL tag in Tools/msi project In-Reply-To: <1559679658.46.0.279980896564.issue37156@roundup.psfhosted.org> Message-ID: <1559840353.82.0.223558223602.issue37156@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 13:02:07 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Jun 2019 17:02:07 +0000 Subject: [issue37178] One argument form of math.perm() In-Reply-To: <1559838628.34.0.228461842236.issue37178@roundup.psfhosted.org> Message-ID: <1559840527.32.0.461123652949.issue37178@roundup.psfhosted.org> Serhiy Storchaka added the comment: I never seen a one argument form of P(n, k) in mathematics. itertools.permutations() corresponds two functions: math.perm() and math .factorial(). Unless you a going to add a new function in the itertools module equal to a one argument form of itertools.permutations() there will be no full symmetry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 13:05:58 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 06 Jun 2019 17:05:58 +0000 Subject: [issue37170] Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall In-Reply-To: <1559803961.74.0.856942246401.issue37170@roundup.psfhosted.org> Message-ID: <1559840758.58.0.424865897541.issue37170@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 13:08:46 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 06 Jun 2019 17:08:46 +0000 Subject: [issue21315] email._header_value_parser does not recognise in-line encoding changes In-Reply-To: <1398009498.59.0.139606640186.issue21315@psf.upfronthosting.co.za> Message-ID: <1559840926.32.0.830437953824.issue21315@roundup.psfhosted.org> Barry A. Warsaw added the comment: New changeset dc20fc4311dece19488299a7cd11317ffbe4d3c3 by Barry Warsaw (Miss Islington (bot)) in branch '3.7': bpo-21315: Fix parsing of encoded words with missing leading ws. (GH-13425) (#13846) https://github.com/python/cpython/commit/dc20fc4311dece19488299a7cd11317ffbe4d3c3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 13:08:50 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 06 Jun 2019 17:08:50 +0000 Subject: [issue36624] cleanup the stdlib and tests with regard to sys.platform usage In-Reply-To: <1555158343.77.0.950141438455.issue36624@roundup.psfhosted.org> Message-ID: <1559840930.23.0.177258328716.issue36624@roundup.psfhosted.org> Steve Dower added the comment: Changing our policy here (from "no policy" to "here's a recommendation") probably deserves a python-dev discussion first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 13:15:42 2019 From: report at bugs.python.org (Rene Dudfield) Date: Thu, 06 Jun 2019 17:15:42 +0000 Subject: [issue14367] try/except block in ismethoddescriptor() in inspect.py, so that pydoc works with pygame in Python 3.2 In-Reply-To: <1332132143.66.0.7093323157.issue14367@psf.upfronthosting.co.za> Message-ID: <1559841342.89.0.749875624394.issue14367@roundup.psfhosted.org> Rene Dudfield added the comment: This can be closed. $ python3 -m pydoc -p 7464 Then view in browser: http://localhost:7464/pygame.html No error. ---------- nosy: +illume _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 13:21:53 2019 From: report at bugs.python.org (Phil Frost) Date: Thu, 06 Jun 2019 17:21:53 +0000 Subject: [issue37168] Decimal divisions sometimes 10x or 100x too large In-Reply-To: <1559772321.45.0.42770583159.issue37168@roundup.psfhosted.org> Message-ID: <1559841713.74.0.540368296536.issue37168@roundup.psfhosted.org> Phil Frost added the comment: > Alpine Linux apparently uses musl. Is that well supported and tested? Heh. Not really. Switching to a Debian container is probably just about as much work as building Python from source. Would that be preferable? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 13:29:12 2019 From: report at bugs.python.org (Stefan Krah) Date: Thu, 06 Jun 2019 17:29:12 +0000 Subject: [issue37168] Decimal divisions sometimes 10x or 100x too large In-Reply-To: <1559772321.45.0.42770583159.issue37168@roundup.psfhosted.org> Message-ID: <1559842152.17.0.586488612258.issue37168@roundup.psfhosted.org> Stefan Krah added the comment: Yes, I'd try Debian first, then potential libc issues can also be eliminated in a single experiment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 13:40:08 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 06 Jun 2019 17:40:08 +0000 Subject: [issue37177] IDLE: Search dialogs can be hidden behind the main window In-Reply-To: <1559838119.79.0.14038633601.issue37177@roundup.psfhosted.org> Message-ID: <1559842808.21.0.761085582349.issue37177@roundup.psfhosted.org> Change by Tal Einat : ---------- nosy: +IrvKalb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 13:55:13 2019 From: report at bugs.python.org (Cooper Lees) Date: Thu, 06 Jun 2019 17:55:13 +0000 Subject: [issue37179] asyncio loop.start_tls() provide support for TLS in TLS Message-ID: <1559843713.76.0.0171515478407.issue37179@roundup.psfhosted.org> New submission from Cooper Lees : aiohttp would love to be able to support HTTPS Proxy servers. To do this, asyncio itself needs to be able to provide TLS within TLS connections. Can we add this support to asyncio please. (I tried search but could not find a related issue - Please merge if there is) ---------- components: asyncio messages: 344846 nosy: asvetlov, cooperlees, yselivanov priority: normal severity: normal status: open title: asyncio loop.start_tls() provide support for TLS in TLS versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 14:02:20 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Thu, 06 Jun 2019 18:02:20 +0000 Subject: [issue37168] Decimal divisions sometimes 10x or 100x too large In-Reply-To: <1559772321.45.0.42770583159.issue37168@roundup.psfhosted.org> Message-ID: <1559844140.95.0.403992765203.issue37168@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 14:04:50 2019 From: report at bugs.python.org (Phil Frost) Date: Thu, 06 Jun 2019 18:04:50 +0000 Subject: [issue37168] Decimal divisions sometimes 10x or 100x too large In-Reply-To: <1559772321.45.0.42770583159.issue37168@roundup.psfhosted.org> Message-ID: <1559844290.17.0.33220672411.issue37168@roundup.psfhosted.org> Phil Frost added the comment: So this is um....interesting.... (gdb) p small_ints[0] $2 = (PyIntObject *) 0x558ce65df528 (gdb) p *small_ints[0] $3 = {ob_refcnt = 18, ob_type = 0x7fe019b694c0 , ob_ival = -5} (gdb) p *small_ints[1] $4 = {ob_refcnt = 65, ob_type = 0x7fe019b694c0 , ob_ival = -3} (gdb) p *small_ints[2] $5 = {ob_refcnt = 204, ob_type = 0x7fe019b694c0 , ob_ival = -3} (gdb) p *small_ints[3] $6 = {ob_refcnt = 1872, ob_type = 0x7fe019b694c0 , ob_ival = -2} When is 1/1=10? When -5 + 1 = -3. So now I suppose the question is how this comes to be. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 14:26:29 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 06 Jun 2019 18:26:29 +0000 Subject: [issue30809] IDLE parenmatch - highlighting options In-Reply-To: <1498768567.92.0.13204753323.issue30809@psf.upfronthosting.co.za> Message-ID: <1559845589.38.0.748178093359.issue30809@roundup.psfhosted.org> Tal Einat added the comment: FWIW I'm -1 on this change, due to the decision to keep IDLE simple for new users learning Python rather than power users. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 14:29:15 2019 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 06 Jun 2019 18:29:15 +0000 Subject: [issue37179] asyncio loop.start_tls() provide support for TLS in TLS In-Reply-To: <1559843713.76.0.0171515478407.issue37179@roundup.psfhosted.org> Message-ID: <1559845755.99.0.398339723307.issue37179@roundup.psfhosted.org> Yury Selivanov added the comment: Yeah, we have the SSL reimplementation ready to be backported from uvloop to cpython. Fantix, the original author, should be able to do that soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 14:29:30 2019 From: report at bugs.python.org (Fantix King) Date: Thu, 06 Jun 2019 18:29:30 +0000 Subject: [issue37179] asyncio loop.start_tls() provide support for TLS in TLS In-Reply-To: <1559843713.76.0.0171515478407.issue37179@roundup.psfhosted.org> Message-ID: <1559845770.98.0.791216495836.issue37179@roundup.psfhosted.org> Change by Fantix King : ---------- nosy: +fantix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 14:35:53 2019 From: report at bugs.python.org (Ramin Najjarbashi) Date: Thu, 06 Jun 2019 18:35:53 +0000 Subject: [issue37180] Fix Persian KAF in mac_farsi.py Message-ID: <1559846153.37.0.617648704502.issue37180@roundup.psfhosted.org> New submission from Ramin Najjarbashi : Regarding the file named: "Lib/encodings/mac_farsi.py", the numbers are inserted in the wrong way, they are inserted Arabic numbers instead of Persian, they are edited in the comment. The KAF character (?) which was the Arabic version, has been changed and edited to the Persian version(?). It's not a big deal, but it's my first step to improve my favorite language ;) ---------- messages: 344850 nosy: RaminNietzsche priority: normal severity: normal status: open title: Fix Persian KAF in mac_farsi.py type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 14:36:03 2019 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 06 Jun 2019 18:36:03 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1559846163.33.0.771249906797.issue35431@roundup.psfhosted.org> Change by Mark Dickinson : ---------- pull_requests: +13746 pull_request: https://github.com/python/cpython/pull/13870 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 14:37:02 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Thu, 06 Jun 2019 18:37:02 +0000 Subject: [issue36422] tempfile.TemporaryDirectory() removes entire directory tree even if it's a mount-point In-Reply-To: <1553512605.72.0.860422023516.issue36422@roundup.psfhosted.org> Message-ID: <1559846222.66.0.968921283021.issue36422@roundup.psfhosted.org> Jeffrey Kintscher added the comment: Since having tempfile.TemporaryDirectory() automatically unmount mount points is difficult to implement in a portable way (Windows, BSD/macOS, and Linux are all different), a shorter-term solution could be to add an 'onerror' callback function as a class initialization parameter. This would allow the caller to inspect and try to handle any directory entries that the cleanup() function can't handle (like unmounting a mount point). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 14:42:42 2019 From: report at bugs.python.org (Ramin Najjarbashi) Date: Thu, 06 Jun 2019 18:42:42 +0000 Subject: [issue37180] Fix Persian KAF in mac_farsi.py In-Reply-To: <1559846153.37.0.617648704502.issue37180@roundup.psfhosted.org> Message-ID: <1559846562.34.0.289996144297.issue37180@roundup.psfhosted.org> Change by Ramin Najjarbashi : ---------- keywords: +patch pull_requests: +13747 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13871 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 14:43:06 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 06 Jun 2019 18:43:06 +0000 Subject: [issue24039] Idle: some modal dialogs maximize, don't minimize In-Reply-To: <1429811337.7.0.183903934829.issue24039@psf.upfronthosting.co.za> Message-ID: <1559846586.62.0.771946848478.issue24039@roundup.psfhosted.org> Terry J. Reedy added the comment: Dialogs attached to a particular window should be 'transient' to that window. https://www.tcl.tk/man/tcl8.6/TkCmd/wm.htm#M64 It is an oversight that the window search and replace windows are not. Modal windows, including the current Find in Files might just as well be. PR 13869 for #37177 (aimed at a different symption) makes search windows transient, fixing this issue also. If Find in Files were not modal, then it need not be transient to a particular window, and minimizing could be sensible. But this is a separate issue. ---------- stage: needs patch -> versions: +Python 3.8, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 15:01:24 2019 From: report at bugs.python.org (Paul Monson) Date: Thu, 06 Jun 2019 19:01:24 +0000 Subject: [issue37181] fix test_regrtest failures on Windows arm64 Message-ID: <1559847684.99.0.249295662285.issue37181@roundup.psfhosted.org> Change by Paul Monson : ---------- components: Tests, Windows nosy: Paul Monson, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: fix test_regrtest failures on Windows arm64 type: enhancement versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 15:07:39 2019 From: report at bugs.python.org (Paul Monson) Date: Thu, 06 Jun 2019 19:07:39 +0000 Subject: [issue37181] fix test_regrtest failures on Windows arm64 Message-ID: <1559848059.79.0.691678190948.issue37181@roundup.psfhosted.org> Change by Paul Monson : ---------- keywords: +patch pull_requests: +13748 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13872 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 15:10:42 2019 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 06 Jun 2019 19:10:42 +0000 Subject: [issue37168] Decimal divisions sometimes 10x or 100x too large In-Reply-To: <1559772321.45.0.42770583159.issue37168@roundup.psfhosted.org> Message-ID: <1559848242.4.0.1088414496.issue37168@roundup.psfhosted.org> Mark Dickinson added the comment: Interesting indeed. What 3rd party extension are installed in your Python environment? Is it possible that one of them is messing with the CPython internals (perhaps in an overeager attempt to optimize)? Any uses of ctypes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 15:14:45 2019 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 06 Jun 2019 19:14:45 +0000 Subject: [issue37168] Decimal divisions sometimes 10x or 100x too large In-Reply-To: <1559772321.45.0.42770583159.issue37168@roundup.psfhosted.org> Message-ID: <1559848485.88.0.22782344383.issue37168@roundup.psfhosted.org> Mark Dickinson added the comment: This smells a bit as though someone's doing something like: myobject = PyInt_FromLong(some_long); and then assuming that they hold the only reference to `myobject`, so that it's safe to mutate in place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 15:15:24 2019 From: report at bugs.python.org (SilentGhost) Date: Thu, 06 Jun 2019 19:15:24 +0000 Subject: [issue37180] Fix Persian KAF in mac_farsi.py In-Reply-To: <1559846153.37.0.617648704502.issue37180@roundup.psfhosted.org> Message-ID: <1559848524.3.0.512449265974.issue37180@roundup.psfhosted.org> SilentGhost added the comment: The names of the characters given in comments agree with the unicode database name (they're indeed ARABIC-INDIC DIGITs and ARABIC LETTER). The replacement character that you're proposing is called (according to the same database) 'ARABIC LETTER KEHEH', whereas the old one was 'ARABIC LETTER KAF'. This encoding was originally generated based on data from unicode.org, I'd think a reference would be needed making clear that this is indeed a valid replacement. ---------- components: +Unicode, macOS nosy: +SilentGhost, ezio.melotti, ned.deily, ronaldoussoren, vstinner type: enhancement -> behavior versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 15:17:57 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 06 Jun 2019 19:17:57 +0000 Subject: [issue24139] Use sqlite3 extended error codes In-Reply-To: <1430990375.51.0.367829317248.issue24139@psf.upfronthosting.co.za> Message-ID: <1559848677.08.0.469993054946.issue24139@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +13749 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13869 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 15:22:21 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 06 Jun 2019 19:22:21 +0000 Subject: [issue37180] Fix Persian KAF in mac_farsi.py In-Reply-To: <1559846153.37.0.617648704502.issue37180@roundup.psfhosted.org> Message-ID: <1559848941.71.0.350992909191.issue37180@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 15:22:30 2019 From: report at bugs.python.org (Brett Cannon) Date: Thu, 06 Jun 2019 19:22:30 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559848950.05.0.12600048584.issue37134@roundup.psfhosted.org> Brett Cannon added the comment: @Brian: Probably not. The worry that came up during the steering council meeting was bifurcating the docs could cause confusion as to why it was different, which one was more "right", etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 15:22:52 2019 From: report at bugs.python.org (Brett Cannon) Date: Thu, 06 Jun 2019 19:22:52 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559848972.03.0.159490724141.issue37134@roundup.psfhosted.org> Brett Cannon added the comment: @Brian: And thanks for the experiment! It was an interesting idea to consider. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 15:23:23 2019 From: report at bugs.python.org (Brett Cannon) Date: Thu, 06 Jun 2019 19:23:23 +0000 Subject: [issue37162] new importlib dependencies csv, email and zipfile In-Reply-To: <1559732109.6.0.0655643851833.issue37162@roundup.psfhosted.org> Message-ID: <1559849003.86.0.633163522133.issue37162@roundup.psfhosted.org> Change by Brett Cannon : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 15:33:38 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 06 Jun 2019 19:33:38 +0000 Subject: [issue30809] IDLE parenmatch - highlighting options In-Reply-To: <1498768567.92.0.13204753323.issue30809@psf.upfronthosting.co.za> Message-ID: <1559849618.42.0.662352380842.issue30809@roundup.psfhosted.org> Terry J. Reedy added the comment: I agree. The parenmatch highlighting is so transient that it hardly matters what it is, except that it should not match a syntax color. ---------- dependencies: -Idle extension configuration: add option-help option resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 15:35:05 2019 From: report at bugs.python.org (Carol Willing) Date: Thu, 06 Jun 2019 19:35:05 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559849705.8.0.745376113742.issue37134@roundup.psfhosted.org> Carol Willing added the comment: @brian, Just to echo Brett's words, the Steering Council appreciated the tabbed prototype and your effort to create it. While we may not use it in this particular case, it's great to keep in mind for other places. Thanks for contributing :D ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 15:41:45 2019 From: report at bugs.python.org (Ilya Kamenshchikov) Date: Thu, 06 Jun 2019 19:41:45 +0000 Subject: [issue37182] ast - handling new line inside a string Message-ID: <1559850105.87.0.562031777923.issue37182@roundup.psfhosted.org> New submission from Ilya Kamenshchikov : parsing two different strings produces identical ast.Str nodes: import ast txt1 = '"""\\n"""' txt2 = '"""\n"""' tree1 = ast.parse(txt1) tree2 = ast.parse(txt2) print(tree1.body[0].value.s == tree2.body[0].value.s) print(bytes(tree1.body[0].value.s, encoding='utf-8')) print(bytes(tree2.body[0].value.s, encoding='utf-8')) >>> True >>> b'\n' >>> b'\n' Expected result: I should be able to distinguish between the nodes created from two different strings. ---------- components: Library (Lib) messages: 344861 nosy: Ilya Kamenshchikov priority: normal severity: normal status: open title: ast - handling new line inside a string type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 15:44:26 2019 From: report at bugs.python.org (Carol Willing) Date: Thu, 06 Jun 2019 19:44:26 +0000 Subject: [issue21106] Updated Mac folder icon In-Reply-To: <1396214057.84.0.0230664527626.issue21106@psf.upfronthosting.co.za> Message-ID: <1559850266.32.0.322176098973.issue21106@roundup.psfhosted.org> Carol Willing added the comment: This was resolved in https://github.com/python/cpython/pull/1780. Thanks @ned.deily. ---------- keywords: +patch message_count: 15.0 -> 16.0 pull_requests: +13750 resolution: -> fixed stage: resolved -> patch review status: open -> closed pull_request: https://github.com/python/cpython/pull/1780 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 15:53:49 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 06 Jun 2019 19:53:49 +0000 Subject: [issue36520] Email header folded incorrectly In-Reply-To: <1554333300.49.0.663084865399.issue36520@roundup.psfhosted.org> Message-ID: <1559850829.97.0.691911248126.issue36520@roundup.psfhosted.org> Barry A. Warsaw added the comment: New changeset f6713e84afc5addcfa8477dbdf2c027787f711c0 by Barry Warsaw (websurfer5) in branch 'master': bpo-36520: Email header folded incorrectly (#13608) https://github.com/python/cpython/commit/f6713e84afc5addcfa8477dbdf2c027787f711c0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 15:55:36 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 06 Jun 2019 19:55:36 +0000 Subject: [issue37183] Linker failure when creating main binary with python-config --libs Message-ID: <1559850936.49.0.687139467253.issue37183@roundup.psfhosted.org> New submission from Christian Heimes : With 3.8 it is no longer possible to compile a custom Python interpreter with linker flags from python-config. The config helper omits the main Python library: $ python3.8-config --ldflags -L/usr/lib64 -lcrypt -lpthread -ldl -lutil -lm -lm $ gcc -L/usr/lib64 -lcrypt -lpthread -ldl -lutil -lm -lm -o custompython custompython.o /usr/bin/ld: custompython.o: in function `main': custompython.c:10: undefined reference to `Py_BytesMain' collect2: error: ld returned 1 exit status ---------- components: Interpreter Core messages: 344864 nosy: christian.heimes, vstinner priority: high severity: normal stage: needs patch status: open title: Linker failure when creating main binary with python-config --libs type: compile error versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 15:56:18 2019 From: report at bugs.python.org (Carol Willing) Date: Thu, 06 Jun 2019 19:56:18 +0000 Subject: [issue23324] Nonblocking serial io using Arduino and Ubuntu 14.10 (Python 3.4.2) performance slowdown In-Reply-To: <1422304616.63.0.532936343926.issue23324@psf.upfronthosting.co.za> Message-ID: <1559850978.34.0.898896732247.issue23324@roundup.psfhosted.org> Carol Willing added the comment: @MrYsLab, Sorry that this issue wasn't resolved in the past. I would like to close this since we are currently working on a 3.8 release. I'm going to do that now. You may wish to take a look at MicroPython and CircuitPython if you haven't already seen them. They are pretty interesting. Thanks for using Python. ---------- resolution: -> out of date stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 15:56:24 2019 From: report at bugs.python.org (Carol Willing) Date: Thu, 06 Jun 2019 19:56:24 +0000 Subject: [issue23324] Nonblocking serial io using Arduino and Ubuntu 14.10 (Python 3.4.2) performance slowdown In-Reply-To: <1422304616.63.0.532936343926.issue23324@psf.upfronthosting.co.za> Message-ID: <1559850984.6.0.812412550618.issue23324@roundup.psfhosted.org> Change by Carol Willing : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 15:59:47 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 06 Jun 2019 19:59:47 +0000 Subject: [issue37183] Linker failure when creating main binary with python-config --libs In-Reply-To: <1559850936.49.0.687139467253.issue37183@roundup.psfhosted.org> Message-ID: <1559851187.93.0.152215066262.issue37183@roundup.psfhosted.org> Christian Heimes added the comment: python-3.8.pc also omits -lpython3.8: $ pkg-config python-3.8 --libs ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 16:02:01 2019 From: report at bugs.python.org (Ilya Kamenshchikov) Date: Thu, 06 Jun 2019 20:02:01 +0000 Subject: [issue37182] ast - handling new line inside a string In-Reply-To: <1559850105.87.0.562031777923.issue37182@roundup.psfhosted.org> Message-ID: <1559851321.86.0.933526375989.issue37182@roundup.psfhosted.org> Ilya Kamenshchikov added the comment: Same problem holds for tabs (\\t vs \t). For \\r vs \r, it is even more fun: txt1 = '"""\\r"""' txt2 = '"""\r"""' >>> b'\r' >>> b'\n' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 16:05:35 2019 From: report at bugs.python.org (Alan Yorinks) Date: Thu, 06 Jun 2019 20:05:35 +0000 Subject: [issue23324] Nonblocking serial io using Arduino and Ubuntu 14.10 (Python 3.4.2) performance slowdown In-Reply-To: <1559850984.62.0.390359637097.issue23324@roundup.psfhosted.org> Message-ID: <702a882f-b52b-7c01-a52d-08e74566d2cc@gmail.com> Alan Yorinks added the comment: Hi Carol, ??? Thanks for the update. I retested on Python 3.7 and the problem seems to have been resolved some where along the way. BTW, I am using MicroPython on an ESP8266 remotely controlled from a Python program on a PC. You can read about it here: https://mryslab.github.io/python_banyan/#gpio_intro/. Looking forward to 3.8! Thanks again, Alan On 6/6/19 3:56 PM, Carol Willing wrote: > Change by Carol Willing : > > > ---------- > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 16:21:00 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 06 Jun 2019 20:21:00 +0000 Subject: [issue37183] Linker failure when creating main binary with python-config --libs In-Reply-To: <1559850936.49.0.687139467253.issue37183@roundup.psfhosted.org> Message-ID: <1559852460.6.0.677156599025.issue37183@roundup.psfhosted.org> Christian Heimes added the comment: memo to me: read the **whole** what's new document. https://docs.python.org/3.8/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build ---------- resolution: -> not a bug stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 16:26:58 2019 From: report at bugs.python.org (Carol Willing) Date: Thu, 06 Jun 2019 20:26:58 +0000 Subject: [issue23324] Nonblocking serial io using Arduino and Ubuntu 14.10 (Python 3.4.2) performance slowdown In-Reply-To: <1422304616.63.0.532936343926.issue23324@psf.upfronthosting.co.za> Message-ID: <1559852818.48.0.155697242798.issue23324@roundup.psfhosted.org> Carol Willing added the comment: @MrYsLab Well, I'm glad it resolved itself along the way. Your project looks cool and the docs are very nice too. Thanks for the link. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 16:28:51 2019 From: report at bugs.python.org (Carol Willing) Date: Thu, 06 Jun 2019 20:28:51 +0000 Subject: [issue5225] OS X "Update Shell Profile" may not update $PATH if run more than once In-Reply-To: <1234440346.58.0.444916712806.issue5225@psf.upfronthosting.co.za> Message-ID: <1559852931.17.0.538219387146.issue5225@roundup.psfhosted.org> Carol Willing added the comment: @ned.deily I'm doing some triaging today. As the original submitter of this issue, would you be willing to close it? Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 16:32:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jun 2019 20:32:08 +0000 Subject: [issue37183] Linker failure when creating main binary with python-config --libs In-Reply-To: <1559852460.6.0.677156599025.issue37183@roundup.psfhosted.org> Message-ID: STINNER Victor added the comment: It is a deliberate change but matbe it is not well documented? Should we update the C API doc? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 16:35:32 2019 From: report at bugs.python.org (Carol Willing) Date: Thu, 06 Jun 2019 20:35:32 +0000 Subject: [issue33048] macOS job broken on Travis CI In-Reply-To: <1520791962.83.0.467229070634.issue33048@psf.upfronthosting.co.za> Message-ID: <1559853332.54.0.46786555551.issue33048@roundup.psfhosted.org> Carol Willing added the comment: Folks, I'm going to close this as resolved since we are now using Azure Pipelines for MacOS as well. Brew has also since come up with a naming policy for 2 or 3 so hopefully (?) there will be no further renaming. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 16:39:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jun 2019 20:39:40 +0000 Subject: [issue37170] Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall In-Reply-To: <1559803961.74.0.856942246401.issue37170@roundup.psfhosted.org> Message-ID: <1559853580.37.0.892890069545.issue37170@roundup.psfhosted.org> STINNER Victor added the comment: New changeset dc2476500d91082f0c907772c83a044bf49af279 by Victor Stinner (Zackery Spytz) in branch 'master': bpo-37170: Fix the cast on error in PyLong_AsUnsignedLongLongMask() (GH-13860) https://github.com/python/cpython/commit/dc2476500d91082f0c907772c83a044bf49af279 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 16:42:20 2019 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 06 Jun 2019 20:42:20 +0000 Subject: [issue37182] ast - handling new line inside a string In-Reply-To: <1559850105.87.0.562031777923.issue37182@roundup.psfhosted.org> Message-ID: <1559853740.64.0.688688930272.issue37182@roundup.psfhosted.org> Eric V. Smith added the comment: There was a recent discussion about this on the bug tracker, but of course now I can't find it. But for an earlier discussion, see issue 25885. The decision was that your expectation that the nodes be distinguishable isn't a design goal of the ast. There's no expectation that code can round-trip through the ast and produce the original text, even for a string. ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 16:50:32 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Thu, 06 Jun 2019 20:50:32 +0000 Subject: [issue15913] PyBuffer_SizeFromFormat is missing In-Reply-To: <1347312444.09.0.484126652005.issue15913@psf.upfronthosting.co.za> Message-ID: <1559854232.88.0.0746043234189.issue15913@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- keywords: +patch pull_requests: +13751 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13873 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 17:03:00 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 06 Jun 2019 21:03:00 +0000 Subject: [issue5225] OS X "Update Shell Profile" may not update $PATH if run more than once In-Reply-To: <1234440346.58.0.444916712806.issue5225@psf.upfronthosting.co.za> Message-ID: <1559854980.87.0.853421209273.issue5225@roundup.psfhosted.org> Ned Deily added the comment: Please don?t close this. It?s still an issue that needs to be addressed and I intend to do so. Thanks. ---------- assignee: -> ned.deily versions: +Python 3.9 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 17:06:00 2019 From: report at bugs.python.org (Carol Willing) Date: Thu, 06 Jun 2019 21:06:00 +0000 Subject: [issue5225] OS X "Update Shell Profile" may not update $PATH if run more than once In-Reply-To: <1234440346.58.0.444916712806.issue5225@psf.upfronthosting.co.za> Message-ID: <1559855160.19.0.0456503009119.issue5225@roundup.psfhosted.org> Carol Willing added the comment: No problem :D Ping me when you need a review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 17:40:17 2019 From: report at bugs.python.org (Phil Frost) Date: Thu, 06 Jun 2019 21:40:17 +0000 Subject: [issue37168] Decimal divisions sometimes 10x or 100x too large In-Reply-To: <1559772321.45.0.42770583159.issue37168@roundup.psfhosted.org> Message-ID: <1559857217.57.0.870221252276.issue37168@roundup.psfhosted.org> Phil Frost added the comment: Probably too many C extensions to feasibly audit them all. Also we can't rule out something busted in Alpine. So I'm going to set a watchpoint on small_ints[1]->ob_ival with a little gdb script to dump core right when it changes; hopefully inspecting that backtrace will lead directly to the culprit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 18:07:05 2019 From: report at bugs.python.org (Brian Skinn) Date: Thu, 06 Jun 2019 22:07:05 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559858825.69.0.275734989164.issue37134@roundup.psfhosted.org> Brian Skinn added the comment: :thumbsup: Glad I happened to be in the right place at the right time to put it together. I'll leave the tabslash repo up for future reference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 18:16:29 2019 From: report at bugs.python.org (Noah) Date: Thu, 06 Jun 2019 22:16:29 +0000 Subject: [issue37184] suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):` Message-ID: <1559859389.6.0.41932196936.issue37184@roundup.psfhosted.org> New submission from Noah : Suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):` with subprocess.Popen('/bin/false'): pass I made the mistake of assuming this construct would raise an exception (CalledProcessError). It would be nice if there were a way to do that. ---------- components: Library (Lib) messages: 344880 nosy: nlevitt priority: normal severity: normal status: open title: suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):` type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 18:20:10 2019 From: report at bugs.python.org (Pierre Glaser) Date: Thu, 06 Jun 2019 22:20:10 +0000 Subject: [issue37185] use os.memfd_create in multiprocessing.shared_memory? Message-ID: <1559859610.5.0.492744373458.issue37185@roundup.psfhosted.org> New submission from Pierre Glaser : Hi, Following https://bugs.python.org/issue26836, I started thinking about using memfd_create instead of shm_open for creating shared-memory segments in multiprocessing.shared_memory. The main advantage of memfd_create over shm_open is that the generated resources management is easier: a segment created using using memfd_create is released once all references to the segment are dropped. This is not the case for segments created using shm_open, for which additional resource tracking is needed (using the new multiprocessing.resource_tracker) The main difference between those two calls is that segments created using memfd_create are anonymous and can only be accessed using file descriptors. The name argument in the signature serves only for debugging purposes. On the contrary, shm_open generates segments that map to a file in /dev/shm: therefore, segments each have unique names. Would we decide to switch from shm_open to memfd_create, the name behavior will also change. How big of a deal would that be? ---------- messages: 344881 nosy: davin, pierreglaser, pitrou priority: normal severity: normal status: open title: use os.memfd_create in multiprocessing.shared_memory? type: resource usage versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 18:25:51 2019 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 06 Jun 2019 22:25:51 +0000 Subject: [issue37184] suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):` In-Reply-To: <1559859389.6.0.41932196936.issue37184@roundup.psfhosted.org> Message-ID: <1559859951.31.0.0105124367143.issue37184@roundup.psfhosted.org> Eric V. Smith added the comment: I think Popen() is just about as complex as anyone wants it to be. Is there something about .run() or .check_call() that keeps you from using them? ---------- nosy: +eric.smith versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 18:32:17 2019 From: report at bugs.python.org (Noah) Date: Thu, 06 Jun 2019 22:32:17 +0000 Subject: [issue37184] suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):` In-Reply-To: <1559859389.6.0.41932196936.issue37184@roundup.psfhosted.org> Message-ID: <1559860337.47.0.822174382351.issue37184@roundup.psfhosted.org> Noah added the comment: Yes, I'm piping a large amount of data to/from a fairly long-running subprocess. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 18:56:17 2019 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 06 Jun 2019 22:56:17 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559858825.69.0.275734989164.issue37134@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: Thanks Brian! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 19:03:34 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 06 Jun 2019 23:03:34 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559862214.89.0.282773708183.issue37134@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thanks Brian for the prototype! I will close this now. We can reopen if something is missing in the future. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 19:17:14 2019 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 06 Jun 2019 23:17:14 +0000 Subject: [issue37184] suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):` In-Reply-To: <1559859389.6.0.41932196936.issue37184@roundup.psfhosted.org> Message-ID: <1559863034.51.0.372644527892.issue37184@roundup.psfhosted.org> Eric V. Smith added the comment: I figured as much (but didn't want to lead the witness!). I'm not completely opposed to this. I think the best thing to do is to bring up the proposal on python-ideas, and point here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 19:24:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jun 2019 23:24:18 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559863458.73.0.122150098897.issue37134@roundup.psfhosted.org> STINNER Victor added the comment: It seems like the translate() method of bytes and bytearray also needs a "/" in their doc. I wrote a quick & dirty script to parse C files: --- import glob def parse(filename): clinic_input = False args = False positional = False func = None for line_number, line in enumerate(open(filename)): line = line.rstrip() if line.startswith("/*[clinic input]"): clinic_input = True args = False positional = False func = None elif clinic_input and func is None: func = line elif clinic_input and not args and not line: args = True elif args and line == " /": positional = True elif positional and (line == " *" or line.startswith("[clinic start generated code]")): clinic_input = False args = False positional = False func = None elif positional and line: print("!!!", filename, line_number, func, repr(line)) elif not line: clinic_input = False args = False positional = False func = None for filename in glob.glob("*/**.c"): parse(filename) --- Output on the master branch: --- !!! Modules/_struct.c 2224 unpack_from ' buffer: Py_buffer' !!! Modules/_struct.c 2225 unpack_from ' offset: Py_ssize_t = 0' !!! Modules/zlibmodule.c 195 zlib.compress ' level: int(c_default="Z_DEFAULT_COMPRESSION") = Z_DEFAULT_COMPRESSION' !!! Modules/zlibmodule.c 196 zlib.compress ' Compression level, in 0-9 or -1.' !!! Modules/zlibmodule.c 314 zlib.decompress ' wbits: int(c_default="MAX_WBITS") = MAX_WBITS' !!! Modules/zlibmodule.c 315 zlib.decompress ' The window buffer size and container format.' !!! Modules/zlibmodule.c 316 zlib.decompress ' bufsize: ssize_t(c_default="DEF_BUF_SIZE") = DEF_BUF_SIZE' !!! Modules/zlibmodule.c 317 zlib.decompress ' The initial output buffer size.' !!! Modules/zlibmodule.c 744 zlib.Decompress.decompress ' max_length: ssize_t = 0' !!! Modules/zlibmodule.c 745 zlib.Decompress.decompress ' The maximum allowable length of the decompressed data.' !!! Modules/zlibmodule.c 746 zlib.Decompress.decompress ' Unconsumed input data will be stored in' !!! Modules/zlibmodule.c 747 zlib.Decompress.decompress ' the unconsumed_tail attribute.' !!! Objects/bytearrayobject.c 1197 bytearray.translate ' delete as deletechars: object(c_default="NULL") = b\'\'' !!! Objects/bytesobject.c 2080 bytes.translate ' delete as deletechars: object(c_default="NULL") = b\'\'' !!! Python/bltinmodule.c 2282 sum as builtin_sum ' start: object(c_default="NULL") = 0' --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 19:28:48 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jun 2019 23:28:48 +0000 Subject: [issue37168] Decimal divisions sometimes 10x or 100x too large In-Reply-To: <1559772321.45.0.42770583159.issue37168@roundup.psfhosted.org> Message-ID: <1559863728.79.0.27556431252.issue37168@roundup.psfhosted.org> STINNER Victor added the comment: On Python 3, you can use tracemalloc.get_object_traceback() to find where an object was allocated ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 19:29:43 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 06 Jun 2019 23:29:43 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559863783.87.0.24775346284.issue37134@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +13752 pull_request: https://github.com/python/cpython/pull/13874 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 19:38:47 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 06 Jun 2019 23:38:47 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559864327.47.0.559053037618.issue37134@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset de76c07a8cd0216c3dce215e4d542e2f45aa022f by Pablo Galindo in branch 'master': bpo-37134: Add PEP570 notation to the signature of byte{array}.translate (GH-13874) https://github.com/python/cpython/commit/de76c07a8cd0216c3dce215e4d542e2f45aa022f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 19:39:17 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Jun 2019 23:39:17 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559864357.55.0.521530050678.issue37134@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13753 pull_request: https://github.com/python/cpython/pull/13875 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 19:44:53 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 06 Jun 2019 23:44:53 +0000 Subject: [issue37134] Use PEP570 syntax in the documentation In-Reply-To: <1559492286.96.0.468855325599.issue37134@roundup.psfhosted.org> Message-ID: <1559864693.22.0.970388984652.issue37134@roundup.psfhosted.org> miss-islington added the comment: New changeset dba4448c63b687204813a5b04c89dd458d5ac45b by Miss Islington (bot) in branch '3.8': bpo-37134: Add PEP570 notation to the signature of byte{array}.translate (GH-13874) https://github.com/python/cpython/commit/dba4448c63b687204813a5b04c89dd458d5ac45b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 20:00:51 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jun 2019 00:00:51 +0000 Subject: [issue24139] Use sqlite3 extended error codes In-Reply-To: <1430990375.51.0.367829317248.issue24139@psf.upfronthosting.co.za> Message-ID: <1559865651.84.0.281981138013.issue24139@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -13749 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 20:01:12 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 07 Jun 2019 00:01:12 +0000 Subject: [issue24039] Idle: some modal dialogs maximize, don't minimize In-Reply-To: <1429811337.7.0.183903934829.issue24039@psf.upfronthosting.co.za> Message-ID: <1559865672.57.0.035266625908.issue24039@roundup.psfhosted.org> Change by Tal Einat : ---------- keywords: +patch pull_requests: +13754 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13869 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 20:03:04 2019 From: report at bugs.python.org (Roffild) Date: Fri, 07 Jun 2019 00:03:04 +0000 Subject: [issue37186] Everyone uses GIL wrong! = DEADLOCK Message-ID: <1559865784.82.0.0210813088917.issue37186@roundup.psfhosted.org> New submission from Roffild : Everyone uses GIL wrong! = DEADLOCK I used sub-interpreters in embedded Python: https://github.com/Roffild/RoffildLibrary/blob/35ef39fafc164d260396b39b28ff897d44cf0adb/Libraries/Roffild/PythonDLL/private.h#L44 https://github.com/Roffild/RoffildLibrary/blob/35ef39fafc164d260396b39b28ff897d44cf0adb/Libraries/Roffild/PythonDLL/mql_class.c#L142 PyEval_AcquireThread(__interp->interp); ... PyGILState_Ensure() = DEADLOCK ... PyEval_ReleaseThread(__interp->interp); A deadlock happens in the line: https://github.com/python/cpython/blob/7114c6504a60365b8b0cd718da0ec8a737599fb9/Python/pystate.c#L1313 Of course in the help there is the note: Note that the PyGILState_() functions assume there is only one global interpreter (created automatically by Py_Initialize()). Python supports the creation of additional interpreters (using Py_NewInterpreter()), but mixing multiple interpreters and the PyGILState_() API is unsupported. But functions PyGILState_() are used in third-party libraries. Most often, these functions are used without checking that GIL is already locked. Often, these functions are added to the code for reinsurance only and this can affect performance. Numpy: https://github.com/numpy/numpy/blob/2d4975e75c210202293b894bf98faf12f4697a31/numpy/core/include/numpy/ndarraytypes.h#L987 https://github.com/numpy/numpy/search?q=NPY_ALLOW_C_API&unscoped_q=NPY_ALLOW_C_API Pytorch: https://github.com/pytorch/pytorch/blob/0a3fb45d3d2cfacbd0469bbdba0e6cb1a2cd1bbe/torch/csrc/utils/auto_gil.h#L9 https://github.com/pytorch/pytorch/search?q=AutoGIL&unscoped_q=AutoGIL Pybind11 developers have already fixed this problem: https://github.com/pybind/pybind11/blob/97784dad3e518ccb415d5db57ff9b933495d9024/include/pybind11/pybind11.h#L1846 It is necessary to change the code of PyGILState_() functions to support sub-interpreters. Or add to https://docs.python.org/3/c-api/init.html#thread-state-and-the-global-interpreter-lock warning: Some Python libraries cannot be used in a sub-interpreter due to the likelihood of deadlock. For me, this is a critical vulnerability! There is another problem: Calling PyEval_AcquireThread() again results in a deadlock. This can be controlled in your code, but not in a third-party library. ---------- components: Interpreter Core messages: 344891 nosy: Roffild priority: normal severity: normal status: open title: Everyone uses GIL wrong! = DEADLOCK type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 20:35:08 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 07 Jun 2019 00:35:08 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559837218.79.0.128349910274.issue37176@roundup.psfhosted.org> Message-ID: <1559867708.44.0.432352649933.issue37176@roundup.psfhosted.org> Steven D'Aprano added the comment: The docs do say what super does: it returns "a proxy object that delegates method calls to a parent or sibling class of type", just as you quoted. That concise description is (almost) completely accurate and precise. (I say *almost* because it's not just method calls that it works with, but any attribute lookup.) What more do you want? That's not a rhetorical question. I'm not saying that the docs are perfect or cannot be improved, but they look pretty good to me: they tell you what super does, they tell you why you might use it, and show how to use it. What's missing? (Again, not a rhetorical question.) I understand that super is a very advanced corner of the language: there's a lot of necessary technical jargon in the docs: - One already needs to have a good understanding of what super *does* in order to make sense of the sentence describing what it *is*, so there's an element of circular reasoning needed. - The reader needs to understand that super isn't magical, it just returns an object like any other function, and understand what "proxy object" means, as well as delegation. - And have an understanding of how inheritance and the MRO work in Python, and the difference between bound and unbound methods/proxies. But to the experienced reader who knows these concepts, I'm having a hard time seeing what you believe is missing from the docs. Perhaps there ought to be a "gentle guide to super" somewhere, and the docs could link to that? ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 20:36:30 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 07 Jun 2019 00:36:30 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559837218.79.0.128349910274.issue37176@roundup.psfhosted.org> Message-ID: <1559867790.81.0.672231524223.issue37176@roundup.psfhosted.org> Change by Steven D'Aprano : ---------- Removed message: https://bugs.python.org/msg344892 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 20:37:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 00:37:16 +0000 Subject: [issue37186] Everyone uses GIL wrong! = DEADLOCK In-Reply-To: <1559865784.82.0.0210813088917.issue37186@roundup.psfhosted.org> Message-ID: <1559867836.59.0.668745304644.issue37186@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +eric.snow, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 20:39:55 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 07 Jun 2019 00:39:55 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559837218.79.0.128349910274.issue37176@roundup.psfhosted.org> Message-ID: <1559867995.12.0.988893524232.issue37176@roundup.psfhosted.org> Steven D'Aprano added the comment: The docs do say what super does: it returns "a proxy object that delegates method calls to a parent or sibling class of type", just as you quoted. That concise description is (almost) completely accurate and precise. (I say *almost* because it's not just method calls that it works with, but any attribute lookup.) What more do you want? That's not a rhetorical question. I'm not saying that the docs are perfect or cannot be improved, but they look pretty good to me: they tell you what super does, they tell you why you might use it, and show how to use it. What's missing? Again, not a rhetorical question. I understand that super is a very advanced corner of the language: there's a lot of necessary technical jargon in the docs, e.g.: - One already needs to have a good understanding of what super *does* in order to make sense of the sentence describing what it *is*, so there's an element of circular reasoning needed. - The reader needs to understand that super isn't magical, it just returns an object like any other function, and understand what "proxy object" means, as well as delegation. - And have an understanding of how inheritance and the MRO work in Python, and the difference between bound and unbound methods/proxies. I think that to the experienced reader who knows these concepts, the docs should be pretty clear and complete. I'm having a hard time seeing what you believe is missing from the docs. Can you explain further? Perhaps there ought to be a "gentle guide to super" somewhere, and the docs could link to that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 20:50:12 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 07 Jun 2019 00:50:12 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559837218.79.0.128349910274.issue37176@roundup.psfhosted.org> Message-ID: <1559868612.96.0.552445883662.issue37176@roundup.psfhosted.org> Raymond Hettinger added the comment: > It only says "Return a proxy object that delegates method > calls to a parent or sibling class of type" and then gives > a bunch of use cases and examples." That wording seems very reasonable to me. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 21:24:14 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 07 Jun 2019 01:24:14 +0000 Subject: [issue37184] suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):` In-Reply-To: <1559859389.6.0.41932196936.issue37184@roundup.psfhosted.org> Message-ID: <1559870654.33.0.795312276627.issue37184@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 6 23:46:36 2019 From: report at bugs.python.org (Eric Wieser) Date: Fri, 07 Jun 2019 03:46:36 +0000 Subject: [issue37187] CField.size from the ctypes module does not behave as documented on bitfields Message-ID: <1559879196.85.0.0861364976154.issue37187@roundup.psfhosted.org> New submission from Eric Wieser : This behavior is pretty surprising: ```python import ctypes class Simple(ctypes.Structure): _fields_ = [ ('a', ctypes.c_uint8), ('b', ctypes.c_uint8), ] class Bitfields(ctypes.Structure): _fields_ = [ ('a', ctypes.c_uint8, 8), ('b', ctypes.c_uint8, 8), ] print(Simple.b.size) # 1 print(Bitfields.b.size) # 262148 ``` The docstring for this field, from `help(type(Bitfields.b).size)`, is: > Help on getset descriptor _ctypes.CField.size: > > size > size in bytes of this field So either the behavior or the docstring needs to change. ---------- assignee: docs at python components: Documentation messages: 344895 nosy: Eric Wieser, docs at python priority: normal severity: normal status: open title: CField.size from the ctypes module does not behave as documented on bitfields _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 00:28:52 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 07 Jun 2019 04:28:52 +0000 Subject: [issue37163] dataclasses.replace() fails with the field named "obj" In-Reply-To: <1559733184.92.0.103225044701.issue37163@roundup.psfhosted.org> Message-ID: <1559881732.77.0.56333660371.issue37163@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: +1 to Serhiy's proposal ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 00:56:56 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Jun 2019 04:56:56 +0000 Subject: [issue37162] new importlib dependencies csv, email and zipfile In-Reply-To: <1559732109.6.0.0655643851833.issue37162@roundup.psfhosted.org> Message-ID: <1559883416.59.0.317764287446.issue37162@roundup.psfhosted.org> Serhiy Storchaka added the comment: @staticmethod def _switch_path(path): from contextlib import suppress import zipfile from pathlib import Path with suppress(Exception): return zipfile.Path(path) return Path(path) Oh, I did not know about zipfile.Path! I do not think this is a correct solution. It does not work with general loaders. I think that it would be more correct to override some methods in zipimport. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 01:22:25 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Jun 2019 05:22:25 +0000 Subject: [issue37163] dataclasses.replace() fails with the field named "obj" In-Reply-To: <1559733184.92.0.103225044701.issue37163@roundup.psfhosted.org> Message-ID: <1559884945.82.0.869978003171.issue37163@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +13755 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13877 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 01:54:43 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 07 Jun 2019 05:54:43 +0000 Subject: [issue37177] IDLE: Search dialogs can be hidden behind the main window In-Reply-To: <1559838119.79.0.14038633601.issue37177@roundup.psfhosted.org> Message-ID: <1559886883.01.0.0846789333963.issue37177@roundup.psfhosted.org> Tal Einat added the comment: New changeset 554450fb4e95066e825bdb4a2d544a490daeebdc by Tal Einat in branch 'master': bpo-37177: make IDLE's search dialogs transient (GH-13869) https://github.com/python/cpython/commit/554450fb4e95066e825bdb4a2d544a490daeebdc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 01:55:04 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 07 Jun 2019 05:55:04 +0000 Subject: [issue37177] IDLE: Search dialogs can be hidden behind the main window In-Reply-To: <1559838119.79.0.14038633601.issue37177@roundup.psfhosted.org> Message-ID: <1559886904.11.0.615441538859.issue37177@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13756 pull_request: https://github.com/python/cpython/pull/13878 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 01:55:11 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 07 Jun 2019 05:55:11 +0000 Subject: [issue37177] IDLE: Search dialogs can be hidden behind the main window In-Reply-To: <1559838119.79.0.14038633601.issue37177@roundup.psfhosted.org> Message-ID: <1559886911.26.0.558528859672.issue37177@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13757 pull_request: https://github.com/python/cpython/pull/13879 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 02:08:17 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 07 Jun 2019 06:08:17 +0000 Subject: [issue37177] IDLE: Search dialogs can be hidden behind the main window In-Reply-To: <1559838119.79.0.14038633601.issue37177@roundup.psfhosted.org> Message-ID: <1559887697.02.0.868746387865.issue37177@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +13758 pull_request: https://github.com/python/cpython/pull/13880 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 02:09:51 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 07 Jun 2019 06:09:51 +0000 Subject: [issue24039] Idle: some modal dialogs maximize, don't minimize In-Reply-To: <1429811337.7.0.183903934829.issue24039@psf.upfronthosting.co.za> Message-ID: <1559887791.88.0.0840083012431.issue24039@roundup.psfhosted.org> Change by Tal Einat : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 02:17:16 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 07 Jun 2019 06:17:16 +0000 Subject: [issue37177] IDLE: Search dialogs can be hidden behind the main window In-Reply-To: <1559838119.79.0.14038633601.issue37177@roundup.psfhosted.org> Message-ID: <1559888236.08.0.804979424192.issue37177@roundup.psfhosted.org> miss-islington added the comment: New changeset 295fe32e393280464feef7c6fb616ea2d1e73e37 by Miss Islington (bot) in branch '3.8': bpo-37177: make IDLE's search dialogs transient (GH-13869) https://github.com/python/cpython/commit/295fe32e393280464feef7c6fb616ea2d1e73e37 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 02:18:44 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 07 Jun 2019 06:18:44 +0000 Subject: [issue33826] enable discovery of class source code in IPython interactively defined classes In-Reply-To: <1528697796.87.0.592728768989.issue33826@psf.upfronthosting.co.za> Message-ID: <1559888324.55.0.297211508807.issue33826@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 02:37:35 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 07 Jun 2019 06:37:35 +0000 Subject: [issue37177] IDLE: Search dialogs can be hidden behind the main window In-Reply-To: <1559838119.79.0.14038633601.issue37177@roundup.psfhosted.org> Message-ID: <1559889455.85.0.902473573119.issue37177@roundup.psfhosted.org> miss-islington added the comment: New changeset 685b806549cc956aeeb3a57fe15ee5a4d1704aed by Miss Islington (bot) in branch '3.7': bpo-37177: make IDLE's search dialogs transient (GH-13869) https://github.com/python/cpython/commit/685b806549cc956aeeb3a57fe15ee5a4d1704aed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 02:41:34 2019 From: report at bugs.python.org (Eric Wieser) Date: Fri, 07 Jun 2019 06:41:34 +0000 Subject: [issue37188] Creating a ctypes array of an element with size zero causes "Fatal Python error: Floating point exception" Message-ID: <1559889694.06.0.92762632537.issue37188@roundup.psfhosted.org> New submission from Eric Wieser : Introduced in the fix to bpo-36504, GH-12660. ```python >>> (ctypes.c_uint8 * 0 * 2)() Fatal Python error: Floating point exception >>> struct Empty(ctypes.Structure): _fields_ = [] >>> (Empty * 2)() Fatal Python error: Floating point exception ``` This used to work just fine ---------- messages: 344901 nosy: Eric Wieser, ZackerySpytz priority: normal severity: normal status: open title: Creating a ctypes array of an element with size zero causes "Fatal Python error: Floating point exception" type: crash versions: Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 02:48:35 2019 From: report at bugs.python.org (Eric Wieser) Date: Fri, 07 Jun 2019 06:48:35 +0000 Subject: [issue37188] Creating a ctypes array of an element with size zero causes "Fatal Python error: Floating point exception" In-Reply-To: <1559889694.06.0.92762632537.issue37188@roundup.psfhosted.org> Message-ID: <1559890115.62.0.0111691726785.issue37188@roundup.psfhosted.org> Change by Eric Wieser : ---------- keywords: +patch pull_requests: +13759 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13881 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 02:51:01 2019 From: report at bugs.python.org (Eric Wieser) Date: Fri, 07 Jun 2019 06:51:01 +0000 Subject: [issue37188] Creating a ctypes array of an element with size zero causes "Fatal Python error: Floating point exception" In-Reply-To: <1559889694.06.0.92762632537.issue37188@roundup.psfhosted.org> Message-ID: <1559890261.64.0.337191732422.issue37188@roundup.psfhosted.org> Change by Eric Wieser : ---------- components: +ctypes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 02:51:30 2019 From: report at bugs.python.org (Eric Wieser) Date: Fri, 07 Jun 2019 06:51:30 +0000 Subject: [issue37187] CField.size from the ctypes module does not behave as documented on bitfields In-Reply-To: <1559879196.85.0.0861364976154.issue37187@roundup.psfhosted.org> Message-ID: <1559890290.44.0.896939573026.issue37187@roundup.psfhosted.org> Change by Eric Wieser : ---------- components: +ctypes type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 02:53:08 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 07 Jun 2019 06:53:08 +0000 Subject: [issue37177] IDLE: Search dialogs can be hidden behind the main window In-Reply-To: <1559838119.79.0.14038633601.issue37177@roundup.psfhosted.org> Message-ID: <1559890388.1.0.521610525683.issue37177@roundup.psfhosted.org> Tal Einat added the comment: New changeset 1b57ab5c6478b93cf4150bd8c475022252776598 by Tal Einat in branch '2.7': [2.7] bpo-37177: make IDLE's search dialogs transient (GH-13869) https://github.com/python/cpython/commit/1b57ab5c6478b93cf4150bd8c475022252776598 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 02:53:57 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 07 Jun 2019 06:53:57 +0000 Subject: [issue37177] IDLE: Search dialogs can be hidden behind the main window In-Reply-To: <1559838119.79.0.14038633601.issue37177@roundup.psfhosted.org> Message-ID: <1559890437.45.0.161619738133.issue37177@roundup.psfhosted.org> Change by Tal Einat : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 02:56:48 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 07 Jun 2019 06:56:48 +0000 Subject: [issue24039] Idle: some modal dialogs maximize, don't minimize In-Reply-To: <1429811337.7.0.183903934829.issue24039@psf.upfronthosting.co.za> Message-ID: <1559890608.61.0.546871959899.issue24039@roundup.psfhosted.org> Tal Einat added the comment: The search dialog windows are now made transient relative to the editor window. Among other things, they no longer have minimize/maximize buttons on Windows, resolving this issue. ---------- nosy: +taleinat resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 03:08:21 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 07 Jun 2019 07:08:21 +0000 Subject: [issue35954] Incoherent type conversion in configparser In-Reply-To: <1549801714.53.0.77041525212.issue35954@roundup.psfhosted.org> Message-ID: <1559891301.91.0.29386670792.issue35954@roundup.psfhosted.org> Tal Einat added the comment: This is indeed inconsistent, but it's a minor issue that has been this way for a long time and is easily worked around. IMO changing it would create more problems than leaving it as-is. IMO we should at most clarify in the docs. ---------- nosy: +taleinat versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 03:55:23 2019 From: report at bugs.python.org (Christoph Gohlke) Date: Fri, 07 Jun 2019 07:55:23 +0000 Subject: [issue37189] PyRun_String not exported in python38.dll Message-ID: <1559894123.98.0.3282613922.issue37189@roundup.psfhosted.org> New submission from Christoph Gohlke : While testing third party packages on Python 3.8.0b1 for Windows, I noticed that the `PyRun_String` function is no longer exported from `python38.dll`. Is this intentional? I can't see this mentioned at or This change breaks existing code. But then `PyRun_String` is easy to replace with `PyRun_StringFlags`. ---------- components: Windows messages: 344905 nosy: cgohlke, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: PyRun_String not exported in python38.dll versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 04:00:34 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 07 Jun 2019 08:00:34 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559837218.79.0.128349910274.issue37176@roundup.psfhosted.org> Message-ID: <1559894434.84.0.594018142015.issue37176@roundup.psfhosted.org> Jeroen Demeyer added the comment: > What more do you want? Mainly: it says "a parent or sibling class of *type*" but it doesn't explain which class it actually uses. And the sentence "The __mro__ attribute of the type lists the method resolution search order used by both getattr() and super()" is even wrong or at least confusing: what matters is not the MRO of the type (the first argument to super()) but the MRO of the object (the second argument to super()). The zero-argument form super() is not explained at all. > Perhaps there ought to be a "gentle guide to super" somewhere, and the docs could link to that? There are plenty of guides like that and in fact that docs already link to https://rhettinger.wordpress.com/2011/05/26/super-considered-super/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 04:13:57 2019 From: report at bugs.python.org (Stefan Krah) Date: Fri, 07 Jun 2019 08:13:57 +0000 Subject: [issue37188] Creating a ctypes array of an element with size zero causes "Fatal Python error: Floating point exception" In-Reply-To: <1559889694.06.0.92762632537.issue37188@roundup.psfhosted.org> Message-ID: <1559895237.92.0.00449112850191.issue37188@roundup.psfhosted.org> Stefan Krah added the comment: New changeset 0690c79c419b8d2bdfe7c5b6dca57b018f5a5a54 by Stefan Krah (Eric Wieser) in branch 'master': bpo-37188: Fix a divide-by-zero in arrays of size-0 objects (#13881) https://github.com/python/cpython/commit/0690c79c419b8d2bdfe7c5b6dca57b018f5a5a54 ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 04:15:10 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 07 Jun 2019 08:15:10 +0000 Subject: [issue37188] Creating a ctypes array of an element with size zero causes "Fatal Python error: Floating point exception" In-Reply-To: <1559889694.06.0.92762632537.issue37188@roundup.psfhosted.org> Message-ID: <1559895310.16.0.714718563647.issue37188@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13760 pull_request: https://github.com/python/cpython/pull/13882 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 04:34:19 2019 From: report at bugs.python.org (Stefan Krah) Date: Fri, 07 Jun 2019 08:34:19 +0000 Subject: [issue37188] Creating a ctypes array of an element with size zero causes "Fatal Python error: Floating point exception" In-Reply-To: <1559889694.06.0.92762632537.issue37188@roundup.psfhosted.org> Message-ID: <1559896459.47.0.875886075832.issue37188@roundup.psfhosted.org> Stefan Krah added the comment: New changeset 8f0bbbdcae73f275faff90cc4559f6111116f001 by Stefan Krah (Miss Islington (bot)) in branch '3.7': bpo-37188: Fix a divide-by-zero in arrays of size-0 objects (GH-13881) (#13882) https://github.com/python/cpython/commit/8f0bbbdcae73f275faff90cc4559f6111116f001 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 04:42:16 2019 From: report at bugs.python.org (Michael Felt) Date: Fri, 07 Jun 2019 08:42:16 +0000 Subject: [issue36624] cleanup the stdlib and tests with regard to sys.platform usage In-Reply-To: <1559840930.23.0.177258328716.issue36624@roundup.psfhosted.org> Message-ID: Michael Felt added the comment: On 06/06/2019 19:08, Steve Dower wrote: > Steve Dower added the comment: > > Changing our policy here (from "no policy" to "here's a recommendation") probably deserves a python-dev discussion first. I can rejoin the list - to follow the discussion, should one start. > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 04:57:50 2019 From: report at bugs.python.org (=?utf-8?q?Radu_Matei_L=C4=83craru?=) Date: Fri, 07 Jun 2019 08:57:50 +0000 Subject: [issue37190] asyncio.iscoroutinefunction(.asend) returns False Message-ID: <1559897870.46.0.572165023126.issue37190@roundup.psfhosted.org> New submission from Radu Matei L?craru : asyncio.iscoroutinefunction(.__anext__) asyncio.iscoroutinefunction(.asend) asyncio.iscoroutinefunction(.athrow) asyncio.iscoroutinefunction(.aclose) All of these return False, is this the intended behavior? Aren't all of these in fact coroutine functions? ---------- components: asyncio messages: 344910 nosy: Radu Matei L?craru, asvetlov, yselivanov priority: normal severity: normal status: open title: asyncio.iscoroutinefunction(.asend) returns False type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 05:04:19 2019 From: report at bugs.python.org (Michael Felt) Date: Fri, 07 Jun 2019 09:04:19 +0000 Subject: [issue36656] Please add race-free os.link and os.symlink wrapper / helper In-Reply-To: <1555577087.92.0.769196427693.issue36656@roundup.psfhosted.org> Message-ID: <1559898259.98.0.294721352867.issue36656@roundup.psfhosted.org> Change by Michael Felt : ---------- nosy: +Michael.Felt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 05:09:29 2019 From: report at bugs.python.org (Robert Collins) Date: Fri, 07 Jun 2019 09:09:29 +0000 Subject: [issue36656] Please add race-free os.link and os.symlink wrapper / helper In-Reply-To: <1555577087.92.0.769196427693.issue36656@roundup.psfhosted.org> Message-ID: <1559898569.92.0.252381878123.issue36656@roundup.psfhosted.org> Robert Collins added the comment: Thank you @Eryk ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 05:13:57 2019 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 07 Jun 2019 09:13:57 +0000 Subject: [issue37191] Python.h contains intermingled declarations Message-ID: <1559898837.19.0.323720820169.issue37191@roundup.psfhosted.org> New submission from Petr Viktorin : When compiled with GCC's -Werror=declaration-after-statement ("intermingled declarations" in PEP7), cpython/abstract.h (included from ) errors on vectorcall helper functions added in 3.8.0 Beta 1. It's well within our rights to ignore this: since 3.6 we require intermingled declarations. But, when re-compiling Fedora we've seen several projects fail with this warning (so far: pygobject3, python-dbus, xen; more will likely come). Dear Release Manager, should we patch 3.8 to avoid this? The patch is simple, and it would give projects that we(re) dutifully tested with the Alphas one more release to adapt. I don't think it's worth changing for 3.9 (but if we do we should test it). ---------- messages: 344912 nosy: lukasz.langa, petr.viktorin priority: normal severity: normal status: open title: Python.h contains intermingled declarations versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 05:14:06 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jun 2019 09:14:06 +0000 Subject: [issue24039] Idle: some modal dialogs maximize, don't minimize In-Reply-To: <1429811337.7.0.183903934829.issue24039@psf.upfronthosting.co.za> Message-ID: <1559898846.54.0.668692876967.issue24039@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 05:16:20 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jun 2019 09:16:20 +0000 Subject: [issue37177] IDLE: Search dialogs can be hidden behind the main window In-Reply-To: <1559838119.79.0.14038633601.issue37177@roundup.psfhosted.org> Message-ID: <1559898980.73.0.966198739922.issue37177@roundup.psfhosted.org> Terry J. Reedy added the comment: Irv's steps did not work for me either, on Windows, and I do not know how else to reproduce. So I cannot test that this fixes any hiding issue. However, the patch fixes #24039. On Windows, it removes the inoperative minimize button and the unwanted maximize buttom, making the search dialog work like all the other IDLE dialogs I checked. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 05:20:28 2019 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 07 Jun 2019 09:20:28 +0000 Subject: [issue37191] Python.h contains intermingled declarations In-Reply-To: <1559898837.19.0.323720820169.issue37191@roundup.psfhosted.org> Message-ID: <1559899228.78.0.874343183882.issue37191@roundup.psfhosted.org> Change by Petr Viktorin : ---------- keywords: +patch pull_requests: +13761 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13887 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 05:22:57 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Fri, 07 Jun 2019 09:22:57 +0000 Subject: [issue36624] cleanup the stdlib and tests with regard to sys.platform usage In-Reply-To: <1555158343.77.0.950141438455.issue36624@roundup.psfhosted.org> Message-ID: <1559899377.52.0.414465566606.issue36624@roundup.psfhosted.org> Change by Kubilay Kocak : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 05:27:03 2019 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 07 Jun 2019 09:27:03 +0000 Subject: [issue37191] Python.h contains intermingled declarations In-Reply-To: <1559898837.19.0.323720820169.issue37191@roundup.psfhosted.org> Message-ID: <1559899623.49.0.581136689067.issue37191@roundup.psfhosted.org> Petr Viktorin added the comment: > pygobject3, python-dbus, xen Correction: - The Fedora packages failed to build; this might or might not be due to the projects themseves - pygobject3 actually only warns on this Anyway, we can usually take care of open-source stuff. Only take it as a litmus test for codebases we don't know about. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 05:39:45 2019 From: report at bugs.python.org (Michael Felt) Date: Fri, 07 Jun 2019 09:39:45 +0000 Subject: [issue36656] Please add race-free os.link and os.symlink wrapper / helper In-Reply-To: <1555577087.92.0.769196427693.issue36656@roundup.psfhosted.org> Message-ID: <1559900385.62.0.984895898584.issue36656@roundup.psfhosted.org> Michael Felt added the comment: I started a reply on the python-mentoring maillist - and promised to come back here. a) imho - the discussion about an "attacker" is only misleading for the general case. For active attacks - where an attacker has active acces to the system is not something that is the responsibility of "stdlib". On POSIX, one of the first things I would consider is adding the "STX" bit so that only root and the file owner can remove an existing "link" to an inode (a symbolic link is a "special" file whose contents is the PATH to yet another filesystem "name" regardless of it's type.) For reference, a hard-link "merely" increases the number of links to an inode - and so only works for non-directory objects within the same filesystem). Puf! b) the "real", again imho, security issue is one of system integrity. Compare this "race" condition with a multi-user database (think of directories as the "index" to a data-record. A user that trusts the file-system index to refer to the correct file-system object (file, directory, other special file) - especially when there is no way for the user to verify the accuracy of the symbolic link. Any application, especially if it runs as "root" needs to be extremely cautious with "overwriting" existing "records". It is asif as database admin just changes where one database record references - as is, I cannot change the data it references - so I just change what it goes to - where I can change the data. -- As I think about it - an application that is dependent on symbolic links has an inherent weakness. In short - I would be against this - if security is the primary argument for developing it. I would rather be notified that there is an existing symbolic link - where there should not be - and consider later action. a) an application, running as root, can override any security measure I can come up with. The is the core "weakness" of UNIX/POSIX access control. When not running as root - there are mechanisms that can block the removal of any directory entry (the unlink() call). b) so, if you want to consider adding a "user-friendly" force option, just as POSIX ln does (whether for hard or soft links) - then that is, imho - a different discussion. I would tend to be "against" making it too easy, because an application coded with "Force=true" would never get the feedback that something already exists. If the currect implementation returns the a "fatal" error - that needs to be fixed. In short, I do not think it is the task of Python to rewrite the behavior of the system calls being used - and/because I fear lazy programmers (being there, done that!). "ls -sf xxx yyy" and/or "ln -f xxx yyy" is a convenience. Using it as a default is "bad-practice" (imho) - and I fear programmers would use this new "feature" and move to "bad practice" Michael ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 05:50:09 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 07 Jun 2019 09:50:09 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559894434.84.0.594018142015.issue37176@roundup.psfhosted.org> Message-ID: <20190607095000.GK4221@ando.pearwood.info> Steven D'Aprano added the comment: On Fri, Jun 07, 2019 at 08:00:34AM +0000, Jeroen Demeyer wrote: > > Jeroen Demeyer added the comment: > > > What more do you want? > > Mainly: it says "a parent or sibling class of *type*" but it doesn't > explain which class it actually uses. Only one of the two arguments is called "type". The other is called "object-or-type". > And the sentence "The __mro__ attribute of the type lists the method > resolution search order used by both getattr() and super()" is even > wrong or at least confusing: what matters is not the MRO of the type > (the first argument to super()) but the MRO of the object (the second > argument to super()). The sentence doesn't talk about the MRO of *type* (the first argument), it talks about the __mro__ attribute. It is correct. The __mro__ attribute is on the type, not the instance: py> int.__mro__ (, ) py> int().__mro__ Traceback (most recent call last): File "", line 1, in AttributeError: 'int' object has no attribute '__mro__' super() look-ups never start at the instance, they delegate to the superclass (or superclasses), not back to the current class, or the instance itself. > The zero-argument form super() is not explained at all. Yes it is. Look at the example given: super().method(arg) # This does the same thing as: # super(C, self).method(arg) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 05:51:22 2019 From: report at bugs.python.org (Stefan Krah) Date: Fri, 07 Jun 2019 09:51:22 +0000 Subject: [issue37188] Creating a ctypes array of an element with size zero causes "Fatal Python error: Floating point exception" In-Reply-To: <1559889694.06.0.92762632537.issue37188@roundup.psfhosted.org> Message-ID: <1559901082.89.0.219361660114.issue37188@roundup.psfhosted.org> Stefan Krah added the comment: Thanks for the fix! 3.7/3.8 are done, 2.7 still needs a manual backport. ---------- versions: -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 05:51:40 2019 From: report at bugs.python.org (Stefan Krah) Date: Fri, 07 Jun 2019 09:51:40 +0000 Subject: [issue37188] Creating a ctypes array of an element with size zero causes "Fatal Python error: Floating point exception" In-Reply-To: <1559889694.06.0.92762632537.issue37188@roundup.psfhosted.org> Message-ID: <1559901100.21.0.0673526557432.issue37188@roundup.psfhosted.org> Change by Stefan Krah : ---------- stage: patch review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 05:57:11 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 07 Jun 2019 09:57:11 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559837218.79.0.128349910274.issue37176@roundup.psfhosted.org> Message-ID: <1559901431.74.0.0354897681455.issue37176@roundup.psfhosted.org> Jeroen Demeyer added the comment: > Only one of the two arguments is called "type". The other is called "object-or-type". I'm having problems with the first word of "a parent or sibling class of type". The most important part of super() is to *which* class that attribute lookups are delegated to and this is not explained. > The __mro__ attribute is on the type, not the instance: Sorry for that. I meant to say: And the sentence "The __mro__ attribute of the type lists the method resolution search order used by both getattr() and super()" is even wrong or at least confusing: what matters is not the MRO of the type (the first argument to super()) but the MRO of ***the type of*** the object (the second argument to super()). > Yes it is. Look at the example given: An example is not an explanation. But it's true, this is the least of my problems with this doc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 06:00:45 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 07 Jun 2019 10:00:45 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559837218.79.0.128349910274.issue37176@roundup.psfhosted.org> Message-ID: <1559901645.61.0.0290471616991.issue37176@roundup.psfhosted.org> Jeroen Demeyer added the comment: > The sentence doesn't talk about the MRO of *type* (the first argument), it talks about the __mro__ attribute. If you have to explain in a bpo issue how the doc should be read, that proves exactly my point that it's confusing. The fact that it's technically correct if you read it the right way is irrelevant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 06:20:38 2019 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 07 Jun 2019 10:20:38 +0000 Subject: [issue37151] Calling code cleanup after PEP 590 In-Reply-To: <1559659244.35.0.514840211553.issue37151@roundup.psfhosted.org> Message-ID: <1559902838.57.0.15498616227.issue37151@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset 3f345c39255dc3823dd989d4e3c93b12d18c44e0 by Petr Viktorin (Jeroen Demeyer) in branch 'master': bpo-37151: simplify classmethoddescr_call (GH-13340) https://github.com/python/cpython/commit/3f345c39255dc3823dd989d4e3c93b12d18c44e0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 06:24:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 10:24:44 +0000 Subject: [issue37169] test_pyobject_is_freed_free fails with 3.8.0beta1 In-Reply-To: <1559778711.54.0.15966452891.issue37169@roundup.psfhosted.org> Message-ID: <1559903084.5.0.10482361752.issue37169@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13762 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13888 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 06:53:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 10:53:05 +0000 Subject: [issue36402] test_threading: test_threads_join_2() failed with "Fatal Python error: Py_EndInterpreter: not the last thread" on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1559904785.75.0.0357605460482.issue36402@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13763 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13889 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 06:56:55 2019 From: report at bugs.python.org (Michele Angrisano) Date: Fri, 07 Jun 2019 10:56:55 +0000 Subject: [issue37187] CField.size from the ctypes module does not behave as documented on bitfields In-Reply-To: <1559879196.85.0.0861364976154.issue37187@roundup.psfhosted.org> Message-ID: <1559905015.92.0.265272653212.issue37187@roundup.psfhosted.org> Michele Angrisano added the comment: Hi Eric, Thank you for the report. Would you interested to propose a Pull Request for this issue? You can read the devguide for more info: https://devguide.python.org/ ---------- nosy: +amaury.forgeotdarc, belopolsky, mangrisano, meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 07:00:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 11:00:19 +0000 Subject: [issue36402] test_threading: test_threads_join_2() failed with "Fatal Python error: Py_EndInterpreter: not the last thread" on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1559905219.95.0.653226520734.issue36402@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PR 13889: with this change, I can easily reproduce the crash on Linux: $ ./python -m test test_threading -m test_threads_join_2 -F Run tests sequentially 0:00:00 load avg: 0.51 [ 1] test_threading Fatal Python error: Py_EndInterpreter: not the last thread Current thread 0x00007f84ad74d740 (most recent call first): File "/home/vstinner/prog/python/master/Lib/test/support/__init__.py", line 2794 in run_in_subinterp File "/home/vstinner/prog/python/master/Lib/test/test_threading.py", line 923 in test_threads_join_2 ... Py_EndInterpreter() calls wait_for_thread_shutdown() to wait until threading._shutdown() completes. When the assertion fails, threading.enumerate() only contains the main thread: the spawned thread is already gone. But the assertion fails, which means that the Python thread state of the thread (which looks to be completed) is still around. This unit test comes from bpo-18808: commit 7b4769937fb612d576b6829c3b834f3dd31752f1 Author: Antoine Pitrou Date: Sat Sep 7 23:38:37 2013 +0200 Issue #18808: Thread.join() now waits for the underlying thread state to be destroyed before returning. This prevents unpredictable aborts in Py_EndInterpreter() when some non-daemon threads are still running. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 07:00:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 11:00:36 +0000 Subject: [issue36402] test_threading: test_threads_join_2() failed with "Fatal Python error: Py_EndInterpreter: not the last thread" on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1559905236.29.0.831235919016.issue36402@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +eric.snow, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 07:34:29 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 07 Jun 2019 11:34:29 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559901431.74.0.0354897681455.issue37176@roundup.psfhosted.org> Message-ID: <20190607113422.GL4221@ando.pearwood.info> Steven D'Aprano added the comment: On Fri, Jun 07, 2019 at 09:57:11AM +0000, Jeroen Demeyer wrote: > I'm having problems with the first word of "a parent or sibling class of type". The first word is "a". Did you mean something else or did you mean it literally? If the second case, we have to talk about *a* parent class rather than *the* parent class, since Python supports multiple inheritance and a class can have more than one parent class. > The most important part of super() is to *which* class that attribute > lookups are delegated to and this is not explained. Lookups are delegated to a parent or sibling class, exactly as the documentation says. Which class that is (whether a parent or sibling) can only be determined at runtime. > And the sentence "The __mro__ attribute of the type lists the method > resolution search order used by both getattr() and super()" is even > wrong or at least confusing: what matters is not the MRO of the type > (the first argument to super()) but the MRO of ***the type of*** the > object (the second argument to super()). I believe that is still wrong. What matters is the __mro__ attribute of the first argument. It matters because that is how the MRO actually is searched. The MRO of the second argument is not relevant, except to the degree that it overlaps with the __mro__ attribute of the first. And it will always overlaps, because the second argument must be an instance or subclass of the first. But not necessarily *directly* of the first: object > Parent > A > B > C > D > E > F > instance = F() If the method is defined in class C, then the super call in C should be written: class C(B): def method(self, arg): super().method(arg) # like super(C, self).method(arg) and the lookup will start at C.__mro__[1], namely B, precisely as expected. If it started back at the type of the instance (self), namely class F, the C.method would recursively call itself over and over and over again. If you don't believe me, you can simulate super() working the way you suggest by doing this: # -----%<----- class A(object): def method(self): print("from class A") class B(A): def method(self): print("bad method") # This is bad, don't do it! super(type(self), self).method() class C(B): pass C().method() # -----%<----- For multiple inheritance: class C(B, X, Y, Z): ... we can't generally tell in advance which will be looked at next, since that depends on the precise details of the inheritance diagram. But whatever the class is, at this point, it is still the __mro__ of C that is used, not the MRO of the instance. The bottom line: what matters is .__mro__, exactly as documented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 07:39:17 2019 From: report at bugs.python.org (Alen Kolman) Date: Fri, 07 Jun 2019 11:39:17 +0000 Subject: [issue37192] pip instal math3d - EROR Message-ID: <1559907557.33.0.540342882272.issue37192@roundup.psfhosted.org> New submission from Alen Kolman : I am geting constant eror while trying to isntal math3d or urx libary for Python using pip install. I am using Windows 10 and Python 3.7.3 I tried to: - unistall/instal python and also try older version 3.4.4.. nothing work - upgrade setuptools - upgrade pip (then I get even more errors) Here is my error: C:\Python34\Scripts>pip install math3d Collecting math3d Using cached https://files.pythonhosted.org/packages/9a/33/72ac95bb4ac11a2b13e033d90f84430dc23fc815124d9303dffca8789a75/math3d-3.3.4.tar.gz Installing collected packages: math3d Running setup.py install for math3d ... error Complete output from command c:\python34\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\ALEN~1.KOL\\AppData\\Local\\Temp\\pip-install-duiwypg9\\math3d\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\ALEN~1.KOL\AppData\Local\Temp\pip-record-cmd8m8g6\install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build\lib creating build\lib\math3d copying math3d\orientation.py -> build\lib\math3d copying math3d\orientation_computer.py -> build\lib\math3d copying math3d\quaternion.py -> build\lib\math3d copying math3d\transform.py -> build\lib\math3d copying math3d\utils.py -> build\lib\math3d copying math3d\vector.py -> build\lib\math3d copying math3d\__init__.py -> build\lib\math3d creating build\lib\math3d\interpolation copying math3d\interpolation\r3interpolation.py -> build\lib\math3d\interpolation copying math3d\interpolation\se3interpolation.py -> build\lib\math3d\interpolation copying math3d\interpolation\so3interpolation.py -> build\lib\math3d\interpolation copying math3d\interpolation\__init__.py -> build\lib\math3d\interpolation creating build\lib\math3d\reference_system copying math3d\reference_system\frame.py -> build\lib\math3d\reference_system copying math3d\reference_system\free_vector.py -> build\lib\math3d\reference_system copying math3d\reference_system\point.py -> build\lib\math3d\reference_system copying math3d\reference_system\reference_system.py -> build\lib\math3d\reference_system copying math3d\reference_system\__init__.py -> build\lib\math3d\reference_system creating build\lib\math3d\dynamics copying math3d\dynamics\twist.py -> build\lib\math3d\dynamics copying math3d\dynamics\wrench.py -> build\lib\math3d\dynamics copying math3d\dynamics\__init__.py -> build\lib\math3d\dynamics creating build\lib\math3d\geometry copying math3d\geometry\line.py -> build\lib\math3d\geometry copying math3d\geometry\plane.py -> build\lib\math3d\geometry copying math3d\geometry\__init__.py -> build\lib\math3d\geometry running install_lib running install_data Traceback (most recent call last): File "", line 1, in File "C:\Users\ALEN~1.KOL\AppData\Local\Temp\pip-install-duiwypg9\math3d\setup.py", line 23, in data_files=[('share/doc/pymath3d/', ['README.md', 'COPYING'])] File "c:\python34\lib\distutils\core.py", line 148, in setup dist.run_commands() File "c:\python34\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "c:\python34\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "c:\python34\lib\site-packages\setuptools\command\install.py", line 61, in run return orig.install.run(self) File "c:\python34\lib\distutils\command\install.py", line 557, in run self.run_command(cmd_name) File "c:\python34\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "c:\python34\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "c:\python34\lib\distutils\command\install_data.py", line 56, in run dir = convert_path(f[0]) File "c:\python34\lib\distutils\util.py", line 112, in convert_path raise ValueError("path '%s' cannot end with '/'" % pathname) ValueError: path 'share/doc/pymath3d/' cannot end with '/' ---------------------------------------- Command "c:\python34\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\ALEN~1.KOL\\AppData\\Local\\Temp\\pip-install-duiwypg9\\math3d\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\ALEN~1.KOL\AppData\Local\Temp\pip-record-cmd8m8g6\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\ALEN~1.KOL\AppData\Local\Temp\pip-install-duiwypg9\math3d\ ---------- components: Installation messages: 344924 nosy: Alen Kolman priority: normal severity: normal status: open title: pip instal math3d - EROR type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 07:50:07 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 07 Jun 2019 11:50:07 +0000 Subject: [issue37192] pip instal math3d - EROR In-Reply-To: <1559907557.33.0.540342882272.issue37192@roundup.psfhosted.org> Message-ID: <1559908207.78.0.116759917104.issue37192@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This tracker is only for issues related to CPython. math3d is not a part of CPython stdlib. I would suggest following up on the respective repo's issue tracker. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 07:51:37 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 07 Jun 2019 11:51:37 +0000 Subject: [issue37192] pip instal math3d - EROR In-Reply-To: <1559907557.33.0.540342882272.issue37192@roundup.psfhosted.org> Message-ID: <1559908297.68.0.713562621296.issue37192@roundup.psfhosted.org> Change by SilentGhost : ---------- resolution: -> third party stage: -> resolved status: open -> closed type: compile error -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 07:53:39 2019 From: report at bugs.python.org (Norihiro Maruyama) Date: Fri, 07 Jun 2019 11:53:39 +0000 Subject: [issue37193] Memory leak while running TCP/UDPServer with socketserver.ThreadingMixIn Message-ID: <1559908419.41.0.390422965351.issue37193@roundup.psfhosted.org> New submission from Norihiro Maruyama : UDP/TCPServer with socketserver.ThreadingMixin class (also ThreadingTCPServer and ThreadingUDPServer class) seems to be memory leak while running the server. https://docs.python.org/3/library/socketserver.html#socketserver.ThreadingMixIn My code which wrote to check this is the following. ``` class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler): def handle(self): data = str(self.request.recv(1024), 'ascii') cur_thread = threading.current_thread() response = bytes("{}: {}".format(cur_thread.name, data), 'ascii') self.request.sendall(response) if __name__ == "__main__": HOST, PORT = "localhost", 0 server = socketserver.ThreadingTCPServer((HOST, PORT), ThreadedTCPRequestHandler) server.daemon_threads = False server.block_on_close = True with server: ip, port = server.server_address server_thread = threading.Thread(target=server.serve_forever) server_thread.daemon = True server_thread.start() for i in range(1000): with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: sock.connect(server.server_address) sock.sendall(bytes("hello", 'ascii')) response = str(sock.recv(1024), 'ascii') print("Received: {}".format(response)) time.sleep(0.01) server.server_close() server.shutdown() ``` ( I wrote this based on https://docs.python.org/3/library/socketserver.html#asynchronous-mixins) Then I checked memory usage with profiling tool. (I used memory-profiler module https://pypi.org/project/memory-profiler/) $ mprof run python mycode.py $ mprof plot I attached result plot. And also I checked this also more long time and I found memory usage was increased endlessly. My environment is Hardware: MacBook Pro (15-inch, 2018) OS: MacOS 10.14 Python 3.7.1 I guess it caused by a thread object is not released in spite of the thread finished to process request and thread object will be made infinitely until server_close() is called. ---------- components: Library (Lib) files: threadingmixin_memory_usage.png messages: 344926 nosy: maru-n priority: normal severity: normal status: open title: Memory leak while running TCP/UDPServer with socketserver.ThreadingMixIn type: resource usage versions: Python 3.7 Added file: https://bugs.python.org/file48399/threadingmixin_memory_usage.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 07:54:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 11:54:00 +0000 Subject: [issue37194] Move new vector headers to the internal C API Message-ID: <1559908440.37.0.746705371355.issue37194@roundup.psfhosted.org> New submission from STINNER Victor : bpo-37191: the new vector APIs declare "static inline" functions which are no C89 compatible and so cause compilation issues on pygobject3, python-dbus, xen (for example). I propose to move the new *private* declarations to the internal C API. I started to work on an application. The blocker issue is _PyObject_CallNoArg() which is now commonly used in CPython code base for best performances. It is used the _testcapi which must *not* be compiled with the internal C API. So I suggest to first add a new public PyObject_CallNoArg() function. It would be different than _PyObject_CallNoArg() static inline function: PyObject_CallNoArg() would be a regular function and so fit better with ABI issues. ---------- components: Interpreter Core messages: 344927 nosy: vstinner priority: normal severity: normal status: open title: Move new vector headers to the internal C API versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 07:55:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 11:55:22 +0000 Subject: [issue37194] Move new vector private declarations to the internal C API In-Reply-To: <1559908440.37.0.746705371355.issue37194@roundup.psfhosted.org> Message-ID: <1559908522.22.0.456307994492.issue37194@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Move new vector headers to the internal C API -> Move new vector private declarations to the internal C API _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 07:55:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 11:55:29 +0000 Subject: [issue37191] Python.h contains intermingled declarations In-Reply-To: <1559898837.19.0.323720820169.issue37191@roundup.psfhosted.org> Message-ID: <1559908529.57.0.783874329767.issue37191@roundup.psfhosted.org> STINNER Victor added the comment: PR 13887 is fine but I would prefer to still be able to use C99 style for variable declarations. More generally, I don't think that variable declaration is the only issue: static inline function is a new shiny thing which can cause other issues with some C compilers. So I propose a different approach, bpo-37194: "Move new vector private declarations to the internal C API". ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 08:04:23 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 07 Jun 2019 12:04:23 +0000 Subject: [issue37194] Move new vector private declarations to the internal C API In-Reply-To: <1559908440.37.0.746705371355.issue37194@roundup.psfhosted.org> Message-ID: <1559909063.65.0.885423003861.issue37194@roundup.psfhosted.org> Jeroen Demeyer added the comment: > I propose to move the new *private* declarations to the internal C API. Some of those functions (in particular _PyObject_Vectorcall) are expected to become public in 3.9. They are only private for now since the API is provisional. ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 08:05:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 12:05:55 +0000 Subject: [issue37194] Move new vector private declarations to the internal C API In-Reply-To: <1559908440.37.0.746705371355.issue37194@roundup.psfhosted.org> Message-ID: <1559909155.67.0.392187342021.issue37194@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13764 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13890 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 08:24:49 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 07 Jun 2019 12:24:49 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559901645.61.0.0290471616991.issue37176@roundup.psfhosted.org> Message-ID: <20190607122440.GM4221@ando.pearwood.info> Steven D'Aprano added the comment: > If you have to explain in a bpo issue how the doc should be read, that > proves exactly my point that it's confusing. The fact that it's > technically correct if you read it the right way is irrelevant. Do you expect the docs to be technically correct when read wrongly? How else should people read the docs, except the right way? If you have *concrete* suggestions for improvements, of course we will consider them. I'll start with two concrete improvements: 1. Explicitly document that the zero-argument version is equivalent to super(__class__, ), and note that __class__ here is a special variable populated by the compiler. The first part of this is already documented in super.__doc__ and the second part used to be documented: https://docs.python.org/3.1/library/functions.html?#super and I don't think there's any harm in adding it back in. 2. Link to the essay on how the MRO is calculated. https://www.python.org/download/releases/2.3/mro/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 08:26:29 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 07 Jun 2019 12:26:29 +0000 Subject: [issue37191] Python.h contains intermingled declarations In-Reply-To: <1559898837.19.0.323720820169.issue37191@roundup.psfhosted.org> Message-ID: <1559910389.74.0.727961640102.issue37191@roundup.psfhosted.org> Jeroen Demeyer added the comment: Should we revert these inline functions back to macros? ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 08:29:15 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 07 Jun 2019 12:29:15 +0000 Subject: [issue37191] Python.h contains intermingled declarations In-Reply-To: <1559898837.19.0.323720820169.issue37191@roundup.psfhosted.org> Message-ID: <1559910555.79.0.238778691738.issue37191@roundup.psfhosted.org> Jeroen Demeyer added the comment: > It's well within our rights to ignore this: since 3.6 we require intermingled declarations. It's not clear from PEP 7 if we require intermingled declarations only when compiling CPython itself, or also for external packages that include CPython headers. It would be prudent to stay C89-compatible for non-internal header files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 08:37:05 2019 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 07 Jun 2019 12:37:05 +0000 Subject: [issue37170] Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall In-Reply-To: <1559803961.74.0.856942246401.issue37170@roundup.psfhosted.org> Message-ID: <1559911025.14.0.938538076978.issue37170@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +13765 pull_request: https://github.com/python/cpython/pull/13891 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 08:45:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 12:45:12 +0000 Subject: [issue37191] Python.h contains intermingled declarations In-Reply-To: <1559898837.19.0.323720820169.issue37191@roundup.psfhosted.org> Message-ID: <1559911512.01.0.170060334259.issue37191@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13766 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13892 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 09:02:57 2019 From: report at bugs.python.org (Norihiro Maruyama) Date: Fri, 07 Jun 2019 13:02:57 +0000 Subject: [issue37193] Memory leak while running TCP/UDPServer with socketserver.ThreadingMixIn In-Reply-To: <1559908419.41.0.390422965351.issue37193@roundup.psfhosted.org> Message-ID: <1559912577.89.0.0979572765637.issue37193@roundup.psfhosted.org> Change by Norihiro Maruyama : ---------- keywords: +patch pull_requests: +13767 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13893 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 09:04:54 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 07 Jun 2019 13:04:54 +0000 Subject: [issue37195] test_utime fails on MacOS Mojave (Kernel Version 18.6.0:) Message-ID: <1559912694.09.0.24854010798.issue37195@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : ./python.exe -m test test_os -R : -v ====================================================================== FAIL: test_utime (test.test_os.UtimeTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/pgalindo3/github/cpython/Lib/test/test_os.py", line 591, in test_utime self._test_utime(set_time) File "/Users/pgalindo3/github/cpython/Lib/test/test_os.py", line 579, in _test_utime self.assertAlmostEqual(st.st_atime, atime_ns * 1e-9, delta=1e-6) AssertionError: 1559912609.2612822 != 1.002003 within 1e-06 delta (1559912608.2592793 difference) ====================================================================== FAIL: test_utime_by_indexed (test.test_os.UtimeTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/pgalindo3/github/cpython/Lib/test/test_os.py", line 609, in test_utime_by_indexed self._test_utime(set_time) File "/Users/pgalindo3/github/cpython/Lib/test/test_os.py", line 579, in _test_utime self.assertAlmostEqual(st.st_atime, atime_ns * 1e-9, delta=1e-6) AssertionError: 1559912609.2679918 != 1.002003 within 1e-06 delta (1559912608.2659888 difference) ====================================================================== FAIL: test_utime_dir_fd (test.test_os.UtimeTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/pgalindo3/github/cpython/Lib/test/test_os.py", line 651, in test_utime_dir_fd self._test_utime(set_time) File "/Users/pgalindo3/github/cpython/Lib/test/test_os.py", line 579, in _test_utime self.assertAlmostEqual(st.st_atime, atime_ns * 1e-9, delta=1e-6) AssertionError: 1559912609.2721212 != 1.002003 within 1e-06 delta (1559912608.2701182 difference) ---------------------------------------------------------------------- ---------- components: Tests messages: 344933 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: test_utime fails on MacOS Mojave (Kernel Version 18.6.0:) versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 09:17:12 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 07 Jun 2019 13:17:12 +0000 Subject: [issue37192] pip instal math3d - EROR In-Reply-To: <1559907557.33.0.540342882272.issue37192@roundup.psfhosted.org> Message-ID: <1559913432.18.0.264338444996.issue37192@roundup.psfhosted.org> Steven D'Aprano added the comment: In addition to being a third-party library, according to the output you posted, you're actually running Python 3.4 not 3.7. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 09:33:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 13:33:51 +0000 Subject: [issue37194] Move new vector private declarations to the internal C API In-Reply-To: <1559908440.37.0.746705371355.issue37194@roundup.psfhosted.org> Message-ID: <1559914431.62.0.904456626256.issue37194@roundup.psfhosted.org> Change by STINNER Victor : Added file: https://bugs.python.org/file48400/stack_overflow-4.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 09:34:33 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Fri, 07 Jun 2019 13:34:33 +0000 Subject: [issue37030] Lib/cmd.py: Hide undocumented commands in help and completenames In-Reply-To: <1558682753.85.0.407660629596.issue37030@roundup.psfhosted.org> Message-ID: <1559914473.57.0.56542694645.issue37030@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: Can there be a review of the PR to let me know if all changes are correct? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 09:35:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 13:35:14 +0000 Subject: [issue37194] Move new vector private declarations to the internal C API In-Reply-To: <1559908440.37.0.746705371355.issue37194@roundup.psfhosted.org> Message-ID: <1559914513.99.0.0501797350317.issue37194@roundup.psfhosted.org> STINNER Victor added the comment: I used testcapi_call_no_args.patch and stack_overflow-4.py to measure the stack consumption of PyObject_CallNoArgs() and PyObject_CallFunctionObjArgs() for PR 13890. ---------- Added file: https://bugs.python.org/file48401/testcapi_call_no_args.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 09:45:50 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 07 Jun 2019 13:45:50 +0000 Subject: [issue37195] test_utime fails on MacOS Mojave (Kernel Version 18.6.0:) In-Reply-To: <1559912694.09.0.24854010798.issue37195@roundup.psfhosted.org> Message-ID: <1559915150.22.0.356776413531.issue37195@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 09:56:45 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 07 Jun 2019 13:56:45 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559837218.79.0.128349910274.issue37176@roundup.psfhosted.org> Message-ID: <1559915805.1.0.622151012135.issue37176@roundup.psfhosted.org> Jeroen Demeyer added the comment: > What matters is the __mro__ attribute of the first argument. It matters because that is how the MRO actually is searched. I'm sorry to say that you're wrong here. super() looks at the MRO of the type of the object (the second argument) (*). It has to do that in order to support diamonds. Consider a diamond like D / \ B C \ / A (with A as common base class). Now super(B, D()).attr will look in the MRO of D (which is D, B, C, A) and therefore delegate to C.attr. In this case, C does not even appear in the MRO of B. (*) To be pedantic: in the special case that the second argument is a type itself, it looks at the MRO of the second argument. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 10:01:35 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 07 Jun 2019 14:01:35 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559837218.79.0.128349910274.issue37176@roundup.psfhosted.org> Message-ID: <1559916095.13.0.518503751681.issue37176@roundup.psfhosted.org> Jeroen Demeyer added the comment: And this last comment is precisely the kind of information which should be explained in the super() docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 10:05:15 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Fri, 07 Jun 2019 14:05:15 +0000 Subject: [issue37196] Allowing arbitrary expressions in the @expression syntax Message-ID: <1559916315.57.0.952678742799.issue37196@roundup.psfhosted.org> New submission from G?ry : Could we allow arbitrary expressions in the @expression syntax for applying decorators to functions/classes? The current grammar restriction to: decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE is very surprising and I don't understand the real motivation. I find it weird that you are not able to do that: def f(): def g(): def h(x): pass return h return g @f()() def i(): pass since you get: @f()() ^ SyntaxError: invalid syntax but the following is perfectly valid: def f(): def g(): def h(x): pass return h return g def g(x): def h(x): pass return g @g(f()()) def h(): pass See this post for more details: https://stackoverflow.com/questions/56490579 ---------- components: Interpreter Core messages: 344939 nosy: bob.ippolito, exarkun, gvanrossum, j1m, maggyero, mwh, rhettinger priority: normal severity: normal status: open title: Allowing arbitrary expressions in the @expression syntax type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 10:06:42 2019 From: report at bugs.python.org (Christian Heimes) Date: Fri, 07 Jun 2019 14:06:42 +0000 Subject: [issue37196] Allowing arbitrary expressions in the @expression syntax In-Reply-To: <1559916315.57.0.952678742799.issue37196@roundup.psfhosted.org> Message-ID: <1559916402.46.0.488606112446.issue37196@roundup.psfhosted.org> Christian Heimes added the comment: The syntax is deliberately limited. The reasons are explained at: https://www.python.org/dev/peps/pep-0318/#current-syntax https://mail.python.org/pipermail/python-dev/2004-August/046711.html ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 10:16:39 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Fri, 07 Jun 2019 14:16:39 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559837218.79.0.128349910274.issue37176@roundup.psfhosted.org> Message-ID: <1559916999.18.0.732922763412.issue37176@roundup.psfhosted.org> G?ry added the comment: @Jeroen Demeyer > I'm sorry to say that you're wrong here. super() looks at the MRO of the type of the object (the second argument) (*). Exactly! It is funny because I was about to open the same issue this weekend. The documentation of super() is wrong here. ---------- nosy: +maggyero _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 10:22:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 14:22:26 +0000 Subject: [issue37169] test_pyobject_is_freed_free fails with 3.8.0beta1 In-Reply-To: <1559778711.54.0.15966452891.issue37169@roundup.psfhosted.org> Message-ID: <1559917346.7.0.0354586506975.issue37169@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 3bf0f3ad2046ac674d8e8a2c074a5a8b3327797d by Victor Stinner in branch 'master': bpo-37169: Rewrite _PyObject_IsFreed() unit tests (GH-13888) https://github.com/python/cpython/commit/3bf0f3ad2046ac674d8e8a2c074a5a8b3327797d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 10:23:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 14:23:01 +0000 Subject: [issue37170] Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall In-Reply-To: <1559803961.74.0.856942246401.issue37170@roundup.psfhosted.org> Message-ID: <1559917381.68.0.677252957239.issue37170@roundup.psfhosted.org> STINNER Victor added the comment: New changeset dd492d9c352eb0fa2bc48ea9acc47e47a7fab8a0 by Victor Stinner (Zackery Spytz) in branch '3.8': [3.8] bpo-37170: Fix the cast on error in PyLong_AsUnsignedLongLongMask() (GH-13860) (GH-13891) https://github.com/python/cpython/commit/dd492d9c352eb0fa2bc48ea9acc47e47a7fab8a0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 10:26:10 2019 From: report at bugs.python.org (Thomas Viehmann) Date: Fri, 07 Jun 2019 14:26:10 +0000 Subject: [issue37177] IDLE: Search dialogs can be hidden behind the main window In-Reply-To: <1559838119.79.0.14038633601.issue37177@roundup.psfhosted.org> Message-ID: <1559917570.66.0.630156659588.issue37177@roundup.psfhosted.org> Change by Thomas Viehmann : ---------- pull_requests: +13768 pull_request: https://github.com/python/cpython/pull/13894 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 10:26:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 14:26:22 +0000 Subject: [issue37169] test_pyobject_is_freed_free fails with 3.8.0beta1 In-Reply-To: <1559778711.54.0.15966452891.issue37169@roundup.psfhosted.org> Message-ID: <1559917582.93.0.0836881990304.issue37169@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13769 pull_request: https://github.com/python/cpython/pull/13895 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 10:28:11 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Fri, 07 Jun 2019 14:28:11 +0000 Subject: [issue37196] Allowing arbitrary expressions in the @expression syntax In-Reply-To: <1559916315.57.0.952678742799.issue37196@roundup.psfhosted.org> Message-ID: <1559917691.53.0.788654781056.issue37196@roundup.psfhosted.org> G?ry added the comment: @Christian Heimes > The reasons are explained at: Yes I read that. But I am wondering if after 15 years Guido still has this "gut feeling". Because my gut feeling as a Python *user* who has discovered decorators and stumbled on this restriction was: "what?!". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 10:30:40 2019 From: report at bugs.python.org (Thomas Viehmann) Date: Fri, 07 Jun 2019 14:30:40 +0000 Subject: [issue33826] enable discovery of class source code in IPython interactively defined classes In-Reply-To: <1528697796.87.0.592728768989.issue33826@psf.upfronthosting.co.za> Message-ID: <1559917840.45.0.332632308334.issue33826@roundup.psfhosted.org> Change by Thomas Viehmann : ---------- pull_requests: +13770 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13894 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 10:32:24 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 07 Jun 2019 14:32:24 +0000 Subject: [issue37177] IDLE: Search dialogs can be hidden behind the main window In-Reply-To: <1559838119.79.0.14038633601.issue37177@roundup.psfhosted.org> Message-ID: <1559917944.5.0.38238987156.issue37177@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: -13768 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 10:43:58 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 07 Jun 2019 14:43:58 +0000 Subject: [issue33826] enable discovery of class source code in IPython interactively defined classes In-Reply-To: <1528697796.87.0.592728768989.issue33826@psf.upfronthosting.co.za> Message-ID: <1559918638.11.0.0351326420584.issue33826@roundup.psfhosted.org> Tal Einat added the comment: Given that classes already have a '__module__' attribute, using which it is rather easy to find the filename, I don't see a good reason to add such an attribute to classes. IMO it would be more appropriate to directly create enhancement proposal for IPython/Jupyter to enhance the capabilities of their source code retrieval. I suggest rejecting this enhancement. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 10:46:40 2019 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 07 Jun 2019 14:46:40 +0000 Subject: [issue37196] Allowing arbitrary expressions in the @expression syntax In-Reply-To: <1559916315.57.0.952678742799.issue37196@roundup.psfhosted.org> Message-ID: <1559918800.96.0.57040448504.issue37196@roundup.psfhosted.org> Guido van Rossum added the comment: What you want to write is as unreadable as it ever was. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 10:46:42 2019 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 07 Jun 2019 14:46:42 +0000 Subject: [issue37170] Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall In-Reply-To: <1559803961.74.0.856942246401.issue37170@roundup.psfhosted.org> Message-ID: <1559918802.73.0.28573349389.issue37170@roundup.psfhosted.org> Change by Zackery Spytz : ---------- pull_requests: +13771 pull_request: https://github.com/python/cpython/pull/13896 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 10:50:59 2019 From: report at bugs.python.org (Thomas Viehmann) Date: Fri, 07 Jun 2019 14:50:59 +0000 Subject: [issue33826] enable discovery of class source code in IPython interactively defined classes In-Reply-To: <1528697796.87.0.592728768989.issue33826@psf.upfronthosting.co.za> Message-ID: <1559919059.64.0.33347361298.issue33826@roundup.psfhosted.org> Thomas Viehmann added the comment: Note that the module is less granular than the filename in IPython - i.e. it's useless for within notebooks. ---------- nosy: +t-vi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 10:54:02 2019 From: report at bugs.python.org (Thomas Viehmann) Date: Fri, 07 Jun 2019 14:54:02 +0000 Subject: [issue33826] enable discovery of class source code in IPython interactively defined classes In-Reply-To: <1528697796.87.0.592728768989.issue33826@psf.upfronthosting.co.za> Message-ID: <1559919242.67.0.141834155325.issue33826@roundup.psfhosted.org> Change by Thomas Viehmann : ---------- nosy: -t-vi resolution: -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 10:54:24 2019 From: report at bugs.python.org (Thomas Viehmann) Date: Fri, 07 Jun 2019 14:54:24 +0000 Subject: [issue33826] enable discovery of class source code in IPython interactively defined classes In-Reply-To: <1528697796.87.0.592728768989.issue33826@psf.upfronthosting.co.za> Message-ID: <1559919264.09.0.0783828161528.issue33826@roundup.psfhosted.org> Change by Thomas Viehmann : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 10:54:57 2019 From: report at bugs.python.org (=?utf-8?q?Pekka_Kl=C3=A4rck?=) Date: Fri, 07 Jun 2019 14:54:57 +0000 Subject: [issue36300] eval of comprehension cannot access local variables In-Reply-To: <1552646652.54.0.949988321046.issue36300@roundup.psfhosted.org> Message-ID: <1559919297.95.0.617559323573.issue36300@roundup.psfhosted.org> Pekka Kl?rck added the comment: More ways to be bitten by this strange behavior: >>> d = {'a': 1, 'b': 2} >>> eval('[x[k] for k in x]', {}, {'x': d}) Traceback (most recent call last): File "", line 1, in File "", line 1, in File "", line 1, in NameError: name 'x' is not defined >>> >>> def f(): ... x = {'a': 1, 'b': 2} ... return eval('[x[k] for k in x]') ... >>> f() Traceback (most recent call last): File "", line 1, in File "", line 3, in f File "", line 1, in File "", line 1, in NameError: name 'x' is not defined In both of the above cases changing eval('[x[k] for k in x]') to eval('[v for v in x.values()]') avoids the problem. There are no problems when using [x[k] for k in x] without `eval()` either. I'd prefer this to be changed, but there should at least be a note in the documentation of `eval()` about this. ---------- nosy: +pekka.klarck _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 10:56:27 2019 From: report at bugs.python.org (=?utf-8?q?Pekka_Kl=C3=A4rck?=) Date: Fri, 07 Jun 2019 14:56:27 +0000 Subject: [issue36300] eval of comprehension cannot access local variables In-Reply-To: <1552646652.54.0.949988321046.issue36300@roundup.psfhosted.org> Message-ID: <1559919387.02.0.211646382664.issue36300@roundup.psfhosted.org> Pekka Kl?rck added the comment: I encountered this issue because Robot Framework -- a generic Python based test automation framework -- supports evaluating Python expressions and this issue was reported for us: https://github.com/robotframework/robotframework/issues/3207 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 11:21:15 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Fri, 07 Jun 2019 15:21:15 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559837218.79.0.128349910274.issue37176@roundup.psfhosted.org> Message-ID: <1559920875.31.0.876490053842.issue37176@roundup.psfhosted.org> G?ry added the comment: @Steven D'Aprano > What matters is the __mro__ attribute of the first argument. It matters because that is how the MRO actually is searched. By the way, if it was true (it is not), then what did you think was the purpose of the second parameter of super(type, obj-or-type)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 11:34:12 2019 From: report at bugs.python.org (Christoph Reiter) Date: Fri, 07 Jun 2019 15:34:12 +0000 Subject: [issue37191] Python.h contains intermingled declarations In-Reply-To: <1559898837.19.0.323720820169.issue37191@roundup.psfhosted.org> Message-ID: <1559921652.2.0.710316898873.issue37191@roundup.psfhosted.org> Christoph Reiter added the comment: I've removed -Wdeclaration-after-statement in upstream pygobject: https://gitlab.gnome.org/GNOME/pygobject/merge_requests/119 ---------- nosy: +lazka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 11:35:16 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Fri, 07 Jun 2019 15:35:16 +0000 Subject: [issue37196] Allowing arbitrary expressions in the @expression syntax In-Reply-To: <1559916315.57.0.952678742799.issue37196@roundup.psfhosted.org> Message-ID: <1559921716.26.0.487101732843.issue37196@roundup.psfhosted.org> G?ry added the comment: @Guido van Rossum > What you want to write is as unreadable as it ever was. How is @g(f()()) more readable than @f()()? Yet the former is allowed. ---------- resolution: wont fix -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 11:41:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 15:41:32 +0000 Subject: [issue37170] Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall In-Reply-To: <1559803961.74.0.856942246401.issue37170@roundup.psfhosted.org> Message-ID: <1559922092.34.0.869424868958.issue37170@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e36ed475ea429f7cc80a4d65f80b44686a74b246 by Victor Stinner (Zackery Spytz) in branch '3.7': [3.7] bpo-37170: Fix the cast on error in PyLong_AsUnsignedLongLongMask() (GH-13860) (GH-13896) https://github.com/python/cpython/commit/e36ed475ea429f7cc80a4d65f80b44686a74b246 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 11:41:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 15:41:43 +0000 Subject: [issue37169] test_pyobject_is_freed_free fails with 3.8.0beta1 In-Reply-To: <1559778711.54.0.15966452891.issue37169@roundup.psfhosted.org> Message-ID: <1559922103.09.0.851852809726.issue37169@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 357626676035d2bb12ea92e0edf3c7b383d627ec by Victor Stinner in branch '3.8': bpo-37169: Rewrite _PyObject_IsFreed() unit tests (GH-13888) (GH-13895) https://github.com/python/cpython/commit/357626676035d2bb12ea92e0edf3c7b383d627ec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 11:51:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 15:51:34 +0000 Subject: [issue37191] Python.h contains intermingled declarations In-Reply-To: <1559898837.19.0.323720820169.issue37191@roundup.psfhosted.org> Message-ID: <1559922694.95.0.195459663262.issue37191@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 740a84de73ad8d02655de0a084036f4b7e49a01b by Victor Stinner in branch 'master': bpo-37191: Move TestPEP590 from test_capi to test_call (GH-13892) https://github.com/python/cpython/commit/740a84de73ad8d02655de0a084036f4b7e49a01b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 11:52:42 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 07 Jun 2019 15:52:42 +0000 Subject: [issue37191] Python.h contains intermingled declarations In-Reply-To: <1559898837.19.0.323720820169.issue37191@roundup.psfhosted.org> Message-ID: <1559922762.8.0.730376645718.issue37191@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13772 pull_request: https://github.com/python/cpython/pull/13897 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 11:57:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 15:57:37 +0000 Subject: [issue37169] test_pyobject_is_freed_free fails with 3.8.0beta1 In-Reply-To: <1559778711.54.0.15966452891.issue37169@roundup.psfhosted.org> Message-ID: <1559923057.29.0.926500984415.issue37169@roundup.psfhosted.org> STINNER Victor added the comment: Matej Cepl: thanks for the bug report, it should now be fixed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 11:59:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 15:59:04 +0000 Subject: [issue37191] Python.h contains intermingled declarations In-Reply-To: <1559898837.19.0.323720820169.issue37191@roundup.psfhosted.org> Message-ID: <1559923144.49.0.798982862372.issue37191@roundup.psfhosted.org> STINNER Victor added the comment: > I've removed -Wdeclaration-after-statement in upstream pygobject: https://gitlab.gnome.org/GNOME/pygobject/merge_requests/119 Thanks! Enjoy C99! :-) IMHO C99 with variables in the middle of a function helps to write more reliable code: we better control the scope of a variable. It reduces the risk of using an uninitialized variable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 12:07:19 2019 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 07 Jun 2019 16:07:19 +0000 Subject: [issue37170] Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall In-Reply-To: <1559803961.74.0.856942246401.issue37170@roundup.psfhosted.org> Message-ID: <1559923639.55.0.797608991948.issue37170@roundup.psfhosted.org> Change by Zackery Spytz : ---------- pull_requests: +13773 pull_request: https://github.com/python/cpython/pull/13898 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 12:08:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 16:08:24 +0000 Subject: [issue37180] Fix Persian KAF in mac_farsi.py In-Reply-To: <1559846153.37.0.617648704502.issue37180@roundup.psfhosted.org> Message-ID: <1559923704.4.0.972914893757.issue37180@roundup.psfhosted.org> STINNER Victor added the comment: > Regarding the file named: "Lib/encodings/mac_farsi.py", the numbers are inserted in the wrong way, they are inserted Arabic numbers instead of Persian, they are edited in the comment. Python implements the Unicode standard. In the master branch, it's the Unicode standard version 11.0. It gives these character names: $ python3 >>> import unicodedata >>> for ch in list(range(0x06f0, 0x06f9+1)) + [0x06A9]: ... print("U+%04x: %s" % (ch, unicodedata.name(chr(ch)))) ... U+06f0: EXTENDED ARABIC-INDIC DIGIT ZERO U+06f1: EXTENDED ARABIC-INDIC DIGIT ONE U+06f2: EXTENDED ARABIC-INDIC DIGIT TWO U+06f3: EXTENDED ARABIC-INDIC DIGIT THREE U+06f4: EXTENDED ARABIC-INDIC DIGIT FOUR U+06f5: EXTENDED ARABIC-INDIC DIGIT FIVE U+06f6: EXTENDED ARABIC-INDIC DIGIT SIX U+06f7: EXTENDED ARABIC-INDIC DIGIT SEVEN U+06f8: EXTENDED ARABIC-INDIC DIGIT EIGHT U+06f9: EXTENDED ARABIC-INDIC DIGIT NINE U+06a9: ARABIC LETTER KEHEH >>> unicodedata.unidata_version '11.0.0' I still see "ARABIC" in character names. > The KAF character (?) That's the Unicode character: U+0643 called "ARABIC LETTER KAF". Comments in https://github.com/python/cpython/blob/master/Lib/encodings/mac_farsi.py still seems to be up to date. SilentGhost: > The replacement character that you're proposing is called (according to the same database) 'ARABIC LETTER KEHEH', whereas the old one was 'ARABIC LETTER KAF'. This encoding was originally generated based on data from unicode.org, I'd think a reference would be needed making clear that this is indeed a valid replacement. mac_farsi.py docstring says: """ Python Character Mapping Codec mac_farsi generated from 'MAPPINGS/VENDORS/APPLE/FARSI.TXT' with gencodec.py. The mapping comes from Unicode. Was it updated since this file was created? The latest change in this file was made in 2007, a few years ago :-) -- I don't see anything wrong, I suggest to close the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 12:13:19 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 07 Jun 2019 16:13:19 +0000 Subject: [issue37191] Python.h contains intermingled declarations In-Reply-To: <1559898837.19.0.323720820169.issue37191@roundup.psfhosted.org> Message-ID: <1559923999.65.0.216189426122.issue37191@roundup.psfhosted.org> miss-islington added the comment: New changeset 5effd10bf14ab0a8a6695100aaf0b687eca68e6d by Miss Islington (bot) in branch '3.8': bpo-37191: Move TestPEP590 from test_capi to test_call (GH-13892) https://github.com/python/cpython/commit/5effd10bf14ab0a8a6695100aaf0b687eca68e6d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 12:14:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 16:14:50 +0000 Subject: [issue37194] Move new vector private declarations to the internal C API In-Reply-To: <1559908440.37.0.746705371355.issue37194@roundup.psfhosted.org> Message-ID: <1559924090.94.0.0377368702976.issue37194@roundup.psfhosted.org> STINNER Victor added the comment: Oh, I used the wrong bpo number for this change: New changeset 740a84de73ad8d02655de0a084036f4b7e49a01b by Victor Stinner in branch 'master': bpo-37191: Move TestPEP590 from test_capi to test_call (GH-13892) https://github.com/python/cpython/commit/740a84de73ad8d02655de0a084036f4b7e49a01b New changeset 5effd10bf14ab0a8a6695100aaf0b687eca68e6d by Miss Islington (bot) in branch '3.8': bpo-37191: Move TestPEP590 from test_capi to test_call (GH-13892) https://github.com/python/cpython/commit/5effd10bf14ab0a8a6695100aaf0b687eca68e6d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 12:23:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 16:23:01 +0000 Subject: [issue37170] Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall In-Reply-To: <1559803961.74.0.856942246401.issue37170@roundup.psfhosted.org> Message-ID: <1559924581.57.0.243285271316.issue37170@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 2bfc2dc214445550521074f428245b502d215eac by Victor Stinner (Zackery Spytz) in branch '2.7': [2.7] bpo-37170: Fix the cast on error in PyLong_AsUnsignedLongLongMask() (GH-13860) (GH-13898) https://github.com/python/cpython/commit/2bfc2dc214445550521074f428245b502d215eac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 12:23:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 16:23:38 +0000 Subject: [issue37170] Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall In-Reply-To: <1559803961.74.0.856942246401.issue37170@roundup.psfhosted.org> Message-ID: <1559924618.36.0.355957413067.issue37170@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Antti Haapala for the bug report and thanks Zackery Spytz for the fix! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 12:26:13 2019 From: report at bugs.python.org (Irv Kalb) Date: Fri, 07 Jun 2019 16:26:13 +0000 Subject: [issue37197] [Idle-dev] Feedback appreciated for two suggested new features In-Reply-To: Message-ID: <183F716E-E3A9-46DE-879A-CC7D02870ECB@furrypants.com> New submission from Irv Kalb : [I'm not sure of the proper protocol here, I hope sending a message this way is OK.] Hi, I am writing about the potential fix to the Search Dialog box problem in IDLE that I reported a while back. I can see that there is a flurry of activity on this bug. I saw that there was a code change, but since I have never looked at IDLE source code, I really cannot comment on the fix. However, I did see comments that it might be difficult to reproduce, so I made a short video to clearly demonstrate the bug. (This is on IDLE/Python 3.6.1 Mac) You can see it here: http://www.youtube.com/watch?v=YWDsOEN8qsE I did not get a chance to test this out on Window, but the bug is easily reproducible on a Mac. If the change is to leave the dialog box in front of the editing window, that would be be fine. But long term, if it is possible to incorporate a search bar like the one in PyCharm, that would be even better. Thanks for addressing the issue and I hope this video is helpful. Irv > On Jun 6, 2019, at 9:28 AM, Tal Einat wrote: > > After a great delay, I've created an issue[0] about the search dialogs being hidden behind the main window, and have a PR[1] up with a proposed fix. > > [0] https://bugs.python.org/issue37177 > [1] https://github.com/python/cpython/pull/13869 > On Thu, Oct 18, 2018 at 8:13 PM Irv Kalb > wrote: > Hi, > > I don't have a strong opinion about the details of the search and replace dialogs. However, I can tell you that a change replacing the dialog box would be greatly appreciated. > > I teach Python classes using IDLE. The search dialog is a real a problem for new students and me as the teacher. My students and I often get into a scenario where the search dialog gets hidden behind a editing window. When that happens, then you try to make edits in code and nothing happens. This happens to very often. I have learned to look for the hidden search dialog window, but my students get very flustered. > > I think that a search bar would be a great improvement. If you can model it similar to the one in PyCharm, that would be wonderful. > > Thanks for looking into this issue. > > Irv > > >> On Oct 13, 2018, at 2:51 PM, Tal Einat > wrote: >> >> Hi, >> >> I've recently been working on two new features, for which I'd like to discuss whether it would be wise to include in IDLE. Each has a working implementation in a PR to make it easy to give it a try. >> >> 1. Replace the search and replace dialogs with a search bar >> https://bugs.python.org/issue34976 >> https://github.com/python/cpython/pull/9855 >> >> 2. Ability to run 3rd party code checkers >> https://bugs.python.org/issue21880 >> https://github.com/python/cpython/pull/9802 >> >> Any thoughts would be greatly appreciated! >> >> - Tal Einat >> _______________________________________________ >> IDLE-dev mailing list >> IDLE-dev at python.org >> https://mail.python.org/mailman/listinfo/idle-dev > > _______________________________________________ > IDLE-dev mailing list > IDLE-dev at python.org > https://mail.python.org/mailman/listinfo/idle-dev ---------- messages: 344963 nosy: IrvKalb, taleinat priority: normal severity: normal status: open title: [Idle-dev] Feedback appreciated for two suggested new features _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 12:30:38 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 07 Jun 2019 16:30:38 +0000 Subject: [issue37197] [Idle-dev] Feedback appreciated for two suggested new features In-Reply-To: <183F716E-E3A9-46DE-879A-CC7D02870ECB@furrypants.com> Message-ID: <1559925038.85.0.177487873772.issue37197@roundup.psfhosted.org> SilentGhost added the comment: This seems to have been posted to bpo by mistake. I'm going to close this issue as a duplicate of #37177 and I would appreciate if you would send your e-mail to the idle-dev mailing list instead. ---------- nosy: +SilentGhost resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> IDLE: Search dialogs can be hidden behind the main window type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 12:32:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 16:32:00 +0000 Subject: [issue37191] Python.h contains intermingled declarations In-Reply-To: <1559898837.19.0.323720820169.issue37191@roundup.psfhosted.org> Message-ID: <1559925120.19.0.683298372696.issue37191@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 9689f80e61e5863668a562793ebb85031ef9fd3e by Victor Stinner (Petr Viktorin) in branch '3.8': bpo-37191: Avoid declaration-after-statement in header included from Python.h (GH-13887) https://github.com/python/cpython/commit/9689f80e61e5863668a562793ebb85031ef9fd3e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 12:33:21 2019 From: report at bugs.python.org (hodai goldman) Date: Fri, 07 Jun 2019 16:33:21 +0000 Subject: [issue37198] _parse_localename fail to parse 'US_IL' Message-ID: <1559925201.97.0.400746291459.issue37198@roundup.psfhosted.org> New submission from hodai goldman : _parse_localename fail to parse 'US_IL': Traceback (most recent call last): File "/usr/bin/flowblade", line 78, in app.main(modules_path) File "/usr/share/flowblade/Flowblade/app.py", line 194, in main translations.init_languages() File "/usr/share/flowblade/Flowblade/translations.py", line 39, in init_languages lc, encoding = locale.getdefaultlocale() File "/usr/lib/python2.7/locale.py", line 545, in getdefaultlocale return _parse_localename(localename) File "/usr/lib/python2.7/locale.py", line 477, in _parse_localename raise ValueError, 'unknown locale: %s' % localename ValueError: unknown locale: en_IL need to add another check for '_' separator, code: if '.' in code: return tuple(code.split('.')[:2]) ---------- messages: 344966 nosy: hodai goldman priority: normal severity: normal status: open title: _parse_localename fail to parse 'US_IL' type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 12:44:00 2019 From: report at bugs.python.org (Michele Angrisano) Date: Fri, 07 Jun 2019 16:44:00 +0000 Subject: [issue37198] _parse_localename fail to parse 'US_IL' In-Reply-To: <1559925201.97.0.400746291459.issue37198@roundup.psfhosted.org> Message-ID: <1559925840.82.0.472997730662.issue37198@roundup.psfhosted.org> Michele Angrisano added the comment: Hi Hodai, thank you for the report. Would you be interested to propose a Pull Request for this issue? You can read the devguide for more informations. Thank you. :) ---------- nosy: +lemburg, mangrisano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 12:45:09 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 07 Jun 2019 16:45:09 +0000 Subject: [issue37198] _parse_localename fail to parse 'en_IL' In-Reply-To: <1559925201.97.0.400746291459.issue37198@roundup.psfhosted.org> Message-ID: <1559925909.41.0.877940970656.issue37198@roundup.psfhosted.org> SilentGhost added the comment: How come your locale doesn't have encoding associated with it? The bit you're looking at is not really relevant, though. ---------- components: +Library (Lib) nosy: +SilentGhost title: _parse_localename fail to parse 'US_IL' -> _parse_localename fail to parse 'en_IL' type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 12:50:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 16:50:37 +0000 Subject: [issue15913] Add PyBuffer_SizeFromFormat() C helper for struct.calcsize() In-Reply-To: <1347312444.09.0.484126652005.issue15913@psf.upfronthosting.co.za> Message-ID: <1559926237.0.0.552617419138.issue15913@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: PyBuffer_SizeFromFormat is missing -> Add PyBuffer_SizeFromFormat() C helper for struct.calcsize() versions: +Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 12:58:40 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 07 Jun 2019 16:58:40 +0000 Subject: [issue37195] test_utime fails on MacOS Mojave (Kernel Version 18.6.0:) In-Reply-To: <1559912694.09.0.24854010798.issue37195@roundup.psfhosted.org> Message-ID: <1559926720.35.0.0513536980991.issue37195@roundup.psfhosted.org> Ned Deily added the comment: FWIW, it doesn't fail for me and I don't recall ever seeing a failure like this on macOS. What hardware? ./python.exe -m test.pythoninfo please! ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 13:00:30 2019 From: report at bugs.python.org (N.P. Khelili) Date: Fri, 07 Jun 2019 17:00:30 +0000 Subject: [issue37199] Test suite fails when Ipv6 is unavailable Message-ID: <1559926830.72.0.215725323123.issue37199@roundup.psfhosted.org> New submission from N.P. Khelili : The test suite does not handle an OS that does not have IPv6. When Linux kernel is started with argument: ipv6.disable=1 The test suite fails. ( See attached file ) 5 tests failed: test_asyncio test_imaplib test_importlib test_socket test_zipapp ---------- files: test_suite_fail.txt messages: 344970 nosy: Nophke priority: normal severity: normal status: open title: Test suite fails when Ipv6 is unavailable type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file48402/test_suite_fail.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 13:02:27 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 07 Jun 2019 17:02:27 +0000 Subject: [issue37195] test_utime fails on MacOS Mojave (Kernel Version 18.6.0:) In-Reply-To: <1559912694.09.0.24854010798.issue37195@roundup.psfhosted.org> Message-ID: <1559926947.46.0.3224997509.issue37195@roundup.psfhosted.org> Ned Deily added the comment: Also, what utime* results show up in ./configure output? I see checking utime.h usability... yes checking utime.h presence... yes checking for utime.h... yes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 13:03:23 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 07 Jun 2019 17:03:23 +0000 Subject: [issue37180] Fix Persian KAF in mac_farsi.py In-Reply-To: <1559846153.37.0.617648704502.issue37180@roundup.psfhosted.org> Message-ID: <1559927003.94.0.865707857687.issue37180@roundup.psfhosted.org> SilentGhost added the comment: Ramin, I agree with Victor, if you have any information contrary to what we posted, please feel free to post it here so that we can consider re-opening the issue. ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 13:11:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 17:11:27 +0000 Subject: [issue37199] Test suite fails when Ipv6 is unavailable In-Reply-To: <1559926830.72.0.215725323123.issue37199@roundup.psfhosted.org> Message-ID: <1559927487.61.0.832892202745.issue37199@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 13:16:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 17:16:53 +0000 Subject: [issue36742] CVE-2019-10160: urlsplit NFKD normalization vulnerability in user:password@ In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1559927813.66.0.453889035503.issue36742@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: urlsplit doesn't accept a NFKD hostname with a port number -> CVE-2019-10160: urlsplit NFKD normalization vulnerability in user:password@ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 13:17:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 17:17:04 +0000 Subject: [issue36742] CVE-2019-10160: urlsplit NFKD normalization vulnerability in user:password@ In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1559927824.47.0.349885068165.issue36742@roundup.psfhosted.org> STINNER Victor added the comment: CVE-2019-10160 has been assigned by Red Hat to this flaw. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 13:25:55 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 07 Jun 2019 17:25:55 +0000 Subject: [issue10915] Make the PyGILState API compatible with multiple interpreters In-Reply-To: <1295103161.75.0.771875465176.issue10915@psf.upfronthosting.co.za> Message-ID: <1559928355.98.0.929891464743.issue10915@roundup.psfhosted.org> Change by Eric Snow : ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 13:26:07 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 07 Jun 2019 17:26:07 +0000 Subject: [issue15751] Support subinterpreters in the GIL state API In-Reply-To: <1345526301.75.0.455071650321.issue15751@psf.upfronthosting.co.za> Message-ID: <1559928367.78.0.901384591523.issue15751@roundup.psfhosted.org> Change by Eric Snow : ---------- versions: +Python 3.8, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 13:29:01 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 07 Jun 2019 17:29:01 +0000 Subject: [issue37186] Everyone uses GIL wrong! = DEADLOCK In-Reply-To: <1559865784.82.0.0210813088917.issue37186@roundup.psfhosted.org> Message-ID: <1559928541.72.0.854829458505.issue37186@roundup.psfhosted.org> Eric Snow added the comment: The situation with subinterpreters and the gilstate API is a known problem (see issues #10915 and #15751). We plan on fixing that in the near future for 3.9 (and probably for 3.8). Feel free to chime in on those earlier issues. Note that the subinterpreter experience is going to be much improved with the 3.9 release. You also mentioned an issue with PyEval_AcquireThread(). If you don't think this is directly related to the gilstate API (I suspect it is) then please open a new issue for that. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Make the PyGILState API compatible with multiple interpreters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 13:30:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 17:30:31 +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: <1559928631.79.0.220303693368.issue18299@roundup.psfhosted.org> STINNER Victor added the comment: I dislike script_helper API. I doesn't allow to pass arbitrary keyword parameters to subprocess.Popen. IMHO a new API should be added, but I didn't check if script_helper already contains such API or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 13:38:50 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 07 Jun 2019 17:38:50 +0000 Subject: [issue37175] make install: make compileall optional In-Reply-To: <1559826192.88.0.243223248459.issue37175@roundup.psfhosted.org> Message-ID: <1559929130.91.0.121579003783.issue37175@roundup.psfhosted.org> Ned Deily added the comment: In many installations, the user running Python would not have write access to the lib directory tree where the compiled byte files need to be created so we would not want to change the current default behavior. On the other hand, I could see some times when testing where it would speed things up to skip compiling. The issue of tons of output is really a more important issue; it would be useful to be able to suppress all those lines of compile output as they rarely provide any useful information, perhaps even suppressing by default. ---------- nosy: +ned.deily versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 13:44:26 2019 From: report at bugs.python.org (Carol Willing) Date: Fri, 07 Jun 2019 17:44:26 +0000 Subject: [issue37195] test_utime fails on MacOS Mojave (Kernel Version 18.6.0:) In-Reply-To: <1559912694.09.0.24854010798.issue37195@roundup.psfhosted.org> Message-ID: <1559929466.95.0.180291825489.issue37195@roundup.psfhosted.org> Carol Willing added the comment: Confirming that they do pass on my Mojave system. test_utime (test.test_os.UtimeTests) ... ok test_utime_by_indexed (test.test_os.UtimeTests) ... ok ... test_utime_dir_fd (test.test_os.UtimeTests) ... ok Though I did have to go through some shenanigans (which may or may not be related) to get configure and make to run cleanly: - open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg - removed brewed binutils - removed all brewed pythons - make clean all Then the normal process worked. ---------- nosy: +willingc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 13:48:43 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 07 Jun 2019 17:48:43 +0000 Subject: [issue37195] test_utime fails on MacOS Mojave (Kernel Version 18.6.0:) In-Reply-To: <1559912694.09.0.24854010798.issue37195@roundup.psfhosted.org> Message-ID: <1559929723.16.0.441184050206.issue37195@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Python debug information ======================== CC.version: Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Py_DEBUG: Yes (sys.gettotalrefcount() present) _decimal.__libmpdec_version__: 2.4.2 builtins.float.double_format: IEEE, little-endian builtins.float.float_format: IEEE, little-endian config[_config_init]: 2 config[_init_main]: 1 config[_install_importlib]: 1 config[argv]: ['-m'] config[base_exec_prefix]: '/usr/local' config[base_prefix]: '/usr/local' config[buffered_stdio]: 1 config[bytes_warning]: 0 config[check_hash_pycs_mode]: 'default' config[configure_c_stdio]: 1 config[dev_mode]: 0 config[dump_refs]: 0 config[exec_prefix]: '/usr/local' config[executable]: '/Users/pgalindo3/github/cpython/python.exe' config[faulthandler]: 0 config[filesystem_encoding]: 'utf-8' config[filesystem_errors]: 'surrogateescape' config[hash_seed]: 0 config[home]: None config[import_time]: 0 config[inspect]: 0 config[install_signal_handlers]: 1 config[interactive]: 0 config[isolated]: 0 config[malloc_stats]: 0 config[module_search_paths]: ['/usr/local/lib/python39.zip', '/Users/pgalindo3/github/cpython/Lib', '/Users/pgalindo3/github/cpython/build/lib.macosx-10.14-x86_64-3.9-pydebug'] config[optimization_level]: 0 config[parse_argv]: 1 config[parser_debug]: 0 config[pathconfig_warnings]: 1 config[prefix]: '/usr/local' config[program_name]: './python.exe' config[pycache_prefix]: None config[pythonpath_env]: None config[quiet]: 0 config[run_command]: None config[run_filename]: None config[run_module]: 'test.pythoninfo' config[show_alloc_count]: 0 config[show_ref_count]: 0 config[site_import]: 1 config[skip_source_first_line]: 0 config[stdio_encoding]: 'utf-8' config[stdio_errors]: 'strict' config[tracemalloc]: 0 config[use_environment]: 1 config[use_hash_seed]: 0 config[user_site_directory]: 1 config[verbose]: 0 config[warnoptions]: [] config[write_bytecode]: 1 config[xoptions]: [] datetime.datetime.now: 2019-06-07 18:47:42.879783 expat.EXPAT_VERSION: expat_2.2.6 gdbm.GDBM_VERSION: 1.18.1 global_config[Py_BytesWarningFlag]: 0 global_config[Py_DebugFlag]: 0 global_config[Py_DontWriteBytecodeFlag]: 0 global_config[Py_FileSystemDefaultEncodeErrors]: 'surrogateescape' global_config[Py_FileSystemDefaultEncoding]: 'utf-8' global_config[Py_FrozenFlag]: 0 global_config[Py_HasFileSystemDefaultEncoding]: 0 global_config[Py_HashRandomizationFlag]: 1 global_config[Py_IgnoreEnvironmentFlag]: 0 global_config[Py_InspectFlag]: 0 global_config[Py_InteractiveFlag]: 0 global_config[Py_IsolatedFlag]: 0 global_config[Py_NoSiteFlag]: 0 global_config[Py_NoUserSiteDirectory]: 0 global_config[Py_OptimizeFlag]: 0 global_config[Py_QuietFlag]: 0 global_config[Py_UTF8Mode]: 0 global_config[Py_UnbufferedStdioFlag]: 0 global_config[Py_VerboseFlag]: 0 global_config[_Py_HasFileSystemDefaultEncodeErrors]: 0 locale.encoding: UTF-8 os.cpu_count: 12 os.cwd: /Users/pgalindo3/github/cpython os.environ[CFLAGS]: -I/usr/local/opt/zlib/include -I/usr/local/opt/openssl/include os.environ[CPPFLAGS]: -I/usr/local/opt/openssl/include -I/usr/local/opt/zlib/include os.environ[DISPLAY]: /private/tmp/com.apple.launchd.e9sp6YZNFd/org.macosforge.xquartz:0 os.environ[HOME]: /Users/pgalindo3 os.environ[LANG]: en_GB.UTF-8 os.environ[LC_CTYPE]: en_GB.UTF-8 os.environ[LDFLAGS]: -L/usr/local/opt/zlib/lib os.environ[LD_LIBRARY_PATH]: /opt/cuda/lib64: os.environ[PATH]: /Users/pgalindo3/.cargo/bin:/Users/pgalindo3/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public/:/usr/local/MacGPG2/bin:/opt/X11/bin:/Users/pgalindo3/.cargo/bin:/opt/cuda/bin:/home/pablogsal/.bin:/Users/pgalindo3/.npm-global/bin/:/Users/pgalindo3/Library/Python/3.7/bin:/home/pablogsal/.gem/ruby/2.3.0/bin:/usr/local/opt/fzf/bin os.environ[SHELL]: /bin/zsh os.environ[TERM]: xterm-256color os.environ[TMPDIR]: /var/folders/sw/ml9tlhsx7hd7sdqpnlzhrxxh0000gr/T/ os.gid: 20 os.groups: 20, 12, 61, 79, 80, 81, 98, 33, 100, 204, 250, 395, 398, 399, 701, 702 os.loadavg: (1.38916015625, 1.4130859375, 1.4541015625) os.login: pgalindo3 os.name: posix os.supports_bytes_environ: True os.supports_effective_ids: ['access'] os.supports_fd: ['chdir', 'chmod', 'chown', 'listdir', 'pathconf', 'scandir', 'stat', 'statvfs', 'truncate', 'utime'] os.supports_follow_symlinks: ['access', 'chflags', 'chmod', 'chown', 'link', 'stat', 'utime'] os.uid: 504 os.umask: 022 os.uname: posix.uname_result(sysname='Darwin', nodename='C02XG51ZJGH5', release='18.6.0', version='Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64', machine='x86_64') platform.architecture: 64bit platform.platform: macOS-10.14.5-x86_64-i386-64bit platform.python_implementation: CPython pre_config[_config_init]: 2 pre_config[allocator]: 0 pre_config[coerce_c_locale]: 0 pre_config[coerce_c_locale_warn]: 0 pre_config[configure_locale]: 1 pre_config[dev_mode]: 0 pre_config[isolated]: 0 pre_config[parse_argv]: 1 pre_config[use_environment]: 1 pre_config[utf8_mode]: 0 pymem.allocator: pymalloc_debug pymem.with_pymalloc: True readline._READLINE_LIBRARY_VERSION: EditLine wrapper readline._READLINE_RUNTIME_VERSION: 0x402 readline._READLINE_VERSION: 0x402 resource.RLIMIT_AS: (9223372036854775807, 9223372036854775807) resource.RLIMIT_CORE: (0, 9223372036854775807) resource.RLIMIT_CPU: (9223372036854775807, 9223372036854775807) resource.RLIMIT_DATA: (9223372036854775807, 9223372036854775807) resource.RLIMIT_FSIZE: (9223372036854775807, 9223372036854775807) resource.RLIMIT_MEMLOCK: (9223372036854775807, 9223372036854775807) resource.RLIMIT_NOFILE: (7168, 9223372036854775807) resource.RLIMIT_NPROC: (1418, 2128) resource.RLIMIT_RSS: (9223372036854775807, 9223372036854775807) resource.RLIMIT_STACK: (8388608, 67104768) resource.pagesize: 4096 socket.hostname: C02XG51ZJGH5 sqlite3.sqlite_version: 3.24.0 sqlite3.version: 2.6.0 ssl.HAS_SNI: True ssl.OPENSSL_VERSION: OpenSSL 1.0.2r 26 Feb 2019 ssl.OPENSSL_VERSION_INFO: (1, 0, 2, 18, 15) ssl.OP_ALL: 0x800003ff ssl.OP_NO_TLSv1_1: 0x10000000 subprocess._USE_POSIX_SPAWN: True sys.abiflags: d sys.api_version: 1013 sys.builtin_module_names: ('_abc', '_ast', '_codecs', '_collections', '_functools', '_imp', '_io', '_locale', '_operator', '_signal', '_sre', '_stat', '_string', '_symtable', '_thread', '_tracemalloc', '_warnings', '_weakref', 'atexit', 'builtins', 'errno', 'faulthandler', 'gc', 'itertools', 'marshal', 'posix', 'pwd', 'sys', 'time', 'xxsubtype') sys.byteorder: little sys.dont_write_bytecode: False sys.executable: /Users/pgalindo3/github/cpython/python.exe sys.filesystem_encoding: utf-8/surrogateescape sys.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, dev_mode=False, utf8_mode=0) sys.float_info: sys.float_info(max=1.7976931348623157e+308, max_exp=1024, max_10_exp=308, min=2.2250738585072014e-308, min_exp=-1021, min_10_exp=-307, dig=15, mant_dig=53, epsilon=2.220446049250313e-16, radix=2, rounds=1) sys.float_repr_style: short sys.hash_info: sys.hash_info(width=64, modulus=2305843009213693951, inf=314159, nan=0, imag=1000003, algorithm='siphash24', hash_bits=64, seed_bits=128, cutoff=0) sys.hexversion: 50921632 sys.implementation: namespace(_multiarch='darwin', cache_tag='cpython-39', hexversion=50921632, name='cpython', version=sys.version_info(major=3, minor=9, micro=0, releaselevel='alpha', serial=0)) sys.int_info: sys.int_info(bits_per_digit=30, sizeof_digit=4) sys.maxsize: 9223372036854775807 sys.maxunicode: 1114111 sys.path: ['/Users/pgalindo3/github/cpython', '/usr/local/lib/python39.zip', '/Users/pgalindo3/github/cpython/Lib', '/Users/pgalindo3/github/cpython/build/lib.macosx-10.14-x86_64-3.9-pydebug'] sys.platform: darwin sys.prefix: /usr/local sys.stderr.encoding: utf-8/backslashreplace sys.stdin.encoding: utf-8/strict sys.stdout.encoding: utf-8/strict sys.thread_info: sys.thread_info(name='pthread', lock='mutex+cond', version=None) sys.version: 3.9.0a0 (heads/master:3f345c39255, Jun 7 2019, 14:02:55) [Clang 10.0.1 (clang-1001.0.46.4)] sys.version_info: sys.version_info(major=3, minor=9, micro=0, releaselevel='alpha', serial=0) sysconfig[ABIFLAGS]: d sysconfig[CC]: gcc sysconfig[CFLAGS]: -Wno-unused-result -Wsign-compare -g -O0 -Wall -I/usr/local/opt/zlib/include -I/usr/local/opt/openssl/include -I/usr/local/opt/zlib/include -I/usr/local/opt/openssl/include sysconfig[CONFIG_ARGS]: '--with-pydebug' '--with-trace-refs' 'CFLAGS= -I/usr/local/opt/zlib/include -I/usr/local/opt/openssl/include' 'LDFLAGS= -L/usr/local/opt/zlib/lib' 'CPPFLAGS= -I/usr/local/opt/openssl/include -I/usr/local/opt/zlib/include' 'PKG_CONFIG_PATH=:/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/zlib/lib/pkgconfig' sysconfig[HOST_GNU_TYPE]: x86_64-apple-darwin18.6.0 sysconfig[MACHDEP]: darwin sysconfig[MULTIARCH]: darwin sysconfig[OPT]: -g -O0 -Wall sysconfig[PY_CFLAGS]: -Wno-unused-result -Wsign-compare -g -O0 -Wall -I/usr/local/opt/zlib/include -I/usr/local/opt/openssl/include -I/usr/local/opt/zlib/include -I/usr/local/opt/openssl/include sysconfig[PY_CFLAGS_NODIST]: -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -I./Include/internal sysconfig[PY_CORE_LDFLAGS]: -L/usr/local/opt/zlib/lib -L/usr/local/opt/zlib/lib sysconfig[PY_LDFLAGS]: -L/usr/local/opt/zlib/lib -L/usr/local/opt/zlib/lib sysconfig[PY_STDMODULE_CFLAGS]: -Wno-unused-result -Wsign-compare -g -O0 -Wall -I/usr/local/opt/zlib/include -I/usr/local/opt/openssl/include -I/usr/local/opt/zlib/include -I/usr/local/opt/openssl/include -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -I./Include/internal -I. -I./Include -I/usr/local/opt/openssl/include -I/usr/local/opt/zlib/include -I/usr/local/opt/openssl/include -I/usr/local/opt/zlib/include sysconfig[Py_DEBUG]: 1 sysconfig[Py_ENABLE_SHARED]: 0 sysconfig[SHELL]: /bin/sh sysconfig[SOABI]: cpython-39d-darwin sysconfig[prefix]: /usr/local test_socket.HAVE_SOCKET_ALG: False test_socket.HAVE_SOCKET_CAN: False test_socket.HAVE_SOCKET_CAN_ISOTP: False test_socket.HAVE_SOCKET_QIPCRTR: False test_socket.HAVE_SOCKET_RDS: False test_socket.HAVE_SOCKET_VSOCK: False test_support.IPV6_ENABLED: True test_support._is_gui_available: False test_support.python_is_optimized: False time.altzone: -3600 time.daylight: 1 time.get_clock_info(monotonic): namespace(adjustable=False, implementation='mach_absolute_time()', monotonic=True, resolution=1e-09) time.get_clock_info(perf_counter): namespace(adjustable=False, implementation='mach_absolute_time()', monotonic=True, resolution=1e-09) time.get_clock_info(process_time): namespace(adjustable=False, implementation='clock_gettime(CLOCK_PROCESS_CPUTIME_ID)', monotonic=True, resolution=1.0000000000000002e-06) time.get_clock_info(thread_time): namespace(adjustable=False, implementation='clock_gettime(CLOCK_THREAD_CPUTIME_ID)', monotonic=True, resolution=1e-09) time.get_clock_info(time): namespace(adjustable=True, implementation='clock_gettime(CLOCK_REALTIME)', monotonic=False, resolution=1.0000000000000002e-06) time.time: 1559929662.8793879 time.timezone: 0 time.tzname: ('GMT', 'BST') tkinter.TCL_VERSION: 8.5 tkinter.TK_VERSION: 8.5 tkinter.info_patchlevel: 8.5.9 zlib.ZLIB_RUNTIME_VERSION: 1.2.11 zlib.ZLIB_VERSION: 1.2.11 ------------------------------------------ ./configure checking utime.h usability... yes checking utime.h presence... yes checking for utime.h... yes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 13:53:26 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 07 Jun 2019 17:53:26 +0000 Subject: [issue37195] test_utime fails on MacOS Mojave (Kernel Version 18.6.0:) In-Reply-To: <1559912694.09.0.24854010798.issue37195@roundup.psfhosted.org> Message-ID: <1559930006.24.0.794028077237.issue37195@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: The failure tends to be very reliable when running with -R, running the test in isolation or only one time normally succeeds. I will try to investigate more. The hardware is a MacBook Pro with Mojave 10.14.5, 2.2 GHz Intel Core i7 and 16 GB 2400 MHz DDR4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 13:58:52 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 07 Jun 2019 17:58:52 +0000 Subject: [issue37181] fix test_regrtest failures on Windows arm64 Message-ID: <1559930332.06.0.798599689966.issue37181@roundup.psfhosted.org> New submission from Steve Dower : New changeset e7e5039d6940e41839dcef0433262ff363408dad by Steve Dower (Paul Monson) in branch 'master': bpo-37181: Fix test_regrtest failures on Windows arm64 (GH-13872) https://github.com/python/cpython/commit/e7e5039d6940e41839dcef0433262ff363408dad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 13:58:53 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 07 Jun 2019 17:58:53 +0000 Subject: [issue37181] fix test_regrtest failures on Windows arm64 In-Reply-To: <1559930332.06.0.798599689966.issue37181@roundup.psfhosted.org> Message-ID: <1559930333.16.0.357760055036.issue37181@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13774 pull_request: https://github.com/python/cpython/pull/13899 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 13:59:17 2019 From: report at bugs.python.org (Riccardo Schirone) Date: Fri, 07 Jun 2019 17:59:17 +0000 Subject: [issue36742] CVE-2019-10160: urlsplit NFKD normalization vulnerability in user:password@ In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1559930357.74.0.640852548427.issue36742@roundup.psfhosted.org> Riccardo Schirone added the comment: The fix for python-2.7 (https://github.com/python/cpython/pull/13815/files#diff-b577545d73dd0cdb2c337a4c5f89e1d7R183) causes errors when netloc contains characters that can't be encoded by 'ascii' codec. You can see it by doing: >>> netloc = u'example.com\uFF03 at bing.com' >>> raise ValueError(u"netloc '" + netloc + u"' contains invalid characters under NFKC normalization") Traceback (most recent call last): File "", line 1, in ValueError: >>> str(netloc) Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' codec can't encode character u'\uff03' in position 11: ordinal not in range(128) I suggest we use `repr(netloc)` instead of `netloc` in the ValueError message. ---------- nosy: +rschiron _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 13:59:19 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 07 Jun 2019 17:59:19 +0000 Subject: [issue37189] PyRun_String not exported in python38.dll In-Reply-To: <1559894123.98.0.3282613922.issue37189@roundup.psfhosted.org> Message-ID: <1559930359.19.0.259619435198.issue37189@roundup.psfhosted.org> Steve Dower added the comment: Guessing Victor may have touched something in this area. Was it exported before? Or did we just have a macro for it? Maybe the macro was moved to an internal header by mistake? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 14:01:10 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 07 Jun 2019 18:01:10 +0000 Subject: [issue37195] test_utime fails on MacOS Mojave (Kernel Version 18.6.0:) In-Reply-To: <1559912694.09.0.24854010798.issue37195@roundup.psfhosted.org> Message-ID: <1559930470.47.0.50315784952.issue37195@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: The problem is that one of the filenames that the test creates has this inode information for some mysterious reason: ? ll @test_25508_tmp/f1 -rw-r--r-- 1 pgalindo3 staff 7B 1 Jan 1970 @test_25508_tmp/f1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 14:01:58 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 07 Jun 2019 18:01:58 +0000 Subject: [issue37138] PEP 590 method_vectorcall calls memcpy with NULL src In-Reply-To: <1559535370.56.0.947989437279.issue37138@roundup.psfhosted.org> Message-ID: <1559930518.05.0.0449096359888.issue37138@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 1f9531764cc0f8dbca1d8f429d162dc28282f4b4 by Gregory P. Smith (Jeroen Demeyer) in branch 'master': bpo-37138: fix undefined behaviour with memcpy() on NULL array (GH-13867) https://github.com/python/cpython/commit/1f9531764cc0f8dbca1d8f429d162dc28282f4b4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 14:02:07 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 07 Jun 2019 18:02:07 +0000 Subject: [issue37138] PEP 590 method_vectorcall calls memcpy with NULL src In-Reply-To: <1559535370.56.0.947989437279.issue37138@roundup.psfhosted.org> Message-ID: <1559930527.59.0.352731197097.issue37138@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13775 pull_request: https://github.com/python/cpython/pull/13900 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 14:02:09 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 07 Jun 2019 18:02:09 +0000 Subject: [issue37195] test_utime fails on MacOS Mojave (Kernel Version 18.6.0:) In-Reply-To: <1559912694.09.0.24854010798.issue37195@roundup.psfhosted.org> Message-ID: <1559930529.05.0.818338975677.issue37195@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- Removed message: https://bugs.python.org/msg344983 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 14:05:12 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 07 Jun 2019 18:05:12 +0000 Subject: [issue37195] test_utime fails on MacOS Mojave (Kernel Version 18.6.0:) In-Reply-To: <1559912694.09.0.24854010798.issue37195@roundup.psfhosted.org> Message-ID: <1559930712.21.0.441207749457.issue37195@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: For some reason, the files created for this test has a very weird inode information: ? ll test_python_**/**/f* -rw-r--r-- 1 pgalindo3 staff 7B 1 Jan 1970 test_python_26370/@test_26370_tmp/f1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 14:08:49 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 07 Jun 2019 18:08:49 +0000 Subject: [issue13501] Make libedit support more generic; port readline / libedit to FreeBSD In-Reply-To: <1322579942.3.0.601983912656.issue13501@psf.upfronthosting.co.za> Message-ID: <1559930929.93.0.326208952139.issue13501@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 14:09:20 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 07 Jun 2019 18:09:20 +0000 Subject: [issue37195] test_utime fails on MacOS Mojave (Kernel Version 18.6.0:) In-Reply-To: <1559912694.09.0.24854010798.issue37195@roundup.psfhosted.org> Message-ID: <1559930960.09.0.35915348514.issue37195@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > For some reason, the files created for this test has a very weird inode information. Ok, disregard what I am saying, that's actually part of the test. But I think this is related to the failure. I keep investigating. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 14:10:53 2019 From: report at bugs.python.org (Phil Frost) Date: Fri, 07 Jun 2019 18:10:53 +0000 Subject: [issue37168] Decimal divisions sometimes 10x or 100x too large In-Reply-To: <1559772321.45.0.42770583159.issue37168@roundup.psfhosted.org> Message-ID: <1559931053.12.0.145757878108.issue37168@roundup.psfhosted.org> Phil Frost added the comment: I'm afraid that won't be of much use since the object is statically allocated. Besides, the trouble isn't finding what created the object, but what mutated an int object which should be immutable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 14:13:01 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 07 Jun 2019 18:13:01 +0000 Subject: [issue37195] test_utime fails on MacOS Mojave (Kernel Version 18.6.0:) In-Reply-To: <1559912694.09.0.24854010798.issue37195@roundup.psfhosted.org> Message-ID: <1559931181.0.0.880483966705.issue37195@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Ok, this is the failure once I investigated with pdb: (Pdb) filename '@test_28886_tmp/f1' (Pdb) atime_ns 1002003000 (Pdb) mtime_ns 4005006000 (Pdb) set_time(filename, (atime_ns, mtime_ns)) (Pdb) st = os.stat(filename) (Pdb) st.st_atime, st.st_mtime (1559931081.6983175, 4.005006) Not sure why is that happening. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 14:13:47 2019 From: report at bugs.python.org (Christoph Gohlke) Date: Fri, 07 Jun 2019 18:13:47 +0000 Subject: [issue37189] PyRun_String not exported in python38.dll In-Reply-To: <1559894123.98.0.3282613922.issue37189@roundup.psfhosted.org> Message-ID: <1559931227.67.0.117818488231.issue37189@roundup.psfhosted.org> Christoph Gohlke added the comment: `PyRun_String` was exported at least since `python23.dll`. Python.Net relies on it at ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 14:15:47 2019 From: report at bugs.python.org (Carol Willing) Date: Fri, 07 Jun 2019 18:15:47 +0000 Subject: [issue37195] test_utime fails on MacOS Mojave (Kernel Version 18.6.0:) In-Reply-To: <1559912694.09.0.24854010798.issue37195@roundup.psfhosted.org> Message-ID: <1559931347.02.0.713966297462.issue37195@roundup.psfhosted.org> Carol Willing added the comment: @pablogsal My debug info looks similar to yours other than shell/terminal preferences. Similar specs on HW and OS. ./python.exe -m test test_os -R : -v Any other configs that you are frequently seeing the failures? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 14:16:49 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 07 Jun 2019 18:16:49 +0000 Subject: [issue13501] Make libedit support more generic; port readline / libedit to FreeBSD In-Reply-To: <1322579942.3.0.601983912656.issue13501@psf.upfronthosting.co.za> Message-ID: <1559931409.87.0.432367646637.issue13501@roundup.psfhosted.org> Gregory P. Smith added the comment: In PR it you refer to -ledit and to editline. libedit and libeditline appear to be two different libraries. I was under the impression that libedit is the desirable one (it's what *BSD uses - coming originally from NetBSD if I understand correctly - which is how it wound up being macOS's choice). I could also be wrong. Is there a relationship between libedit and libeditline? They both look like useful non-GPL readline alternatives. We're building CPython internally at Google with libedit instead of readline of late and our initial patch to do this looks similar (though simpler) than your PR's readline.c changes. The #ifdef __APPLE__ checks are replaced with a #ifdef HAVE_LIBEDIT check which we set in our pyconfig.h. I'm interested in seeing this stuff get in one way or another, there's no reason we should tie people to GNU readline. :) ---------- assignee: -> gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 14:18:05 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 07 Jun 2019 18:18:05 +0000 Subject: [issue37181] fix test_regrtest failures on Windows arm64 In-Reply-To: <1559930332.06.0.798599689966.issue37181@roundup.psfhosted.org> Message-ID: <1559931485.2.0.773140338419.issue37181@roundup.psfhosted.org> miss-islington added the comment: New changeset 84d47bd8ad48f29ed5d333f4307408ad1e081f59 by Miss Islington (bot) in branch '3.8': bpo-37181: Fix test_regrtest failures on Windows arm64 (GH-13872) https://github.com/python/cpython/commit/84d47bd8ad48f29ed5d333f4307408ad1e081f59 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 14:20:17 2019 From: report at bugs.python.org (Zachary Ware) Date: Fri, 07 Jun 2019 18:20:17 +0000 Subject: [issue37189] PyRun_String not exported in python38.dll In-Reply-To: <1559894123.98.0.3282613922.issue37189@roundup.psfhosted.org> Message-ID: <1559931617.72.0.177184846644.issue37189@roundup.psfhosted.org> Zachary Ware added the comment: A look through `git log -p` looks like bpo-34646 is likely to be related. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 14:26:07 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 07 Jun 2019 18:26:07 +0000 Subject: [issue37138] PEP 590 method_vectorcall calls memcpy with NULL src In-Reply-To: <1559535370.56.0.947989437279.issue37138@roundup.psfhosted.org> Message-ID: <1559931967.02.0.232020762791.issue37138@roundup.psfhosted.org> miss-islington added the comment: New changeset 6e053079ac3fe50ffbe9128bcf766298168c31cb by Miss Islington (bot) in branch '3.8': bpo-37138: fix undefined behaviour with memcpy() on NULL array (GH-13867) https://github.com/python/cpython/commit/6e053079ac3fe50ffbe9128bcf766298168c31cb ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 14:30:26 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 07 Jun 2019 18:30:26 +0000 Subject: [issue37138] PEP 590 method_vectorcall calls memcpy with NULL src In-Reply-To: <1559535370.56.0.947989437279.issue37138@roundup.psfhosted.org> Message-ID: <1559932226.64.0.167400779096.issue37138@roundup.psfhosted.org> Gregory P. Smith added the comment: Thanks Jeroen! ---------- resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 14:30:38 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 07 Jun 2019 18:30:38 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559837218.79.0.128349910274.issue37176@roundup.psfhosted.org> Message-ID: <1559932238.08.0.739275648818.issue37176@roundup.psfhosted.org> Raymond Hettinger added the comment: Please make a concrete proposal (a PR or somesuch). That will make it much easier to determine whether a particular bit of word-smithing is a improvement. Of the issues discussed so far, these are the most promising: * Document how the zero argument form of super() infers its arguments. * Be clear that it is the mro of type(self) that determines the search path and that the role of super() is to the next in the mro after the current class. ---------- versions: -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 14:40:15 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 07 Jun 2019 18:40:15 +0000 Subject: [issue37195] test_utime fails on MacOS Mojave (Kernel Version 18.6.0:) In-Reply-To: <1559912694.09.0.24854010798.issue37195@roundup.psfhosted.org> Message-ID: <1559932815.49.0.338068762935.issue37195@roundup.psfhosted.org> Ned Deily added the comment: WHat kind of file system is @test_28886_tmp/f1 created on? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 14:42:26 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 07 Jun 2019 18:42:26 +0000 Subject: [issue37195] test_utime fails on MacOS Mojave (Kernel Version 18.6.0:) In-Reply-To: <1559912694.09.0.24854010798.issue37195@roundup.psfhosted.org> Message-ID: <1559932946.18.0.356147644943.issue37195@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I will test this on other laptops to try to "bisect" configuration-wise, but for my investigation so far, it seems that the value in the (STRUCT_STAT) st->st_atime is directly wrong (is 1559932701 when the test fails and 1 when the test succeeds). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 14:44:02 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 07 Jun 2019 18:44:02 +0000 Subject: [issue37195] test_utime fails on MacOS Mojave (Kernel Version 18.6.0:) In-Reply-To: <1559912694.09.0.24854010798.issue37195@roundup.psfhosted.org> Message-ID: <1559933042.53.0.190779522201.issue37195@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > WHat kind of file system is @test_28886_tmp/f1 created on? Apple_APFS ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 14:44:38 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jun 2019 18:44:38 +0000 Subject: [issue21492] email.header.decode_header sometimes returns bytes, sometimes str In-Reply-To: <1399972085.94.0.85314895463.issue21492@psf.upfronthosting.co.za> Message-ID: <1559933078.68.0.198152941608.issue21492@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 14:58:45 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jun 2019 18:58:45 +0000 Subject: [issue37129] Add os.RWF_APPEND flag for os.pwritev Message-ID: <1559933925.78.0.510794410466.issue37129@roundup.psfhosted.org> New submission from Terry J. Reedy : Issues need a more complete title and at least *some* explanation. ---------- nosy: +terry.reedy title: Add RWF_APPEND flag -> Add os.RWF_APPEND flag for os.pwritev versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 15:14:24 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jun 2019 19:14:24 +0000 Subject: [issue37130] pathlib.with_name() doesn't like unnamed files. In-Reply-To: <1559438292.33.0.601764456145.issue37130@roundup.psfhosted.org> Message-ID: <1559934864.81.0.254556749892.issue37130@roundup.psfhosted.org> Terry J. Reedy added the comment: Welcome to Python. If you end up proposing a change to code or doc, this will end up being the right place. A change to a documented behavior be called an 'enhancement' and only applied to the next version. A doc change will likely be backported. ---------- nosy: +terry.reedy versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 15:30:32 2019 From: report at bugs.python.org (Michele Angrisano) Date: Fri, 07 Jun 2019 19:30:32 +0000 Subject: [issue37150] Do not allow to pass FileType class object instead of instance in add_argument In-Reply-To: <1559654520.68.0.135252915467.issue37150@roundup.psfhosted.org> Message-ID: <1559935832.53.0.710254541197.issue37150@roundup.psfhosted.org> Change by Michele Angrisano : ---------- nosy: +bethard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 15:32:16 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Fri, 07 Jun 2019 19:32:16 +0000 Subject: [issue37200] PyType_GenericAlloc might over-allocate memory Message-ID: <1559935936.79.0.824964365383.issue37200@roundup.psfhosted.org> New submission from Neil Schemenauer : In the process of working on some garbage collector/obmalloc experiments, I noticed what seems to be a quirk about PyType_GenericAlloc(). It calls: size = _PyObject_VAR_SIZE(type, nitems+1); Note the "+1" which is documented as "for the sentinel". That code dates back to change "e5c691abe3946ddbaa00730b92f3b96f96903f7d" when Guido added support for heap types. This extra item is not added by _PyObject_GC_NewVar(). Also, the documentation for tp_alloc says that the size of the allocated block should be: tp_basicsize + nitems*tp_itemsize, rounded up to a multiple of sizeof(void*); The "+1" for the sentinel is definitely needed in certain cases. I think it might only be needed if 'type' is a subtype of 'type'. I.e. if Py_TPFLAGS_TYPE_SUBCLASS is set on 'type'. I haven't done enough analysis to fully understand this quirk yet but I think we are allocating extra memory quite regularly. Quite a lot of types use tp_alloc = PyType_GenericAlloc. E.g. the 'list' type or a subclass of the tuple type. It seems with the attached patch, unit tests still pass. Perhaps the +1 could be removed on the non-GC branch of the code as well. ---------- components: Interpreter Core files: generic_alloc_sentinel.txt messages: 345002 nosy: nascheme priority: normal severity: normal status: open title: PyType_GenericAlloc might over-allocate memory type: performance Added file: https://bugs.python.org/file48403/generic_alloc_sentinel.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 15:50:05 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jun 2019 19:50:05 +0000 Subject: [issue37133] Erro "ffi.h: No such file" when build python 3.8 (branch master) on windows 10 In-Reply-To: <1559485272.43.0.308074768888.issue37133@roundup.psfhosted.org> Message-ID: <1559937005.27.0.30018100026.issue37133@roundup.psfhosted.org> Terry J. Reedy added the comment: In command prompt, I see the following, with comments added. f:\dev\3x>PCbuild\build.bat -e # -e should not be needed, but explicitly says to build externals Using py -3.7 (found 3.7 with py.exe) # You must have an installed python to build python. Fetching external libraries... # There are 4. bzip2-1.0.6 already exists, skipping. # You should see something about fetching. ... Fetching external binaries... # There are 3 libffi already exists, skipping. # Again, you should see something about fetching. # Although the .c files are not downloaded, the include files, including ffi.h, are, in externals/libffi/(win32|amd64)/include. I personally have not used PCBuild\pcbuild.sln for years, since Zach added a fully functional build.bat. After running the resulting binary, I pin the icon to the taskbar, so I can easily run freshly compiled python interactively without blocking the command window. The pinned icon remains valid after re-compiles, which I do often. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 15:56:12 2019 From: report at bugs.python.org (Marco Sulla) Date: Fri, 07 Jun 2019 19:56:12 +0000 Subject: [issue36964] `python3 -m venv NAME`: virtualenv is not portable In-Reply-To: <1558267639.25.0.0700835222258.issue36964@roundup.psfhosted.org> Message-ID: <1559937372.64.0.175078722487.issue36964@roundup.psfhosted.org> Marco Sulla added the comment: Please Mr. Cannon, can you read my last posts? I think they are not describing a mad idea, but something reasonable. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 15:57:03 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jun 2019 19:57:03 +0000 Subject: [issue37141] Allow multiple separators in Stream.readuntil In-Reply-To: <1559554350.7.0.981137522594.issue37141@roundup.psfhosted.org> Message-ID: <1559937423.56.0.423664121829.issue37141@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- stage: -> test needed versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 15:59:04 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jun 2019 19:59:04 +0000 Subject: [issue37144] tarfile.open: improper handling of path-like object In-Reply-To: <1559573660.5.0.124771167649.issue37144@roundup.psfhosted.org> Message-ID: <1559937544.13.0.711906943035.issue37144@roundup.psfhosted.org> Terry J. Reedy added the comment: 3.6 only gets security patches. Thanks for testing with 3.7 also. ---------- nosy: +terry.reedy versions: +Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 16:01:24 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jun 2019 20:01:24 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1559937684.77.0.25295901439.issue37149@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- Removed message: https://bugs.python.org/msg344550 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 16:08:41 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 07 Jun 2019 20:08:41 +0000 Subject: [issue37150] Do not allow to pass FileType class object instead of instance in add_argument In-Reply-To: <1559654520.68.0.135252915467.issue37150@roundup.psfhosted.org> Message-ID: <1559938121.73.0.828415999402.issue37150@roundup.psfhosted.org> miss-islington added the comment: New changeset 03d5831a2d62c68654ec223168e574cd546efbf6 by Miss Islington (bot) (zygocephalus) in branch 'master': bpo-37150: Throw ValueError if FileType class object was passed in add_argument (GH-13805) https://github.com/python/cpython/commit/03d5831a2d62c68654ec223168e574cd546efbf6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 16:08:58 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 07 Jun 2019 20:08:58 +0000 Subject: [issue37150] Do not allow to pass FileType class object instead of instance in add_argument In-Reply-To: <1559654520.68.0.135252915467.issue37150@roundup.psfhosted.org> Message-ID: <1559938138.28.0.0650123454792.issue37150@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13776 pull_request: https://github.com/python/cpython/pull/13901 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 16:19:30 2019 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 07 Jun 2019 20:19:30 +0000 Subject: [issue37196] Allowing arbitrary expressions in the @expression syntax In-Reply-To: <1559916315.57.0.952678742799.issue37196@roundup.psfhosted.org> Message-ID: <1559938770.85.0.531194890852.issue37196@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 16:30:25 2019 From: report at bugs.python.org (Evita Cano) Date: Fri, 07 Jun 2019 20:30:25 +0000 Subject: [issue37151] Calling code cleanup after PEP 590 In-Reply-To: <1559659244.35.0.514840211553.issue37151@roundup.psfhosted.org> Message-ID: <1559939425.68.0.719305745705.issue37151@roundup.psfhosted.org> Change by Evita Cano : ---------- nosy: +Evita Cano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 16:43:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jun 2019 20:43:46 +0000 Subject: [issue37168] Decimal divisions sometimes 10x or 100x too large In-Reply-To: <1559772321.45.0.42770583159.issue37168@roundup.psfhosted.org> Message-ID: <1559940226.3.0.345495943663.issue37168@roundup.psfhosted.org> STINNER Victor added the comment: Can you try to reproduce your workflow with Python compiled in debug mode (./configure --with-pydebug)? With Python 3.8, you can now use a debug Python without having to recompile your C extensions :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 16:47:57 2019 From: report at bugs.python.org (Paul Monson) Date: Fri, 07 Jun 2019 20:47:57 +0000 Subject: [issue37201] fix test_distutils failures for Windows ARM64 Message-ID: <1559940477.37.0.824825377046.issue37201@roundup.psfhosted.org> New submission from Paul Monson : There are a few places where ARM64 is not correctly specified in order for distutils to work for on-target builds using Visual Studio (32-bit x86 emulation). ---------- components: Tests, Windows messages: 345008 nosy: Paul Monson, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: fix test_distutils failures for Windows ARM64 type: enhancement versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 16:55:24 2019 From: report at bugs.python.org (Paul Monson) Date: Fri, 07 Jun 2019 20:55:24 +0000 Subject: [issue37201] fix test_distutils failures for Windows ARM64 In-Reply-To: <1559940477.37.0.824825377046.issue37201@roundup.psfhosted.org> Message-ID: <1559940924.19.0.711188327424.issue37201@roundup.psfhosted.org> Change by Paul Monson : ---------- keywords: +patch pull_requests: +13777 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13902 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 16:56:46 2019 From: report at bugs.python.org (Brett Cannon) Date: Fri, 07 Jun 2019 20:56:46 +0000 Subject: [issue37162] new importlib dependencies csv, email and zipfile In-Reply-To: <1559732109.6.0.0655643851833.issue37162@roundup.psfhosted.org> Message-ID: <1559941006.44.0.08671715584.issue37162@roundup.psfhosted.org> Brett Cannon added the comment: @serhiy: mind opening a new issue for your zipfile.Path worry? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 17:00:27 2019 From: report at bugs.python.org (Brett Cannon) Date: Fri, 07 Jun 2019 21:00:27 +0000 Subject: [issue36964] `python3 -m venv NAME`: virtualenv is not portable In-Reply-To: <1558267639.25.0.0700835222258.issue36964@roundup.psfhosted.org> Message-ID: <1559941227.77.0.554892780158.issue36964@roundup.psfhosted.org> Brett Cannon added the comment: Please do not add me back to the nosy list as I stand by my thinking that this feature isn't worth pursuing. I understand you feel they are reasonable, Marco, but I don't like the idea of changing what VIRTUAL_ENV gets set to when I believe you should recreate the virtual environment as necessary and risk surprising people who expect VIRTUAL_ENV to function as it does today and has for years. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 17:00:37 2019 From: report at bugs.python.org (Brett Cannon) Date: Fri, 07 Jun 2019 21:00:37 +0000 Subject: [issue36964] `python3 -m venv NAME`: virtualenv is not portable In-Reply-To: <1558267639.25.0.0700835222258.issue36964@roundup.psfhosted.org> Message-ID: <1559941237.45.0.944552263534.issue36964@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 17:12:04 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 07 Jun 2019 21:12:04 +0000 Subject: [issue37150] Do not allow to pass FileType class object instead of instance in add_argument In-Reply-To: <1559654520.68.0.135252915467.issue37150@roundup.psfhosted.org> Message-ID: <1559941924.47.0.0562452610754.issue37150@roundup.psfhosted.org> miss-islington added the comment: New changeset 606ac581e2451c420117c55632f0fe13d4cec2cd by Miss Islington (bot) in branch '3.8': bpo-37150: Throw ValueError if FileType class object was passed in add_argument (GH-13805) https://github.com/python/cpython/commit/606ac581e2451c420117c55632f0fe13d4cec2cd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 17:12:36 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 07 Jun 2019 21:12:36 +0000 Subject: [issue37150] Do not allow to pass FileType class object instead of instance in add_argument In-Reply-To: <1559654520.68.0.135252915467.issue37150@roundup.psfhosted.org> Message-ID: <1559941956.34.0.469277649107.issue37150@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 18:51:52 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jun 2019 22:51:52 +0000 Subject: [issue37161] Pre-populate user editable text in input() In-Reply-To: <1559731249.86.0.916028878199.issue37161@roundup.psfhosted.org> Message-ID: <1559947912.84.0.346640030736.issue37161@roundup.psfhosted.org> Terry J. Reedy added the comment: I like the idea, but doubt this can be implemented. Python assumes a least-common-denominator dumb terminal. Program output is sent on stdout/err and displayed read-only. Used input is read from stdin. It is put there either key by key or after the Enter key is hit. An input buffer allows editing before hitting enter. 'Dumb' means 'No smart escape code to put following output into the user input buffer.' Actually, I don't know that there is an ansi codes to do that. I am curious how readline.insert_text works. (I don't have it on Windows.) Even if the feature could be made to run on Mac/Linux/Windows10 system consoles with custom , there is the issue of supporting other displays, such as IDLE. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 19:07:59 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jun 2019 23:07:59 +0000 Subject: [issue37172] Odd error awaiting a Future In-Reply-To: <1559816999.36.0.898434753785.issue37172@roundup.psfhosted.org> Message-ID: <1559948879.38.0.546890060391.issue37172@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- title: Odd error awating a Future -> Odd error awaiting a Future versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 19:09:40 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 07 Jun 2019 23:09:40 +0000 Subject: [issue18355] Merge super() guide into documentation In-Reply-To: <1372901200.41.0.725969821731.issue18355@psf.upfronthosting.co.za> Message-ID: <1559948980.2.0.0445530548621.issue18355@roundup.psfhosted.org> Raymond Hettinger added the comment: I think for now I'll leave this as an external supplement to the documentation. My previous experience with moving a personal blog post into the main docs didn't go so well. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 19:11:45 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Fri, 07 Jun 2019 23:11:45 +0000 Subject: [issue37200] PyType_GenericAlloc might over-allocate memory In-Reply-To: <1559935936.79.0.824964365383.issue37200@roundup.psfhosted.org> Message-ID: <1559949105.71.0.149269754607.issue37200@roundup.psfhosted.org> Neil Schemenauer added the comment: Updated patch is attached. It appears that the extra item is only needed if Py_TPFLAGS_TYPE_SUBCLASS set. In all other cases, it seems we don't need the extra space for the sentinel. At least, the unit tests pass with this change. It could be that some extension module depends on this extra allocated spaced. The number of types affected by this change seem relatively small. The 'list' type is not affected because tp_itemsize is 0. I did a little test by running some unit tests, here are some type names that have a smaller amount of memory allocated for them: _NamedIntConstant CodecInfo Point TestResults madtuple ---------- priority: normal -> low stage: -> patch review Added file: https://bugs.python.org/file48404/generic_alloc_sentinel_v2.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 19:23:55 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 07 Jun 2019 23:23:55 +0000 Subject: [issue36924] Simplify implementation of classmethod_descriptor.__call__ In-Reply-To: <1557921506.83.0.125634021475.issue36924@roundup.psfhosted.org> Message-ID: <1559949835.92.0.767736011126.issue36924@roundup.psfhosted.org> Raymond Hettinger added the comment: > However, calling them is unlikely to happen in practice: the > only way to obtain such an object is to extract from the > class __dict__. Generally the experience of the PyPy team has been that every code that a user can take is in fact taken by some users. Usually, we don't get to change a publicly accessible API to facilitate an optimization. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 19:45:38 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 07 Jun 2019 23:45:38 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559915805.1.0.622151012135.issue37176@roundup.psfhosted.org> Message-ID: <20190607234532.GN4221@ando.pearwood.info> Steven D'Aprano added the comment: > I'm sorry to say that you're wrong here. I'm happy to be corrected. It is fair to say I failed to take the multiple inheritance case into account. Clearly super can't *only* look at the MRO of the first object since that will miss the multiple inheritance case, as you point out. Thank you. But neither can it *only* look at the MRO of the second class, because that would restart the search at the top of the hierarchy; also if type(second argument) was the only thing that mattered, that would make the first argument redundant and pointless. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 20:20:08 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 08 Jun 2019 00:20:08 +0000 Subject: [issue37178] One argument form of math.perm() In-Reply-To: <1559838628.34.0.228461842236.issue37178@roundup.psfhosted.org> Message-ID: <1559953208.98.0.112702865809.issue37178@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +13778 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13905 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 20:26:57 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 08 Jun 2019 00:26:57 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559837218.79.0.128349910274.issue37176@roundup.psfhosted.org> Message-ID: <1559953617.49.0.384556494473.issue37176@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 21:40:13 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jun 2019 01:40:13 +0000 Subject: [issue37172] Odd error awaiting a Future In-Reply-To: <1559816999.36.0.898434753785.issue37172@roundup.psfhosted.org> Message-ID: <1559958013.21.0.19055377318.issue37172@roundup.psfhosted.org> Terry J. Reedy added the comment: Dima, unless you want to make a specific doc change suggestion, I think this should be closed. The planned code changes will be on other issues. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 21:48:22 2019 From: report at bugs.python.org (Eric Wieser) Date: Sat, 08 Jun 2019 01:48:22 +0000 Subject: [issue37188] Creating a ctypes array of an element with size zero causes "Fatal Python error: Floating point exception" In-Reply-To: <1559889694.06.0.92762632537.issue37188@roundup.psfhosted.org> Message-ID: <1559958502.68.0.257598382428.issue37188@roundup.psfhosted.org> Change by Eric Wieser : ---------- pull_requests: +13779 stage: backport needed -> patch review pull_request: https://github.com/python/cpython/pull/13906 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 22:47:09 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jun 2019 02:47:09 +0000 Subject: [issue37173] inspect.getfile error names module instead of passed class In-Reply-To: <1559819294.25.0.844595961888.issue37173@roundup.psfhosted.org> Message-ID: <1559962029.74.0.656499631503.issue37173@roundup.psfhosted.org> Terry J. Reedy added the comment: The correct message would be " is a built-in class" We do not backport exception message changes unless 'buggy enough'. I asked on core-mentorship whether this fix qualifies. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 23:08:55 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 08 Jun 2019 03:08:55 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559920875.31.0.876490053842.issue37176@roundup.psfhosted.org> Message-ID: <20190608030849.GO4221@ando.pearwood.info> Steven D'Aprano added the comment: > > What matters is the __mro__ attribute of the first argument. It matters > because that is how the MRO actually is searched. > > By the way, if it was true (it is not), Yes, I see that now. > then what did you think was > the purpose of the second parameter of super(type, obj-or-type)? Given super(T, obj).method the method object is bound to instance obj; how else could it return a bound method instead of an unbound one? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 23:21:17 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 08 Jun 2019 03:21:17 +0000 Subject: [issue37178] One argument form of math.perm() In-Reply-To: <1559838628.34.0.228461842236.issue37178@roundup.psfhosted.org> Message-ID: <1559964077.57.0.261024483991.issue37178@roundup.psfhosted.org> Raymond Hettinger added the comment: It's possible the word permutations means something different to you than it does to me. The itertools.permutations() function is only one function, one that includes the default option to generate all permutations. It does the same as permute(n, r) and permute(n) in Maple; and the same as Permutations[list, n] and Permutations[list] in Mathematica. For the math module, perm(n) is just a common special case that means all possible arrangements. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 7 23:32:20 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jun 2019 03:32:20 +0000 Subject: [issue37174] sched.py: run() is caught in delayfunc even if all events are cancelled. In-Reply-To: <1559822786.43.0.93146538102.issue37174@roundup.psfhosted.org> Message-ID: <1559964740.08.0.97939456021.issue37174@roundup.psfhosted.org> Terry J. Reedy added the comment: 3.6 only gets security fixes. 3.7, 3.8 only get bugfixes. Something new should be a separate PR. ---------- nosy: +terry.reedy stage: -> test needed versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 00:26:10 2019 From: report at bugs.python.org (Ammar Askar) Date: Sat, 08 Jun 2019 04:26: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: <1559967970.28.0.749986986483.issue29505@roundup.psfhosted.org> Change by Ammar Askar : ---------- pull_requests: +13780 pull_request: https://github.com/python/cpython/pull/13907 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 01:32:38 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sat, 08 Jun 2019 05:32:38 +0000 Subject: [issue36422] tempfile.TemporaryDirectory() removes entire directory tree even if it's a mount-point In-Reply-To: <1553512605.72.0.860422023516.issue36422@roundup.psfhosted.org> Message-ID: <1559971958.55.0.329117490118.issue36422@roundup.psfhosted.org> Jeffrey Kintscher added the comment: Another data point: On macOS 10.14.4, unlink() returns EBUSY when it tries to delete the mount point. tempfile.TemporaryDirectory() doesn't handle EBUSY and ends up skipping over the mount point and propagates the OSError exception up to the caller. It leaves the mounted directory tree untouched. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 01:49:36 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 08 Jun 2019 05:49:36 +0000 Subject: [issue37174] sched.py: run() is caught in delayfunc even if all events are cancelled. In-Reply-To: <1559822786.43.0.93146538102.issue37174@roundup.psfhosted.org> Message-ID: <1559972976.8.0.0255330321627.issue37174@roundup.psfhosted.org> Raymond Hettinger added the comment: Marking this as 3.9 because it is an API change. Also, you can already control the delayfunc through the current API, so I don't see the necessity of a changing the default which seems to work fine for most users. Tim, what do you think? ---------- nosy: +rhettinger, tim.peters versions: -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 02:54:16 2019 From: report at bugs.python.org (hai shi) Date: Sat, 08 Jun 2019 06:54:16 +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: <1559976856.0.0.581227719791.issue18299@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +13781 pull_request: https://github.com/python/cpython/pull/13908 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 03:30:48 2019 From: report at bugs.python.org (Ma Lin) Date: Sat, 08 Jun 2019 07:30:48 +0000 Subject: [issue37188] Creating a ctypes array of an element with size zero causes "Fatal Python error: Floating point exception" In-Reply-To: <1559889694.06.0.92762632537.issue37188@roundup.psfhosted.org> Message-ID: <1559979048.7.0.131971882813.issue37188@roundup.psfhosted.org> Ma Lin added the comment: > 3.7/3.8 are done 3.7 and master (3.9) are done, 3.8 was missed. ---------- nosy: +Ma Lin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 03:50:27 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 08 Jun 2019 07:50:27 +0000 Subject: [issue36520] Email header folded incorrectly In-Reply-To: <1554333300.49.0.663084865399.issue36520@roundup.psfhosted.org> Message-ID: <1559980227.52.0.29655295123.issue36520@roundup.psfhosted.org> Change by Abhilash Raj : ---------- pull_requests: +13782 pull_request: https://github.com/python/cpython/pull/13909 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 03:50:37 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 08 Jun 2019 07:50:37 +0000 Subject: [issue36520] Email header folded incorrectly In-Reply-To: <1554333300.49.0.663084865399.issue36520@roundup.psfhosted.org> Message-ID: <1559980237.0.0.132607405329.issue36520@roundup.psfhosted.org> Change by Abhilash Raj : ---------- pull_requests: +13783 pull_request: https://github.com/python/cpython/pull/13910 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 05:19:36 2019 From: report at bugs.python.org (Stefan Krah) Date: Sat, 08 Jun 2019 09:19:36 +0000 Subject: [issue37188] Creating a ctypes array of an element with size zero causes "Fatal Python error: Floating point exception" In-Reply-To: <1559889694.06.0.92762632537.issue37188@roundup.psfhosted.org> Message-ID: <1559985576.73.0.957841681242.issue37188@roundup.psfhosted.org> Stefan Krah added the comment: New changeset 48f190f79cd89f7ad4409b3c782e462368583309 by Stefan Krah (Eric Wieser) in branch '2.7': [2.7] bpo-37188: Fix a divide-by-zero in arrays of size-0 objects (#13906) https://github.com/python/cpython/commit/48f190f79cd89f7ad4409b3c782e462368583309 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 05:24:49 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Jun 2019 09:24:49 +0000 Subject: [issue37188] Creating a ctypes array of an element with size zero causes "Fatal Python error: Floating point exception" In-Reply-To: <1559889694.06.0.92762632537.issue37188@roundup.psfhosted.org> Message-ID: <1559985889.06.0.363125512237.issue37188@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13784 pull_request: https://github.com/python/cpython/pull/13911 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 05:46:58 2019 From: report at bugs.python.org (Stefan Krah) Date: Sat, 08 Jun 2019 09:46:58 +0000 Subject: [issue37188] Creating a ctypes array of an element with size zero causes "Fatal Python error: Floating point exception" In-Reply-To: <1559889694.06.0.92762632537.issue37188@roundup.psfhosted.org> Message-ID: <1559987218.41.0.636376667949.issue37188@roundup.psfhosted.org> Stefan Krah added the comment: New changeset 3d03a35ba0f162a350898100efc95fdf392070a2 by Stefan Krah (Miss Islington (bot)) in branch '3.8': [3.8] bpo-37188: Fix a divide-by-zero in arrays of size-0 objects (#13911) https://github.com/python/cpython/commit/3d03a35ba0f162a350898100efc95fdf392070a2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 05:56:26 2019 From: report at bugs.python.org (Stefan Krah) Date: Sat, 08 Jun 2019 09:56:26 +0000 Subject: [issue37188] Creating a ctypes array of an element with size zero causes "Fatal Python error: Floating point exception" In-Reply-To: <1559889694.06.0.92762632537.issue37188@roundup.psfhosted.org> Message-ID: <1559987786.54.0.0639204402089.issue37188@roundup.psfhosted.org> Change by Stefan Krah : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 06:27:52 2019 From: report at bugs.python.org (Martin Panter) Date: Sat, 08 Jun 2019 10:27:52 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559837218.79.0.128349910274.issue37176@roundup.psfhosted.org> Message-ID: <1559989672.01.0.144658126548.issue37176@roundup.psfhosted.org> Martin Panter added the comment: Some of the problems brought up here (which sibling or subclass, and which parameter?s MRO) also came up a few years ago in Issue 23674. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 06:28:54 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Sat, 08 Jun 2019 10:28:54 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559837218.79.0.128349910274.issue37176@roundup.psfhosted.org> Message-ID: <1559989734.66.0.564873636961.issue37176@roundup.psfhosted.org> G?ry added the comment: @Steven D'Aprano > But neither can it *only* look at the MRO of the second class, because that would restart the search at the top of the hierarchy; also if type(second argument) was the only thing that mattered, that would make the first argument redundant and pointless. Yes of course, but nobody states the opposite. Both parameters are necessary super(type1, obj-or-type2): ? the first one for getting the start class in the MRO, which is the class following type1 in the MRO; ? the second one for getting the MRO, which is type(obj).__mro__ if it is an instance of type1 or type2.__mro__ if it is a subclass of type1, and for binding the function into a method in a super(type1, obj).function expression (as you correctly said in your last message). Guido's Python equivalent implementation of super() given in his 2002 paper Unifying types and classes in Python 2.2 is very informative: https://www.python.org/download/releases/2.2.3/descrintro/#cooperation All this confusion around super() shows that there is room for improvement in the documentation. @Raymond Hettinger > Please make a concrete proposal (a PR or somesuch). I will try to make a PR this weekend if I find some time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 07:07:20 2019 From: report at bugs.python.org (Roland Netzsch) Date: Sat, 08 Jun 2019 11:07:20 +0000 Subject: [issue37202] Future.cancelled is not set to true immediately after calling Future.cancel Message-ID: <1559992040.91.0.159243641871.issue37202@roundup.psfhosted.org> New submission from Roland Netzsch : The attached file produces the following output: wait is still running wait is not set to cancelled! Awaiting cancelled future produced a CancelledError. A look a the documentation does not suggest a need to await the future in order to make sure the cancelled-flag is being set. ---------- components: asyncio files: test.py messages: 345029 nosy: Roland Netzsch, asvetlov, yselivanov priority: normal severity: normal status: open title: Future.cancelled is not set to true immediately after calling Future.cancel type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48405/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 07:14:36 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 08 Jun 2019 11:14:36 +0000 Subject: [issue33071] Document that PyPI no longer requires 'register' In-Reply-To: <1520950887.05.0.467229070634.issue33071@psf.upfronthosting.co.za> Message-ID: <1559992476.94.0.89996064626.issue33071@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 07:15:16 2019 From: report at bugs.python.org (Roland Netzsch) Date: Sat, 08 Jun 2019 11:15:16 +0000 Subject: [issue37202] Future.cancelled is not set to true immediately after calling Future.cancel In-Reply-To: <1559992040.91.0.159243641871.issue37202@roundup.psfhosted.org> Message-ID: <1559992516.07.0.0278368696038.issue37202@roundup.psfhosted.org> Roland Netzsch added the comment: Python-Version: [stuxcrystal at caprica ~]$ python3.7 --version Python 3.7.3 Additional Notes: Distribution: Fedora 30 (Workstation Edition) Kernel: x86_64 Linux 5.0.9-301.fc30.x86_64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 07:51:27 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Sat, 08 Jun 2019 11:51:27 +0000 Subject: [issue37203] Correct classmethod emulation in Descriptor HowTo Guide Message-ID: <1559994687.73.0.550711459072.issue37203@roundup.psfhosted.org> New submission from G?ry : With the current Python equivalent `ClassMethod` implementation of `classmethod` given in Raymond Hettinger's _Descriptor HowTo Guide_, the following code snippet: ``` class A: @ClassMethod def f(cls, *, x): pass print(A.f) A.f(x=3) ``` prints: > .newfunc at 0x106b76268> and raises: > TypeError: newfunc() got an unexpected keyword argument 'x' instead of only printing: > > like the `@classmethod` decorator would do. So the `ClassMethod` implementation fails in two regards: * it does not return a bound method to a class; * it does not handle keyword-only arguments. With this PR `ClassMethod` will correctly emulate `classmethod`. This approach (`types.MethodType`) is already used in the Python equivalent `Function` implementation of functions given earlier in the same guide. ---------- assignee: docs at python components: Documentation messages: 345031 nosy: docs at python, eric.araujo, ezio.melotti, maggyero, mdk, rhettinger, willingc priority: normal pull_requests: 13785 severity: normal status: open title: Correct classmethod emulation in Descriptor HowTo Guide type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 08:04:37 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 08 Jun 2019 12:04:37 +0000 Subject: [issue37173] inspect.getfile error names module instead of passed class In-Reply-To: <1559819294.25.0.844595961888.issue37173@roundup.psfhosted.org> Message-ID: <1559995477.12.0.279917624477.issue37173@roundup.psfhosted.org> Andrew Svetlov added the comment: I think landing the fix to 3.8 only is just fine ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 08:04:44 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 08 Jun 2019 12:04:44 +0000 Subject: [issue37173] inspect.getfile error names module instead of passed class In-Reply-To: <1559819294.25.0.844595961888.issue37173@roundup.psfhosted.org> Message-ID: <1559995484.1.0.660050745465.issue37173@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 08:05:51 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Jun 2019 12:05:51 +0000 Subject: [issue37173] inspect.getfile error names module instead of passed class In-Reply-To: <1559819294.25.0.844595961888.issue37173@roundup.psfhosted.org> Message-ID: <1559995551.27.0.305787039468.issue37173@roundup.psfhosted.org> miss-islington added the comment: New changeset d407d2a7265f6102e51a1d62b3fd28b4f7a78d16 by Miss Islington (bot) (Philipp A) in branch 'master': bpo-37173: Show passed class in inspect.getfile error (GH-13861) https://github.com/python/cpython/commit/d407d2a7265f6102e51a1d62b3fd28b4f7a78d16 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 08:06:23 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Jun 2019 12:06:23 +0000 Subject: [issue37173] inspect.getfile error names module instead of passed class In-Reply-To: <1559819294.25.0.844595961888.issue37173@roundup.psfhosted.org> Message-ID: <1559995583.29.0.45661009413.issue37173@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13786 pull_request: https://github.com/python/cpython/pull/13913 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 08:15:47 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 08 Jun 2019 12:15:47 +0000 Subject: [issue37173] inspect.getfile error names module instead of passed class In-Reply-To: <1559819294.25.0.844595961888.issue37173@roundup.psfhosted.org> Message-ID: <1559996147.32.0.63027408678.issue37173@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 08:25:04 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Jun 2019 12:25:04 +0000 Subject: [issue37173] inspect.getfile error names module instead of passed class In-Reply-To: <1559819294.25.0.844595961888.issue37173@roundup.psfhosted.org> Message-ID: <1559996704.42.0.389182108129.issue37173@roundup.psfhosted.org> miss-islington added the comment: New changeset c5daae4ef6d09269c95ed1023e76932cc179f309 by Miss Islington (bot) in branch '3.8': bpo-37173: Show passed class in inspect.getfile error (GH-13861) https://github.com/python/cpython/commit/c5daae4ef6d09269c95ed1023e76932cc179f309 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 09:17:26 2019 From: report at bugs.python.org (Tal Einat) Date: Sat, 08 Jun 2019 13:17:26 +0000 Subject: [issue37177] IDLE: Search dialogs can be hidden behind the main window In-Reply-To: <1559838119.79.0.14038633601.issue37177@roundup.psfhosted.org> Message-ID: <1559999846.9.0.270594855174.issue37177@roundup.psfhosted.org> Tal Einat added the comment: The issue Irv reported happened on macOS but not on Windows. I've reproduced his issue without this fix, and checked that this fix does indeed fix his issue. For future reference, Irv also posted a video showing his issue on YouTube[1] (he sent a link to idle-dev). [1] http://www.youtube.com/watch?v=YWDsOEN8qsE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 09:21:37 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 08 Jun 2019 13:21:37 +0000 Subject: [issue37202] Future.cancelled is not set to true immediately after calling Future.cancel In-Reply-To: <1559992040.91.0.159243641871.issue37202@roundup.psfhosted.org> Message-ID: <1560000097.01.0.954638205945.issue37202@roundup.psfhosted.org> Andrew Svetlov added the comment: This is the expected behavior. asyncio.ensure_future() returns not a future but a task for your case. Task cancellation requires at least one context switch to finish the task. P.S. I suggest replacing `asyncio.ensure_future()` with `asyncio.create_task()` to avoid confusion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 09:56:52 2019 From: report at bugs.python.org (Vlad Shcherbina) Date: Sat, 08 Jun 2019 13:56:52 +0000 Subject: [issue37204] Scripts and binaries in PYTHON_PREFIX/Scripts contain unnecessarily lowercased path to Python location on Windows Message-ID: <1560002212.48.0.983837427907.issue37204@roundup.psfhosted.org> New submission from Vlad Shcherbina : To reproduce: 1. Download and run Python installer (I used python-3.7.3-amd64-webinstall.exe). 2. Modify install settings: - Install for all users: yes - Customize install location: "C:\Python37" (don't know if it's relevant, mentioning it just in case) 3. Install. 4. Run the following commands: pip --version py -m pip --version Expected result: > pip --version pip 19.0.3 from C:\Python37\lib\site-packages\pip (python 3.7) > py -m pip --version pip 19.0.3 from C:\Python37\lib\site-packages\pip (python 3.7) Actual result: > pip --version pip 19.0.3 from c:\python37\lib\site-packages\pip (python 3.7) > py -m pip --version pip 19.0.3 from C:\Python37\lib\site-packages\pip (python 3.7) Same happens for all binaries and scripts in PYTHON_PREFIX/Scripts, not only for pip.exe. For example, if I install pytest (using "pip install pytest" or "py -m pip install pytest", doesn't matter), I get the following: > pytest -v ============================================================ test session starts ============================================================ platform win32 -- Python 3.7.3, pytest-4.6.2, py-1.8.0, pluggy-0.12.0 -- c:\python37\python.exe cachedir: .pytest_cache rootdir: C:\temp\qqq collected 0 items ======================================================= no tests ran in 0.02 seconds ======================================================== > py -m pytest -v ============================================================ test session starts ============================================================ platform win32 -- Python 3.7.3, pytest-4.6.2, py-1.8.0, pluggy-0.12.0 -- C:\Python37\python.exe cachedir: .pytest_cache rootdir: C:\temp\qqq collected 0 items ======================================================= no tests ran in 0.02 seconds ======================================================== ---------- components: Distutils, Installation, Windows messages: 345037 nosy: dstufft, eric.araujo, paul.moore, steve.dower, tim.golden, vlad, zach.ware priority: normal severity: normal status: open title: Scripts and binaries in PYTHON_PREFIX/Scripts contain unnecessarily lowercased path to Python location on Windows type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 10:03:55 2019 From: report at bugs.python.org (Roland Netzsch) Date: Sat, 08 Jun 2019 14:03:55 +0000 Subject: [issue37202] Future.cancelled is not set to true immediately after calling Future.cancel In-Reply-To: <1559992040.91.0.159243641871.issue37202@roundup.psfhosted.org> Message-ID: <1560002635.46.0.469626760791.issue37202@roundup.psfhosted.org> Roland Netzsch added the comment: So there is no way to reliably find out whether a task has been cancelled by calling Task.cancelled()? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 10:43:19 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 08 Jun 2019 14:43:19 +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: <1560004999.69.0.597752132482.issue29505@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset a15a7bcaea54e1845ab2abe27e6f583294cd715b by Gregory P. Smith (Ammar Askar) in branch 'master': bpo-29505: Fix interpreter in fuzzing targets to be relocatable (GH-13907) https://github.com/python/cpython/commit/a15a7bcaea54e1845ab2abe27e6f583294cd715b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 10:43:47 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Jun 2019 14:43:47 +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: <1560005027.77.0.978286704477.issue29505@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13787 pull_request: https://github.com/python/cpython/pull/13914 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 10:43:55 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Jun 2019 14:43:55 +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: <1560005035.46.0.0746585234072.issue29505@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13788 pull_request: https://github.com/python/cpython/pull/13915 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 10:46:59 2019 From: report at bugs.python.org (Owais Kazi) Date: Sat, 08 Jun 2019 14:46:59 +0000 Subject: [issue10880] do_mkvalue and 'boolean' In-Reply-To: <1294678522.28.0.674271875959.issue10880@psf.upfronthosting.co.za> Message-ID: <1560005219.09.0.308378134517.issue10880@roundup.psfhosted.org> Owais Kazi added the comment: If it's a easy patch, I would like to pick it up. Can someone please explain how should I proceed with this? I am already done with the setup. TIA ---------- nosy: +Owais Kazi type: enhancement -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 10:50:30 2019 From: report at bugs.python.org (Steve Dower) Date: Sat, 08 Jun 2019 14:50:30 +0000 Subject: [issue37204] Scripts and binaries in PYTHON_PREFIX/Scripts contain unnecessarily lowercased path to Python location on Windows In-Reply-To: <1560002212.48.0.983837427907.issue37204@roundup.psfhosted.org> Message-ID: <1560005430.41.0.304574062599.issue37204@roundup.psfhosted.org> Steve Dower added the comment: This is due to how the pip.exe launcher is generated, which is part of pip itself (actually distlib, I think, but someone over there can redirect). Please report this at https://github.com/pypa/pip ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 10:56:27 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 08 Jun 2019 14:56:27 +0000 Subject: [issue34886] subprocess.run throws exception when input and stdin are passed as kwargs In-Reply-To: <1538592638.37.0.545547206417.issue34886@psf.upfronthosting.co.za> Message-ID: <1560005787.69.0.752030537519.issue34886@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 8cc605acdda5aff250ab4c9b524a7560f90ca9f3 by Gregory P. Smith (R?mi Lapeyre) in branch 'master': bpo-34886: Fix subprocess.run handling of exclusive arguments (GH-11727) https://github.com/python/cpython/commit/8cc605acdda5aff250ab4c9b524a7560f90ca9f3 ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 10:56:35 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Jun 2019 14:56:35 +0000 Subject: [issue34886] subprocess.run throws exception when input and stdin are passed as kwargs In-Reply-To: <1538592638.37.0.545547206417.issue34886@psf.upfronthosting.co.za> Message-ID: <1560005795.95.0.0887574083293.issue34886@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13789 pull_request: https://github.com/python/cpython/pull/13916 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 10:56:42 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Jun 2019 14:56:42 +0000 Subject: [issue34886] subprocess.run throws exception when input and stdin are passed as kwargs In-Reply-To: <1538592638.37.0.545547206417.issue34886@psf.upfronthosting.co.za> Message-ID: <1560005802.2.0.351465659875.issue34886@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13790 pull_request: https://github.com/python/cpython/pull/13917 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 10:58:49 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jun 2019 14:58:49 +0000 Subject: [issue37173] inspect.getfile error names module instead of passed class In-Reply-To: <1559819294.25.0.844595961888.issue37173@roundup.psfhosted.org> Message-ID: <1560005929.44.0.37637619643.issue37173@roundup.psfhosted.org> Terry J. Reedy added the comment: Right, 3.8 not being released yet makes it different. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 11:02:52 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Jun 2019 15:02:52 +0000 Subject: [issue37173] inspect.getfile error names module instead of passed class In-Reply-To: <1559819294.25.0.844595961888.issue37173@roundup.psfhosted.org> Message-ID: <1560006172.27.0.287999315764.issue37173@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13791 pull_request: https://github.com/python/cpython/pull/13918 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 11:03:08 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Jun 2019 15:03:08 +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: <1560006188.63.0.5594151341.issue29505@roundup.psfhosted.org> miss-islington added the comment: New changeset 22b69da4c38042e923d633530bdafc1b5fb94928 by Miss Islington (bot) in branch '3.8': bpo-29505: Fix interpreter in fuzzing targets to be relocatable (GH-13907) https://github.com/python/cpython/commit/22b69da4c38042e923d633530bdafc1b5fb94928 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 11:03:49 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Jun 2019 15:03:49 +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: <1560006229.34.0.00817532303248.issue29505@roundup.psfhosted.org> miss-islington added the comment: New changeset 6692d35317a45905a043dccae3940ea5d5d84352 by Miss Islington (bot) in branch '3.7': bpo-29505: Fix interpreter in fuzzing targets to be relocatable (GH-13907) https://github.com/python/cpython/commit/6692d35317a45905a043dccae3940ea5d5d84352 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 11:15:10 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Jun 2019 15:15:10 +0000 Subject: [issue34886] subprocess.run throws exception when input and stdin are passed as kwargs In-Reply-To: <1538592638.37.0.545547206417.issue34886@psf.upfronthosting.co.za> Message-ID: <1560006910.5.0.560287403337.issue34886@roundup.psfhosted.org> miss-islington added the comment: New changeset 6324ac1293b2cf71559869b88f89f510f9a62a8e by Miss Islington (bot) in branch '3.8': bpo-34886: Fix subprocess.run handling of exclusive arguments (GH-11727) https://github.com/python/cpython/commit/6324ac1293b2cf71559869b88f89f510f9a62a8e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 11:16:31 2019 From: report at bugs.python.org (Vlad Shcherbina) Date: Sat, 08 Jun 2019 15:16:31 +0000 Subject: [issue37204] Scripts and binaries in PYTHON_PREFIX/Scripts contain unnecessarily lowercased path to Python location on Windows In-Reply-To: <1560002212.48.0.983837427907.issue37204@roundup.psfhosted.org> Message-ID: <1560006991.81.0.780152543961.issue37204@roundup.psfhosted.org> Vlad Shcherbina added the comment: https://github.com/pypa/pip/issues/6582 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 11:23:55 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 08 Jun 2019 15:23:55 +0000 Subject: [issue37202] Future.cancelled is not set to true immediately after calling Future.cancel In-Reply-To: <1559992040.91.0.159243641871.issue37202@roundup.psfhosted.org> Message-ID: <1560007435.8.0.490450106252.issue37202@roundup.psfhosted.org> Andrew Svetlov added the comment: I don't follow what reliability guarantee are you requesting. A cite from task.cancel() docstring: > Request that this task cancel itself. This arranges for a CancelledError to be thrown into the wrapped coroutine on the next cycle through the event loop. The coroutine then has a chance to clean up or even deny the request using try/except/finally. Unlike Future.cancel, this does not guarantee that the task will be cancelled: the exception might be caught and acted upon, delaying cancellation of the task or preventing cancellation completely. The task may also return a value or raise a different exception. Immediately after this method is called, Task.cancelled() will not return True (unless the task was already cancelled). A task will be marked as cancelled when the wrapped coroutine terminates with a CancelledError exception (even if cancel() was not called). task.cancelled() returns True for canceled and finished tasks, but task.cancel() is a request for cancellation. The requested task needs some time to gracefully finish itself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 11:24:13 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Jun 2019 15:24:13 +0000 Subject: [issue34886] subprocess.run throws exception when input and stdin are passed as kwargs In-Reply-To: <1538592638.37.0.545547206417.issue34886@psf.upfronthosting.co.za> Message-ID: <1560007453.61.0.302359730855.issue34886@roundup.psfhosted.org> miss-islington added the comment: New changeset 10b4fd98142edef6ab7b034e10ae5c9551043999 by Miss Islington (bot) in branch '3.7': bpo-34886: Fix subprocess.run handling of exclusive arguments (GH-11727) https://github.com/python/cpython/commit/10b4fd98142edef6ab7b034e10ae5c9551043999 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 11:27:09 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Jun 2019 15:27:09 +0000 Subject: [issue37173] inspect.getfile error names module instead of passed class In-Reply-To: <1559819294.25.0.844595961888.issue37173@roundup.psfhosted.org> Message-ID: <1560007629.22.0.360392479638.issue37173@roundup.psfhosted.org> miss-islington added the comment: New changeset 51c9cc73cb8768a691688755af0a8b6b12cf712c by Miss Islington (bot) in branch '3.7': bpo-37173: Show passed class in inspect.getfile error (GH-13861) https://github.com/python/cpython/commit/51c9cc73cb8768a691688755af0a8b6b12cf712c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 11:27:31 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Jun 2019 15:27:31 +0000 Subject: [issue37177] IDLE: Search dialogs can be hidden behind the main window In-Reply-To: <1559838119.79.0.14038633601.issue37177@roundup.psfhosted.org> Message-ID: <1560007651.74.0.376411495249.issue37177@roundup.psfhosted.org> Terry J. Reedy added the comment: I saw the email, thanks for testing. Irv, a reminder: All reports of IDLE UI behavior (and some of internal behavior) need to be tagged with OS. Working 'cross-platform' does not mean 'the same across platforms'. In particular, tcl/tk long ago made a decision to adjust to platform conventions (which have sometimes changed ;-). I should have asked 'what OS' when I saw your report. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 11:42:23 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 08 Jun 2019 15:42:23 +0000 Subject: [issue37203] Correct classmethod emulation in Descriptor HowTo Guide In-Reply-To: <1559994687.73.0.550711459072.issue37203@roundup.psfhosted.org> Message-ID: <1560008543.53.0.570121462832.issue37203@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 11:48:39 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 08 Jun 2019 15:48:39 +0000 Subject: [issue37203] Correct classmethod emulation in Descriptor HowTo Guide In-Reply-To: <1559994687.73.0.550711459072.issue37203@roundup.psfhosted.org> Message-ID: <1560008919.13.0.561973062155.issue37203@roundup.psfhosted.org> Raymond Hettinger added the comment: This wasn't intended to be an exact equivalent. Instead, it focuses on the key action of classmethod which is prepending the class to the call. Though less accurate, the current version communicates better. I suggest adding a short comment to the effect that "newfunc" emulates "types.MethodType(self.f, klass)". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 11:58:15 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 08 Jun 2019 15:58:15 +0000 Subject: [issue37178] One argument form of math.perm() In-Reply-To: <1559838628.34.0.228461842236.issue37178@roundup.psfhosted.org> Message-ID: <1560009495.72.0.330987500584.issue37178@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset e119b3d136bd94d880bce4b382096f6de3f38062 by Raymond Hettinger in branch 'master': bpo-37178: Allow a one argument form of math.perm() (GH-13905) https://github.com/python/cpython/commit/e119b3d136bd94d880bce4b382096f6de3f38062 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 11:59:30 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Jun 2019 15:59:30 +0000 Subject: [issue37178] One argument form of math.perm() In-Reply-To: <1559838628.34.0.228461842236.issue37178@roundup.psfhosted.org> Message-ID: <1560009570.19.0.769874946925.issue37178@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13792 pull_request: https://github.com/python/cpython/pull/13919 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 12:17:37 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 08 Jun 2019 16:17:37 +0000 Subject: [issue37178] One argument form of math.perm() In-Reply-To: <1559838628.34.0.228461842236.issue37178@roundup.psfhosted.org> Message-ID: <1560010657.16.0.391148432401.issue37178@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset feaceaafe816e95c4aff15eab0bea6dc2bbfe4fd by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-37178: Allow a one argument form of math.perm() (GH-13905) (GH-13919) https://github.com/python/cpython/commit/feaceaafe816e95c4aff15eab0bea6dc2bbfe4fd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 12:26:43 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Sat, 08 Jun 2019 16:26:43 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559837218.79.0.128349910274.issue37176@roundup.psfhosted.org> Message-ID: <1560011203.12.0.742115892101.issue37176@roundup.psfhosted.org> Jeroen Demeyer added the comment: > Some of the problems brought up here (which sibling or subclass, and which parameter?s MRO) also came up a few years ago in Issue 23674. Indeed. I would actually say that these two issues are duplicates of each other. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 13:21:00 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 08 Jun 2019 17:21:00 +0000 Subject: [issue37189] PyRun_String not exported in python38.dll In-Reply-To: <1559894123.98.0.3282613922.issue37189@roundup.psfhosted.org> Message-ID: <1560014460.18.0.784093150168.issue37189@roundup.psfhosted.org> Benjamin Peterson added the comment: It shouldn't break existing code because PyRun_String has a macro expansion to PyRun_StringFlags. ABI compatibility between major releases is not provded. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 13:49:25 2019 From: report at bugs.python.org (Emmanuel Arias) Date: Sat, 08 Jun 2019 17:49:25 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1560016165.62.0.233732314895.issue36373@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- pull_requests: +13793 pull_request: https://github.com/python/cpython/pull/13920 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 14:00:30 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 08 Jun 2019 18:00:30 +0000 Subject: [issue12144] cookielib.CookieJar.make_cookies fails for cookies with 'expires' set In-Reply-To: <1306033124.86.0.836605602237.issue12144@psf.upfronthosting.co.za> Message-ID: <1560016830.72.0.823741027572.issue12144@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- pull_requests: +13794 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/13921 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 14:15:00 2019 From: report at bugs.python.org (Ken Healy) Date: Sat, 08 Jun 2019 18:15:00 +0000 Subject: [issue37205] time.perf_counter() is not system-wide on Windows, in disagreement with documentation Message-ID: <1560017700.11.0.127727162727.issue37205@roundup.psfhosted.org> New submission from Ken Healy : The documentation for time.perf_counter() indicates it should return a system-wide value: https://docs.python.org/3/library/time.html#time.perf_counter This is not true on Windows, as a process-specific offset is subtracted from the underlying QueryPerformanceCounter() value. The code comments indicate this is to reduce precision loss: https://github.com/python/cpython/blob/master/Python/pytime.c#L995-L997 This is relevant in multiprocess applications, where accurate timing is required across multiple processes. Here is a simple test case: ----------------------------------------------------------- import concurrent.futures import time def worker(): return time.perf_counter() if __name__ == '__main__': pool = concurrent.futures.ProcessPoolExecutor() futures = [] for i in range(3): print('Submitting worker {:d} at time.perf_counter() == {:.3f}'.format(i, time.perf_counter())) futures.append(pool.submit(worker)) time.sleep(1) for i, f in enumerate(futures): print('Worker {:d} started at time.perf_counter() == {:.3f}'.format(i, f.result())) ----------------------------------------------------------- Output: ----------------------------------------------------------- C:\...>Python37\python.exe -VV Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] C:\...>Python37\python.exe perf_counter_across_processes.py Submitting worker 0 at time.perf_counter() == 0.376 Submitting worker 1 at time.perf_counter() == 1.527 Submitting worker 2 at time.perf_counter() == 2.529 Worker 0 started at time.perf_counter() == 0.380 Worker 1 started at time.perf_counter() == 0.956 Worker 2 started at time.perf_counter() == 1.963 ----------------------------------------------------------- See my stackoverflow question for a comparison with Linux: https://stackoverflow.com/questions/56502111/should-time-perf-counter-be-consistent-across-processes-in-python-on-windows ---------- assignee: docs at python components: Documentation, Library (Lib), Windows messages: 345057 nosy: docs at python, kh90909, paul.moore, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal status: open type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 14:18:49 2019 From: report at bugs.python.org (Tal Einat) Date: Sat, 08 Jun 2019 18:18:49 +0000 Subject: [issue36003] set better defaults for TCPServer options In-Reply-To: <1550238279.45.0.385319342978.issue36003@roundup.psfhosted.org> Message-ID: <1560017929.47.0.491791957289.issue36003@roundup.psfhosted.org> Tal Einat added the comment: I'm not sure that changing the default value for "reuse address" justifies breaking backwards compatibility like this. Admittedly, I'm not an expert on networking, so perhaps there's a good reason that I'm unaware of. As for the queue size, passing 0 to socket.listen() does seem like a more reasonable default than the rather arbitrary value of 5. Again, it's arguable whether it's worth changing this given that it has been like this for a long time, but in this case at least the potential for harm seems negligible. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 14:19:39 2019 From: report at bugs.python.org (Ken Healy) Date: Sat, 08 Jun 2019 18:19:39 +0000 Subject: [issue37205] time.perf_counter() is not system-wide on Windows, in disagreement with documentation In-Reply-To: <1560017700.11.0.127727162727.issue37205@roundup.psfhosted.org> Message-ID: <1560017979.98.0.718285594986.issue37205@roundup.psfhosted.org> Ken Healy added the comment: Note that this offset subtraction behavior appears to be inherited from time.clock(), which did not make any guarantees about returning a system-wide value: https://github.com/python/cpython/commit/ec89539ccccd6103665a7a5c7234cf09f27c1c72#diff-4a575e94d6ac98a0d82fd93509b6bfd3L91 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 14:34:20 2019 From: report at bugs.python.org (Tal Einat) Date: Sat, 08 Jun 2019 18:34:20 +0000 Subject: [issue34235] PyArg_ParseTupleAndKeywords: support required keyword arguments In-Reply-To: <1532610257.0.0.56676864532.issue34235@psf.upfronthosting.co.za> Message-ID: <1560018860.46.0.744885958818.issue34235@roundup.psfhosted.org> Tal Einat added the comment: How about allowing '|' to be used again after '$'? Keyword arguments would be optional by default, but if there is a '|' after the '$', then those before it are required. Examples: "O|O$O|O" -- one required keyword arg and one optional one. "O|O$OO" -- both keyword args are optional. "O|O$|OO" -- both keyword args are optional. "O|O$OO|" -- both keyword args are required. Pros: 1. Backwards-compatible with current notation. 2. No additional characters used as sigils. 3. Similar meaning as existing use of '|' to separate required and optional args. 4. Same order as for Python function. Cons: 1. Need to scan to the end of the format string to figure out whether keyword args are optional or required. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 14:47:49 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 08 Jun 2019 18:47:49 +0000 Subject: [issue37091] subprocess - uncaught PermissionError in send_signal can cause hang In-Reply-To: <1559170322.53.0.309237543574.issue37091@roundup.psfhosted.org> Message-ID: <1560019669.75.0.612245129359.issue37091@roundup.psfhosted.org> Gregory P. Smith added the comment: even with that initially proposed patch, the subprocess.run code is going to hang if the .kill() fails without raising an exception: The run() TimeoutExpired path calls communicate() after the kill to consume all remaining output: https://github.com/python/cpython/blob/master/Lib/subprocess.py#L478 and the __exit__ code path calls wait(). both assume that the kill() succeeded because the normal case is not someone launching a child process that they are unable to kill (as happens when sudo or similar is used). Today's workarounds: Don't use timeout when launching a child you cannot kill. OR launch it via an intermediate process that you can kill (shell=True or equivalent). To address this issue, catching a PermissionError exception around both of those kill() calls and preventing it from calling either communicate() or wait() as we cannot force the child process to exit makes sense. With some indication that this happened left as a hint to the user on the TimeoutExpired itself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 14:48:05 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 08 Jun 2019 18:48:05 +0000 Subject: [issue37206] Incorrect application of Argument Clinic to dict.pop() Message-ID: <1560019685.35.0.640301237908.issue37206@roundup.psfhosted.org> New submission from Raymond Hettinger : help(dict.pop) was correct in 3.7: pop(...) D.pop(k[,d]) -> v and incorrect for 3.8: pop(self, key, default=None, /) This happened in: https://github.com/python/cpython/commit/9e4f2f3a6b8ee995c365e86d976937c141d867f8 https://github.com/python/cpython/pull/12792 We've long known that the Argument Clinic was not applicable to all functions and methods, including this one in particular. The issue is that the one argument form does not set the default to None; rather, it triggers a KeyError when the key is missing. In other words, there is an important and long-standing semantic difference between d.pop(k) and d.pop(k,None). When reverting this change, please add a note about why the ArgumentClinic is not being applied to this function until its capabilities have been built-out to handle functions that have different behaviors depending on the number of arguments. Also, we should review other recent applications of the ArgumentClinic to make sure they didn't make the same mistake. ---------- components: Argument Clinic keywords: 3.8regression messages: 345062 nosy: larry, rhettinger priority: high severity: normal status: open title: Incorrect application of Argument Clinic to dict.pop() versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 14:50:59 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 08 Jun 2019 18:50:59 +0000 Subject: [issue37206] Incorrect application of Argument Clinic to dict.pop() In-Reply-To: <1560019685.35.0.640301237908.issue37206@roundup.psfhosted.org> Message-ID: <1560019859.77.0.346868004025.issue37206@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 15:13:08 2019 From: report at bugs.python.org (Jakub Wilk) Date: Sat, 08 Jun 2019 19:13:08 +0000 Subject: [issue31652] make install fails: no module _ctypes In-Reply-To: <1506812661.87.0.213398074469.issue31652@psf.upfronthosting.co.za> Message-ID: <1560021188.26.0.89815807144.issue31652@roundup.psfhosted.org> Change by Jakub Wilk : ---------- nosy: +jwilk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 15:32:39 2019 From: report at bugs.python.org (Roland Netzsch) Date: Sat, 08 Jun 2019 19:32:39 +0000 Subject: [issue37202] Future.cancelled is not set to true immediately after calling Future.cancel In-Reply-To: <1559992040.91.0.159243641871.issue37202@roundup.psfhosted.org> Message-ID: <1560022359.95.0.963581864844.issue37202@roundup.psfhosted.org> Change by Roland Netzsch : ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 17:05:09 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 08 Jun 2019 21:05:09 +0000 Subject: [issue11122] bdist_rpm should use rpmbuild, not rpm In-Reply-To: <1296854362.61.0.538085175842.issue11122@psf.upfronthosting.co.za> Message-ID: <1560027909.95.0.1277480436.issue11122@roundup.psfhosted.org> Cheryl Sabella added the comment: New changeset 45a14942c969ed508b35abd5e116cb18f84ce5b4 by Cheryl Sabella (Marcin Niemira) in branch 'master': bpo-11122: fix hardcoded path checking for rpmbuild in bdist_rpm.py (GH-10594) https://github.com/python/cpython/commit/45a14942c969ed508b35abd5e116cb18f84ce5b4 ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 17:06:22 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 08 Jun 2019 21:06:22 +0000 Subject: [issue11122] bdist_rpm should use rpmbuild, not rpm In-Reply-To: <1296854362.61.0.538085175842.issue11122@psf.upfronthosting.co.za> Message-ID: <1560027982.88.0.615147986752.issue11122@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 17:07:15 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Jun 2019 21:07:15 +0000 Subject: [issue11122] bdist_rpm should use rpmbuild, not rpm In-Reply-To: <1296854362.61.0.538085175842.issue11122@psf.upfronthosting.co.za> Message-ID: <1560028035.24.0.478032469233.issue11122@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13795 pull_request: https://github.com/python/cpython/pull/13922 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 17:07:32 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Sat, 08 Jun 2019 21:07:32 +0000 Subject: [issue37203] Correct classmethod emulation in Descriptor HowTo Guide In-Reply-To: <1559994687.73.0.550711459072.issue37203@roundup.psfhosted.org> Message-ID: <1560028052.97.0.679820321603.issue37203@roundup.psfhosted.org> G?ry added the comment: @Raymond Hettinger > Though less accurate, the current version communicates better I agree that types.MethodType is more accurate but may be less understandable. But in this case I think that the Function class for emulating instance methods should not use types.MethodType either, but a custom newfunc function as well. And **kwargs parameters should be added to both newfunc functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 17:14:18 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 08 Jun 2019 21:14:18 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559837218.79.0.128349910274.issue37176@roundup.psfhosted.org> Message-ID: <1560028458.73.0.760090177142.issue37176@roundup.psfhosted.org> Raymond Hettinger added the comment: Yes, issue 23674 seems to be at least a partial duplicate. We should just get this fixed and close both issues. Ideally, the text can also be made more compact. Having eight paragraphs sends an implicit message that this is too complex to understand and that it should be avoided. One essential goal is that we need to overcome strong preconceptions about about what super() might do versus what it actually does. Those with experience of super() in other languages tend to presume that it would be a keyword rather than a builtin type that needs to be instantiated, that it can only work within a class, that it has lower computational overhead than it does, that it only calls parents rather than siblings, that search order is controlled by the method using super() rather than the child instance, that operators will work, or that the search order is something is something other than the C3 algorithm. The core challenge of documenting super() is that it is so different from what a person might imagine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 17:20:23 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 08 Jun 2019 21:20:23 +0000 Subject: [issue37203] Correct classmethod emulation in Descriptor HowTo Guide In-Reply-To: <1559994687.73.0.550711459072.issue37203@roundup.psfhosted.org> Message-ID: <1560028823.29.0.844848428234.issue37203@roundup.psfhosted.org> Raymond Hettinger added the comment: I'm going to close this because 1) I'm working on a somewhat major set of updates this guide already and 2) I think this tracker issue misses the point of what those guide is trying to do (communicating that the class is prepended to the argument stream but not trying to be a fully accurate drop in substitute). The responsibility for describing in detail what @classmethod does belongs in libstdtypes.rst. The goal in the descriptor how-to is to give an understanding of how descriptors work. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 17:25:24 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 08 Jun 2019 21:25:24 +0000 Subject: [issue11122] bdist_rpm should use rpmbuild, not rpm In-Reply-To: <1296854362.61.0.538085175842.issue11122@psf.upfronthosting.co.za> Message-ID: <1560029124.65.0.0944351753071.issue11122@roundup.psfhosted.org> miss-islington added the comment: New changeset 3f7629d93c8cb3e0ee118c6a6463250f03d6c9f9 by Miss Islington (bot) in branch '3.8': bpo-11122: fix hardcoded path checking for rpmbuild in bdist_rpm.py (GH-10594) https://github.com/python/cpython/commit/3f7629d93c8cb3e0ee118c6a6463250f03d6c9f9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 19:55:34 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 08 Jun 2019 23:55:34 +0000 Subject: [issue37178] One argument form of math.perm() In-Reply-To: <1559838628.34.0.228461842236.issue37178@roundup.psfhosted.org> Message-ID: <1560038134.9.0.472079402483.issue37178@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 8 21:06:51 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 09 Jun 2019 01:06:51 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1560028458.73.0.760090177142.issue37176@roundup.psfhosted.org> Message-ID: <20190609010644.GP4221@ando.pearwood.info> Steven D'Aprano added the comment: On Sat, Jun 08, 2019 at 09:14:18PM +0000, Raymond Hettinger wrote: > Ideally, the text can also be made more compact. Having eight > paragraphs sends an implicit message that this is too complex to > understand and that it should be avoided. But it is complex -- as you point out, there are *at least* seven potential misapprehensions here. super does a lot: there are at least four ways to call it (zero-argument form, unbound super, class+instance and class+subclass). And as the old "super considered harmful" versus "super considered super" debate shows, there are pitfalls in multiple inheritance that people run into. The challenge here is that for 95% of cases (plucking a number from thin air) using super is simple: just follow the example in the docs. But the remaining troublesome cases can be very troublesome, and people running into those cases do need to understand the gory details. > One essential goal is that we need to overcome strong preconceptions > about about what super() might do versus what it actually does. [...] Here's two more that you missed: - that you should call super with super(type(self), self); - that unbound super objects dispatch to unbound methods. At some point or another over the last decade I've misunderstood super to do almost all of those things. As this thread shows, I thought I had understood it but I still misunderstood the role of the class calling super. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 00:58:58 2019 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Jun 2019 04:58:58 +0000 Subject: [issue37107] ensurepip --upgrade doesn't change the version of pip used by venv In-Reply-To: <1559283295.29.0.266679199585.issue37107@roundup.psfhosted.org> Message-ID: <1560056338.74.0.274966138167.issue37107@roundup.psfhosted.org> Nick Coghlan added the comment: (Added packaging, Linux distro, and Windows and macOS installer folks to the cc list) Chris and I were discussing this behaviour, and it turns out even I had forgotten how we had specified this feature in PEP 453: `ensurepip --upgrade` ensures that an older pip is brought up to date with the bundled version, but it does *not* check PyPI for the latest version the way that `python3 -m pip install --upgrade pip` does. We both expected the ensurepip option to behave the same way as the pip option, since they share a name. If I had the time machine keys, I'd use a more verbose name for the ensurepip flag (e.g. `--upgrade-to-match-bundle`) to help make it clearer that it does something different from the corresponding pip flag. As it is though, for Python 3.9, I think we should change the behaviour of `--upgrade` to imply `python -m pip install --upgrade pip`, and then add a separate `--network-upgrade`/`--no-network-upgrade` option that allows folks to opt out of the PyPI part of the version check. The make file would presumably be updated to pass the `--no-network-upgrade` flag, and I guess the macOS and Windows installers would as well (I'm not sure what the platform policies are around installers making random additional requests to external network services) ---------- nosy: +barry, doko, dstufft, ncoghlan, ned.deily, paul.moore, petr.viktorin, steve.dower stage: -> needs patch type: -> enhancement versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 01:10:16 2019 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Jun 2019 05:10:16 +0000 Subject: [issue37107] ensurepip --upgrade doesn't change the version of pip used by venv In-Reply-To: <1559283295.29.0.266679199585.issue37107@roundup.psfhosted.org> Message-ID: <1560057016.73.0.391539810796.issue37107@roundup.psfhosted.org> Nick Coghlan added the comment: Addressing the other part of Chris's initial post: there's also no `--upgrade-pip` option on `venv` itself. Instead, there's only an `--upgrade` option that is intended for *Python* version upgrades, and restructures the internal layout of the venv to switch the Python major version number. Unless you're using a Linux distro Python that has been patched to inject the external pip installation with rewheel or dirtbike, getting a venv that uses the externally updated version of pip requires running `python3 - m venv --system-site-packages --without-pip ...`. So my suggestion there would be to: - rename "venv --upgrade" to "venv --set-interpreter" (keeping `--upgrade` as a legacy alias) - default to running `ensurepip --upgrade` with its new behaviour - add `--network-upgrade/--no-network-upgrade` options which get passed straight through to the updated ensurepip ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 01:45:09 2019 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Jun 2019 05:45:09 +0000 Subject: [issue34836] test_ssl.test_default_ecdh_curve needs no tls1.3 flag in 2.7, for now In-Reply-To: <1538152364.12.0.545547206417.issue34836@psf.upfronthosting.co.za> Message-ID: <1560059109.91.0.14393159366.issue34836@roundup.psfhosted.org> Nick Coghlan added the comment: New changeset 99b5c940d3471e0ed6579771d94e7342d7c733e0 by Nick Coghlan (Dimitri John Ledkov) in branch '2.7': [2.7] bpo-34836: fix test_default_ecdh_curve, needs no tlsv1.3. (GH-9626) https://github.com/python/cpython/commit/99b5c940d3471e0ed6579771d94e7342d7c733e0 ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 01:49:36 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Jun 2019 05:49:36 +0000 Subject: [issue37206] Incorrect application of Argument Clinic to dict.pop() In-Reply-To: <1560019685.35.0.640301237908.issue37206@roundup.psfhosted.org> Message-ID: <1560059376.37.0.923426811984.issue37206@roundup.psfhosted.org> Serhiy Storchaka added the comment: The code generated by Argument Clinic is correct. >>> {}.pop(1) Traceback (most recent call last): File "", line 1, in KeyError: 1 >>> {}.pop(1, None) It is just a signature wrong. Some earlier versions of Argument Clinic allowed you to write "default=undefined" to specify an optional argument without default value, but this feature was lost a long time ago. So now signatures of some functions with optional arguments are false. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 02:03:13 2019 From: report at bugs.python.org (Alejandro Gonzalez) Date: Sun, 09 Jun 2019 06:03:13 +0000 Subject: [issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call In-Reply-To: <1480885774.84.0.670239959771.issue28869@psf.upfronthosting.co.za> Message-ID: <1560060192.99.0.728589451468.issue28869@roundup.psfhosted.org> Alejandro Gonzalez added the comment: Hello, I would like to add further on this issue. (I'm new to bpo. Please advise if this report could be better) Issue ----- Pickling breaks when attempting to dump an instance of a class that was defined by calling ABCMeta directly, because it attempts to look for the class in `abc` rather than the module the class was defined in. Below is a short snippet to reproduce the issue (my environment is Python 3.7.3 on Ubuntu 16.04) >>> import pickle >>> from abc import ABCMeta >>> class Foo(metaclass=ABCMeta): >>> pass >>> Bar = ABCMeta('Bar', (), {}) >>> foo = Foo() >>> bar = Bar() >>> foo_p = pickle.dumps(foo) # OK >>> bar_p = pickle.dumps(bar) # PicklingError: Can't pickle : attribute lookup Bar on abc failed I encountered this issue when working on a class factory to define classes dynamically. You can work around it if you smuggle `{'__module__': __name__}` when calling the metaclass, e.g.: >>> Qux = ABCMeta('Qux', (), {'__module__': __name__}) >>> qux = Qux() >>> qux_p = pickle.dumps(qux) # OK Apparently others have also stumbled upon this ABCMeta behavior before: https://stackoverflow.com/q/49457441 Some ideas to solve this ------------------------ A. Steven's proposal seems that could work (I haven't tested it myself yet though). - This, however, would be limited to ABCMeta. Any other metaclass subclassed from type would have to include that workaround too for it to play well with pickle, which leads to, B. Do A. and include in the documentation some recipe that shows this workaround when subclassing from type. C. Implement A. in type itself. (Maybe around here? https://github.com/python/cpython/blob/master/Objects/typeobject.c#L2603) - I'm not familiar with the internals of CPython, but I guess this would be the nuclear option. If any of above ideas (or some other idea that could come up upon discussion) seems sensible, please allow me to work on it. I'd be happy to contribute :) ---------- nosy: +alegonz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 03:09:31 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Sun, 09 Jun 2019 07:09:31 +0000 Subject: [issue37203] Correct classmethod emulation in Descriptor HowTo Guide In-Reply-To: <1559994687.73.0.550711459072.issue37203@roundup.psfhosted.org> Message-ID: <1560064171.96.0.794533988618.issue37203@roundup.psfhosted.org> G?ry added the comment: @Raymond Hettinger > The goal in the descriptor how-to is to give an understanding of how descriptors work. Okay. So I don't know if that was clear in my last message but that also means replacing the current "Function" implementation: class Function(object): . . . def __get__(self, obj, objtype=None): "Simulate func_descr_get() in Objects/funcobject.c" if obj is None: return self return types.MethodType(self, obj) with something like this: class Function(object): . . . def __get__(self, obj, objtype=None): "Simulate func_descr_get() in Objects/funcobject.c" if obj is None: return self def newfunc(*args, **kwargs): return self(obj, *args, **kwargs) return newfunc # "newfunc" emulates "types.MethodType(self, obj)" And as you said, adding a similar comment to the "ClassMethod" implementation (and **kwargs): class ClassMethod(object): "Emulate PyClassMethod_Type() in Objects/funcobject.c" def __init__(self, f): self.f = f def __get__(self, obj, klass=None): if klass is None: klass = type(obj) def newfunc(*args, **kwargs): return self.f(klass, *args, **kwargs) return newfunc # "newfunc" emulates "types.MethodType(self.f, klass)" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 04:21:47 2019 From: report at bugs.python.org (hodai goldman) Date: Sun, 09 Jun 2019 08:21:47 +0000 Subject: [issue37198] _parse_localename fail to parse 'en_IL' In-Reply-To: <1559925201.97.0.400746291459.issue37198@roundup.psfhosted.org> Message-ID: <1560068507.77.0.473139904899.issue37198@roundup.psfhosted.org> hodai goldman added the comment: hi Michele, Yes i wold propose a Pull Request. SilentGhost: I don't know. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 05:02:57 2019 From: report at bugs.python.org (Lorenz Mende) Date: Sun, 09 Jun 2019 09:02:57 +0000 Subject: [issue36670] test suite broken due to cpu usage feature on win 10/ german In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1560070977.25.0.134418861891.issue36670@roundup.psfhosted.org> Lorenz Mende added the comment: Did some minor changes with win_utils. Encoding changed to 'oem'. @heckad: does this bugfix work for u? @all: please verify working of the changes with different localizations. thx ---------- Added file: https://bugs.python.org/file48406/win_utils.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 05:03:08 2019 From: report at bugs.python.org (Lorenz Mende) Date: Sun, 09 Jun 2019 09:03:08 +0000 Subject: [issue36670] test suite broken due to cpu usage feature on win 10/ german In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1560070988.63.0.86749478462.issue36670@roundup.psfhosted.org> Change by Lorenz Mende : Removed file: https://bugs.python.org/file48285/win_utils.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 05:23:47 2019 From: report at bugs.python.org (Mark Shannon) Date: Sun, 09 Jun 2019 09:23:47 +0000 Subject: [issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict() Message-ID: <1560072227.25.0.180298594259.issue37207@roundup.psfhosted.org> New submission from Mark Shannon : PEP 590 allows us the short circuit the __new__, __init__ slow path for commonly created builtin types. As an initial step, we can speed up calls to range, list and dict by about 30%. See https://gist.github.com/markshannon/5cef3a74369391f6ef937d52cca9bfc8 ---------- components: Interpreter Core messages: 345077 nosy: Mark.Shannon priority: normal severity: normal status: open title: Use PEP 590 vectorcall to speed up calls to range(), list() and dict() type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 05:38:40 2019 From: report at bugs.python.org (Batuhan) Date: Sun, 09 Jun 2019 09:38:40 +0000 Subject: [issue19666] Format string for ASCII unicode or bytes-like object as readonly buffer In-Reply-To: <1384971256.72.0.0181602551145.issue19666@psf.upfronthosting.co.za> Message-ID: <1560073120.32.0.873058141057.issue19666@roundup.psfhosted.org> Batuhan added the comment: Don't we need to discuss it more before triage it as "patch required"? ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 05:40:27 2019 From: report at bugs.python.org (Mark Shannon) Date: Sun, 09 Jun 2019 09:40:27 +0000 Subject: [issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict() In-Reply-To: <1560072227.25.0.180298594259.issue37207@roundup.psfhosted.org> Message-ID: <1560073227.08.0.692054658573.issue37207@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: +patch pull_requests: +13796 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13930 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 07:04:00 2019 From: report at bugs.python.org (Iceflower) Date: Sun, 09 Jun 2019 11:04:00 +0000 Subject: [issue37208] Weird exception behaviour in ProcessPoolExecutor Message-ID: <1560078240.39.0.310143322777.issue37208@roundup.psfhosted.org> New submission from Iceflower : I don't really know where this belongs, but it is at least for me not an expected behaviour. It is weird for me at all. Please take a look if this is an intended behaviour and why it is like that. Tested with py3.7.3, py3.8.0b1 ``` A process in the process pool was terminated abruptly while the future was running or pending. ``` Tested with py 3.6.8: ``` Exception in thread Thread-1: Traceback (most recent call last): File "C:\Python36\lib\threading.py", line 916, in _bootstrap_inner self.run() File "C:\Python36\lib\threading.py", line 864, in run self._target(*self._args, **self._kwargs) File "C:\Python36\lib\concurrent\futures\process.py", line 272, in _queue_management_worker result_item = reader.recv() File "C:\Python36\lib\multiprocessing\connection.py", line 251, in recv return _ForkingPickler.loads(buf.getbuffer()) TypeError: __init__() missing 1 required positional argument: 'num' ``` I expect that the PoolBreaker exception would work too. Code to test: As attachment. ---------- components: Interpreter Core files: ProcPoolEx-exception.py messages: 345079 nosy: Iceflower priority: normal severity: normal status: open title: Weird exception behaviour in ProcessPoolExecutor type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file48407/ProcPoolEx-exception.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 08:37:19 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 09 Jun 2019 12:37:19 +0000 Subject: [issue36785] Implement PEP 574 In-Reply-To: <1556908101.83.0.107763193732.issue36785@roundup.psfhosted.org> Message-ID: <1560083839.74.0.419925595238.issue36785@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- pull_requests: +13797 pull_request: https://github.com/python/cpython/pull/13931 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 08:38:47 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 09 Jun 2019 12:38:47 +0000 Subject: [issue37209] Add what's new entries for pickle enhancements Message-ID: <1560083927.43.0.0939739725641.issue37209@roundup.psfhosted.org> New submission from Antoine Pitrou : The various pickle enhancements in 3.8 (apart from PEP 574) need to be mentioned in the What's New document (`Doc/whatsnew/3.8.rst`). ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 345080 nosy: docs at python, ogrisel, pierreglaser, pitrou priority: normal severity: normal stage: needs patch status: open title: Add what's new entries for pickle enhancements type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 08:47:20 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sun, 09 Jun 2019 12:47:20 +0000 Subject: [issue36785] Implement PEP 574 In-Reply-To: <1556908101.83.0.107763193732.issue36785@roundup.psfhosted.org> Message-ID: <1560084440.8.0.920252347902.issue36785@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset c879ff247ae1b67a790ff98d2d59145302cd4e4e by ?ukasz Langa (Antoine Pitrou) in branch 'master': bpo-36785: PEP 574 What's New entry (#13931) https://github.com/python/cpython/commit/c879ff247ae1b67a790ff98d2d59145302cd4e4e ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 09:32:30 2019 From: report at bugs.python.org (Chris Withers) Date: Sun, 09 Jun 2019 13:32:30 +0000 Subject: [issue37107] ensurepip --upgrade doesn't change the version of pip used by venv In-Reply-To: <1559283295.29.0.266679199585.issue37107@roundup.psfhosted.org> Message-ID: <1560087150.44.0.771860305996.issue37107@roundup.psfhosted.org> Chris Withers added the comment: I don't suppose there's any chance we can treat the misnaming of these options as the bugs they feel like, so so fix them for 3.7+, rather than having people battle on with the confusion for another 3+ years until 3.9 is mainstream? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 09:36:12 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 09 Jun 2019 13:36:12 +0000 Subject: [issue37206] Incorrect application of Argument Clinic to dict.pop() In-Reply-To: <1560019685.35.0.640301237908.issue37206@roundup.psfhosted.org> Message-ID: <1560087372.68.0.634038124122.issue37206@roundup.psfhosted.org> Raymond Hettinger added the comment: > It is just a signature wrong. Yes, that is the part that needs to be fixed. The information it provides is incorrect. That is why this function wasn't converted long ago. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 11:40:19 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Jun 2019 15:40:19 +0000 Subject: [issue37206] Incorrect application of Argument Clinic to dict.pop() In-Reply-To: <1560019685.35.0.640301237908.issue37206@roundup.psfhosted.org> Message-ID: <1560094819.47.0.582952370061.issue37206@roundup.psfhosted.org> Serhiy Storchaka added the comment: I am working on this issue and almost done. The questions is what inspect.Signature() and inspect.getfullargspec() should do with such functions. 1. Raise an exception as they did in old Python versions and as they do with builtin functions not converted to Argument Clinic. 2. Return a value where a special placeholder is used as a default value for optional parameters which cannot have a default value. In this case there are other questions: what is better name for it (I considered "unspecified" and "unrepresentable") and should it be a single object used for all parameters or a separate object created for every parameter? ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 11:54:17 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 09 Jun 2019 15:54:17 +0000 Subject: [issue35954] Incoherent type conversion in configparser In-Reply-To: <1549801714.53.0.77041525212.issue35954@roundup.psfhosted.org> Message-ID: <1560095657.0.0.763039076319.issue35954@roundup.psfhosted.org> R?mi Lapeyre added the comment: > IMO we should at most clarify in the docs. This makes sense, I will update my PR tomorrow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 12:00:38 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 09 Jun 2019 16:00:38 +0000 Subject: [issue32884] Adding the ability for getpass to print asterisks when passowrd is typed In-Reply-To: <1519122533.37.0.467229070634.issue32884@psf.upfronthosting.co.za> Message-ID: <1560096038.29.0.686433983214.issue32884@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 12:24:48 2019 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 09 Jun 2019 16:24:48 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1560097488.21.0.718986402955.issue37111@roundup.psfhosted.org> Change by Vinay Sajip : ---------- keywords: +patch pull_requests: +13798 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/13932 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 14:31:23 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 09 Jun 2019 18:31:23 +0000 Subject: [issue37208] Weird exception behaviour in ProcessPoolExecutor In-Reply-To: <1560078240.39.0.310143322777.issue37208@roundup.psfhosted.org> Message-ID: <1560105083.49.0.256677463655.issue37208@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +bquinlan, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 15:09:10 2019 From: report at bugs.python.org (Tal Einat) Date: Sun, 09 Jun 2019 19:09:10 +0000 Subject: [issue35922] robotparser crawl_delay and request_rate do not work with no matching entry In-Reply-To: <1549485183.59.0.634497522614.issue35922@roundup.psfhosted.org> Message-ID: <1560107350.76.0.162726188063.issue35922@roundup.psfhosted.org> Change by Tal Einat : ---------- versions: +Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 15:14:00 2019 From: report at bugs.python.org (Anthony Sottile) Date: Sun, 09 Jun 2019 19:14:00 +0000 Subject: [issue36853] inconsistencies in docs builds (Sphinx 2) In-Reply-To: <1557331408.26.0.606381835406.issue36853@roundup.psfhosted.org> Message-ID: <1560107640.25.0.35704531343.issue36853@roundup.psfhosted.org> Change by Anthony Sottile : ---------- keywords: +patch pull_requests: +13799 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13579 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 15:20:49 2019 From: report at bugs.python.org (Anthony Sottile) Date: Sun, 09 Jun 2019 19:20:49 +0000 Subject: [issue36853] inconsistencies in docs builds (Sphinx 2) In-Reply-To: <1557331408.26.0.606381835406.issue36853@roundup.psfhosted.org> Message-ID: <1560108049.61.0.297378185431.issue36853@roundup.psfhosted.org> Change by Anthony Sottile : ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 15:26:39 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Jun 2019 19:26:39 +0000 Subject: [issue37206] Incorrect application of Argument Clinic to dict.pop() In-Reply-To: <1560019685.35.0.640301237908.issue37206@roundup.psfhosted.org> Message-ID: <1560108399.66.0.601705657938.issue37206@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +13800 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13933 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 15:34:32 2019 From: report at bugs.python.org (Bachsau) Date: Sun, 09 Jun 2019 19:34:32 +0000 Subject: [issue34850] Emit a syntax warning for "is" with a literal In-Reply-To: <1538295319.77.0.545547206417.issue34850@psf.upfronthosting.co.za> Message-ID: <1560108872.92.0.852575285165.issue34850@roundup.psfhosted.org> Bachsau added the comment: This is bullshit. SyntaxWarnings should be raised on problems with the *syntax* not for ProgrammerMightBeDumb errors. There are a whole lot of things a programmer not knowing the language could do wrong. But these are syntactically valid expressions and it is not the purpose of a compiler to teach. ---------- nosy: +Bachsau _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 15:49:26 2019 From: report at bugs.python.org (Tal Einat) Date: Sun, 09 Jun 2019 19:49:26 +0000 Subject: [issue26806] IDLE not displaying RecursionError tracebacks and hangs In-Reply-To: <1461105544.08.0.0145590373976.issue26806@psf.upfronthosting.co.za> Message-ID: <1560109766.15.0.933430978438.issue26806@roundup.psfhosted.org> Change by Tal Einat : ---------- components: -Documentation versions: +Python 3.8, Python 3.9 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 15:56:45 2019 From: report at bugs.python.org (Tal Einat) Date: Sun, 09 Jun 2019 19:56:45 +0000 Subject: [issue26806] IDLE not displaying RecursionError tracebacks and hangs In-Reply-To: <1461105544.08.0.0145590373976.issue26806@psf.upfronthosting.co.za> Message-ID: <1560110205.96.0.589345569664.issue26806@roundup.psfhosted.org> Tal Einat added the comment: IMO just updating the documentation would not be enough. I suggest wrapping sys.setrecursionlimit() and *adding* 30 to the given limit, to offset the call stack depth added by IDLE. This makes more sense to me than max(n, 50), which I imagine would cause a lot of confusion in cases where it comes into effect. If that's not acceptable, then I suggest wrapping it to raise an informative exception if the given limit is too low. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 16:23:32 2019 From: report at bugs.python.org (Christian Heimes) Date: Sun, 09 Jun 2019 20:23:32 +0000 Subject: [issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer Message-ID: <1560111812.29.0.301182333638.issue37210@roundup.psfhosted.org> New submission from Christian Heimes : In https://twitter.com/moreati/status/1137815804530049028 Alex Willmer wrote: > In CPython 3.8dev the pure http://pickle.py module now depends on the C _pickle module, but only for one class https://github.com/python/cpython/blob/c879ff247ae1b67a790ff98d2d59145302cd4e4e/Lib/pickle.py#L39 Antoine, would it make sense turn _pickle.PickleBuffer into an optional dependency? The class is only used for pickle 5 as described in PEP 574, https://www.python.org/dev/peps/pep-0574/ ---------- components: Library (Lib) keywords: 3.8regression messages: 345088 nosy: christian.heimes, pitrou priority: normal severity: normal status: open title: Pure Python pickle module should not depend on _pickle.PickleBuffer type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 16:40:44 2019 From: report at bugs.python.org (Alex Willmer) Date: Sun, 09 Jun 2019 20:40:44 +0000 Subject: [issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer In-Reply-To: <1560111812.29.0.301182333638.issue37210@roundup.psfhosted.org> Message-ID: <1560112844.81.0.072747220217.issue37210@roundup.psfhosted.org> Alex Willmer added the comment: I noticed this because I was experimenting with pickle.py from the 3.8 branch to support protocol 5 in https://github.com/moreati/pikl (and later to https://pypi.org/project/zodbpickle/). However I want to make it clear, if CPython maintainers wish to keep the code as it is I will deal with it. Maximizing our convenience, and minimizing your maintenance workload is paramount. ---------- nosy: +Alex.Willmer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 16:43:47 2019 From: report at bugs.python.org (Alex Willmer) Date: Sun, 09 Jun 2019 20:43:47 +0000 Subject: [issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer In-Reply-To: <1560111812.29.0.301182333638.issue37210@roundup.psfhosted.org> Message-ID: <1560113027.06.0.312136060186.issue37210@roundup.psfhosted.org> Alex Willmer added the comment: Arggh, typo. I mean maximizing *your* convenience is paramount. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 16:44:32 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 09 Jun 2019 20:44:32 +0000 Subject: [issue37206] Incorrect application of Argument Clinic to dict.pop() In-Reply-To: <1560019685.35.0.640301237908.issue37206@roundup.psfhosted.org> Message-ID: <1560113072.77.0.00730030679386.issue37206@roundup.psfhosted.org> Raymond Hettinger added the comment: I would think that the best course of action is to revert the dict.pop() check-in for Python3.8, then reapply in 3.9 once a plan is worked out to expand the capabilities of the argument clinic and the expressiveness of signatures. The latter seem more like enhancements that need time to mature rather than putting them in to 3.8b2. There's no real downside to reverting the dict.pop() checkin. It's only effects were to generate an incorrect signature and to make help() misleading. The patch is too extensive for backporting to 3.8 and 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 16:52:21 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 09 Jun 2019 20:52:21 +0000 Subject: [issue37203] Correct classmethod emulation in Descriptor HowTo Guide In-Reply-To: <1559994687.73.0.550711459072.issue37203@roundup.psfhosted.org> Message-ID: <1560113541.73.0.408733630897.issue37203@roundup.psfhosted.org> Raymond Hettinger added the comment: How about taking another look at this after I've finished my more extensive rewrite based on my course materials. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 16:58:53 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 09 Jun 2019 20:58:53 +0000 Subject: [issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer In-Reply-To: <1560111812.29.0.301182333638.issue37210@roundup.psfhosted.org> Message-ID: <1560113933.6.0.568808991342.issue37210@roundup.psfhosted.org> Antoine Pitrou added the comment: Note that PickleBuffer is really a built-in type (it's defined in Objects/picklebufobject.c). However it's exposed from _pickle.c because it doesn't make sense to expose it in the `builtins` module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 17:01:07 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 09 Jun 2019 21:01:07 +0000 Subject: [issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer In-Reply-To: <1560111812.29.0.301182333638.issue37210@roundup.psfhosted.org> Message-ID: <1560114067.72.0.2072738214.issue37210@roundup.psfhosted.org> Antoine Pitrou added the comment: In short I'm not against making PickleBuffer optional but I'm not sure it makes a lot of sense. Would you make memoryview optional because it's written in C? Is anyone annoyed by the fact that something comes from _pickle.c. (note that the pure Python Pickler class *does* work with PickleBuffer; so you don't lose any extensability or customizability by using PickleBuffer) In any case, I won't do the work myself, so feel free to draft a PR so that we see the magnitude of the changes required. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 17:27:25 2019 From: report at bugs.python.org (Alex Willmer) Date: Sun, 09 Jun 2019 21:27:25 +0000 Subject: [issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer In-Reply-To: <1560111812.29.0.301182333638.issue37210@roundup.psfhosted.org> Message-ID: <1560115645.97.0.266262514071.issue37210@roundup.psfhosted.org> Alex Willmer added the comment: Attempting a PR ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 17:43:56 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 09 Jun 2019 21:43:56 +0000 Subject: [issue34850] Emit a syntax warning for "is" with a literal In-Reply-To: <1538295319.77.0.545547206417.issue34850@psf.upfronthosting.co.za> Message-ID: <1560116636.01.0.314844019436.issue34850@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- Removed message: https://bugs.python.org/msg345086 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 17:44:18 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 09 Jun 2019 21:44:18 +0000 Subject: [issue34850] Emit a syntax warning for "is" with a literal In-Reply-To: <1538295319.77.0.545547206417.issue34850@psf.upfronthosting.co.za> Message-ID: <1560116658.79.0.0248456046604.issue34850@roundup.psfhosted.org> Gregory P. Smith added the comment: (message from a code of conduct violating troll deleted) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 18:36:40 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sun, 09 Jun 2019 22:36:40 +0000 Subject: [issue23649] tarfile not re-entrant for multi-threading In-Reply-To: <1426178401.83.0.913984210908.issue23649@psf.upfronthosting.co.za> Message-ID: <1560119800.42.0.540859250723.issue23649@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 20:36:19 2019 From: report at bugs.python.org (Tim Peters) Date: Mon, 10 Jun 2019 00:36:19 +0000 Subject: [issue37211] obmalloc: eliminate limit on pool size Message-ID: <1560126979.94.0.247484308186.issue37211@roundup.psfhosted.org> New submission from Tim Peters : On 64-bit Python, many object sizes essentially doubled over 32-bit Python, because Python objects are so heavy with pointers. More recently, forcing alignment to 16 bytes on 64-bit boxes boosted the memory requirements more modestly. But obmalloc's 256 KiB arenas and 4 KiB pools haven't changed since obmalloc was first written, and its `address_in_range()` machinery cannot deal with pools bigger than that (they're segfault factories, because the machinery relies on that a pool is no larger than a system page). obmalloc's fastest paths are those that stay within a pool. Whenever a pool boundary is hit, it necessarily gets slower, then slower still if an arena boundary is hit. So I propose to: - Remove the 4 KiB pool limit, by making `address_in_range()` page-based rather than pool-based. Pools should be able to span any power-of-2 number of pages. Then a pool for a given size class will be able to hold that many more times as many objects too, and so stay in the fastest paths more often. - On 64-bit boxes, increase both POOL_SIZE and ARENA_SIZE. ---------- components: Interpreter Core messages: 345097 nosy: tim.peters priority: normal severity: normal status: open title: obmalloc: eliminate limit on pool size type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 20:43:42 2019 From: report at bugs.python.org (Tim Peters) Date: Mon, 10 Jun 2019 00:43:42 +0000 Subject: [issue37211] obmalloc: eliminate limit on pool size In-Reply-To: <1560126979.94.0.247484308186.issue37211@roundup.psfhosted.org> Message-ID: <1560127422.76.0.392186342776.issue37211@roundup.psfhosted.org> Change by Tim Peters : ---------- keywords: +patch pull_requests: +13801 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13934 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 21:25:46 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 10 Jun 2019 01:25:46 +0000 Subject: [issue26806] IDLE not displaying RecursionError tracebacks and hangs In-Reply-To: <1461105544.08.0.0145590373976.issue26806@psf.upfronthosting.co.za> Message-ID: <1560129946.45.0.261840023122.issue26806@roundup.psfhosted.org> Terry J. Reedy added the comment: 'max(n, 50)' should have been 'min(n, 50)' Tal, does you comment avove about the former apply when corrected to the latter? Both get... and setrecursionlimit should be wrapped in a function, such as 'wrap_recursionlimits', called from run.main, each decorated with functools.wraps. Both docstrings should be augmented with ... .__doc__ += "\n\nWhen running under IDLE, ..." This is all that is needed for getrecursionlimit. The question is to do with setrecursionlimit. Whatever is chosen should be added to the IDLE doc section mentioned above. Currently, at least on CPython, n must be >= 1 or ValueError is raised. I don't like changing that. I don't have a strong feeling about threshholding versus incrementing, but see my question above. ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 21:32:11 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 10 Jun 2019 01:32:11 +0000 Subject: [issue34850] Emit a syntax warning for "is" with a literal In-Reply-To: <1560116658.79.0.0248456046604.issue34850@roundup.psfhosted.org> Message-ID: <20190610013201.GR4221@ando.pearwood.info> Steven D'Aprano added the comment: > (message from a code of conduct violating troll deleted) How did Bachsau violate the code of conduct, and what evidence do you have that they were anything but 100% sincere in their comments? >From where I am sitting, the only person violating the CoC is you (Gregory) with your hair-trigger accusation of trolling and zero- tolerance removal of a critical message. Your behaviour fails the CoC on all three points: it is not open, considerate or respectful. It is not open to criticism: in #msg333923 Gregory wrote "let's see if anyone complains during the betas" but the first complaint gets censored without one word acknowledging the substance of the complaint. Think about the message that sends about our openess to criticism. Its not considerate: Bachsau took the time to comment about something they clearly feel very strongly about, even if only 30 seconds, and your response was to delete their comments with only a vague hand-wavy claim of a CoC violation. You didn't bother to explain what the claimed violation was. Even if the violation was clear in your head, it is not considerate of others who may not have that clarity of thought you do. How is Bachsau supposed to learn what to avoid doing in the future? Backsau attacked the feature. Instead of assuming good faith until proven otherwise, you (Gregory) assumed bad faith from the first post, and attacked the *person*, labelling them a troll on zero evidence. Being called a troll is not a small thing: it is an accusation that the poster is an insincere, dishonest, lying troublemaker. That's not respectful. Accusations of trolling should only be made on the basis of a pattern of behaviour, not because you don't like the poster's comment or disapprove of how they say it. Tone policing ("its not what you said, its how you said it") is an act of oppression and a derailing tactic. The stakes here may not be high (it's just a syntax warning!) but being passionate about Python is a good thing. Vigourous and passionate disagreement with a feature is not trolling. It is not a violate the CoC to use strong language or to disagree with a feature. I don't believe anything in Bachsau's post violated the CoC. But I am sure that your heavy-handed act did. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 21:48:56 2019 From: report at bugs.python.org (Dima Tisnek) Date: Mon, 10 Jun 2019 01:48:56 +0000 Subject: [issue37172] Odd error awaiting a Future In-Reply-To: <1559816999.36.0.898434753785.issue37172@roundup.psfhosted.org> Message-ID: <1560131336.2.0.0164219241116.issue37172@roundup.psfhosted.org> Dima Tisnek added the comment: Hi Terry, Yes, I have a specific suggestion: The error `RuntimeError: await wasn't used with future` is misleading. I'm not sure if changing error text is enough. I think that Future.__await__ should be fixed; I think that `await f` should be idempotent, that the same exception should be raised in single and double await examples. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 21:50:38 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 10 Jun 2019 01:50:38 +0000 Subject: [issue34850] Emit a syntax warning for "is" with a literal In-Reply-To: <1538295319.77.0.545547206417.issue34850@psf.upfronthosting.co.za> Message-ID: <1560131438.04.0.204124413371.issue34850@roundup.psfhosted.org> Terry J. Reedy added the comment: "This is bullshit." struck me as jarring and rude. I will stop there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 21:51:01 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 10 Jun 2019 01:51:01 +0000 Subject: [issue34850] Emit a syntax warning for "is" with a literal In-Reply-To: <1538295319.77.0.545547206417.issue34850@psf.upfronthosting.co.za> Message-ID: <1560131461.14.0.489284207292.issue34850@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: -terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 21:54:44 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 10 Jun 2019 01:54:44 +0000 Subject: [issue37172] Odd error awaiting a Future In-Reply-To: <1559816999.36.0.898434753785.issue37172@roundup.psfhosted.org> Message-ID: <1560131684.38.0.943009507994.issue37172@roundup.psfhosted.org> Terry J. Reedy added the comment: OK. I am quitting here because asyncio and futures are outside my expertise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 21:54:54 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 10 Jun 2019 01:54:54 +0000 Subject: [issue37172] Odd error awaiting a Future In-Reply-To: <1559816999.36.0.898434753785.issue37172@roundup.psfhosted.org> Message-ID: <1560131694.57.0.323362479135.issue37172@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: -terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 22:02:15 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 10 Jun 2019 02:02:15 +0000 Subject: [issue34850] Emit a syntax warning for "is" with a literal In-Reply-To: <1560108872.92.0.852575285165.issue34850@roundup.psfhosted.org> Message-ID: <20190610020209.GS4221@ando.pearwood.info> Steven D'Aprano added the comment: Bachsau, to respond to the substance of your comments: it is not the *primary* purpose of a compiler to teach, but compiler warnings on potentially wrong behaviour is a long-standing tradition in many languages, including Python. This is not the first such warning in Python: it has warned on incorrect assertions for a few releases now: py> assert (flag, "error") :1: SyntaxWarning: assertion is always true, perhaps remove parentheses? Ideally a language should have no warts, gotchas or features which are easy to misuse, but in practice that's not the case. Identity testing in Python is, unfortunately, one of those features which are easy to misuse, and it has real consequences. If you go back to the very first post in the discussion which launched this feature, Gregory points out that PyPy had to change their behaviour to work around so many bugs in Python code from people wrongly using identity tests over equality. https://discuss.python.org/t/demoting-the-is-operator-to-avoid-an-identity-crisis/86 As the Zen says, "practicality beats purity" and this is a low-impact change with no runtime cost that we expect will nevertheless help catch many logical errors. Apart from your aesthetic sense that the compiler shouldn't try to educate users into using correct code rather than wrong code that works by accident, do you have any objections to this feature? Evidence of code that breaks because of this change is especially valuable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 9 22:07:14 2019 From: report at bugs.python.org (Inada Naoki) Date: Mon, 10 Jun 2019 02:07:14 +0000 Subject: [issue37206] Incorrect application of Argument Clinic to dict.pop() In-Reply-To: <1560019685.35.0.640301237908.issue37206@roundup.psfhosted.org> Message-ID: <1560132434.92.0.469768314108.issue37206@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +13803 pull_request: https://github.com/python/cpython/pull/13935 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 00:15:11 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jun 2019 04:15:11 +0000 Subject: [issue37206] Incorrect application of Argument Clinic to dict.pop() In-Reply-To: <1560019685.35.0.640301237908.issue37206@roundup.psfhosted.org> Message-ID: <1560140111.08.0.651305069798.issue37206@roundup.psfhosted.org> Serhiy Storchaka added the comment: PR 13933 implements the first option. It fixes similar issues with other functions so it should be backported to 3.7. The second option is considered as a new feature and can go only in 3.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 00:18:00 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jun 2019 04:18:00 +0000 Subject: [issue32884] Adding the ability for getpass to print asterisks when password is typed In-Reply-To: <1519122533.37.0.467229070634.issue32884@psf.upfronthosting.co.za> Message-ID: <1560140280.32.0.0510305959993.issue32884@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- title: Adding the ability for getpass to print asterisks when passowrd is typed -> Adding the ability for getpass to print asterisks when password is typed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 00:25:22 2019 From: report at bugs.python.org (Tim Peters) Date: Mon, 10 Jun 2019 04:25:22 +0000 Subject: [issue37211] obmalloc: eliminate limit on pool size In-Reply-To: <1560126979.94.0.247484308186.issue37211@roundup.psfhosted.org> Message-ID: <1560140722.83.0.369941151555.issue37211@roundup.psfhosted.org> Change by Tim Peters : ---------- assignee: -> tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 00:28:14 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jun 2019 04:28:14 +0000 Subject: [issue34850] Emit a syntax warning for "is" with a literal In-Reply-To: <1538295319.77.0.545547206417.issue34850@psf.upfronthosting.co.za> Message-ID: <1560140894.86.0.711037309299.issue34850@roundup.psfhosted.org> Serhiy Storchaka added the comment: > Should this also produce warnings for `list` / `dict` / `set` literals? No, because these cases are useless expressions, but they are not hidden bugs. The result is always False and does not rely on the implementation. > SyntaxWarnings should be raised on problems with the *syntax* not for ProgrammerMightBeDumb errors. There are a whole lot of things a programmer not knowing the language could do wrong. But these are syntactically valid expressions and it is not the purpose of a compiler to teach. SyntaxErrors should be raised on problems with the syntax. SyntaxWarnings *can* be raised for the syntax which is valid but is definitely a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 01:32:24 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 10 Jun 2019 05:32:24 +0000 Subject: [issue34850] Emit a syntax warning for "is" with a literal In-Reply-To: <1538295319.77.0.545547206417.issue34850@psf.upfronthosting.co.za> Message-ID: <1560144744.05.0.33550093864.issue34850@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- nosy: -gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 03:53:37 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 10 Jun 2019 07:53:37 +0000 Subject: [issue37212] ordered keyword arguments in unittest.mock.call repr and error messages Message-ID: <1560153217.35.0.990763770677.issue37212@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : With PEP 468 implemented in Python 3.6 the order of keyword arguments are preserved. In mock.call the arguments are sorted [0]. This makes the output different from the expectation that order should be same as the one passed. This was implemented in issue21256 where ordered kwargs was suggested but I guess it was not implemented and hence sort was used for deterministic output. The PEP also links to the discussion where ordered kwargs was discussed [1] in 2009 before ordered dict implementation. Given that keyword argument dictionary is now deterministic is it okay to drop sorting in 3.9? This is backwards incompatible with 3.8 where code might have depended upon the sorted output so if this requires a python-dev discussion I would be happy to start one. # (b=1, a=2) is the actual call but "actual" in error message is noted as (a=2, b=1) >>> from unittest.mock import call, Mock >>> call(b=1, a=2) call(a=2, b=1) >>> m = Mock() >>> m(b=1, a=2) >>> m.assert_called_with(c=3) Traceback (most recent call last): File "", line 1, in File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", line 870, in assert_called_with raise AssertionError(_error_message()) from cause AssertionError: expected call not found. Expected: mock(c=3) Actual: mock(a=2, b=1) # With proposed change removing sorting >>> from unittest.mock import call, Mock >>> call(b=1, a=2) call(b=1, a=2) >>> m = Mock() >>> m(b=1, a=2) >>> m.assert_called_with(c=3) Traceback (most recent call last): File "", line 1, in File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", line 870, in assert_called_with raise AssertionError(_error_message()) from cause AssertionError: expected call not found. Expected: mock(c=3) Actual: mock(b=1, a=2) [0] https://github.com/python/cpython/blob/c879ff247ae1b67a790ff98d2d59145302cd4e4e/Lib/unittest/mock.py#L2284 [1] https://mail.python.org/pipermail/python-ideas/2009-April/004163.html ---------- components: Library (Lib) messages: 345106 nosy: cjw296, mariocj89, michael.foord, xtreak priority: normal severity: normal status: open title: ordered keyword arguments in unittest.mock.call repr and error messages type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 04:01:11 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jun 2019 08:01:11 +0000 Subject: [issue37074] os.stat() does not work for NUL and CON In-Reply-To: <1559029061.14.0.328684807212.issue37074@roundup.psfhosted.org> Message-ID: <1560153671.1.0.586072282285.issue37074@roundup.psfhosted.org> Serhiy Storchaka added the comment: Do you mind to create a PR Eryk? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 04:02:04 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jun 2019 08:02:04 +0000 Subject: [issue36548] Make the repr of re flags more readable In-Reply-To: <1554632881.49.0.427945168441.issue36548@roundup.psfhosted.org> Message-ID: <1560153724.01.0.993619868344.issue36548@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 04:24:23 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jun 2019 08:24:23 +0000 Subject: [issue37213] Peeephole optimizer does not optimize functions with multiline expressions Message-ID: <1560155063.44.0.426038128869.issue37213@roundup.psfhosted.org> New submission from Serhiy Storchaka : The optimization is skipped if lnotab contains 255. It was very uncommon in older versions (only when the function contains very large expressions, larger than hundreds of lines or bytecode instructions), but in 3.8 this situation is common. For example: [x for x in a if x] 1 0 BUILD_LIST 0 2 LOAD_FAST 0 (.0) >> 4 FOR_ITER 12 (to 18) 2 6 STORE_FAST 1 (x) 8 LOAD_FAST 1 (x) 10 POP_JUMP_IF_FALSE 16 1 12 LOAD_FAST 1 (x) 14 LIST_APPEND 2 >> 16 JUMP_ABSOLUTE 4 >> 18 RETURN_VALUE if x: if (y and z): foo() else: bar() 1 0 LOAD_NAME 0 (x) 2 POP_JUMP_IF_FALSE 20 2 4 LOAD_NAME 1 (y) 6 POP_JUMP_IF_FALSE 18 3 8 LOAD_NAME 2 (z) 2 10 POP_JUMP_IF_FALSE 18 4 12 LOAD_NAME 3 (foo) 14 CALL_FUNCTION 0 16 POP_TOP >> 18 JUMP_FORWARD 6 (to 26) 6 >> 20 LOAD_NAME 4 (bar) 22 CALL_FUNCTION 0 24 POP_TOP >> 26 LOAD_CONST 0 (None) 28 RETURN_VALUE You can see non-optimized jumps to jumps (from 10 to 16 and from 6 and 10 to 16 correspondingly). This is a consequence of two features: ability to encode negative line differences in lnotab and setting lines for both outer and inner expressions. Two ways to solve this issue: 1. Move optimizations from Python/peephole.c to Python/compile.c (see issue32477 and issue33318). This is a new feature and it is too late for 3.8. 2. Make the peepholer to work with lnotab containing 255. Pablo, are you interesting? ---------- components: Interpreter Core messages: 345108 nosy: benjamin.peterson, pablogsal, serhiy.storchaka, vstinner, yselivanov priority: normal severity: normal status: open title: Peeephole optimizer does not optimize functions with multiline expressions type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 04:32:36 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jun 2019 08:32:36 +0000 Subject: [issue32477] Move jumps optimization from the peepholer to the compiler In-Reply-To: <1514844207.77.0.467229070634.issue32477@psf.upfronthosting.co.za> Message-ID: <1560155556.67.0.468190295841.issue32477@roundup.psfhosted.org> Serhiy Storchaka added the comment: Opened issue37213 for the regression in the peepholer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 04:32:54 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jun 2019 08:32:54 +0000 Subject: [issue37213] Peeephole optimizer does not optimize functions with multiline expressions In-Reply-To: <1560155063.44.0.426038128869.issue37213@roundup.psfhosted.org> Message-ID: <1560155574.2.0.102238599388.issue37213@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +3.8regression _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 05:00:04 2019 From: report at bugs.python.org (=?utf-8?b?0JDQu9C10LrRgdC10Lkg0JrQvtGB0YLRi9GA0LjQvQ==?=) Date: Mon, 10 Jun 2019 09:00:04 +0000 Subject: [issue29717] `loop.add_reader` and `< Message-ID: <1560157204.17.0.800616719746.issue29717@roundup.psfhosted.org> ??????? ???????? added the comment: Checked latest master (c879ff247ae1b67a790ff98d2d59145302cd4e4e), 3.8 - 3.5 branches - can not reproduce. OS - macOS ---------- nosy: +??????? ???????? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 05:37:25 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 10 Jun 2019 09:37:25 +0000 Subject: [issue37172] Odd error awaiting a Future In-Reply-To: <1559816999.36.0.898434753785.issue37172@roundup.psfhosted.org> Message-ID: <1560159445.21.0.688477007924.issue37172@roundup.psfhosted.org> Andrew Svetlov added the comment: Not sure what "idempotency fix" means in the context of Future objects. Could you describe desired behavior or, even better, provide a pull request that demonstrates your desire? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 05:42:11 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 10 Jun 2019 09:42:11 +0000 Subject: [issue29717] `loop.add_reader` and `< Message-ID: <1560159731.24.0.0821395080539.issue29717@roundup.psfhosted.org> Andrew Svetlov added the comment: If fd is a regular file it is not supported well by all select/poll/epoll. Registration may succeed but the data is marked as "already ready for reading". Not sure if we should do anything. The situation may be changed after eventual providing asyncio API for files (there is no actual work for it yet). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 05:44:19 2019 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 10 Jun 2019 09:44:19 +0000 Subject: [issue37107] ensurepip --upgrade doesn't change the version of pip used by venv In-Reply-To: <1559283295.29.0.266679199585.issue37107@roundup.psfhosted.org> Message-ID: <1560159859.24.0.0219017486081.issue37107@roundup.psfhosted.org> Petr Viktorin added the comment: Please don't forget that it is possible to use venv without PyPI. With my Fedora hat on: as a distro, we don't trust PyPI as a package delivery infrastructure. Lots of users do, and we allow the users to easily but explicitly opt in to trusting it by running "pip install". (In the same way, we don't trust rubygems, npm, CPAN, hackage, etc. -- there are too many, and PyPI is not special.) Changing venv's existing `--upgrade` option to start installing from PyPI is problematic. We'd probably need to patch it out, creating an inconsistency between the distro and upstream: it would not do what `python3 -m pip install --upgrade pip` does. ISTM, the proposed semantics aren't consistent: "venv --upgrade" would not match what "pip --upgrade" does: it would do what "pip install --upgrade pip" does. The latter needs an extra argument, explicitly saying *what* to upgrade. Making "pip" implicit makes sense for "ensurepip", but not for "venv". Also, in my view, "network" should not be used as a synonym for PyPI (outside pip). Could we instead make `venv --upgrade` print out a warning, saying that it upgrades Python, and to upgrade pip you should `python -m pip install --upgrade pip` instead? --- > Unless you're using a Linux distro Python that has been patched > to inject the external pip installation with rewheel or dirtbike, > getting a venv that uses the externally updated version of pip > requires running > `python3 - m venv --system-site-packages --without-pip ...`. FWIW, "rewheel" is no more: Fedora now distributes the wheels themselves, and patches system ensurepip to look in /usr/share/python-wheels/. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 05:57:54 2019 From: report at bugs.python.org (Dima Tisnek) Date: Mon, 10 Jun 2019 09:57:54 +0000 Subject: [issue37172] Odd error awaiting a Future In-Reply-To: <1559816999.36.0.898434753785.issue37172@roundup.psfhosted.org> Message-ID: <1560160674.49.0.767700756794.issue37172@roundup.psfhosted.org> Dima Tisnek added the comment: I think that if a Future is abused, the following two should return *same* error: async def test(): await asyncio.gather(reader(), writer()) -vs- async def test(): await asyncio.gather(reader(), reader(), writer()) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 06:00:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 10:00:52 +0000 Subject: [issue36742] CVE-2019-10160: urlsplit NFKD normalization vulnerability in user:password@ In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1560160852.72.0.202704478152.issue36742@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13804 pull_request: https://github.com/python/cpython/pull/13937 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 06:05:04 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 10 Jun 2019 10:05:04 +0000 Subject: [issue37172] Odd error awaiting a Future In-Reply-To: <1559816999.36.0.898434753785.issue37172@roundup.psfhosted.org> Message-ID: <1560161104.76.0.814566566954.issue37172@roundup.psfhosted.org> Andrew Svetlov added the comment: Agree, it would be fine. So the behavior is not changed but the error text should be clear, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 06:12:29 2019 From: report at bugs.python.org (Riccardo Schirone) Date: Mon, 10 Jun 2019 10:12:29 +0000 Subject: [issue36742] CVE-2019-10160: urlsplit NFKD normalization vulnerability in user:password@ In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1560161549.9.0.00285261427466.issue36742@roundup.psfhosted.org> Riccardo Schirone added the comment: > CVE-2019-10160 has been assigned by Red Hat to this flaw. For clarity, CVE-2019-10160 has been assigned to the bug introduced with the fix for the functional regression mentioned in this bug, and not to the bug itself explained in the first comment. See https://bugzilla.redhat.com/show_bug.cgi?id=1718388 for more details about it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 06:12:40 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 10 Jun 2019 10:12:40 +0000 Subject: [issue37213] Peeephole optimizer does not optimize functions with multiline expressions In-Reply-To: <1560155063.44.0.426038128869.issue37213@roundup.psfhosted.org> Message-ID: <1560161560.77.0.191455340681.issue37213@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thank you very much, Serhiy! I am interested, I will try to look at the problem and try to get a PR soon. What of the two possible solutions that you mention you think is better? I assume if we make the peephole optimizer work with lnotab containing 255 we could backport to 3.8 as a bugfix, right? ---------- assignee: -> pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 06:18:40 2019 From: report at bugs.python.org (Dima Tisnek) Date: Mon, 10 Jun 2019 10:18:40 +0000 Subject: [issue37172] Odd error awaiting a Future In-Reply-To: <1559816999.36.0.898434753785.issue37172@roundup.psfhosted.org> Message-ID: <1560161920.19.0.348015716212.issue37172@roundup.psfhosted.org> Dima Tisnek added the comment: Yes, I think that would be sufficient! I don't know about implementation though, as there's some magic in the way Future.__await__ tries to guess how it was called. I hope one day that magic could go away, but I neither understand the origin nor the mechanics of it, so... My gut tells me that fixing the error involves digging into that magic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 06:31:43 2019 From: report at bugs.python.org (shafiq sahil) Date: Mon, 10 Jun 2019 10:31:43 +0000 Subject: [issue37151] Calling code cleanup after PEP 590 In-Reply-To: <1559659244.35.0.514840211553.issue37151@roundup.psfhosted.org> Message-ID: <1560162703.72.0.770737969134.issue37151@roundup.psfhosted.org> shafiq sahil added the comment: http://www.mobile-phone.pk/search/ ---------- nosy: +shafiq sahil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 06:39:04 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Jun 2019 10:39:04 +0000 Subject: [issue37213] Peeephole optimizer does not optimize functions with multiline expressions In-Reply-To: <1560155063.44.0.426038128869.issue37213@roundup.psfhosted.org> Message-ID: <1560163144.51.0.125777897059.issue37213@roundup.psfhosted.org> Serhiy Storchaka added the comment: Yes, we should backport the fix to 3.8. There is a bug in 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 06:39:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 10:39:37 +0000 Subject: [issue37214] Add new EncodingWarning warning category: emitted when the locale encoding is used implicitly Message-ID: <1560163177.73.0.639513289421.issue37214@roundup.psfhosted.org> New submission from STINNER Victor : Spin-off of INADA-san's PEP 597: I propose to emit a new EncodingWarning warning when the locale encoding is used implicitly. I propose to add a new warning to be able to control how they are handled: either make them hard error (python3.9 -W error::EncodingWarning) or ignore them (python3.9 -W ignore::EncodingWarning). Displaying these warnings by default or not is an open question discussed in PEP 597 discussion: https://discuss.python.org/t/pep-597-use-utf-8-for-default-text-file-encoding/1819 I propose to only emit a warning which can be turned off easily to not bother people who don't care of encodings. There are many legit cases where a Python application works well in a control environment whereas it would break on any other environment, but the application is only used in one specific environment. For example, an application may only be run in a container which has a well defined locale and locale encoding, but will never be run on Windows, macOS, FreeBSD or HP-UX. Writing portable code is *great*. But I'm not sure that *all* code must be portable. For example, it's also fine to use Python to write applications specific to Linux, again, for code only run in a controlled environment. Many companies have private projects which will never run outside their "walls" (outside their datacenters ;-)). ---------- components: Library (Lib) messages: 345121 nosy: vstinner priority: normal severity: normal status: open title: Add new EncodingWarning warning category: emitted when the locale encoding is used implicitly type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 06:47:15 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 10:47:15 +0000 Subject: [issue37214] Add new EncodingWarning warning category: emitted when the locale encoding is used implicitly In-Reply-To: <1560163177.73.0.639513289421.issue37214@roundup.psfhosted.org> Message-ID: <1560163635.42.0.389104244409.issue37214@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13805 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13938 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 06:49:15 2019 From: report at bugs.python.org (Alexey Kostyrin) Date: Mon, 10 Jun 2019 10:49:15 +0000 Subject: [issue36221] Setting PYTHONASYNCIODEBUG breaks warnings In-Reply-To: <1551941918.68.0.578445039903.issue36221@roundup.psfhosted.org> Message-ID: <1560163755.39.0.6507774484.issue36221@roundup.psfhosted.org> Alexey Kostyrin added the comment: Can not reproduce - warning is displayed with PYTHONASYNCIODEBUG=1 Python version: Python 3.8.0b1+ (heads/3.8:3f7629d93c, Jun 10 2019, 13:46:55) [Clang 10.0.0 (clang-1000.10.44.4)] on darwin ---------- nosy: +def_bk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 06:49:33 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 10 Jun 2019 10:49:33 +0000 Subject: [issue37151] Calling code cleanup after PEP 590 In-Reply-To: <1559659244.35.0.514840211553.issue37151@roundup.psfhosted.org> Message-ID: <1560163773.82.0.431232554959.issue37151@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- Removed message: https://bugs.python.org/msg345119 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 07:12:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 11:12:25 +0000 Subject: [issue37214] Add new EncodingWarning warning category: emitted when the locale encoding is used implicitly In-Reply-To: <1560163177.73.0.639513289421.issue37214@roundup.psfhosted.org> Message-ID: <1560165145.61.0.401899983978.issue37214@roundup.psfhosted.org> STINNER Victor added the comment: Building Python (make) with PR 13938 emits 7 EncodingWarning warnings: $ PYTHONWARNINGS=always::EncodingWarning make /home/vstinner/prog/python/master/Lib/sysconfig.py:228: EncodingWarning: encoding=None with open(filename, errors="surrogateescape") as f: /home/vstinner/prog/python/master/Lib/sysconfig.py:371: EncodingWarning: encoding=None with open(config_h) as f: ./setup.py:559: EncodingWarning: encoding=None with open(tmpfile) as fp: ./setup.py:691: EncodingWarning: encoding=None with open(config_h) as file: ./setup.py:893: EncodingWarning: encoding=None with open(tmpfile) as fp: ./setup.py:1369: EncodingWarning: encoding=None with open(f) as file: ./setup.py:1496: EncodingWarning: encoding=None with open(zlib_h) as fp: The test suite cannot be run if EncodingWarning are treated as error, an exception fails before running the first test: $ PYTHONWARNINGS=error::EncodingWarning ./python -W error::EncodingWarning -m test -j0 -r ... File "/home/vstinner/prog/python/master/Lib/test/libregrtest/main.py", line 427, in display_header print("==", platform.platform(aliased=True), ... File "/home/vstinner/prog/python/master/Lib/platform.py", line 613, in _syscmd_uname output = subprocess.check_output(('uname', option), ... File "/home/vstinner/prog/python/master/Lib/subprocess.py", line 821, in __init__ self.stdout = io.TextIOWrapper(self.stdout, EncodingWarning: encoding=None To be able to run the test suite, I turned off the warning in subprocess.Popen using this change: diff --git a/Lib/subprocess.py b/Lib/subprocess.py index d34c57828b..d89911cc32 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -749,6 +749,9 @@ class Popen(object): self.stderr = None self.pid = None self.returncode = None + if not encoding: + import locale + encoding = locale.getpreferredencoding(False) self.encoding = encoding self.errors = errors Using PR 13938 and subprocess.Popen change, at least 136 tests are failing. I have to interrupt the test suite since 7 tests hang: $ PYTHONWARNINGS=error::EncodingWarning ./python -W error::EncodingWarning -m test -j0 -r ... 7 tests omitted: test_cmd_line_script test_concurrent_futures test_httpservers test_multiprocessing_fork test_multiprocessing_spawn test_ssl test_subprocess 258 tests OK. 136 tests failed: test___all__ test__xxsubinterpreters test_argparse test_asyncio test_atexit test_base64 test_baseexception test_bdb test_bool test_builtin test_bz2 test_calendar test_capi test_cgi test_cgitb test_cmath test_cmd_line test_compile test_compileall test_complex test_configparser test_contextlib test_coroutines test_cprofile test_csv test_ctypes test_dbm test_dbm_dumb test_decimal test_defaultdict test_deque test_difflib test_distutils test_doctest test_eintr test_email test_embed test_eof test_exceptions test_faulthandler test_file test_file_eintr test_filecmp test_fileinput test_float test_gc test_gdb test_gzip test_hash test_http_cookiejar test_httplib test_idle test_imp test_import test_importlib test_inspect test_io test_iter test_json test_lib2to3 test_linecache test_list test_lltrace test_logging test_lzma test_mailbox test_mailcap test_math test_module test_modulefinder test_multiprocessing_forkserver test_multiprocessing_main_handling test_netrc test_ntpath test_opcodes test_os test_parser test_pathlib test_pdb test_pickle test_pipes test_pkg test_pkgimport test_pkgutil test_platform test_poll test_popen test_posix test_posixpath test_profile test_py_compile test_pydoc test_quopri test_random test_readline test_regrtest test_repl test_runpy test_sax test_script_helper test_select test_set test_shutil test_signal test_site test_socket test_source_encoding test_stat test_support test_symbol test_sys test_sysconfig test_tabnanny test_tarfile test_tcl test_tempfile test_threading test_tools test_trace test_traceback test_tracemalloc test_turtle test_unicodedata test_unittest test_univnewlines test_userlist test_utf8_mode test_venv test_warnings test_weakref test_webbrowser test_xml_etree test_xml_etree_c test_zipfile test_zipimport test_zipimport_support For example, if EncodingWarning is treated as an error, test_cmd_line_script.test_repl_stderr_flush() hangs: $ PYTHONWARNINGS=error::EncodingWarning ./python -W error::EncodingWarning -m test -v test_cmd_line_script -m test_repl_stderr_flush ... 0:00:00 load avg: 0.83 [1/1] test_cmd_line_script test_repl_stderr_flush (test.test_cmd_line_script.CmdLineTest) ... I would like to believe that Python code base is sane in general and that we handle encodings properly (I spent a significant amount of time to ensure that it's the case ;-)). So even if Python itself emits so many warnings, I don't think that it would be a good idea to introduce this warning and make it an hard error (exception) in Python 3.9. I even don't think that such warning must be displayed by default. As DeprecationWarning, it's more a notice that should only be displayed to developers. Users don't control the code and so cannot fix the warning just by tuning their locale or locale encoding. I don't see the point of flooding users with such warnings just to be pedantic. As I wrote, they are many legit cases for encoding=None. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 07:28:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 11:28:11 +0000 Subject: [issue37214] Add new EncodingWarning warning category: emitted when the locale encoding is used implicitly In-Reply-To: <1560163177.73.0.639513289421.issue37214@roundup.psfhosted.org> Message-ID: <1560166091.5.0.474149864781.issue37214@roundup.psfhosted.org> STINNER Victor added the comment: Another test: try to build a venv to get pip: Building a venv is ok. Good, our stdlib is not so bad :-) $ PYTHONWARNINGS=error::EncodingWarning ./python -W error::EncodingWarning -m venv --without-pip env But ensurepip fails soon: $ PYTHONWARNINGS=error::EncodingWarning ./env/bin/python -W error::EncodingWarning -m ensurepip --verbose /tmp/tmpyxn9yklq/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/pyparsing.py:3068: SyntaxWarning: invalid escape sequence \w /tmp/tmpyxn9yklq/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/pyparsing.py:3068: SyntaxWarning: invalid escape sequence \w /tmp/tmpyxn9yklq/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/html5lib/_trie/_base.py:3: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working Exception: Traceback (most recent call last): File "/tmp/tmpyxn9yklq/pip-19.0.3-py2.py3-none-any.whl/pip/_internal/cli/base_command.py", line 179, in main status = self.run(options, args) File "/tmp/tmpyxn9yklq/pip-19.0.3-py2.py3-none-any.whl/pip/_internal/commands/install.py", line 255, in run with self._build_session(options) as session: File "/tmp/tmpyxn9yklq/pip-19.0.3-py2.py3-none-any.whl/pip/_internal/cli/base_command.py", line 87, in _build_session session = PipSession( File "/tmp/tmpyxn9yklq/pip-19.0.3-py2.py3-none-any.whl/pip/_internal/download.py", line 344, in __init__ self.headers["User-Agent"] = user_agent() File "/tmp/tmpyxn9yklq/pip-19.0.3-py2.py3-none-any.whl/pip/_internal/download.py", line 108, in user_agent zip(["name", "version", "id"], distro.linux_distribution()), File "/tmp/tmpyxn9yklq/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/distro.py", line 120, in linux_distribution return _distro.linux_distribution(full_distribution_name) File "/tmp/tmpyxn9yklq/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/distro.py", line 674, in linux_distribution self.name() if full_distribution_name else self.id(), File "/tmp/tmpyxn9yklq/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/distro.py", line 712, in name name = self.os_release_attr('name') \ File "/tmp/tmpyxn9yklq/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/distro.py", line 883, in os_release_attr return self._os_release_info.get(attribute, '') File "/tmp/tmpyxn9yklq/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/distro.py", line 550, in __get__ ret = obj.__dict__[self._fname] = self._f(obj) File "/tmp/tmpyxn9yklq/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/distro.py", line 921, in _os_release_info with open(self.os_release_file) as release_file: EncodingWarning: encoding=None Note: an "up to date" pip still emits many SyntaxWarning and DeprecationWarning warnings :-( New attempt using "always" action: $ PYTHONWARNINGS=always::EncodingWarning ./env/bin/python -W always::EncodingWarning -m ensurepip --verbose /tmp/tmpc309fubz/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/pyparsing.py:3068: SyntaxWarning: invalid escape sequence \w /tmp/tmpc309fubz/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/pyparsing.py:3068: SyntaxWarning: invalid escape sequence \w /tmp/tmpc309fubz/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/html5lib/_trie/_base.py:3: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working /tmp/tmpc309fubz/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/distro.py:921: EncodingWarning: encoding=None /tmp/tmpc309fubz/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/distro.py:995: EncodingWarning: encoding=None /tmp/tmpc309fubz/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/distro.py:1131: EncodingWarning: encoding=None /tmp/tmpc309fubz/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/distro.py:1030: EncodingWarning: encoding=None /home/vstinner/prog/python/master/Lib/subprocess.py:824: EncodingWarning: encoding=None self.stdout = io.TextIOWrapper(self.stdout, Ignoring indexes: https://pypi.org/simple Created temporary directory: /tmp/pip-ephem-wheel-cache-2hizyo3q Created temporary directory: /tmp/pip-req-tracker-kb535zvl Created requirements tracker '/tmp/pip-req-tracker-kb535zvl' Created temporary directory: /tmp/pip-install-_z_c4ze9 Looking in links: /tmp/tmpc309fubz Collecting setuptools 0 location(s) to search for versions of setuptools: Skipping link /tmp/tmpc309fubz (from -f); not a file Skipping link file:///tmp/tmpc309fubz/pip-19.0.3-py2.py3-none-any.whl; wrong project name (not setuptools) Found link file:///tmp/tmpc309fubz/setuptools-40.8.0-py2.py3-none-any.whl, version: 40.8.0 Local files found: /tmp/tmpc309fubz/setuptools-40.8.0-py2.py3-none-any.whl Using version 40.8.0 (newest of versions: 40.8.0) /tmp/tmpc309fubz/pip-19.0.3-py2.py3-none-any.whl/pip/_internal/req/req_tracker.py:60: EncodingWarning: encoding=None Added setuptools from file:///tmp/tmpc309fubz/setuptools-40.8.0-py2.py3-none-any.whl to build tracker '/tmp/pip-req-tracker-kb535zvl' Removed setuptools from file:///tmp/tmpc309fubz/setuptools-40.8.0-py2.py3-none-any.whl from build tracker '/tmp/pip-req-tracker-kb535zvl' Collecting pip 0 location(s) to search for versions of pip: Found link file:///tmp/tmpc309fubz/pip-19.0.3-py2.py3-none-any.whl, version: 19.0.3 Skipping link file:///tmp/tmpc309fubz/setuptools-40.8.0-py2.py3-none-any.whl; wrong project name (not pip) Local files found: /tmp/tmpc309fubz/pip-19.0.3-py2.py3-none-any.whl Using version 19.0.3 (newest of versions: 19.0.3) /tmp/tmpc309fubz/pip-19.0.3-py2.py3-none-any.whl/pip/_internal/req/req_tracker.py:60: EncodingWarning: encoding=None Added pip from file:///tmp/tmpc309fubz/pip-19.0.3-py2.py3-none-any.whl to build tracker '/tmp/pip-req-tracker-kb535zvl' Removed pip from file:///tmp/tmpc309fubz/pip-19.0.3-py2.py3-none-any.whl from build tracker '/tmp/pip-req-tracker-kb535zvl' Installing collected packages: setuptools, pip /tmp/tmpc309fubz/pip-19.0.3-py2.py3-none-any.whl/pip/_internal/wheel.py:140: EncodingWarning: encoding=None /tmp/tmpc309fubz/pip-19.0.3-py2.py3-none-any.whl/pip/_internal/wheel.py:157: EncodingWarning: encoding=None changing mode of /home/vstinner/prog/python/master/env/bin/easy_install-3.9 to 775 /tmp/tmpc309fubz/pip-19.0.3-py2.py3-none-any.whl/pip/_internal/wheel.py:95: EncodingWarning: encoding=None /tmp/tmpc309fubz/pip-19.0.3-py2.py3-none-any.whl/pip/_internal/wheel.py:95: EncodingWarning: encoding=None /tmp/tmpc309fubz/pip-19.0.3-py2.py3-none-any.whl/pip/_internal/wheel.py:140: EncodingWarning: encoding=None /tmp/tmpc309fubz/pip-19.0.3-py2.py3-none-any.whl/pip/_internal/wheel.py:157: EncodingWarning: encoding=None changing mode of /home/vstinner/prog/python/master/env/bin/pip3 to 775 changing mode of /home/vstinner/prog/python/master/env/bin/pip3.9 to 775 /tmp/tmpc309fubz/pip-19.0.3-py2.py3-none-any.whl/pip/_internal/wheel.py:95: EncodingWarning: encoding=None /tmp/tmpc309fubz/pip-19.0.3-py2.py3-none-any.whl/pip/_internal/wheel.py:95: EncodingWarning: encoding=None Successfully installed pip-19.0.3 setuptools-40.8.0 Cleaning up... Removed build tracker '/tmp/pip-req-tracker-kb535zvl' Hum, there are *a lot* of EncodingWarning warnings :-/ Trying to use pip fails with the same distro error: $ PYTHONWARNINGS=error::EncodingWarning ./env/bin/python -W error::EncodingWarning -m pip install requests ... File "/home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_vendor/distro.py", line 921, in _os_release_info with open(self.os_release_file) as release_file: EncodingWarning: encoding=None Installing requests using pip emits even more EncodingWarning warnings in many functions of pip, but also in distro and msgpack dependencies: $ PYTHONWARNINGS=always::EncodingWarning ./env/bin/python -W always::EncodingWarning -m pip install requests /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_vendor/html5lib/_trie/_base.py:3: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working from collections import Mapping /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_vendor/distro.py:921: EncodingWarning: encoding=None with open(self.os_release_file) as release_file: /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_vendor/distro.py:995: EncodingWarning: encoding=None with open(os.devnull, 'w') as devnull: /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_vendor/distro.py:1131: EncodingWarning: encoding=None with open(filepath) as fp: /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_vendor/distro.py:1030: EncodingWarning: encoding=None with open(os.devnull, 'w') as devnull: /home/vstinner/prog/python/master/Lib/subprocess.py:824: EncodingWarning: encoding=None self.stdout = io.TextIOWrapper(self.stdout, Collecting requests /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_vendor/msgpack/fallback.py:220: PendingDeprecationWarning: encoding is deprecated, Use raw=False instead. warnings.warn( Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/req/req_tracker.py:60: EncodingWarning: encoding=None with open(entry_path, 'w') as fp: Collecting certifi>=2017.4.17 (from requests) Using cached https://files.pythonhosted.org/packages/60/75/f692a584e85b7eaba0e03827b3d51f45f571c2e793dd731e598828d380aa/certifi-2019.3.9-py2.py3-none-any.whl /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/req/req_tracker.py:60: EncodingWarning: encoding=None with open(entry_path, 'w') as fp: Collecting chardet<3.1.0,>=3.0.2 (from requests) Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/req/req_tracker.py:60: EncodingWarning: encoding=None with open(entry_path, 'w') as fp: Collecting idna<2.9,>=2.5 (from requests) Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/req/req_tracker.py:60: EncodingWarning: encoding=None with open(entry_path, 'w') as fp: Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests) Using cached https://files.pythonhosted.org/packages/e6/60/247f23a7121ae632d62811ba7f273d0e58972d75e58a94d329d51550a47d/urllib3-1.25.3-py2.py3-none-any.whl /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/req/req_tracker.py:60: EncodingWarning: encoding=None with open(entry_path, 'w') as fp: Installing collected packages: certifi, chardet, idna, urllib3, requests /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/wheel.py:140: EncodingWarning: encoding=None with open(os.path.join(wheeldir, item, 'WHEEL')) as wheel: /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/wheel.py:95: EncodingWarning: encoding=None return open(name, mode + bin, **nl) /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/wheel.py:95: EncodingWarning: encoding=None return open(name, mode + bin, **nl) /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/wheel.py:140: EncodingWarning: encoding=None with open(os.path.join(wheeldir, item, 'WHEEL')) as wheel: /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/wheel.py:157: EncodingWarning: encoding=None with open(filename) as fp: /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/wheel.py:95: EncodingWarning: encoding=None return open(name, mode + bin, **nl) /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/wheel.py:95: EncodingWarning: encoding=None return open(name, mode + bin, **nl) /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/wheel.py:140: EncodingWarning: encoding=None with open(os.path.join(wheeldir, item, 'WHEEL')) as wheel: /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/wheel.py:95: EncodingWarning: encoding=None return open(name, mode + bin, **nl) /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/wheel.py:95: EncodingWarning: encoding=None return open(name, mode + bin, **nl) /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/wheel.py:140: EncodingWarning: encoding=None with open(os.path.join(wheeldir, item, 'WHEEL')) as wheel: /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/wheel.py:95: EncodingWarning: encoding=None return open(name, mode + bin, **nl) /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/wheel.py:95: EncodingWarning: encoding=None return open(name, mode + bin, **nl) /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/wheel.py:140: EncodingWarning: encoding=None with open(os.path.join(wheeldir, item, 'WHEEL')) as wheel: /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/wheel.py:95: EncodingWarning: encoding=None return open(name, mode + bin, **nl) /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/wheel.py:95: EncodingWarning: encoding=None return open(name, mode + bin, **nl) Successfully installed certifi-2019.3.9 chardet-3.0.4 idna-2.8 requests-2.22.0 urllib3-1.25.3 /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/utils/outdated.py:40: EncodingWarning: encoding=None with open(self.statefile_path) as statefile: /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_vendor/msgpack/fallback.py:220: PendingDeprecationWarning: encoding is deprecated, Use raw=False instead. warnings.warn( /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/utils/outdated.py:64: EncodingWarning: encoding=None with open(self.statefile_path) as statefile: /home/vstinner/prog/python/master/env/lib/python3.9/site-packages/pip/_internal/utils/outdated.py:74: EncodingWarning: encoding=None with open(self.statefile_path, "w") as statefile: You are using pip version 19.0.3, however version 19.1.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 07:28:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 11:28:45 +0000 Subject: [issue37214] Add new EncodingWarning warning category: emitted when the locale encoding is used implicitly In-Reply-To: <1560163177.73.0.639513289421.issue37214@roundup.psfhosted.org> Message-ID: <1560166125.56.0.19543869048.issue37214@roundup.psfhosted.org> STINNER Victor added the comment: My subprocess patch was wrong: you must use attached subprocess.patch. ---------- Added file: https://bugs.python.org/file48408/subprocess.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 07:48:23 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 10 Jun 2019 11:48:23 +0000 Subject: [issue34677] Event scheduler page example In-Reply-To: <1536927469.93.0.956365154283.issue34677@psf.upfronthosting.co.za> Message-ID: <1560167303.92.0.400210621975.issue34677@roundup.psfhosted.org> Cheryl Sabella added the comment: Thank you for the report. As others have said, the actual time.time() value for the two `s.enter` events is different even though the `delay` value of 5 seems like it should be the same. As @xtreak pointed out, the example is clever in showing that using `enter` instead of `enterabs` can make the queue behave in unexpected ways. Closing as 'not a bug'. ---------- nosy: +cheryl.sabella resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 08:30:26 2019 From: report at bugs.python.org (Andrei Zene) Date: Mon, 10 Jun 2019 12:30:26 +0000 Subject: [issue28708] Low FD_SETSIZE limit on Windows In-Reply-To: <1479250358.07.0.768722440644.issue28708@psf.upfronthosting.co.za> Message-ID: <1560169826.14.0.00627691287503.issue28708@roundup.psfhosted.org> Andrei Zene added the comment: I have updated PR 13842(https://github.com/python/cpython/pull/13842) to dynamically alocate the fd_sets on windows. I did some testing on windows with the following two paterns: 1. 10000 transient clients: (open connection, send message, close connection) 2. 1024 permanent clients: (open connection, then in infinite loop: (read message, send message back)) Everything seemed to be fine. I didn't do any testing on Linux. On windows I also had to remove the if that vstinner added to check if the greatest file descriptor is greater than the setsize. That condition always failed for me on Windows. Apparently, according to: https://docs.microsoft.com/en-us/windows/desktop/api/winsock2/nf-winsock2-select, windows ignores nfds and "is included only for compatibility with Berkeley sockets." The documentation also states that the FD_ "macros are compatible with those used in the Berkeley software, but the underlying representation is completely different.", and: "Internally, socket handles in an fd_set structure are not represented as bit flags as in Berkeley Unix. Their data representation is opaque." This is why I chose to determine setsize based on the inputs. If you think that's not going to work, please say why :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 09:22:54 2019 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 10 Jun 2019 13:22:54 +0000 Subject: [issue37215] Build with dtrace is broken on some systems Message-ID: <1560172974.02.0.554258836838.issue37215@roundup.psfhosted.org> New submission from Jakub Kulik : After the integration of https://bugs.python.org/issue36842, build with dtrace is broken on systems where files that reference DTrace probes need to be modified in-place by dtrace (e.g., Solaris). The reason for that is that Python/sysmodule.o, which newly contains some dtrace references, was not added to DTRACE_DEPS. ---------- components: Build messages: 345128 nosy: kulikjak priority: normal severity: normal status: open title: Build with dtrace is broken on some systems versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 09:29:33 2019 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 10 Jun 2019 13:29:33 +0000 Subject: [issue37215] Build with dtrace is broken on some systems In-Reply-To: <1560172974.02.0.554258836838.issue37215@roundup.psfhosted.org> Message-ID: <1560173373.52.0.893837299459.issue37215@roundup.psfhosted.org> Change by Jakub Kulik : ---------- keywords: +patch pull_requests: +13806 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13939 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 09:33:55 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 10 Jun 2019 13:33:55 +0000 Subject: [issue36842] Implement PEP 578 In-Reply-To: <1557262112.79.0.0300199683807.issue36842@roundup.psfhosted.org> Message-ID: <1560173635.44.0.463673413816.issue36842@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +13808 pull_request: https://github.com/python/cpython/pull/13940 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 09:33:55 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 10 Jun 2019 13:33:55 +0000 Subject: [issue37215] Build with dtrace is broken on some systems In-Reply-To: <1560172974.02.0.554258836838.issue37215@roundup.psfhosted.org> Message-ID: <1560173635.36.0.512301889777.issue37215@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +13807 pull_request: https://github.com/python/cpython/pull/13940 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 09:38:14 2019 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 10 Jun 2019 13:38:14 +0000 Subject: [issue36742] CVE-2019-10160: urlsplit NFKD normalization vulnerability in user:password@ In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1560173894.53.0.290619351773.issue36742@roundup.psfhosted.org> Change by Charalampos Stratakis : ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 09:51:32 2019 From: report at bugs.python.org (N.P. Khelili) Date: Mon, 10 Jun 2019 13:51:32 +0000 Subject: [issue37130] pathlib does not handle '..' directory In-Reply-To: <1559438292.33.0.601764456145.issue37130@roundup.psfhosted.org> Message-ID: <1560174692.19.0.0784997690576.issue37130@roundup.psfhosted.org> N.P. Khelili added the comment: First, there is no real special case about the '.' path. The parse_args() method simlply removes then during __new__() (around line 80) as they are not needed. Double dots having to be kept, are later considered valid by the name @property. In test_pathlib.py, '..' are just ignored in a lot of tests. In my previous post, I pointed the bahaviour of .stem and .parent. But we should also consider the question of .anchor. The doc says that it should return the """The concatenation of the drive and root, or ''.""" but the code is: anchor = self._drv + self._root return anchor leading to: >>> Path('.').anchor '' >>> Path('..').anchor '' and: >>> Path('foo').anchor '' when one would probably expect '.', './..' and './foo'. I also found: >>> Path('*').match('.') Traceback (most recent call last): File "", line 1, in File "/home/nono/BUILD/cpython/Lib/pathlib.py", line 956, in match raise ValueError("empty pattern") ValueError: empty pattern >>> Path('*').match('..') False While the behaviour of .stem (cf up msg 344770) dates from initial commit of test_pathlib, maybe breaking it may be a bad idea... ( I really don't know.) I have a working code that sets name to '' for '..' and adds a special case in .stem() so that we do not remove any line in test_pathlib, but only adds some. I think anyway, it is too soon for any pull request. Questions are: - Should .name allways return a string, even if empty? - Should P('..').parent really return '.'? - Is it ok that .match() make that much difference between '.' and '..'? - Am I correct in my expectations about .anchor ? - May .stem behaviour be changed ? ---------- title: pathlib.with_name() doesn't like unnamed files. -> pathlib does not handle '..' directory _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 10:54:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 14:54:06 +0000 Subject: [issue36842] Implement PEP 578 In-Reply-To: <1557262112.79.0.0300199683807.issue36842@roundup.psfhosted.org> Message-ID: <1560178446.24.0.691208562723.issue36842@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 10:55:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 14:55:28 +0000 Subject: [issue34850] Emit a syntax warning for "is" with a literal In-Reply-To: <1538295319.77.0.545547206417.issue34850@psf.upfronthosting.co.za> Message-ID: <1560178528.67.0.336911803514.issue34850@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 10:55:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 14:55:43 +0000 Subject: [issue23649] tarfile not re-entrant for multi-threading In-Reply-To: <1426178401.83.0.913984210908.issue23649@psf.upfronthosting.co.za> Message-ID: <1560178543.59.0.318568539503.issue23649@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 11:19:56 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 10 Jun 2019 15:19:56 +0000 Subject: [issue36842] Implement PEP 578 In-Reply-To: <1557262112.79.0.0300199683807.issue36842@roundup.psfhosted.org> Message-ID: <1560179996.48.0.631612789446.issue36842@roundup.psfhosted.org> miss-islington added the comment: New changeset 8a8b59c9794674b50b2242698c29038034f4864c by Miss Islington (bot) (Christian Heimes) in branch 'master': bpo-37215: Fix dtrace issue introduce by bpo-36842 (GH-13940) https://github.com/python/cpython/commit/8a8b59c9794674b50b2242698c29038034f4864c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 11:19:56 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 10 Jun 2019 15:19:56 +0000 Subject: [issue37215] Build with dtrace is broken on some systems In-Reply-To: <1560172974.02.0.554258836838.issue37215@roundup.psfhosted.org> Message-ID: <1560179996.43.0.972040988198.issue37215@roundup.psfhosted.org> miss-islington added the comment: New changeset 8a8b59c9794674b50b2242698c29038034f4864c by Miss Islington (bot) (Christian Heimes) in branch 'master': bpo-37215: Fix dtrace issue introduce by bpo-36842 (GH-13940) https://github.com/python/cpython/commit/8a8b59c9794674b50b2242698c29038034f4864c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 11:20:13 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 10 Jun 2019 15:20:13 +0000 Subject: [issue37215] Build with dtrace is broken on some systems In-Reply-To: <1560172974.02.0.554258836838.issue37215@roundup.psfhosted.org> Message-ID: <1560180013.21.0.32202399356.issue37215@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13809 pull_request: https://github.com/python/cpython/pull/13942 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 11:20:13 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 10 Jun 2019 15:20:13 +0000 Subject: [issue36842] Implement PEP 578 In-Reply-To: <1557262112.79.0.0300199683807.issue36842@roundup.psfhosted.org> Message-ID: <1560180013.26.0.800606336367.issue36842@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13810 pull_request: https://github.com/python/cpython/pull/13942 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 11:38:31 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 10 Jun 2019 15:38:31 +0000 Subject: [issue37215] Build with dtrace is broken on some systems In-Reply-To: <1560172974.02.0.554258836838.issue37215@roundup.psfhosted.org> Message-ID: <1560181111.72.0.484802291108.issue37215@roundup.psfhosted.org> miss-islington added the comment: New changeset bac6e63fd63960a1ab862befab42de05d32667c2 by Miss Islington (bot) in branch '3.8': bpo-37215: Fix dtrace issue introduce by bpo-36842 (GH-13940) https://github.com/python/cpython/commit/bac6e63fd63960a1ab862befab42de05d32667c2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 11:38:31 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 10 Jun 2019 15:38:31 +0000 Subject: [issue36842] Implement PEP 578 In-Reply-To: <1557262112.79.0.0300199683807.issue36842@roundup.psfhosted.org> Message-ID: <1560181111.77.0.257344232593.issue36842@roundup.psfhosted.org> miss-islington added the comment: New changeset bac6e63fd63960a1ab862befab42de05d32667c2 by Miss Islington (bot) in branch '3.8': bpo-37215: Fix dtrace issue introduce by bpo-36842 (GH-13940) https://github.com/python/cpython/commit/bac6e63fd63960a1ab862befab42de05d32667c2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 11:40:22 2019 From: report at bugs.python.org (makdon) Date: Mon, 10 Jun 2019 15:40:22 +0000 Subject: [issue37216] mac installation document wrong for python 3.7.3 Message-ID: <1560181222.28.0.0831029476518.issue37216@roundup.psfhosted.org> New submission from makdon : According the mail in docs mailing list, there's a typo in python installation document on Macos. I will check it and create a PR if necessary. The email says: https://docs.python.org/3/using/mac.html#getting-and-installing-macpython says "What you get after installing is a number of things: A MacPython 3.6 folder in your Applications folder." However, after installing just now $ /usr/local/bin/python3 -V Python 3.7.3 I instead found a folder called /Applications/Python 3.7 ---------- assignee: docs at python components: Documentation messages: 345134 nosy: docs at python, makdon priority: normal severity: normal status: open title: mac installation document wrong for python 3.7.3 versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 11:44:04 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 10 Jun 2019 15:44:04 +0000 Subject: [issue37216] mac installation document wrong for python 3.7.3 In-Reply-To: <1560181222.28.0.0831029476518.issue37216@roundup.psfhosted.org> Message-ID: <1560181444.4.0.861303723832.issue37216@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Relevant email : https://mail.python.org/pipermail/docs/2019-June/041030.html ---------- components: +macOS nosy: +ned.deily, ronaldoussoren, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 13:19:22 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 10 Jun 2019 17:19:22 +0000 Subject: [issue34850] Emit a syntax warning for "is" with a literal In-Reply-To: <1538295319.77.0.545547206417.issue34850@psf.upfronthosting.co.za> Message-ID: <1560187162.67.0.088611590068.issue34850@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 13:23:32 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 10 Jun 2019 17:23:32 +0000 Subject: [issue37107] ensurepip --upgrade doesn't change the version of pip used by venv In-Reply-To: <1559283295.29.0.266679199585.issue37107@roundup.psfhosted.org> Message-ID: <1560187412.46.0.153688935126.issue37107@roundup.psfhosted.org> Steve Dower added the comment: I'm with Petr here. ensurepip/venv should only go as far as we support, which is the version of the wheels included in our bundle. We should continue having the stdlib pretend that PyPI doesn't exist. External network access would justify the longer option, in my opinion: "--upgrade-pip-from-pypi" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 13:23:42 2019 From: report at bugs.python.org (Tal Einat) Date: Mon, 10 Jun 2019 17:23:42 +0000 Subject: [issue26806] IDLE not displaying RecursionError tracebacks and hangs In-Reply-To: <1461105544.08.0.0145590373976.issue26806@psf.upfronthosting.co.za> Message-ID: <1560187422.76.0.968075753784.issue26806@roundup.psfhosted.org> Tal Einat added the comment: > 'max(n, 50)' should have been 'min(n, 50)' Tal, does you comment avove about the former apply when corrected to the latter? Yes. To use your terms, I prefer incrementing over thresholding. > This is all that is needed for getrecursionlimit. If we go with incrementing, then getrecursionlimit should likely decrement the returned value by the same amount, so that setrecursionlimit(getrecursionlimit()) doesn't change the recursion limit. > Currently, at least on CPython, n must be >= 1 or ValueError is raised. I don't like changing that. This is another issue that incrementing avoids. Since it looks like we're in general agreement, Terry, I'll work up a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 13:48:58 2019 From: report at bugs.python.org (Tal Einat) Date: Mon, 10 Jun 2019 17:48:58 +0000 Subject: [issue26806] IDLE not displaying RecursionError tracebacks and hangs In-Reply-To: <1461105544.08.0.0145590373976.issue26806@psf.upfronthosting.co.za> Message-ID: <1560188938.72.0.0201965415275.issue26806@roundup.psfhosted.org> Tal Einat added the comment: Setting the recursion limit too low also causes issues in a plain Python interactive session. With current master (to be 3.9) on Win10, I get issues with values up to 6. In IDLE values up to 20 cause an immediate exception similar to the one described by Serhiy. Anyways, I think we should increment by 25, to always set "safe" values. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 14:49:58 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 10 Jun 2019 18:49:58 +0000 Subject: [issue37130] pathlib does not handle '..' directory In-Reply-To: <1559438292.33.0.601764456145.issue37130@roundup.psfhosted.org> Message-ID: <1560192598.99.0.00038972082295.issue37130@roundup.psfhosted.org> Change by Brett Cannon : ---------- assignee: -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 15:15:51 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 10 Jun 2019 19:15:51 +0000 Subject: [issue37206] Incorrect application of Argument Clinic to dict.pop() In-Reply-To: <1560019685.35.0.640301237908.issue37206@roundup.psfhosted.org> Message-ID: <1560194151.91.0.945041917245.issue37206@roundup.psfhosted.org> Ned Deily added the comment: As I noted on the PR: "I'm not going to get into whether this PR is appropriate for 3.8 but, assuming it were, I would be very concerned about making a change of this size and complexity in 3.7 at this stage in its lifecycle." ---------- nosy: +lukasz.langa, ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 15:51:00 2019 From: report at bugs.python.org (Tal Einat) Date: Mon, 10 Jun 2019 19:51:00 +0000 Subject: [issue26806] IDLE not displaying RecursionError tracebacks and hangs In-Reply-To: <1461105544.08.0.0145590373976.issue26806@psf.upfronthosting.co.za> Message-ID: <1560196260.42.0.804769983345.issue26806@roundup.psfhosted.org> Change by Tal Einat : ---------- keywords: +patch pull_requests: +13811 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13944 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 16:03:59 2019 From: report at bugs.python.org (kmille) Date: Mon, 10 Jun 2019 20:03:59 +0000 Subject: [issue37217] SSL socket segfaults during a connect() using a punycode domain containg a umlaut Message-ID: <1560197039.5.0.767955558559.issue37217@roundup.psfhosted.org> New submission from kmille : Hey, chs at gw-sss-nb8:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.4 LTS Release: 16.04 Codename: xenial chs at gw-sss-nb8:~$ python3 --version Python 3.5.2 chs at gw-sss-nb8:~$ cat segfault.py import ssl import socket hostname = "www.xn--b.buchhandlunggr?nden.de" ctx = ssl.create_default_context() s = ctx.wrap_socket(socket.socket(), server_hostname=hostname) s.check_hostname = True try: s.connect((hostname, 443)) except UnicodeError as incorrect_punycode: pass chs at gw-sss-nb8:~$ python3 segfault.py Segmentation fault The problem does not occur if I remove the ? in www.xn--b.buchhandlunggr?nden.de On my Arch the DNS fails (above the name doesn't resolve too but I seems like it doesn't matter): kmille at linbox timetracking master % python3 omg.py Traceback (most recent call last): File "omg.py", line 10, in s.connect((hostname, 443)) File "/usr/lib/python3.7/ssl.py", line 1150, in connect self._real_connect(addr, False) File "/usr/lib/python3.7/ssl.py", line 1137, in _real_connect super().connect(addr) socket.gaierror: [Errno -2] Name or service not known kmille at linbox timetracking master % python3 --version Python 3.7.3 If you need further help please ask. Thank you for python <3 kmille ---------- components: ctypes messages: 345140 nosy: kmille priority: normal severity: normal status: open title: SSL socket segfaults during a connect() using a punycode domain containg a umlaut versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 16:26:08 2019 From: report at bugs.python.org (Tal Einat) Date: Mon, 10 Jun 2019 20:26:08 +0000 Subject: [issue26806] IDLE not displaying RecursionError tracebacks and hangs In-Reply-To: <1461105544.08.0.0145590373976.issue26806@psf.upfronthosting.co.za> Message-ID: <1560198368.65.0.564859090846.issue26806@roundup.psfhosted.org> Tal Einat added the comment: See PR GH-13944. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 16:38:54 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 10 Jun 2019 20:38:54 +0000 Subject: [issue26806] IDLE not displaying RecursionError tracebacks and hangs In-Reply-To: <1461105544.08.0.0145590373976.issue26806@psf.upfronthosting.co.za> Message-ID: <1560199134.35.0.129898127181.issue26806@roundup.psfhosted.org> Terry J. Reedy added the comment: [Initially written before you posted the PR] Serhiy's result suggests that 25 might not always be enough and he suggested 50. Plus IDLE sometimes makes more calls internally. Lets go with at least 30. I agree that "get...(set...(n)) == n" (when n is positive, a check we should emulate) and "set...(get...())" leaving limit as it was are desirable. The docs and docstrings just need to say what we do. Possible additions. "This IDLE wrapper adds 30 to prevent possible uninterruptible loops." "This IDLE wrapper subtracts 30 to compensate for the 30 IDLE adds when setting the limit." The main reason I can think of for users to play with low recursion limits is to explore the implementation. They simply cannot get stock CPython behavior when running with IDLE. So I want the IDLE wrappers to not be completely transparent. For that to be obvious in calltips, the first line should say so. The main reason I want to intervene is to prevent the not-nice behavior of hanging until a manual restart. I checked, and it is still possible. In 3.8.0b1, the min n is not 1 but current stack + 5. >>> sys.setrecursionlimit(11) Traceback (most recent call last): File "", line 1, in sys.setrecursionlimit(11) RecursionError: cannot set the recursion limit to 11 at the recursion depth 6: the limit is too low Our increment will prevent a user from seeing this, but this is necessary to prevent ... >>> sys.setrecursionlimit(12) # hangs, once after printing "Exception ignored in thread started by" # until manual restart. # 18 hangs after printing 60 lines of a double exception. # 20 does not hang and calling 'f' from the original message # gets a truncated traceback ending with [Previous line repeated 12 more times] ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 16:42:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 20:42:50 +0000 Subject: [issue13889] str(float) and round(float) issues with FPU precision In-Reply-To: <1327676303.66.0.487112802864.issue13889@psf.upfronthosting.co.za> Message-ID: <1560199370.57.0.321176016701.issue13889@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13812 pull_request: https://github.com/python/cpython/pull/13946 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 16:45:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 20:45:58 +0000 Subject: [issue36402] test_threading: test_threads_join_2() failed with "Fatal Python error: Py_EndInterpreter: not the last thread" on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1560199558.91.0.809301920873.issue36402@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13813 pull_request: https://github.com/python/cpython/pull/13946 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 16:59:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 20:59:51 +0000 Subject: [issue36402] test_threading: test_threads_join_2() failed with "Fatal Python error: Py_EndInterpreter: not the last thread" on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1560200391.81.0.920640613625.issue36402@roundup.psfhosted.org> STINNER Victor added the comment: Oh. Using PR 13889, I'm able to reproduce the bug up to Python 3.4. Example at commit commit e76cbc781044ee01b059f3702c580e66266b84c5 (tag: v3.4.10): $ wget 'https://github.com/python/cpython/pull/13889.patch' $ git apply 13889.patch $ ./python -m test -F -m test_threads_join_2 test_threading [ 1] test_threading [ 2] test_threading (...) [ 10] test_threading [ 11] test_threading Fatal Python error: Py_EndInterpreter: not the last thread Current thread 0x00007f418b3280c0 (most recent call first): File "/home/vstinner/prog/python/3.4/Lib/test/support/__init__.py", line 2304 in run_in_subinterp File "/home/vstinner/prog/python/3.4/Lib/test/test_threading.py", line 877 in test_threads_join_2 (...) Aborted (core dumped) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 17:02:15 2019 From: report at bugs.python.org (Alex Willmer) Date: Mon, 10 Jun 2019 21:02:15 +0000 Subject: [issue37218] Default hmac.new() digestmod has not been removed from documentation Message-ID: <1560200535.68.0.253007657272.issue37218@roundup.psfhosted.org> New submission from Alex Willmer : Until Python 3.8 hmc.new() defaulted the digestmod argument to 'hmac-md5'. This was deperecated, to be removed in Python 3.8. In Python 3.8.0b1 it is gone, e.g. Python 3.8.0b1 (default, Jun 6 2019, 03:44:52) [GCC 7.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import hmac >>> hmac.new(b'qwertyuiop').name Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.8/hmac.py", line 146, in new return HMAC(key, msg, digestmod) File "/usr/lib/python3.8/hmac.py", line 49, in __init__ raise ValueError('`digestmod` is required.') ValueError: `digestmod` is required. but the deprecation note, and the documented signature haven't been updated. PR incoming ---------- assignee: docs at python components: Documentation messages: 345144 nosy: Alex.Willmer, docs at python priority: normal severity: normal status: open title: Default hmac.new() digestmod has not been removed from documentation versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 17:20:37 2019 From: report at bugs.python.org (Alex Willmer) Date: Mon, 10 Jun 2019 21:20:37 +0000 Subject: [issue37218] Default hmac.new() digestmod has not been removed from documentation In-Reply-To: <1560200535.68.0.253007657272.issue37218@roundup.psfhosted.org> Message-ID: <1560201637.45.0.769722893883.issue37218@roundup.psfhosted.org> Alex Willmer added the comment: Scratch the part about documented signature, it's still `hmac.new(... digestmod=None)`, the check happens in the body of the function ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 17:23:12 2019 From: report at bugs.python.org (Lisa Roach) Date: Mon, 10 Jun 2019 21:23:12 +0000 Subject: [issue24412] setUpClass equivalent for addCleanup In-Reply-To: <1433788299.35.0.440062273493.issue24412@psf.upfronthosting.co.za> Message-ID: <1560201792.34.0.204292212258.issue24412@roundup.psfhosted.org> Change by Lisa Roach : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 17:46:07 2019 From: report at bugs.python.org (Alex Willmer) Date: Mon, 10 Jun 2019 21:46:07 +0000 Subject: [issue37218] Default hmac.new() digestmod has not been removed from documentation In-Reply-To: <1560200535.68.0.253007657272.issue37218@roundup.psfhosted.org> Message-ID: <1560203167.76.0.950777730782.issue37218@roundup.psfhosted.org> Change by Alex Willmer : ---------- keywords: +patch pull_requests: +13814 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13947 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 17:57:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 21:57:27 +0000 Subject: [issue36402] test_threading: test_threads_join_2() failed with "Fatal Python error: Py_EndInterpreter: not the last thread" on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1560203847.28.0.493356604945.issue36402@roundup.psfhosted.org> STINNER Victor added the comment: threading._shutdown() uses threading.enumerate() which iterations on threading._active. threading.Thread registers itself into threading._active using its _bootstrap_inner() method. It unregisters itself when _bootstrap_inner() completes, whereas its is_alive() method still returns true: since the underlying native thread still runs and the Python thread state still exists. _thread._set_sentinel() creates a lock and registers a tstate->on_delete callback to release this lock. It's called by threading.Thread._set_tstate_lock() to set threading.Thread._tstate_lock. This lock is used by threading.Thread.join() to wait until the thread completes. _thread.start_new_thread() calls the C function t_bootstrap() which ends with: tstate->interp->num_threads--; PyThreadState_Clear(tstate); PyThreadState_DeleteCurrent(); PyThread_exit_thread(); _PyThreadState_DeleteCurrent() calls tstate->on_delete() which releases threading.Thread._tstate_lock lock. In test_threads_join_2() test, PyThreadState_Clear() blocks on clearing thread variables: the Sleeper destructor of the Sleeper instance sleeps. The race condition is that: * threading._shutdown() rely on threading._alive * Py_EndInterpreter() rely on the interpreter linked list of Python thread states: interp->tstate_head. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 18:01:36 2019 From: report at bugs.python.org (Anthony Sottile) Date: Mon, 10 Jun 2019 22:01:36 +0000 Subject: [issue37219] empty set difference does not check types of values Message-ID: <1560204096.52.0.24651391919.issue37219@roundup.psfhosted.org> New submission from Anthony Sottile : This is a regression from python2.x behaviour: $ python2 Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15) [GCC 7.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> x = set() >>> x.difference(123) Traceback (most recent call last): File "", line 1, in TypeError: 'int' object is not iterable $ python3.8 Python 3.8.0b1 (default, Jun 6 2019, 03:44:52) [GCC 7.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> x = set() >>> x.difference(123) set() The regression appears to be introduced in this patch: 4103e4dfbce https://github.com/python/cpython/commit/4103e4dfbce ---------- components: Library (Lib) messages: 345147 nosy: Anthony Sottile, rhettinger priority: normal severity: normal status: open title: empty set difference does not check types of values versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 18:33:32 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 10 Jun 2019 22:33:32 +0000 Subject: [issue36905] test_typing.GetTypeHintTests.test_get_type_hints_modules_forwardref unexpected success while running whole test suite sequentially In-Reply-To: <1557762722.1.0.805190875774.issue36905@roundup.psfhosted.org> Message-ID: <1560206012.51.0.943423920787.issue36905@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Unexpected success of test_get_type_hints_modules_forwardref in test_typing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 18:39:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 22:39:36 +0000 Subject: [issue36402] test_threading: test_threads_join_2() failed with "Fatal Python error: Py_EndInterpreter: not the last thread" on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1560206376.07.0.888465689277.issue36402@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13816 pull_request: https://github.com/python/cpython/pull/13948 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 18:49:49 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 10 Jun 2019 22:49:49 +0000 Subject: [issue37220] test_idle crash on Windows when run with -R: Message-ID: <1560206989.94.0.836960275888.issue37220@roundup.psfhosted.org> New submission from Zachary Ware : See for example https://buildbot.python.org/all/#/builders/33/builds/613 This build ended when I logged into the machine and clicked the "Close the program" button on the "python_d.exe crashed" dialog box. Here's the details from that dialog: Problem signature: Problem Event Name: APPCRASH Application Name: python_d.exe Application Version: 0.0.0.0 Application Timestamp: 5cfe5fd5 Fault Module Name: tk85g.dll Fault Module Version: 8.5.2.19 Fault Module Timestamp: 5bf46c38 Exception Code: c0000005 Exception Offset: 000000000002ef7f OS Version: 6.3.9600.2.0.0.256.27 Locale ID: 1033 Additional Information 1: 0d70 Additional Information 2: 0d701a26b222a63773c5247c2c1f6fa1 Additional Information 3: 044d Additional Information 4: 044dd28b2ab7dea188c1da19a590076d Bisection shows that the issue showed up with 1b57ab5c6478b93cf4150bd8c475022252776598 in bpo-37177. ---------- assignee: terry.reedy components: IDLE, Windows keywords: buildbot messages: 345148 nosy: paul.moore, steve.dower, taleinat, terry.reedy, tim.golden, zach.ware priority: normal severity: normal stage: test needed status: open title: test_idle crash on Windows when run with -R: versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 18:52:15 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 22:52:15 +0000 Subject: [issue36402] test_threading: test_threads_join_2() failed with "Fatal Python error: Py_EndInterpreter: not the last thread" on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1560207135.96.0.22521810743.issue36402@roundup.psfhosted.org> STINNER Victor added the comment: Other references to test_threads_join_2() failures: * bpo-36989: fails once AIX * bpo-27791: 2 failures in 2016 in "AMD64 FreeBSD 10 Shared 3.x" buildbots (I closed the issue with: "Sadly, such bug is hard to reproduce. I didn't look at buildbots recently, and I don't have access to FreeBSD, so I just close the issue :-/") * bpo-28084: once failure on "AMD64 FreeBSD 9.x 3.x" buildbot (closed as a duplicate of bpo-27791) See also bpo-18808: "Thread.join returns before PyThreadState is destroyed" (issue which added the test). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 19:04:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 23:04:33 +0000 Subject: [issue36402] test_threading: test_threads_join_2() failed with "Fatal Python error: Py_EndInterpreter: not the last thread" on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1560207873.65.0.4384886288.issue36402@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13817 pull_request: https://github.com/python/cpython/pull/13949 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 19:10:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 23:10:50 +0000 Subject: [issue36402] test_threading: test_threads_join_2() failed with "Fatal Python error: Py_EndInterpreter: not the last thread" on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1560208250.74.0.640234147344.issue36402@roundup.psfhosted.org> STINNER Victor added the comment: test_threading: test_threads_join_2() was added by commit 7b47699 in 2013, but the test failed randomly since it was added. It's just that failures were ignored until I created https://bugs.python.org/issue36402 last March. In fact, when the test failed randomly on buildbot (with tests run in parallel), it was fine since test_threading was re-run alone and then the test passed. The buildbot build was seen overall as a success. Previous issues were closed (see my previous comment). The test shows the bug using subinterpreters (Py_EndInterpreter), but the bug also exists in Py_Finalize() which hash the same race condition (it also calls threading._shutdown()). It's just that Py_EndInterpreter() is stricter, it contains this assertion: if (tstate != interp->tstate_head || tstate->next != NULL) Py_FatalError("Py_EndInterpreter: not the last thread"); Attached py_finalize.patch adds the same assertion to Py_Finalize. I added test_threading.test_finalization_shutdown() to PR 13948. If you run test_finalization_shutdown() with py_finalize.patch, Py_Finalize() fails with a similar assertion error. But py_finalize.patch is incompatible with the principle of daemon threads and so cannot be commited. ---------- Added file: https://bugs.python.org/file48409/py_finalize.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 19:11:51 2019 From: report at bugs.python.org (Robert) Date: Mon, 10 Jun 2019 23:11:51 +0000 Subject: [issue33591] ctypes does not support fspath protocol In-Reply-To: <1526900168.47.0.682650639539.issue33591@psf.upfronthosting.co.za> Message-ID: <1560208311.39.0.955905437454.issue33591@roundup.psfhosted.org> Robert added the comment: Can anyone do a review? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 19:12:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 23:12:29 +0000 Subject: [issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1560208349.69.0.174567563674.issue36402@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: test_threading: test_threads_join_2() failed with "Fatal Python error: Py_EndInterpreter: not the last thread" on AMD64 FreeBSD CURRENT Shared 3.x -> threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 19:19:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 23:19:38 +0000 Subject: [issue18808] Thread.join returns before PyThreadState is destroyed In-Reply-To: <1377179797.68.0.40345735309.issue18808@psf.upfronthosting.co.za> Message-ID: <1560208778.84.0.858364193471.issue18808@roundup.psfhosted.org> STINNER Victor added the comment: _thread._set_sentinel() and threading.Thread._tstate_lock is a great enhancement, as Py_EndInterprter() which now calls threading._shutdown(). FYI I found yet another race condition, this time in threading._shutdown(). See bpo-36402 follow-up: "threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly". ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 19:24:27 2019 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 10 Jun 2019 23:24:27 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy Message-ID: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> New submission from Nick Coghlan : The Porting section of the What's New guide is for changes where the old behaviour was at best arguably correct, but it's still possible someone was relying on it behaving exactly the way it used to. It isn't for us to say "We broke all extensions that use this existing public C API by adding a new parameter to its signature". For 3.8b2, the function with the extra parameter should be renamed to PyCode_NewEx, and a PyCode_New compatibility wrapper added that calls it with the extra parameter set to zero. ---------- keywords: 3.8regression messages: 345153 nosy: lukasz.langa, ncoghlan, pablogsal priority: release blocker severity: normal stage: needs patch status: open title: PyCode_New API change breaks backwards compatibility policy type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 19:28:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 23:28:10 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560209290.62.0.447776967486.issue37221@roundup.psfhosted.org> STINNER Victor added the comment: PyCode_New() and types.CodeType constructor are actively discussed: * https://mail.python.org/archives/list/python-dev at python.org/thread/VXDPH2TUAHNPT5K6HBUIV6VASBCKKY2K/ * bpo-36896 * bpo-36886 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 19:38:21 2019 From: report at bugs.python.org (Dan Hemberger) Date: Mon, 10 Jun 2019 23:38:21 +0000 Subject: [issue37222] urllib missing voidresp breaks CacheFTPHandler Message-ID: <1560209901.95.0.0637922149523.issue37222@roundup.psfhosted.org> New submission from Dan Hemberger : When using the CacheFTPHandler in the most basic of contexts, a URLError will be thrown if you try to reuse any of the FTP instances stored in the handler. This makes CacheFTPHandler unusable for its intended purpose. Note that the default FTPHandler circumvents this issue by creating a new ftplib.FTP instance for each connection (and thus never reuses any of them). Here is a simple example illustrating the problem: """ import urllib.request as req import ftplib opener = req.build_opener(req.CacheFTPHandler) req.install_opener(opener) ftplib.FTP.debugging = 2 for _ in range(2): req.urlopen("ftp://www.pythontest.net/README", timeout=10) """ >From the ftplib debugging output, we see the following communication between the client and server: """ *cmd* 'TYPE I' *put* 'TYPE I\r\n' *get* '200 Switching to Binary mode.\n' *resp* '200 Switching to Binary mode.' *cmd* 'PASV' *put* 'PASV\r\n' *get* '227 Entering Passive Mode (159,89,235,38,39,111).\n' *resp* '227 Entering Passive Mode (159,89,235,38,39,111).' *cmd* 'RETR README' *put* 'RETR README\r\n' *get* '150 Opening BINARY mode data connection for README (123 bytes).\n' *resp* '150 Opening BINARY mode data connection for README (123 bytes).' *cmd* 'TYPE I' *put* 'TYPE I\r\n' *get* '226 Transfer complete.\n' *resp* '226 Transfer complete.' *cmd* 'PASV' *put* 'PASV\r\n' *get* '200 Switching to Binary mode.\n' *resp* '200 Switching to Binary mode.' ftplib.error_reply: 200 Switching to Binary mode. """ The client and the server have gotten out of sync due to the missing voidresp() call, i.e. the client sends 'Type I' but receives the response from the previous 'RETR README' command. When ftp.voidresp() is added anywhere between after the ftp.ntransfercmd() and before the next command is sent (i.e. by reverting 2d51f687e133fb8141f1a6b5a6ac51c9d5eddf58), we see the correct send/receive pattern: """ *cmd* 'TYPE I' *put* 'TYPE I\r\n' *get* '200 Switching to Binary mode.\n' *resp* '200 Switching to Binary mode.' *cmd* 'PASV' *put* 'PASV\r\n' *get* '227 Entering Passive Mode (159,89,235,38,39,107).\n' *resp* '227 Entering Passive Mode (159,89,235,38,39,107).' *cmd* 'RETR README' *put* 'RETR README\r\n' *get* '150 Opening BINARY mode data connection for README (123 bytes).\n' *resp* '150 Opening BINARY mode data connection for README (123 bytes).' *get* '226 Transfer complete.\n' *resp* '226 Transfer complete.' *cmd* 'TYPE I' *put* 'TYPE I\r\n' *get* '200 Switching to Binary mode.\n' *resp* '200 Switching to Binary mode.' *cmd* 'PASV' *put* 'PASV\r\n' *get* '227 Entering Passive Mode (159,89,235,38,39,107).\n' *resp* '227 Entering Passive Mode (159,89,235,38,39,107).' *cmd* 'RETR README' *put* 'RETR README\r\n' *get* '150 Opening BINARY mode data connection for README (123 bytes).\n' *resp* '150 Opening BINARY mode data connection for README (123 bytes).' *get* '226 Transfer complete.\n' *resp* '226 Transfer complete.' """ By inspecting the methods of ftplib.FTP, we can see that every use of ntransfercmd() is followed by a voidresp(), see e.g. retrbinary, retrlines, storbinary, storlines, and voidcmd. I hope that some experts in urllib and ftplib can weigh in on any of the subtleties of this issue, but I think it's clear that the missing ftp.voidresp() call is a significant bug. -------------------------------------- Some historical notes about this issue -------------------------------------- This issue has been documented in a number of other bug reports, but I don't think any have addressed the complete breakage of the CachedFTPHandler that it causes. The breaking change was originally introduced as a resolution to issue16270. However, it's not clear from the comments why it was believed that removing ftp.voidresp() from endtransfer() was the correct solution. In either case, with this commit reverted, both the test outlined in this report and in issue16270 work correctly. @orsenthil has suggested this fix (to revert the change to endtransfer) in msg286020, and has explained his reasoning in detail in msg286016. @Ivan.Pozdeev has also explained this issue in msg282797 and provided a similar patch in issue28931, though it does more than just revert the breaking commit and I'm not sure what the additional changes are intending to fix. ---------- components: Library (Lib) messages: 345155 nosy: danh priority: normal severity: normal status: open title: urllib missing voidresp breaks CacheFTPHandler type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 19:39:36 2019 From: report at bugs.python.org (Emmanuel Arias) Date: Mon, 10 Jun 2019 23:39:36 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1560209976.77.0.0840747621317.issue36373@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- pull_requests: +13818 pull_request: https://github.com/python/cpython/pull/13950 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 19:44:24 2019 From: report at bugs.python.org (Dan Hemberger) Date: Mon, 10 Jun 2019 23:44:24 +0000 Subject: [issue16270] urllib hangs when closing connection In-Reply-To: <1350509929.7.0.680667591801.issue16270@psf.upfronthosting.co.za> Message-ID: <1560210264.98.0.0307680197361.issue16270@roundup.psfhosted.org> Change by Dan Hemberger : ---------- pull_requests: +13820 pull_request: https://github.com/python/cpython/pull/13951 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 19:44:24 2019 From: report at bugs.python.org (Dan Hemberger) Date: Mon, 10 Jun 2019 23:44:24 +0000 Subject: [issue37222] urllib missing voidresp breaks CacheFTPHandler In-Reply-To: <1560209901.95.0.0637922149523.issue37222@roundup.psfhosted.org> Message-ID: <1560210264.93.0.320036747802.issue37222@roundup.psfhosted.org> Change by Dan Hemberger : ---------- keywords: +patch pull_requests: +13819 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13951 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 19:45:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 23:45:19 +0000 Subject: [issue37223] test_io logs Exception ignored in: warnings Message-ID: <1560210319.85.0.887484202288.issue37223@roundup.psfhosted.org> New submission from STINNER Victor : bpo-18748 modified io.IOBase finalizer to no longer silence close() exception in develoment and in debug mode. The commit 472f794a33221ea835a2fbf6c9f12aa2bd66d1b0 fixed a few destructor errors in test_io, but there are still a few: test_uninitialized (test.test_io.PyBufferedReaderTest) ... Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 814, in close if self.raw is not None and not self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 836, in raw return self._raw AttributeError: 'BufferedReader' object has no attribute '_raw' ok test_max_buffer_size_removal (test.test_io.PyBufferedWriterTest) ... Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1299, in close with self._write_lock: AttributeError: 'BufferedWriter' object has no attribute '_write_lock' ok test_misbehaved_io (test.test_io.PyBufferedWriterTest) ... Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1308, in close self.flush() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1269, in flush self._flush_unlocked() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1285, in _flush_unlocked raise OSError("write() returned incorrect number of bytes") OSError: write() returned incorrect number of bytes ok test_uninitialized (test.test_io.PyBufferedWriterTest) ... Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1299, in close with self._write_lock: AttributeError: 'BufferedWriter' object has no attribute '_write_lock' ok test_writer_close_error_on_close (test.test_io.CBufferedRWPairTest) ... Exception ignored in: <_io.BufferedWriter> Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 611, in _callTestMethod method() ValueError: flush of closed file ok test_constructor_max_buffer_size_removal (test.test_io.PyBufferedRWPairTest) ... Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1377, in close self.reader.close() AttributeError: 'BufferedRWPair' object has no attribute 'reader' ok test_constructor_with_not_readable (test.test_io.PyBufferedRWPairTest) ... Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1377, in close self.reader.close() AttributeError: 'BufferedRWPair' object has no attribute 'reader' ok test_constructor_with_not_writeable (test.test_io.PyBufferedRWPairTest) ... Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1377, in close self.reader.close() AttributeError: 'BufferedRWPair' object has no attribute 'reader' ok test_isatty (test.test_io.PyBufferedRWPairTest) ... Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1377, in close self.reader.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 814, in close if self.raw is not None and not self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 840, in closed return self.raw.closed AttributeError: 'SelectableIsAtty' object has no attribute 'closed' Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 814, in close if self.raw is not None and not self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 840, in closed return self.raw.closed AttributeError: 'SelectableIsAtty' object has no attribute 'closed' Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1300, in close if self.raw is None or self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 840, in closed return self.raw.closed AttributeError: 'SelectableIsAtty' object has no attribute 'closed' Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1377, in close self.reader.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 814, in close if self.raw is not None and not self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 840, in closed return self.raw.closed AttributeError: 'SelectableIsAtty' object has no attribute 'closed' Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 814, in close if self.raw is not None and not self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 840, in closed return self.raw.closed AttributeError: 'SelectableIsAtty' object has no attribute 'closed' Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1300, in close if self.raw is None or self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 840, in closed return self.raw.closed AttributeError: 'SelectableIsAtty' object has no attribute 'closed' Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1377, in close self.reader.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 814, in close if self.raw is not None and not self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 840, in closed return self.raw.closed AttributeError: 'SelectableIsAtty' object has no attribute 'closed' Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 814, in close if self.raw is not None and not self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 840, in closed return self.raw.closed AttributeError: 'SelectableIsAtty' object has no attribute 'closed' Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1300, in close if self.raw is None or self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 840, in closed return self.raw.closed AttributeError: 'SelectableIsAtty' object has no attribute 'closed' Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1377, in close self.reader.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 814, in close if self.raw is not None and not self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 840, in closed return self.raw.closed AttributeError: 'SelectableIsAtty' object has no attribute 'closed' Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 814, in close if self.raw is not None and not self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 840, in closed return self.raw.closed AttributeError: 'SelectableIsAtty' object has no attribute 'closed' Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1300, in close if self.raw is None or self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 840, in closed return self.raw.closed AttributeError: 'SelectableIsAtty' object has no attribute 'closed' ok test_uninitialized (test.test_io.PyBufferedRWPairTest) ... Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1377, in close self.reader.close() AttributeError: 'BufferedRWPair' object has no attribute 'reader' ok test_destructor (test.test_io.CBufferedRandomTest) ... Exception ignored in: <_io.BufferedRWPair object at 0x7f2f3c5842f0> Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/test/support/__init__.py", line 1627, in gc_collect gc.collect() ValueError: flush of closed file Exception ignored in: <_io.BufferedWriter> Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/test/support/__init__.py", line 1627, in gc_collect gc.collect() ValueError: flush of closed file ok test_misbehaved_io (test.test_io.CBufferedRandomTest) ... Exception ignored in: <_io.BufferedRandom> Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/test/test_io.py", line 2306, in test_misbehaved_io BufferedReaderTest.test_misbehaved_io(self) OSError: Raw stream returned invalid position -123 Exception ignored in: <_io.BufferedRandom> Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/test/test_io.py", line 2307, in test_misbehaved_io BufferedWriterTest.test_misbehaved_io(self) OSError: Raw stream returned invalid position -123 ok test_write_non_blocking (test.test_io.CBufferedRandomTest) ... Exception ignored in: <_io.BufferedRandom> Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 611, in _callTestMethod method() io.UnsupportedOperation: seek ok test_max_buffer_size_removal (test.test_io.PyBufferedRandomTest) ... Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1299, in close with self._write_lock: AttributeError: 'BufferedRandom' object has no attribute '_write_lock' ok test_misbehaved_io (test.test_io.PyBufferedRandomTest) ... Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1308, in close self.flush() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1269, in flush self._flush_unlocked() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1285, in _flush_unlocked raise OSError("write() returned incorrect number of bytes") OSError: write() returned incorrect number of bytes ok test_uninitialized (test.test_io.PyBufferedRandomTest) ... Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1299, in close with self._write_lock: AttributeError: 'BufferedRandom' object has no attribute '_write_lock' Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 1299, in close with self._write_lock: AttributeError: 'BufferedRandom' object has no attribute '_write_lock' ok test_destructor (test.test_io.PyTextIOWrapperTest) ... Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/test/test_io.py", line 2817, in close l.append(self.getvalue()) File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 896, in getvalue raise ValueError("getvalue on closed file") ValueError: getvalue on closed file ok test_issue22849 (test.test_io.PyTextIOWrapperTest) ... Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2161, in close if self.buffer is not None and not self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2169, in closed return self.buffer.closed AttributeError: 'F' object has no attribute 'closed' Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2161, in close if self.buffer is not None and not self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2169, in closed return self.buffer.closed AttributeError: 'F' object has no attribute 'closed' Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2161, in close if self.buffer is not None and not self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2169, in closed return self.buffer.closed AttributeError: 'F' object has no attribute 'closed' Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2161, in close if self.buffer is not None and not self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2169, in closed return self.buffer.closed AttributeError: 'F' object has no attribute 'closed' Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2161, in close if self.buffer is not None and not self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2169, in closed return self.buffer.closed AttributeError: 'F' object has no attribute 'closed' Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2161, in close if self.buffer is not None and not self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2169, in closed return self.buffer.closed AttributeError: 'F' object has no attribute 'closed' Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2161, in close if self.buffer is not None and not self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2169, in closed return self.buffer.closed AttributeError: 'F' object has no attribute 'closed' Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2161, in close if self.buffer is not None and not self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2169, in closed return self.buffer.closed AttributeError: 'F' object has no attribute 'closed' Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2161, in close if self.buffer is not None and not self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2169, in closed return self.buffer.closed AttributeError: 'F' object has no attribute 'closed' Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2161, in close if self.buffer is not None and not self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2169, in closed return self.buffer.closed AttributeError: 'F' object has no attribute 'closed' Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2161, in close if self.buffer is not None and not self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2169, in closed return self.buffer.closed AttributeError: 'F' object has no attribute 'closed' ok test_repr (test.test_io.PyTextIOWrapperTest) ... Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2161, in close if self.buffer is not None and not self.closed: File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 2169, in closed return self.buffer.closed File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 840, in closed return self.raw.closed AttributeError: 'NoneType' object has no attribute 'closed' ok List of failing tests: test.test_io.CBufferedRWPairTest.test_writer_close_error_on_close test.test_io.CBufferedRandomTest.test_destructor test.test_io.CBufferedRandomTest.test_misbehaved_io test.test_io.CBufferedRandomTest.test_write_non_blocking test.test_io.PyBufferedRWPairTest.test_constructor_max_buffer_size_removal test.test_io.PyBufferedRWPairTest.test_constructor_with_not_readable test.test_io.PyBufferedRWPairTest.test_constructor_with_not_writeable test.test_io.PyBufferedRWPairTest.test_isatty test.test_io.PyBufferedRWPairTest.test_uninitialized test.test_io.PyBufferedRandomTest.test_max_buffer_size_removal test.test_io.PyBufferedRandomTest.test_misbehaved_io test.test_io.PyBufferedRandomTest.test_uninitialized test.test_io.PyBufferedReaderTest.test_uninitialized test.test_io.PyBufferedWriterTest.test_max_buffer_size_removal test.test_io.PyBufferedWriterTest.test_misbehaved_io test.test_io.PyBufferedWriterTest.test_uninitialized test.test_io.PyTextIOWrapperTest.test_destructor test.test_io.PyTextIOWrapperTest.test_issue22849 test.test_io.PyTextIOWrapperTest.test_repr ---------- components: Tests messages: 345156 nosy: vstinner priority: normal severity: normal status: open title: test_io logs Exception ignored in: warnings versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 19:45:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 23:45:40 +0000 Subject: [issue18748] io.IOBase destructor silence I/O error on close() by default In-Reply-To: <1376572242.37.0.931026549367.issue18748@psf.upfronthosting.co.za> Message-ID: <1560210340.04.0.371690508429.issue18748@roundup.psfhosted.org> STINNER Victor added the comment: I created bpo-37223: test_io logs Exception ignored in: warnings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 19:45:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 23:45:53 +0000 Subject: [issue18748] io.IOBase destructor silence I/O error on close() by default In-Reply-To: <1376572242.37.0.931026549367.issue18748@psf.upfronthosting.co.za> Message-ID: <1560210353.54.0.00457416345017.issue18748@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -13234 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 19:46:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 23:46:34 +0000 Subject: [issue37223] test_io logs Exception ignored in: warnings In-Reply-To: <1560210319.85.0.887484202288.issue37223@roundup.psfhosted.org> Message-ID: <1560210394.83.0.0681255525867.issue37223@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-36918 (test_urllib) and bpo-37069 (regrtest: log unraisable exceptions and uncaught thread exceptions). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 19:55:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jun 2019 23:55:20 +0000 Subject: [issue18748] io.IOBase destructor silence I/O error on close() by default In-Reply-To: <1376572242.37.0.931026549367.issue18748@psf.upfronthosting.co.za> Message-ID: <1560210920.13.0.35975447711.issue18748@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13821 pull_request: https://github.com/python/cpython/pull/13952 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 20:18:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 00:18:18 +0000 Subject: [issue37223] test_io logs Exception ignored in: warnings In-Reply-To: <1560210319.85.0.887484202288.issue37223@roundup.psfhosted.org> Message-ID: <1560212298.77.0.66592947887.issue37223@roundup.psfhosted.org> STINNER Victor added the comment: PR 13952 fix many errors, but not of all them. test_io.PyBufferedWriterTest.test_misbehaved_io() logs a warning, whereas test_io.CBufferedWriterTest.test_misbehaved_io() doesn't. It seems like _pyio.BufferedWriter lacks bpo-32228 fix. Extract of the C implementation: static PyObject * _bufferedwriter_flush_unlocked(buffered *self) { ... if (!VALID_WRITE_BUFFER(self) || self->write_pos == self->write_end) goto end; /* First, rewind */ rewind = RAW_OFFSET(self) + (self->pos - self->write_pos); if (rewind != 0) { n = _buffered_raw_seek(self, -rewind, 1); if (n < 0) { goto error; } self->raw_pos -= rewind; } ... end: /* This ensures that after return from this function, VALID_WRITE_BUFFER(self) returns false. This is a required condition because when a tell() is called after flushing and if VALID_READ_BUFFER(self) is false, we need VALID_WRITE_BUFFER(self) to be false to have RAW_OFFSET(self) == 0. Issue: https://bugs.python.org/issue32228 */ _bufferedwriter_reset_buf(self); Py_RETURN_NONE; error: return NULL; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 20:49:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 00:49:17 +0000 Subject: [issue18748] io.IOBase destructor silence I/O error on close() by default In-Reply-To: <1376572242.37.0.931026549367.issue18748@psf.upfronthosting.co.za> Message-ID: <1560214157.13.0.550807026459.issue18748@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 4f6f7c5a611905fb6b81671547f268c226bc646a by Victor Stinner in branch 'master': bpo-18748: Fix _pyio.IOBase destructor (closed case) (GH-13952) https://github.com/python/cpython/commit/4f6f7c5a611905fb6b81671547f268c226bc646a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 20:49:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 00:49:51 +0000 Subject: [issue37223] test_io logs Exception ignored in: warnings In-Reply-To: <1560210319.85.0.887484202288.issue37223@roundup.psfhosted.org> Message-ID: <1560214191.7.0.322054308595.issue37223@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 4f6f7c5a611905fb6b81671547f268c226bc646a by Victor Stinner in branch 'master': bpo-18748: Fix _pyio.IOBase destructor (closed case) (GH-13952) https://github.com/python/cpython/commit/4f6f7c5a611905fb6b81671547f268c226bc646a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 20:54:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 00:54:19 +0000 Subject: [issue37223] test_io logs Exception ignored in: warnings In-Reply-To: <1560210319.85.0.887484202288.issue37223@roundup.psfhosted.org> Message-ID: <1560214459.63.0.0417342279116.issue37223@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13822 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13954 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 20:58:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 00:58:01 +0000 Subject: [issue37224] test__xxsubinterpreters failed on AMD64 Windows8.1 Refleaks 3.8 Message-ID: <1560214681.61.0.906498246375.issue37224@roundup.psfhosted.org> New submission from STINNER Victor : https://buildbot.python.org/all/#/builders/224/builds/5 0:46:02 load avg: 1.53 [259/423/1] test__xxsubinterpreters failed -- running: test_httplib (1 min 6 sec), test_mmap (16 min 42 sec) beginning 6 repetitions 123456 ..Exception in thread Thread-28: Traceback (most recent call last): File "D:\buildarea\3.8.ware-win81-release.refleak\build\lib\threading.py", line 923, in _bootstrap_inner self.run() File "D:\buildarea\3.8.ware-win81-release.refleak\build\lib\threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "D:\buildarea\3.8.ware-win81-release.refleak\build\lib\test\test__xxsubinterpreters.py", line 51, in run interpreters.run_string(interp, dedent(f""" RuntimeError: unrecognized interpreter ID 182 test test__xxsubinterpreters failed -- Traceback (most recent call last): File "D:\buildarea\3.8.ware-win81-release.refleak\build\lib\test\test__xxsubinterpreters.py", line 492, in test_subinterpreter self.assertTrue(interpreters.is_running(interp)) AssertionError: False is not true (...) FAIL: test_still_running (test.test__xxsubinterpreters.DestroyTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\buildarea\3.8.ware-win81-release.refleak\build\lib\test\test__xxsubinterpreters.py", line 765, in test_still_running interpreters.destroy(interp) AssertionError: RuntimeError not raised ---------- components: Tests messages: 345162 nosy: eric.snow, vstinner priority: normal severity: normal status: open title: test__xxsubinterpreters failed on AMD64 Windows8.1 Refleaks 3.8 versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 20:58:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 00:58:20 +0000 Subject: [issue37224] test__xxsubinterpreters failed on AMD64 Windows8.1 Refleaks 3.8 In-Reply-To: <1560214681.61.0.906498246375.issue37224@roundup.psfhosted.org> Message-ID: <1560214700.11.0.271680299653.issue37224@roundup.psfhosted.org> STINNER Victor added the comment: See bpo-33356. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 20:59:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 00:59:29 +0000 Subject: [issue36918] ValueError warning in test_urllib due to io.IOBase destructor In-Reply-To: <1557856507.99.0.0146189740679.issue36918@roundup.psfhosted.org> Message-ID: <1560214769.52.0.826136120648.issue36918@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -13428 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 21:05:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 01:05:00 +0000 Subject: [issue36918] ValueError warning in test_urllib due to io.IOBase destructor In-Reply-To: <1557856507.99.0.0146189740679.issue36918@roundup.psfhosted.org> Message-ID: <1560215100.85.0.712711249381.issue36918@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13823 pull_request: https://github.com/python/cpython/pull/13955 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 21:06:28 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Tue, 11 Jun 2019 01:06:28 +0000 Subject: [issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1560215188.64.0.991091284878.issue36402@roundup.psfhosted.org> Change by Kubilay Kocak : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 21:08:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 01:08:50 +0000 Subject: [issue36918] ValueError warning in test_urllib due to io.IOBase destructor In-Reply-To: <1557856507.99.0.0146189740679.issue36918@roundup.psfhosted.org> Message-ID: <1560215330.19.0.687681570097.issue36918@roundup.psfhosted.org> STINNER Victor added the comment: Well, maybe Python GC can be enhanced. In the meanwhile, I would like to make these warnings quiet since they are very annoying when I have to analyze buildbot warnings. Moreover, this issues blocks my bpo-37069. Maybe open a separated issue to propose to enhance the GC, if you have an idea how to change it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 21:11:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 01:11:02 +0000 Subject: [issue37223] test_io logs Exception ignored in: warnings In-Reply-To: <1560210319.85.0.887484202288.issue37223@roundup.psfhosted.org> Message-ID: <1560215462.95.0.658637650487.issue37223@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b589cef9c4dada2fb84ce0fae5040ecf16d9d5ef by Victor Stinner in branch 'master': bpo-37223: test_io: silence destructor errors (GH-13954) https://github.com/python/cpython/commit/b589cef9c4dada2fb84ce0fae5040ecf16d9d5ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 21:11:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 01:11:41 +0000 Subject: [issue37223] test_io logs Exception ignored in: warnings In-Reply-To: <1560210319.85.0.887484202288.issue37223@roundup.psfhosted.org> Message-ID: <1560215501.7.0.4517333416.issue37223@roundup.psfhosted.org> STINNER Victor added the comment: Once bpo-36918 will be fixed, I will backport changes to Python 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 21:12:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 01:12:13 +0000 Subject: [issue36918] ValueError warning in test_urllib due to io.IOBase destructor In-Reply-To: <1557856507.99.0.0146189740679.issue36918@roundup.psfhosted.org> Message-ID: <1560215533.48.0.328711211656.issue36918@roundup.psfhosted.org> STINNER Victor added the comment: I proposed PR 13955: a fix in 2 lines. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 21:23:33 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 11 Jun 2019 01:23:33 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560216213.27.0.444528126382.issue37221@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thanks, Nick for opening this issue. If everyone agrees this is the best path forward I can make a PR. Take into account that doing such rename will break again the projects that have adapted already (primarily only Cython). I would like to give some context around the change itself. * Last time the function was changed in commit 4f72a78684bbfcdc43ceeabb240ceee54706c4b0 (for adding keyword-only parameters) a wrapper was not created or a new compatibility layer was not created. This happened as well in the past when the function slowly growed from 3 parameters in 1990 to 16 parameters currently. If we decide to provide the wrapper, this would be the first time we do this for changes in this function. * In the past, backwards incompatible changes that came from syntax changes were reported in the What's New. For example, in Python3.6 we added "async and await names are now reserved keywords. Code using these names as identifiers will now raise a SyntaxError" in the porting session and one could argue that that broke more code than this change. I am not saying this to justify breaking changes, just to give more context of somehow similar situations on how we report changes that we knew that were backwards incompatible due to new features. * A quick (and I acknowledge that is partial and incomplete) search in GitHub about usages of PyCode_New excluding interpreter files to avoid forks and the like, points mainly at Cython (and Pyrex forks). Cython already adapted to this change, so changing it back will break Cython and all other possible extensions that already adapted after the last alpha. * In the email thread https://mail.python.org/archives/list/python-dev at python.org/thread/VXDPH2TUAHNPT5K6HBUIV6VASBCKKY2K/, Stefan Behnel (who is also a Cython maintainer) said in relation to adding PyCode_NewEx: >It's not a commonly used function, and it's easy for C code to adapt. I >don't think it's worth adding a new function to the C-API here, compared to >just changing the signature. Very few users would benefit, at the cost of >added complexity. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 21:31:37 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jun 2019 01:31:37 +0000 Subject: [issue37220] test_idle crash on Windows when run with -R: In-Reply-To: <1560206989.94.0.836960275888.issue37220@roundup.psfhosted.org> Message-ID: <1560216697.06.0.609107783347.issue37220@roundup.psfhosted.org> Terry J. Reedy added the comment: The #37177 patch touched SearchDialogBase.py and test_searchdialogbase.py. I reproduced a premature stop if the full IDLE suite is run, but don't understand all of the results. After fresh update and rebuild: python -m test -ugui test_idle 3.9 runs fine, no noise 2.7 runs fine except for 2 '''can't invoke "event" command:...'''s python -m test -R3:3 -ugui -m SearchDialogBaseTest test_idle 3.9 runs fine, no noise 2.7 runs fine, no noise (so from other tests) python -m test -R3:3 -ugui test_idle 3.9 runs fine, but 18 instances of "can't invoke "event" command:..." # ==> noise from other tests, only with -R 2.7 prints 2 "can'ts" and one "complete a round '.'. After a pause, presumibly to run round 2, it exits to the Windows prompt. Commenting out "self.top.transient('')" in close() solves the problem. There is some interaction between running 2.7 (versus 3.x), tcl/tk 8.5.19 (versus 8.6), testing with -R, running other IDLE test files, and disabling 'transient' (back to default). (Tal, this sort of thing is part of why I don't backport to 2.7.) An alternate fix for me is a slight change in the test cleanup. Preparing PRs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 21:43:29 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jun 2019 01:43:29 +0000 Subject: [issue37220] test_idle crash on Windows when run with -R: In-Reply-To: <1560206989.94.0.836960275888.issue37220@roundup.psfhosted.org> Message-ID: <1560217409.99.0.399604353822.issue37220@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +13824 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/13957 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 21:48:04 2019 From: report at bugs.python.org (makdon) Date: Tue, 11 Jun 2019 01:48:04 +0000 Subject: [issue37216] mac installation document wrong for python 3.7.3 In-Reply-To: <1560181222.28.0.0831029476518.issue37216@roundup.psfhosted.org> Message-ID: <1560217684.57.0.00165356779385.issue37216@roundup.psfhosted.org> makdon added the comment: Thanks xtreak. I am a beginner on python mailing list and now i've learn how to get a link to the email. And i found a version error on windows installation document on version 3.6.8 that the picture is still using version 3.5: https://docs.python.org/3.6/using/windows.html#installation-steps I will check them and create PR for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 21:48:19 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 11 Jun 2019 01:48:19 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560217699.73.0.491038571097.issue37221@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +13825 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13959 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 21:48:31 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 11 Jun 2019 01:48:31 +0000 Subject: [issue33758] Unexpected success of test_get_type_hints_modules_forwardref in test_typing In-Reply-To: <1528041121.47.0.592728768989.issue33758@psf.upfronthosting.co.za> Message-ID: <1560217711.63.0.227784732349.issue33758@roundup.psfhosted.org> Benjamin Peterson added the comment: In particular, test_typing has an unexpected success if you run it after test___all__. It would be nice at least to change the expected fail to a skip, since it's so subtle. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 21:48:36 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jun 2019 01:48:36 +0000 Subject: [issue37220] test_idle crash on Windows when run with -R: In-Reply-To: <1560206989.94.0.836960275888.issue37220@roundup.psfhosted.org> Message-ID: <1560217716.34.0.126727928573.issue37220@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +13826 pull_request: https://github.com/python/cpython/pull/13958 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 21:49:09 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 11 Jun 2019 01:49:09 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560217749.39.0.537559819183.issue37221@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I have created PR13959 in case we decide to go with the PyCode_NewEx path. ---------- keywords: -patch stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 21:53:32 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 11 Jun 2019 01:53:32 +0000 Subject: [issue36422] tempfile.TemporaryDirectory() removes entire directory tree even if it's a mount-point In-Reply-To: <1553512605.72.0.860422023516.issue36422@roundup.psfhosted.org> Message-ID: <1560218012.44.0.118398969054.issue36422@roundup.psfhosted.org> Jeffrey Kintscher added the comment: tempfile.TemporaryDirectory() relies upon shutil.rmtree() to do the actual cleanup. Up through 3.7, it simply calls shutil.rmtree(). 3.8 adds some more logic using the onerror callback parameter of shutil.rmtree() to try changing the permissions on otherwise undeletable directory entries. In order to make tempfile.TemporaryDirectory() handle mount points, shutil.rmtree() requires some enhancements so that mount points can be detected before their contents are deleted. I am working on some generic enhancements to tempfile.TemporaryDirectory() and shutil.rmtree() that add (hopefully) useful functionality that covers mount points as well as other corner cases: 1. Add an "onitem" callback paramter to shutil.rmtree() that, if provided, gets called for each directory entry as it is encountered. This allows the caller to perform any required special handling of individual directory entries (e.g. unmounting a mount point, closing a file, shutting down a named pipe, etc.). 2. Add an "onerror" callback parameter to the tempfile.TemporaryDirectory member functions so that the caller can perform special handling for directory items that it can't automatically delete. The caller created the undeletable directory entries, so it is reasonable to believe the caller may know how to unmake what they made. 3. Add an "onitem" callback parameter to the tempfile.TemporaryDirectory member functions that they pass on to shutil.rmtree(). I debated implementing "ondelete" instead of "onitem". "ondelete" would be called just prior to deleting an item, while "onitem" is called when the item is encountered. The difference in semantics is that a subdirectory entry triggers a call to "onitem" immediately, while "ondelete" would get called after the subdirectory tree had been traversed and all of its items deleted. "onitem" seems more useful because it allows the caller to implement special handling per item. I will have a pull request ready soon. In the mean time, I am open to any other suggestions for handling non-portable corner cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 21:54:27 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 11 Jun 2019 01:54:27 +0000 Subject: [issue35184] Makefile is not correctly generated when compiling pyextat with DXML_POOR_ENTROPY=1 In-Reply-To: <1541609240.08.0.788709270274.issue35184@psf.upfronthosting.co.za> Message-ID: <1560218067.06.0.203658928789.issue35184@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 408a2ef1aceff1f4270c44552fa39ef93d9283e3 by Benjamin Peterson (aaronpaulhurst) in branch 'master': closes bpo-35184: Fix XML_POOR_ENTROPY option that breaks makesetup parsing of pyexpat line in Setup. (GH-13064) https://github.com/python/cpython/commit/408a2ef1aceff1f4270c44552fa39ef93d9283e3 ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 21:54:37 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Jun 2019 01:54:37 +0000 Subject: [issue35184] Makefile is not correctly generated when compiling pyextat with DXML_POOR_ENTROPY=1 In-Reply-To: <1541609240.08.0.788709270274.issue35184@psf.upfronthosting.co.za> Message-ID: <1560218077.63.0.48599562025.issue35184@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13827 pull_request: https://github.com/python/cpython/pull/13960 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 21:54:44 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Jun 2019 01:54:44 +0000 Subject: [issue35184] Makefile is not correctly generated when compiling pyextat with DXML_POOR_ENTROPY=1 In-Reply-To: <1541609240.08.0.788709270274.issue35184@psf.upfronthosting.co.za> Message-ID: <1560218084.56.0.331103861816.issue35184@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13828 pull_request: https://github.com/python/cpython/pull/13961 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 21:54:51 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jun 2019 01:54:51 +0000 Subject: [issue37220] test_idle crash on Windows 2.7 when run with -R: In-Reply-To: <1560206989.94.0.836960275888.issue37220@roundup.psfhosted.org> Message-ID: <1560218091.58.0.62293184578.issue37220@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: -patch title: test_idle crash on Windows when run with -R: -> test_idle crash on Windows 2.7 when run with -R: type: -> crash versions: +Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 21:57:15 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 11 Jun 2019 01:57:15 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560218235.13.0.136387639539.issue37221@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 22:14:37 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Jun 2019 02:14:37 +0000 Subject: [issue35184] Makefile is not correctly generated when compiling pyextat with DXML_POOR_ENTROPY=1 In-Reply-To: <1541609240.08.0.788709270274.issue35184@psf.upfronthosting.co.za> Message-ID: <1560219277.69.0.437763916722.issue35184@roundup.psfhosted.org> miss-islington added the comment: New changeset 5b94b857f590db80aab69c31f88dd2a4978f8329 by Miss Islington (bot) in branch '3.8': closes bpo-35184: Fix XML_POOR_ENTROPY option that breaks makesetup parsing of pyexpat line in Setup. (GH-13064) https://github.com/python/cpython/commit/5b94b857f590db80aab69c31f88dd2a4978f8329 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 22:15:27 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Jun 2019 02:15:27 +0000 Subject: [issue35184] Makefile is not correctly generated when compiling pyextat with DXML_POOR_ENTROPY=1 In-Reply-To: <1541609240.08.0.788709270274.issue35184@psf.upfronthosting.co.za> Message-ID: <1560219327.55.0.919934799545.issue35184@roundup.psfhosted.org> miss-islington added the comment: New changeset 30fd7a476bbd6bb8096c1349698463fa8a3bca18 by Miss Islington (bot) in branch '3.7': closes bpo-35184: Fix XML_POOR_ENTROPY option that breaks makesetup parsing of pyexpat line in Setup. (GH-13064) https://github.com/python/cpython/commit/30fd7a476bbd6bb8096c1349698463fa8a3bca18 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 22:30:39 2019 From: report at bugs.python.org (Phillip Middleton) Date: Tue, 11 Jun 2019 02:30:39 +0000 Subject: [issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support In-Reply-To: <1530609211.5.0.56676864532.issue34028@psf.upfronthosting.co.za> Message-ID: <1560220239.22.0.705556455612.issue34028@roundup.psfhosted.org> Phillip Middleton added the comment: I have the same issue installing v3.7.3 on RHEL6.8. The standard version came with openssl v1.0.1c, which would not configure. I installed openssl 1.0.2s in /usr/local and created a file /etc/profile.d/openssl.sh adding the following lines: # /etc/profile.d/openssl.sh pathmunge /usr/local/openssl/bin Exiting and relogging into the shell, the version returns openssl 1.0.2s 28 May 2019. As has been mentioned, there is no openssl distro out there that contains the filepath that either configure or make appears to expect. To get through configuration, I began with configure, modifying the ssldirs variable to /usr/local/openssl, and also repointing the following to the appropriate subdirs: 17214 if ! $found; then 17215 OPENSSL_INCLUDES= 17216 for ssldir in $ssldirs; do 17217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5 17218 $as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; } 17219 if test -f "$ssldir/include/openssl/ssl.h"; then 17220 OPENSSL_INCLUDES="-I$ssldir/include/openssl" 17221 OPENSSL_LDFLAGS="-L$ssldir/lib" This apparently wasn't sufficient for configure to recognize this openssl installation. Next, I uncommented and modified Modules/Setup.dist to reflect the openssl header and lib paths: 211 SSL=/usr/local/openssl 212 _ssl _ssl.c \ 213 -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ 214 -L$(SSL)/lib -lssl -lcrypto That gets us to here with ./configure: checking whether compiling and linking against OpenSSL works... yes checking for X509_VERIFY_PARAM_set1_host in libssl... no checking for --with-ssl-default-suites... python However using ./configure -with-openssl=/usr/local/openssl, configure returns: checking whether compiling and linking against OpenSSL works... yes checking for X509_VERIFY_PARAM_set1_host in libssl... yes checking for --with-ssl-default-suites... python So at least from configure's standpoint, I was able to get configure to pick up the openssl folder and its include/openssl which contains x509_vfy.h. Ok great. However make doesn't appear to respect these changes in configure - I get one of the typical variants of: *** WARNING: renaming "_hashlib" since importing it failed: libssl.so.1.0.0: cannot open shared object file: No such file or directory Python build finished successfully! The necessary bits to build these optional modules were not found: _lzma _tkinter _uuid To find the necessary bits, look in setup.py in detect_modules() for the module's name. The following modules found by detect_modules() in setup.py, have been built by the Makefile instead, as configured by the Setup files: _abc atexit pwd time Failed to build these modules: _ssl Following modules built successfully but were removed because they could not be imported: _hashlib Could not build the ssl module! Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host(). LibreSSL 2.6.4 and earlier do not provide the necessary APIs, https://github.com/libressl-portable/portable/issues/381 What I'd like to know is, what is the difference between what configure is looking for and in what cases would make not necessarily respect the confirmations of configure's checks? Let me know if there are any dumps/logs you'd be interested in. I realize that in my case we're dealing with an older OS, but this issue doesn't seem restricted per se to that alone. ---------- nosy: +Phillip Middleton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 22:40:29 2019 From: report at bugs.python.org (Roundup Robot) Date: Tue, 11 Jun 2019 02:40:29 +0000 Subject: [issue37216] mac installation document wrong for python 3.7.3 In-Reply-To: <1560181222.28.0.0831029476518.issue37216@roundup.psfhosted.org> Message-ID: <1560220829.9.0.562490686436.issue37216@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +13829 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13962 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 22:46:03 2019 From: report at bugs.python.org (Roundup Robot) Date: Tue, 11 Jun 2019 02:46:03 +0000 Subject: [issue37216] mac installation document wrong for python 3.7.3 In-Reply-To: <1560181222.28.0.0831029476518.issue37216@roundup.psfhosted.org> Message-ID: <1560221163.71.0.391408117756.issue37216@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +13830 pull_request: https://github.com/python/cpython/pull/13963 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 22:50:12 2019 From: report at bugs.python.org (Roundup Robot) Date: Tue, 11 Jun 2019 02:50:12 +0000 Subject: [issue37216] mac installation document wrong for python 3.7.3 In-Reply-To: <1560181222.28.0.0831029476518.issue37216@roundup.psfhosted.org> Message-ID: <1560221412.56.0.291204941876.issue37216@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +13831 pull_request: https://github.com/python/cpython/pull/13964 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 10 23:53:45 2019 From: report at bugs.python.org (Aaron Hurst) Date: Tue, 11 Jun 2019 03:53:45 +0000 Subject: =?utf-8?q?=5Bissue35586=5D_Open_pyexpat_compilation=2C_Make_shows_error?= =?utf-8?b?77yIbWlzc2luZyBzZXBhcmF0b3LvvIk=?= In-Reply-To: <1545796783.34.0.712150888896.issue35586@roundup.psfhosted.org> Message-ID: <1560225225.45.0.895791428048.issue35586@roundup.psfhosted.org> Aaron Hurst added the comment: I believe this bug can be closed now that the following have landed: New changeset 408a2ef1aceff1f4270c44552fa39ef93d9283e3 by Benjamin Peterson (aaronpaulhurst) in branch 'master': closes bpo-35184: Fix XML_POOR_ENTROPY option that breaks makesetup parsing of pyexpat line in Setup. (GH-13064) https://github.com/python/cpython/commit/408a2ef1aceff1f4270c44552fa39ef93d9283e3 New changeset 5b94b857f590db80aab69c31f88dd2a4978f8329 by Miss Islington (bot) in branch '3.8': closes bpo-35184: Fix XML_POOR_ENTROPY option that breaks makesetup parsing of pyexpat line in Setup. (GH-13064) https://github.com/python/cpython/commit/5b94b857f590db80aab69c31f88dd2a4978f8329 New changeset 30fd7a476bbd6bb8096c1349698463fa8a3bca18 by Miss Islington (bot) in branch '3.7': closes bpo-35184: Fix XML_POOR_ENTROPY option that breaks makesetup parsing of pyexpat line in Setup. (GH-13064) https://github.com/python/cpython/commit/30fd7a476bbd6bb8096c1349698463fa8a3bca18 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 00:19:20 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 11 Jun 2019 04:19:20 +0000 Subject: =?utf-8?q?=5Bissue35586=5D_Open_pyexpat_compilation=2C_Make_shows_error?= =?utf-8?b?77yIbWlzc2luZyBzZXBhcmF0b3LvvIk=?= In-Reply-To: <1545796783.34.0.712150888896.issue35586@roundup.psfhosted.org> Message-ID: <1560226760.69.0.954689258188.issue35586@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Makefile is not correctly generated when compiling pyextat with DXML_POOR_ENTROPY=1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 00:55:33 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 11 Jun 2019 04:55:33 +0000 Subject: [issue34886] subprocess.run throws exception when input and stdin are passed as kwargs In-Reply-To: <1538592638.37.0.545547206417.issue34886@psf.upfronthosting.co.za> Message-ID: <1560228933.83.0.40043685162.issue34886@roundup.psfhosted.org> Gregory P. Smith added the comment: thanks! ---------- assignee: -> gregory.p.smith resolution: -> fixed stage: patch review -> commit review status: open -> closed versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 00:57:58 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 11 Jun 2019 04:57:58 +0000 Subject: [issue19666] Format string for ASCII unicode or bytes-like object as readonly buffer In-Reply-To: <1384971256.72.0.0181602551145.issue19666@psf.upfronthosting.co.za> Message-ID: <1560229078.03.0.128334727469.issue19666@roundup.psfhosted.org> Gregory P. Smith added the comment: "needs patch" doesn't mean it has been accepted, it's just a common state for issues where nobody has written any code even as a proof of concept. Christian - is this still desired? ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 01:25:04 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 11 Jun 2019 05:25:04 +0000 Subject: [issue37219] empty set difference does not check types of values In-Reply-To: <1560204096.52.0.24651391919.issue37219@roundup.psfhosted.org> Message-ID: <1560230704.8.0.833813130216.issue37219@roundup.psfhosted.org> Raymond Hettinger added the comment: Nice catch. Thanks. ---------- assignee: -> rhettinger priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 01:37:39 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Jun 2019 05:37:39 +0000 Subject: [issue37216] mac installation document wrong for python 3.7.3 In-Reply-To: <1560181222.28.0.0831029476518.issue37216@roundup.psfhosted.org> Message-ID: <1560231459.53.0.842153605865.issue37216@roundup.psfhosted.org> Ned Deily added the comment: New changeset fe5f8b9ce2e504d4510cc82129d595015d239634 by Ned Deily (Makdon) in branch '3.8': [3.8] bpo-37216: Fix version and filename in Mac using document (GH-13964) https://github.com/python/cpython/commit/fe5f8b9ce2e504d4510cc82129d595015d239634 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 01:38:28 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Jun 2019 05:38:28 +0000 Subject: [issue37216] mac installation document wrong for python 3.7.3 In-Reply-To: <1560181222.28.0.0831029476518.issue37216@roundup.psfhosted.org> Message-ID: <1560231508.95.0.344465691515.issue37216@roundup.psfhosted.org> Ned Deily added the comment: New changeset c59b1bbbb37bbfc7eb7a9386bb51c7fea838fc2a by Ned Deily (Makdon) in branch '3.7': [3.7] bpo-37216: Fix version and filename in Mac using document (GH-13963) https://github.com/python/cpython/commit/c59b1bbbb37bbfc7eb7a9386bb51c7fea838fc2a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 01:42:02 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Jun 2019 05:42:02 +0000 Subject: [issue37216] "Using Python on a Macintosh" chapter of "Python Setup and Usage" doc is out-of-date In-Reply-To: <1560181222.28.0.0831029476518.issue37216@roundup.psfhosted.org> Message-ID: <1560231722.24.0.244039568007.issue37216@roundup.psfhosted.org> Change by Ned Deily : ---------- assignee: docs at python -> ned.deily title: mac installation document wrong for python 3.7.3 -> "Using Python on a Macintosh" chapter of "Python Setup and Usage" doc is out-of-date versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 01:49:44 2019 From: report at bugs.python.org (Tal Einat) Date: Tue, 11 Jun 2019 05:49:44 +0000 Subject: [issue37038] Make idlelib/run.py runnable. In-Reply-To: <1558734979.99.0.70787522165.issue37038@roundup.psfhosted.org> Message-ID: <1560232184.05.0.486914930459.issue37038@roundup.psfhosted.org> Tal Einat added the comment: Terry, I believe this can be closed now that the fix has been merged? ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 01:50:18 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 11 Jun 2019 05:50:18 +0000 Subject: [issue28071] Stop set.difference when set is empty In-Reply-To: <1473546124.61.0.846799872363.issue28071@psf.upfronthosting.co.za> Message-ID: <1560232218.99.0.672050403855.issue28071@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Behavior change in msg306973 is tracked with issue37219 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 01:52:48 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 11 Jun 2019 05:52:48 +0000 Subject: [issue37217] SSL socket segfaults during a connect() using a punycode domain containg a umlaut In-Reply-To: <1560197039.5.0.767955558559.issue37217@roundup.psfhosted.org> Message-ID: <1560232368.96.0.582187423237.issue37217@roundup.psfhosted.org> Gregory P. Smith added the comment: FWIW, I could reproduce this on early 3.5 versions but it appears to have been fixed between 3.5.3 and 3.5.4. I'm leaving this open in case anyone can tie it back to a particular change. ---------- components: +Extension Modules -ctypes nosy: +gregory.p.smith stage: -> resolved type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 01:52:59 2019 From: report at bugs.python.org (Tal Einat) Date: Tue, 11 Jun 2019 05:52:59 +0000 Subject: [issue37220] test_idle crash on Windows 2.7 when run with -R: In-Reply-To: <1560206989.94.0.836960275888.issue37220@roundup.psfhosted.org> Message-ID: <1560232379.26.0.423000560768.issue37220@roundup.psfhosted.org> Tal Einat added the comment: Terry, we can also just revert the fix on the 2.7 branch, it's not crucial. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 01:54:03 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 11 Jun 2019 05:54:03 +0000 Subject: [issue37038] Make idlelib/run.py runnable. In-Reply-To: <1558734979.99.0.70787522165.issue37038@roundup.psfhosted.org> Message-ID: <1560232443.32.0.247840840657.issue37038@roundup.psfhosted.org> Terry J. Reedy added the comment: Yes, thank you. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 01:59:56 2019 From: report at bugs.python.org (Tal Einat) Date: Tue, 11 Jun 2019 05:59:56 +0000 Subject: [issue37220] test_idle crash on Windows 2.7 when run with -R: In-Reply-To: <1560206989.94.0.836960275888.issue37220@roundup.psfhosted.org> Message-ID: <1560232796.42.0.234248589433.issue37220@roundup.psfhosted.org> Tal Einat added the comment: Now that I've looked at the PR, it should likely be merged for all relevant branches to make the test more robust. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 02:13:36 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 11 Jun 2019 06:13:36 +0000 Subject: [issue37217] SSL socket segfaults during a connect() using a punycode domain containg a umlaut In-Reply-To: <1560197039.5.0.767955558559.issue37217@roundup.psfhosted.org> Message-ID: <1560233616.45.0.844292650144.issue37217@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I couldn't get an ssl build with 3.5.4 to verify this but looking at changelog between 3.5.3 and 3.5.4 issue30594 might have fixed it since it reports a similar segfault. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 02:25:08 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 11 Jun 2019 06:25:08 +0000 Subject: [issue37217] SSL socket segfaults during a connect() using a punycode domain containg a umlaut In-Reply-To: <1560197039.5.0.767955558559.issue37217@roundup.psfhosted.org> Message-ID: <1560234308.85.0.291444041621.issue37217@roundup.psfhosted.org> Christian Heimes added the comment: Yes, this looks like a duplicate of issue30594. kmille, please contact Ubuntu and ask them to apply the fix to 16.04. By the way, your hostname is not correct. "xn--b" is an invalid punycode. The correct IDNA encoding for the domain looks like this: >>> "www.buchhandlunggr?nden.de".encode('idna') b'www.xn--buchhandlunggrnden-z6b.de' ---------- nosy: +christian.heimes resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 02:25:50 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 11 Jun 2019 06:25:50 +0000 Subject: [issue37217] SSL socket segfaults during a connect() using a punycode domain containg a umlaut In-Reply-To: <1560197039.5.0.767955558559.issue37217@roundup.psfhosted.org> Message-ID: <1560234350.1.0.129681527303.issue37217@roundup.psfhosted.org> Gregory P. Smith added the comment: oh that is likely it, the stacktrace i got in a pydebug build was a gc time refcount != 0 assertion. ---------- superseder: -> Refcounting mistake in _ssl.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 02:27:59 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 11 Jun 2019 06:27:59 +0000 Subject: [issue37219] empty set difference does not check types of values In-Reply-To: <1560204096.52.0.24651391919.issue37219@roundup.psfhosted.org> Message-ID: <1560234479.01.0.418465220668.issue37219@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +13832 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13965 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 02:30:02 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 11 Jun 2019 06:30:02 +0000 Subject: [issue37129] Add os.RWF_APPEND flag for os.pwritev In-Reply-To: <1559933925.78.0.510794410466.issue37129@roundup.psfhosted.org> Message-ID: <1560234602.64.0.0483617895738.issue37129@roundup.psfhosted.org> Gregory P. Smith added the comment: This is just adding a missing constant (when defined at CPython compile time) to the os module. I suggest landing this in 3.8 as well assuming we're still in the beta cycles when the PR is ready. It isn't a functional change. ---------- nosy: +gregory.p.smith versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 02:33:06 2019 From: report at bugs.python.org (alter-bug-tracer) Date: Tue, 11 Jun 2019 06:33:06 +0000 Subject: [issue36993] zipfile: tuple IndexError on extract In-Reply-To: <1558441969.28.0.928640082083.issue36993@roundup.psfhosted.org> Message-ID: <1560234786.35.0.58170186892.issue36993@roundup.psfhosted.org> alter-bug-tracer added the comment: @berker.peksag, first of all sorry for the late reply. We are not sure that we know how to do that. Our tests are generated automatically. What we can do is retest the lib with your temporary fixes in place, to see if they fix all the problems our software can detect. Would that help you? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 02:51:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 06:51:24 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560235884.59.0.0885260520962.issue37221@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 03:11:42 2019 From: report at bugs.python.org (Hong Xu) Date: Tue, 11 Jun 2019 07:11:42 +0000 Subject: [issue37225] Signatures of Exceptions not documented Message-ID: <1560237102.52.0.133464005619.issue37225@roundup.psfhosted.org> New submission from Hong Xu : The "Builtin Exceptions" page does not document the constructors of the listed exception classes. All it says is > The tuple of arguments given to the exception constructor. Some built-in exceptions (like OSError) expect a certain number of arguments and assign a special meaning to the elements of this tuple, while others are usually called only with a single string giving an error message. This is quite vague and does not really guide users for individual exception classes. ---------- assignee: docs at python components: Documentation messages: 345195 nosy: Hong Xu, docs at python priority: normal severity: normal status: open title: Signatures of Exceptions not documented versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 03:17:40 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Jun 2019 07:17:40 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560237460.33.0.264252711995.issue37221@roundup.psfhosted.org> Serhiy Storchaka added the comment: Seems it was changed last time many years ago and was stable in Python 3. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 03:24:02 2019 From: report at bugs.python.org (Roundup Robot) Date: Tue, 11 Jun 2019 07:24:02 +0000 Subject: [issue37216] "Using Python on a Macintosh" chapter of "Python Setup and Usage" doc is out-of-date In-Reply-To: <1560181222.28.0.0831029476518.issue37216@roundup.psfhosted.org> Message-ID: <1560237842.43.0.575712017434.issue37216@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +13833 pull_request: https://github.com/python/cpython/pull/13966 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 03:31:54 2019 From: report at bugs.python.org (Alex Willmer) Date: Tue, 11 Jun 2019 07:31:54 +0000 Subject: [issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer In-Reply-To: <1560111812.29.0.301182333638.issue37210@roundup.psfhosted.org> Message-ID: <1560238314.91.0.848193222462.issue37210@roundup.psfhosted.org> Alex Willmer added the comment: I don't think I can do this. My WIP code is in https://github.com/moreati/cpython/pull/new/bpo-37210, and associated make test output is attached. Principal blockers - `_pickle.PickleBuffer.raw()` can return a contiguous buffer from either a c_contiguous, or f_contiguous buffer. memoryview() (and hence pickle._PickleBuffer.raw()) requires a c_contiguous buffer. - I'm unsure how to allow _PickleBuffer -> bytearray conversion The most common cause of test failures is `TypeError: cannot pickle 'memoryview' object`. I guess Python is seeing a lack of __reduce__(), and failing back to walking the object attributes. Implementing __reduce__() and or __reduce_ex__() might fix this, but seems moot given the other blockers. ---------- Added file: https://bugs.python.org/file48410/bp0-37201_make_test_20190610.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 04:07:56 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 11 Jun 2019 08:07:56 +0000 Subject: [issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer In-Reply-To: <1560111812.29.0.301182333638.issue37210@roundup.psfhosted.org> Message-ID: <1560240476.97.0.306909532004.issue37210@roundup.psfhosted.org> Antoine Pitrou added the comment: Right, it is probably not possible to write a pure Python PickleBuffer. There's a reason it's written in C... When you said "make PickleBuffer an optional dependency", I thought you intended to have a usable pure Python Pickler, but without support for the PickleBuffer class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 04:16:06 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 11 Jun 2019 08:16:06 +0000 Subject: [issue37219] empty set difference does not check types of values In-Reply-To: <1560204096.52.0.24651391919.issue37219@roundup.psfhosted.org> Message-ID: <1560240966.06.0.916425773975.issue37219@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 1f11cf9521114447b3e32e2ac88f075ffaa37555 by Raymond Hettinger in branch 'master': bpo-37219: Remove erroneous optimization for differencing an empty set (GH-13965) https://github.com/python/cpython/commit/1f11cf9521114447b3e32e2ac88f075ffaa37555 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 04:19:30 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 11 Jun 2019 08:19:30 +0000 Subject: [issue37222] urllib missing voidresp breaks CacheFTPHandler In-Reply-To: <1560209901.95.0.0637922149523.issue37222@roundup.psfhosted.org> Message-ID: <1560241170.98.0.0709812201641.issue37222@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +giampaolo.rodola, orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 04:24:08 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Jun 2019 08:24:08 +0000 Subject: [issue37219] empty set difference does not check types of values In-Reply-To: <1560204096.52.0.24651391919.issue37219@roundup.psfhosted.org> Message-ID: <1560241448.8.0.835764193975.issue37219@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13834 pull_request: https://github.com/python/cpython/pull/13967 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 04:40:43 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 11 Jun 2019 08:40:43 +0000 Subject: [issue37219] empty set difference does not check types of values In-Reply-To: <1560204096.52.0.24651391919.issue37219@roundup.psfhosted.org> Message-ID: <1560242443.92.0.236059899065.issue37219@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +13835 pull_request: https://github.com/python/cpython/pull/13968 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 04:41:30 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 11 Jun 2019 08:41:30 +0000 Subject: [issue37219] empty set difference does not check types of values In-Reply-To: <1560204096.52.0.24651391919.issue37219@roundup.psfhosted.org> Message-ID: <1560242490.84.0.27374909301.issue37219@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 583ff84351e528976aa93d383e5a81aee9f3bac3 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-37219: Remove erroneous optimization for differencing an empty set (GH-13965) (GH-13967) https://github.com/python/cpython/commit/583ff84351e528976aa93d383e5a81aee9f3bac3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 04:44:59 2019 From: report at bugs.python.org (Ben Brown) Date: Tue, 11 Jun 2019 08:44:59 +0000 Subject: [issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range Message-ID: <1560242699.55.0.804750809475.issue37226@roundup.psfhosted.org> New submission from Ben Brown : I have been getting an intermittent errors when using asyncio with SSL. The error always occurs in the _process_write_backlog method in asyncio's sslproto.py file. I have looked at lots of possibilities as to what the cause is and found that for some reason when in _process_write_backlog's loop the deque seems to be empty, I added some quick terrible hacky code to confirm it fixed the issue and checking at each point it is used wether it is empty fixes the issue, I am unusure as to what causes it to become empty but still run through the loop. The most frequent time it happens is after we have a successful message the client sends a request to join a data stream this request mostly causes the error but sometimes it happens while the client is receiving data. I am currently using python 3.7.1 but have also tested my code on 3.7.3 with the same result. NOTE: I am currently working on a minimal sample to show the issue easier. Fatal error on SSL transport protocol: transport: <_SelectorSocketTransport fd=38 read=polling write=> Traceback (most recent call last): File "/usr/local/lib/python3.7/asyncio/sslproto.py", line 689, in _process_write_backlog del self._write_backlog[0] IndexError: deque index out of range Fatal error on SSL transport protocol: transport: <_SelectorSocketTransport fd=29 read=polling write=> Traceback (most recent call last): File "/usr/local/lib/python3.7/asyncio/sslproto.py", line 664, in _process_write_backlog data, offset = self._write_backlog[0] IndexError: deque index out of range ---------- assignee: christian.heimes components: SSL messages: 345201 nosy: ben.brown, christian.heimes priority: normal severity: normal status: open title: Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 04:47:56 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 11 Jun 2019 08:47:56 +0000 Subject: [issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range In-Reply-To: <1560242699.55.0.804750809475.issue37226@roundup.psfhosted.org> Message-ID: <1560242876.2.0.537289091044.issue37226@roundup.psfhosted.org> Christian Heimes added the comment: This looks more like an asyncio problem than an SSL problem. Andrew, Yury, please take a look. ---------- components: +asyncio nosy: +asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 04:53:06 2019 From: report at bugs.python.org (chr0139) Date: Tue, 11 Jun 2019 08:53:06 +0000 Subject: [issue37227] Wrong parse long argument Message-ID: <1560243186.93.0.426375916497.issue37227@roundup.psfhosted.org> New submission from chr0139 : I have this script import argparse parser = argparse.ArgumentParser() group = parser.add_mutually_exclusive_group() group.add_argument('-l', '--list', action='store_true', help="show help") group.add_argument('-u', '--upgrade', action='store_true', help="show help") parser.parse_args(['--li']) and this is the unexpected result: Namespace(list=True, upgrade=False) ---------- components: Library (Lib) messages: 345203 nosy: chr0139 priority: normal severity: normal status: open title: Wrong parse long argument type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 04:57:39 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 11 Jun 2019 08:57:39 +0000 Subject: [issue37227] Wrong parse long argument In-Reply-To: <1560243186.93.0.426375916497.issue37227@roundup.psfhosted.org> Message-ID: <1560243459.93.0.838367573276.issue37227@roundup.psfhosted.org> Eric V. Smith added the comment: And what is your expected result, and why? ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 05:01:27 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 11 Jun 2019 09:01:27 +0000 Subject: [issue37219] empty set difference does not check types of values In-Reply-To: <1560204096.52.0.24651391919.issue37219@roundup.psfhosted.org> Message-ID: <1560243687.22.0.0995248748988.issue37219@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 1b615b2f035d207941e44259a92ed0bdcc56ac45 by Raymond Hettinger in branch '3.7': [3.7] bpo-37219: Remove erroneous optimization for differencing an empty set (GH-13965) (GH-13968) https://github.com/python/cpython/commit/1b615b2f035d207941e44259a92ed0bdcc56ac45 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 05:01:44 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 11 Jun 2019 09:01:44 +0000 Subject: [issue37219] empty set difference does not check types of values In-Reply-To: <1560204096.52.0.24651391919.issue37219@roundup.psfhosted.org> Message-ID: <1560243704.05.0.221177170529.issue37219@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 05:08:41 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 11 Jun 2019 09:08:41 +0000 Subject: [issue37227] Wrong parse long argument In-Reply-To: <1560243186.93.0.426375916497.issue37227@roundup.psfhosted.org> Message-ID: <1560244121.91.0.259226026533.issue37227@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 05:16:12 2019 From: report at bugs.python.org (chr0139) Date: Tue, 11 Jun 2019 09:16:12 +0000 Subject: [issue37227] Wrong parse long argument In-Reply-To: <1560243186.93.0.426375916497.issue37227@roundup.psfhosted.org> Message-ID: <1560244572.54.0.617425705437.issue37227@roundup.psfhosted.org> chr0139 added the comment: I think --li is not the same argument as --list So I expect that parser.parse_args(['-l']) or parser.parse_args(['--list']) should be only two options which should leads to the result Namespace(list=True, upgrade=False) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 05:18:48 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 11 Jun 2019 09:18:48 +0000 Subject: [issue37227] Wrong parse long argument In-Reply-To: <1560243186.93.0.426375916497.issue37227@roundup.psfhosted.org> Message-ID: <1560244728.28.0.124223992293.issue37227@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: argparse allows abbreviations by default so --li matches --list as a prefix match. This is documented at https://docs.python.org/2.7/library/argparse.html#argument-abbreviations-prefix-matching >From python 3.5 allow_abbrev=False can be passed to ArgumentParser to disable this. See also issue10981 and issue14910 that implemented this. https://docs.python.org/3/library/argparse.html#argument-abbreviations-prefix-matching. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 05:26:10 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 11 Jun 2019 09:26:10 +0000 Subject: [issue37227] Wrong parse long argument In-Reply-To: <1560243186.93.0.426375916497.issue37227@roundup.psfhosted.org> Message-ID: <1560245170.17.0.820326282692.issue37227@roundup.psfhosted.org> Eric V. Smith added the comment: Although note that with allow_abbrev=False, -l will conflict with --long, which I'm not sure is a great design. I'm closing this as not a bug, since it works as documented and there's a workaround (albeit not in 2.7, which is closed to new features). ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 05:36:54 2019 From: report at bugs.python.org (=?utf-8?q?Jukka_V=C3=A4is=C3=A4nen?=) Date: Tue, 11 Jun 2019 09:36:54 +0000 Subject: [issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port Message-ID: <1560245814.37.0.496048869185.issue37228@roundup.psfhosted.org> New submission from Jukka V?is?nen : When using loop.create_datagram_endpoint(), the default for reuse_address=True, which sets the SO_REUSEADDR sockopt for the UDP socket. This is a dangerous and unreasonable default for UDP, because in Linux it allows multiple processes to create listening sockets for the same UDP port and the kernel will randomly give incoming packets to these processes. I discovered this by accidentally starting two Python asyncio programs with the same UDP port and instead of getting an exception that the address is already in use, everything looked to be working except half my packets went to the wrong process. The documentation also refers to behavior with TCP sockets: https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.create_datagram_endpoint "reuse_address tells the kernel to reuse a local socket in TIME_WAIT state, without waiting for its natural timeout to expire. If not specified will automatically be set to True on Unix." This is true for TCP but not UDP. Either the documentation should reflect the current (dangerous) behavior or the behavior should be changed for UDP sockets. Workaround is of course to create your own socket without SO_REUSEADDR and pass it to create_datagram_endpoint(). ---------- components: asyncio messages: 345209 nosy: Jukka V?is?nen, asvetlov, yselivanov priority: normal severity: normal status: open title: UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 05:39:30 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 11 Jun 2019 09:39:30 +0000 Subject: [issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port In-Reply-To: <1560245814.37.0.496048869185.issue37228@roundup.psfhosted.org> Message-ID: <1560245970.44.0.663582961296.issue37228@roundup.psfhosted.org> Andrew Svetlov added the comment: There is no chance to change the flag for 3.7. But we can consider it for 3.8 Yuri, what do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 05:41:20 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 11 Jun 2019 09:41:20 +0000 Subject: [issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range In-Reply-To: <1560242699.55.0.804750809475.issue37226@roundup.psfhosted.org> Message-ID: <1560246080.2.0.126901665988.issue37226@roundup.psfhosted.org> Andrew Svetlov added the comment: Just to clarify: what OpenSSL version is used? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 05:43:20 2019 From: report at bugs.python.org (Ben Brown) Date: Tue, 11 Jun 2019 09:43:20 +0000 Subject: [issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range In-Reply-To: <1560242699.55.0.804750809475.issue37226@roundup.psfhosted.org> Message-ID: <1560246200.94.0.44041858814.issue37226@roundup.psfhosted.org> Ben Brown added the comment: The OpenSSL version is OpenSSL 1.1.0j 20 Nov 2018 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 06:00:13 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 11 Jun 2019 10:00:13 +0000 Subject: [issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range In-Reply-To: <1560242699.55.0.804750809475.issue37226@roundup.psfhosted.org> Message-ID: <1560247213.46.0.638812769825.issue37226@roundup.psfhosted.org> Andrew Svetlov added the comment: That's what I afraid. asyncio/sslproto.py fails on new OpenSSL at several places :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 06:08:56 2019 From: report at bugs.python.org (Ben Brown) Date: Tue, 11 Jun 2019 10:08:56 +0000 Subject: [issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range In-Reply-To: <1560242699.55.0.804750809475.issue37226@roundup.psfhosted.org> Message-ID: <1560247736.52.0.501941082072.issue37226@roundup.psfhosted.org> Ben Brown added the comment: That's a shame, which version should it work on I don't mind downgrading for now to fix the issue as a workaround. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 06:09:28 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 11 Jun 2019 10:09:28 +0000 Subject: [issue34467] No mechanism to abort created coroutine or suppress not-awaited warning In-Reply-To: <1534975363.12.0.56676864532.issue34467@psf.upfronthosting.co.za> Message-ID: <1560247768.39.0.678376281976.issue34467@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 06:09:56 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 11 Jun 2019 10:09:56 +0000 Subject: [issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range In-Reply-To: <1560242699.55.0.804750809475.issue37226@roundup.psfhosted.org> Message-ID: <1560247796.97.0.796500029244.issue37226@roundup.psfhosted.org> Christian Heimes added the comment: Is 1.1.0 also a problem? I have only seen issue with 1.1.1 and TLS 1.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 06:14:31 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 11 Jun 2019 10:14:31 +0000 Subject: [issue37213] Peeephole optimizer does not optimize functions with multiline expressions In-Reply-To: <1560155063.44.0.426038128869.issue37213@roundup.psfhosted.org> Message-ID: <1560248071.96.0.318309186494.issue37213@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +13836 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13969 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 06:36:53 2019 From: report at bugs.python.org (G) Date: Tue, 11 Jun 2019 10:36:53 +0000 Subject: [issue37229] bisect: Allow a custom compare function Message-ID: <1560249413.65.0.773454068732.issue37229@roundup.psfhosted.org> New submission from G : All of bisect's functions (insort_{left,right}, bisect_{left,right}) can only use comparison of objects via __lt__. They should support providing a custom comparison function. ---------- components: Library (Lib) messages: 345216 nosy: gpery priority: normal severity: normal status: open title: bisect: Allow a custom compare function type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 06:41:14 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 11 Jun 2019 10:41:14 +0000 Subject: [issue37229] bisect: Allow a custom compare function In-Reply-To: <1560249413.65.0.773454068732.issue37229@roundup.psfhosted.org> Message-ID: <1560249674.4.0.6627873272.issue37229@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 06:43:04 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 11 Jun 2019 10:43:04 +0000 Subject: [issue37229] bisect: Allow a custom compare function In-Reply-To: <1560249413.65.0.773454068732.issue37229@roundup.psfhosted.org> Message-ID: <1560249784.85.0.600481878357.issue37229@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: See also issue1451588. issue4356 for more discussion that also proposes to add key parameter. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 06:45:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 10:45:39 +0000 Subject: [issue36742] CVE-2019-10160: urlsplit NFKD normalization vulnerability in user:password@ In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1560249939.31.0.73717562971.issue36742@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 2b578479b96aa3deeeb8bac313a02b5cf3cb1aff by Victor Stinner in branch '2.7': [2.7] bpo-36742: Fix urlparse.urlsplit() error message for Unicode URL (GH-13937) https://github.com/python/cpython/commit/2b578479b96aa3deeeb8bac313a02b5cf3cb1aff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 06:48:29 2019 From: report at bugs.python.org (G) Date: Tue, 11 Jun 2019 10:48:29 +0000 Subject: [issue37229] bisect: Allow a custom compare function In-Reply-To: <1560249413.65.0.773454068732.issue37229@roundup.psfhosted.org> Message-ID: <1560250109.18.0.380687148185.issue37229@roundup.psfhosted.org> Change by G : ---------- keywords: +patch pull_requests: +13837 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13970 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 06:54:31 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 11 Jun 2019 10:54:31 +0000 Subject: [issue36607] asyncio.all_tasks() crashes if asyncio is used in multiple threads In-Reply-To: <1555006368.14.0.78767463153.issue36607@roundup.psfhosted.org> Message-ID: <1560250471.99.0.534272163274.issue36607@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +13838 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13971 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 06:55:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 10:55:23 +0000 Subject: [issue37224] test__xxsubinterpreters failed on AMD64 Windows8.1 Refleaks 3.8 In-Reply-To: <1560214681.61.0.906498246375.issue37224@roundup.psfhosted.org> Message-ID: <1560250523.15.0.99661017459.issue37224@roundup.psfhosted.org> STINNER Victor added the comment: Fail on x86 Gentoo Refleaks 3.x: https://buildbot.python.org/all/#/builders/1/builds/618 3:15:59 load avg: 6.93 [339/423/1] test__xxsubinterpreters failed -- running: test_multiprocessing_spawn (19 min 36 sec) beginning 6 repetitions 123456 .Exception in thread Thread-17: Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/threading.py", line 923, in _bootstrap_inner self.run() File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/test__xxsubinterpreters.py", line 51, in run interpreters.run_string(interp, dedent(f""" RuntimeError: unrecognized interpreter ID 108 test test__xxsubinterpreters failed -- Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/test__xxsubinterpreters.py", line 765, in test_still_running interpreters.destroy(interp) AssertionError: RuntimeError not raised (...) test_after_destroying (test.test__xxsubinterpreters.ListAllTests) ... ok test_initial (test.test__xxsubinterpreters.ListAllTests) ... ok test_SystemExit (test.test__xxsubinterpreters.RunStringTests) ... ok test_already_running (test.test__xxsubinterpreters.RunStringTests) ... spam Exception in thread Thread-31: Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/threading.py", line 923, in _bootstrap_inner self.run() File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/test__xxsubinterpreters.py", line 51, in run interpreters.run_string(interp, dedent(f""" RuntimeError: unrecognized interpreter ID 190 FAIL test_bad_id (test.test__xxsubinterpreters.RunStringTests) ... ok test_bad_script (test.test__xxsubinterpreters.RunStringTests) ... ok test_bytes_for_script (test.test__xxsubinterpreters.RunStringTests) ... ok test_create_thread (test.test__xxsubinterpreters.RunStringTests) ... ok test_does_not_exist (test.test__xxsubinterpreters.RunStringTests) ... ok test_error_id (test.test__xxsubinterpreters.RunStringTests) ... ok test_execution_namespace_is_main (test.test__xxsubinterpreters.RunStringTests) ... ok test_failure (test.test__xxsubinterpreters.RunStringTests) ... ok test_fork (test.test__xxsubinterpreters.RunStringTests) ... ok test_in_thread (test.test__xxsubinterpreters.RunStringTests) ... ok test_invalid_syntax (test.test__xxsubinterpreters.RunStringTests) ... ok test_main_reused (test.test__xxsubinterpreters.RunStringTests) ... ok test_shared_overwrites (test.test__xxsubinterpreters.RunStringTests) ... ok test_shared_overwrites_default_vars (test.test__xxsubinterpreters.RunStringTests) ... ok test_still_running_at_exit (test.test__xxsubinterpreters.RunStringTests) ... skipped 'blocking forever' test_success (test.test__xxsubinterpreters.RunStringTests) ... ok test_sys_exit (test.test__xxsubinterpreters.RunStringTests) ... ok test_with_shared (test.test__xxsubinterpreters.RunStringTests) ... ok test_bytes (test.test__xxsubinterpreters.ShareableTypeTests) ... ok test_int (test.test__xxsubinterpreters.ShareableTypeTests) ... ok test_non_shareable_int (test.test__xxsubinterpreters.ShareableTypeTests) ... ok test_singletons (test.test__xxsubinterpreters.ShareableTypeTests) ... ok test_types (test.test__xxsubinterpreters.ShareableTypeTests) ... ok ====================================================================== FAIL: test_already_running (test.test__xxsubinterpreters.RunStringTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/test__xxsubinterpreters.py", line 855, in test_already_running interpreters.run_string(self.id, 'print("spam")') AssertionError: RuntimeError not raised ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 06:56:12 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 11 Jun 2019 10:56:12 +0000 Subject: [issue36607] asyncio.all_tasks() crashes if asyncio is used in multiple threads In-Reply-To: <1555006368.14.0.78767463153.issue36607@roundup.psfhosted.org> Message-ID: <1560250572.1.0.67879942521.issue36607@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 07:02:14 2019 From: report at bugs.python.org (G) Date: Tue, 11 Jun 2019 11:02:14 +0000 Subject: [issue4356] Add "key" argument to "bisect" module functions In-Reply-To: <1227115048.67.0.318831592843.issue4356@psf.upfronthosting.co.za> Message-ID: <1560250934.0.0.432721759629.issue4356@roundup.psfhosted.org> G added the comment: I opened a relevant PR, https://github.com/python/cpython/pull/11781. I believe a key parameter is inferior to a comparison callback. The former is a specific case of the latter, and in my use case would force me to create another class to serve as a comparator for my objects, at which point I might as well wrap them and add __lt__. Furthermore, I believe this is more in-line with similar standard functions in other languages such as C++ (std::sort), Java (PriorityQueue) or Rust (slice.sort_by). ---------- nosy: +gpery _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 07:11:38 2019 From: report at bugs.python.org (David Jones) Date: Tue, 11 Jun 2019 11:11:38 +0000 Subject: [issue36853] inconsistencies in docs builds (Sphinx 2) In-Reply-To: <1557331408.26.0.606381835406.issue36853@roundup.psfhosted.org> Message-ID: <1560251498.23.0.646769341033.issue36853@roundup.psfhosted.org> David Jones added the comment: I believe the issue is only triggered if you actually have some suspicious markup in your documentation (which is why your plain build on Sphinx 2 appears to work). Remove some lines from Doc/tools/susp-ignored.csv to trigger it. ---------- nosy: +drj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 07:22:44 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 11 Jun 2019 11:22:44 +0000 Subject: [issue33758] Unexpected success of test_get_type_hints_modules_forwardref in test_typing In-Reply-To: <1528041121.47.0.592728768989.issue33758@psf.upfronthosting.co.za> Message-ID: <1560252164.04.0.609688473828.issue33758@roundup.psfhosted.org> Ivan Levkivskyi added the comment: Likely, the unexpected success can be avoided with clearing generic caches in test___all__ (it just imports whatever it can find and likely also test/mod_generics_cache.py), but I am also fine with just skipping it for now. Will you have time to make a PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 07:22:52 2019 From: report at bugs.python.org (Ben Brown) Date: Tue, 11 Jun 2019 11:22:52 +0000 Subject: [issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range In-Reply-To: <1560242699.55.0.804750809475.issue37226@roundup.psfhosted.org> Message-ID: <1560252172.16.0.80644367062.issue37226@roundup.psfhosted.org> Ben Brown added the comment: I am using the version I mentioned above 1.1.0 and TLS 1.2, I am sorry I can't be of more help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 07:25:36 2019 From: report at bugs.python.org (pallavi shete) Date: Tue, 11 Jun 2019 11:25:36 +0000 Subject: [issue37230] Why Highly Skilled Network Engineers prefer On-Demand work? Message-ID: <1560252336.74.0.292651844665.issue37230@roundup.psfhosted.org> New submission from pallavi shete : What Is On-Demand Work? The on-demand workforce describes a shift towards an open talent economy. Rather than working as a traditional employee, skilled workers can take on contracted projects. They could be temporary jobs or ongoing agreements. While the idea of contracting is nothing new, this is a new(ish) approach. Contractors find their projects on a marketplace, like FieldEngineer, to make landing work easier than ever. This ensures that their work is as secure as traditional employment. https://www.fieldengineer.com/blogs/network-engineers-prefer-on-demand-work ---------- components: Windows messages: 345224 nosy: pallavishete, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Why Highly Skilled Network Engineers prefer On-Demand work? versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 07:27:16 2019 From: report at bugs.python.org (pallavi shete) Date: Tue, 11 Jun 2019 11:27:16 +0000 Subject: [issue37230] Why Highly Skilled Network Engineers prefer On-Demand work? In-Reply-To: <1560252336.74.0.292651844665.issue37230@roundup.psfhosted.org> Message-ID: <1560252436.92.0.112037297405.issue37230@roundup.psfhosted.org> pallavi shete added the comment: hat Is On-Demand Work? The on-demand workforce describes a shift towards an open talent economy. Rather than working as a traditional employee, skilled workers can take on contracted projects. They could be temporary jobs or ongoing agreements. While the idea of contracting is nothing new, this is a new(ish) approach. Contractors find their projects on a marketplace, like FieldEngineer, to make landing work easier than ever. This ensures that their work is as secure as traditional employment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 07:29:15 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 11 Jun 2019 11:29:15 +0000 Subject: [issue37230] spam In-Reply-To: <1560252336.74.0.292651844665.issue37230@roundup.psfhosted.org> Message-ID: <1560252555.33.0.843576808461.issue37230@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed title: Why Highly Skilled Network Engineers prefer On-Demand work? -> spam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 07:30:16 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 11 Jun 2019 11:30:16 +0000 Subject: [issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call In-Reply-To: <1480885774.84.0.670239959771.issue28869@psf.upfronthosting.co.za> Message-ID: <1560252616.88.0.87893058923.issue28869@roundup.psfhosted.org> Ivan Levkivskyi added the comment: I think we can proceed with option A, but only if doesn't cause visible slow-down for creating ABCs (which is already slower that normal classes). TBH, I don't want to document A as "official" recipe (maybe however mention the problem in the `pickle` module docs). Note that other "class factories" in stdlib (like collections.namedtuple) do almost exactly option A. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 07:54:42 2019 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 11 Jun 2019 11:54:42 +0000 Subject: [issue4356] Add "key" argument to "bisect" module functions In-Reply-To: <1227115048.67.0.318831592843.issue4356@psf.upfronthosting.co.za> Message-ID: <1560254082.52.0.2106302475.issue4356@roundup.psfhosted.org> Mark Dickinson added the comment: > I opened a relevant PR, https://github.com/python/cpython/pull/11781. Did you mean https://github.com/python/cpython/pull/13970 ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 07:56:22 2019 From: report at bugs.python.org (G) Date: Tue, 11 Jun 2019 11:56:22 +0000 Subject: [issue4356] Add "key" argument to "bisect" module functions In-Reply-To: <1227115048.67.0.318831592843.issue4356@psf.upfronthosting.co.za> Message-ID: <1560254182.18.0.546433720334.issue4356@roundup.psfhosted.org> G added the comment: I did, thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 07:58:07 2019 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 11 Jun 2019 11:58:07 +0000 Subject: [issue13889] str(float) and round(float) issues with FPU precision In-Reply-To: <1327676303.66.0.487112802864.issue13889@psf.upfronthosting.co.za> Message-ID: <1560254287.23.0.550529008228.issue13889@roundup.psfhosted.org> Change by Mark Dickinson : ---------- pull_requests: -13812 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 08:08:01 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 11 Jun 2019 12:08:01 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560254881.84.0.353477211418.issue37221@roundup.psfhosted.org> Jeroen Demeyer added the comment: > Take into account that doing such rename will break again the projects that have adapted already (primarily only Cython). +1. You already broke backwards compatibility once in beta1, no need to do it again in beta2. ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 08:21:05 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 11 Jun 2019 12:21:05 +0000 Subject: [issue37151] Calling code cleanup after PEP 590 In-Reply-To: <1559659244.35.0.514840211553.issue37151@roundup.psfhosted.org> Message-ID: <1560255665.79.0.992766736775.issue37151@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +13839 pull_request: https://github.com/python/cpython/pull/13972 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 08:27:50 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 11 Jun 2019 12:27:50 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560256070.05.0.71359740003.issue37221@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > You already broke backwards compatibility once in beta1 There is one other thing to consider, that is projects with pinned dependencies will have to upgrade to the last Cython and update their generated sources if we don't do the renaming. I don't know how often this happens (for example, Python3.7 changed the result of PyUnicode_AsUTF8AndSize() and PyUnicode_AsUTF8() to type const char * rather of char * and that is backward incompatible if you compile with a C++ compiler or with -Werror) but certainly is worth to consider. Also, take into account that beta period is precisely the moment to fix these kinds of problems (although I apologize for any inconvenience this may have caused). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 08:29:53 2019 From: report at bugs.python.org (Jakub Kulik) Date: Tue, 11 Jun 2019 12:29:53 +0000 Subject: [issue37215] Build with dtrace is broken on some systems In-Reply-To: <1560172974.02.0.554258836838.issue37215@roundup.psfhosted.org> Message-ID: <1560256193.59.0.621058596085.issue37215@roundup.psfhosted.org> Change by Jakub Kulik : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 09:07:40 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 11 Jun 2019 13:07:40 +0000 Subject: [issue37231] Optimize calling special methods Message-ID: <1560258460.83.0.570346812053.issue37231@roundup.psfhosted.org> New submission from Jeroen Demeyer : Change call_method() and related functions in Objects/typeobject.c to allow profiting from the PY_VECTORCALL_ARGUMENTS_OFFSET optimization: instead of passing "self" as separate argument, put it inside the args vector. ---------- components: Interpreter Core messages: 345231 nosy: jdemeyer priority: normal severity: normal status: open title: Optimize calling special methods type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 09:10:04 2019 From: report at bugs.python.org (Jakub Kulik) Date: Tue, 11 Jun 2019 13:10:04 +0000 Subject: [issue37232] Parallel compilation fails because of low ulimit. Message-ID: <1560258604.43.0.910483303566.issue37232@roundup.psfhosted.org> New submission from Jakub Kulik : When building and installing Python 3.8 on our sparc machine, the build breaks during the compileall stage with [Error 24] Too many open files. The problem is due to the recently enabled parallel compilation (issue36786). When -j0 is passed to the compileall, executor starts as many threads as there are cpus, which is problem on our sparc machine with 512 CPUs and rather low ulimit on number of opened files. Compilation fails and is not able to recover from that. For the same reason, test_compileall also breaks and never ends. I am able to fix both of these by patching both Makefile.pre.in and test_compileall.py with -j32 (instead of -j0), but that is not the best solution. I think that the best solution to this would be to make compileall.py check for this limit and consider that when creating ProcessPoolExecutor (or, maybe even better, to make it recover when this problem occurs). ---------- components: Build messages: 345232 nosy: kulikjak priority: normal severity: normal status: open title: Parallel compilation fails because of low ulimit. versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 10:06:47 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Jun 2019 14:06:47 +0000 Subject: [issue37232] Parallel compilation fails because of low ulimit. In-Reply-To: <1560258604.43.0.910483303566.issue37232@roundup.psfhosted.org> Message-ID: <1560262007.61.0.461106111622.issue37232@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 10:07:54 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 11 Jun 2019 14:07:54 +0000 Subject: [issue37232] Parallel compilation fails because of low ulimit. In-Reply-To: <1560258604.43.0.910483303566.issue37232@roundup.psfhosted.org> Message-ID: <1560262074.14.0.761641330842.issue37232@roundup.psfhosted.org> Antoine Pitrou added the comment: Can't you just up the ulimit? What the current ulimit for your user? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 10:09:36 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Jun 2019 14:09:36 +0000 Subject: [issue37230] spam In-Reply-To: <1560252436.92.0.112037297405.issue37230@roundup.psfhosted.org> Message-ID: <1560262176.39.0.940242229905.issue37230@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg345224 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 10:09:44 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 11 Jun 2019 14:09:44 +0000 Subject: [issue37230] spam Message-ID: <1560262184.02.0.842703349678.issue37230@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg345225 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 10:37:15 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 11 Jun 2019 14:37:15 +0000 Subject: [issue37231] Optimize calling special methods In-Reply-To: <1560258460.83.0.570346812053.issue37231@roundup.psfhosted.org> Message-ID: <1560263835.84.0.818807731016.issue37231@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +13840 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13973 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 10:43:31 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 11 Jun 2019 14:43:31 +0000 Subject: [issue37233] Use _PY_FASTCALL_SMALL_STACK for method_vectorcall Message-ID: <1560264211.71.0.0575753966343.issue37233@roundup.psfhosted.org> New submission from Jeroen Demeyer : The PEP 590 implementation for type "method" caused a minor regression: instead of using _PyObject_Call_Prepend(), method_vectorcall manually allocates and fills a newly allocated vector. This does NOT use the _PY_FASTCALL_SMALL_STACK optimization, but it should. ---------- components: Interpreter Core messages: 345234 nosy: jdemeyer priority: normal severity: normal status: open title: Use _PY_FASTCALL_SMALL_STACK for method_vectorcall type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 11:16:43 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 11 Jun 2019 15:16:43 +0000 Subject: [issue37233] Use _PY_FASTCALL_SMALL_STACK for method_vectorcall In-Reply-To: <1560264211.71.0.0575753966343.issue37233@roundup.psfhosted.org> Message-ID: <1560266203.33.0.729866138841.issue37233@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +13841 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13974 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 11:18:44 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 11 Jun 2019 15:18:44 +0000 Subject: [issue4356] Add "key" argument to "bisect" module functions In-Reply-To: <1227115048.67.0.318831592843.issue4356@psf.upfronthosting.co.za> Message-ID: <1560266324.9.0.507398922402.issue4356@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- versions: -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 11:18:47 2019 From: report at bugs.python.org (Jakub Kulik) Date: Tue, 11 Jun 2019 15:18:47 +0000 Subject: [issue37232] Parallel compilation fails because of low ulimit. In-Reply-To: <1560258604.43.0.910483303566.issue37232@roundup.psfhosted.org> Message-ID: <1560266327.63.0.72171151376.issue37232@roundup.psfhosted.org> Jakub Kulik added the comment: We have a limit of 256 opened files, which is not much, but I can up it and then it doesn't happen. Mainly, I wanted to report that this might be happening now. But I guess not many people will face this problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 11:20:23 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 11 Jun 2019 15:20:23 +0000 Subject: [issue37232] Parallel compilation fails because of low ulimit. In-Reply-To: <1560258604.43.0.910483303566.issue37232@roundup.psfhosted.org> Message-ID: <1560266423.26.0.678890823117.issue37232@roundup.psfhosted.org> Antoine Pitrou added the comment: I guess you'd get a similar problem if you were compiling on all cores simultaneously? 256 simultaneous open files is very low. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 11:21:12 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 11 Jun 2019 15:21:12 +0000 Subject: [issue37229] bisect: Allow a custom compare function In-Reply-To: <1560249413.65.0.773454068732.issue37229@roundup.psfhosted.org> Message-ID: <1560266472.93.0.207560289624.issue37229@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> rhettinger versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 11:24:16 2019 From: report at bugs.python.org (Jakub Kulik) Date: Tue, 11 Jun 2019 15:24:16 +0000 Subject: [issue37232] Parallel compilation fails because of low ulimit. In-Reply-To: <1560258604.43.0.910483303566.issue37232@roundup.psfhosted.org> Message-ID: <1560266656.3.0.800405579797.issue37232@roundup.psfhosted.org> Jakub Kulik added the comment: I am not sure what you are asking now. compileall with -j0 does compile on all cores simultaneously right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 11:26:26 2019 From: report at bugs.python.org (Mahdi Jafary) Date: Tue, 11 Jun 2019 15:26:26 +0000 Subject: [issue37234] error in variable Message-ID: <1560266786.16.0.932165098203.issue37234@roundup.psfhosted.org> New submission from Mahdi Jafary : this code is ok def test(t): n = 0 def f(t): print(t+str(N)) f(t) test('test') but this code have error def test(t): n = 0 def f(t): n = n+1 print(t+str(n)) f(t) test('test') we can fix this by edit code to: def test(t): n = 0 def f(t): N = n+1 print(t+str(N)) f(t) test('test') ---------- components: Windows messages: 345238 nosy: Mahdi Jafary, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: error in variable versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 11:27:35 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Jun 2019 15:27:35 +0000 Subject: [issue36607] asyncio.all_tasks() crashes if asyncio is used in multiple threads In-Reply-To: <1555006368.14.0.78767463153.issue36607@roundup.psfhosted.org> Message-ID: <1560266855.25.0.870991659477.issue36607@roundup.psfhosted.org> miss-islington added the comment: New changeset 65aa64fae89a24491aae84ba0329eb8f3c68c389 by Miss Islington (bot) (Andrew Svetlov) in branch 'master': bpo-36607: Eliminate RuntimeError raised by asyncio.all_tasks() (GH-13971) https://github.com/python/cpython/commit/65aa64fae89a24491aae84ba0329eb8f3c68c389 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 11:27:53 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Jun 2019 15:27:53 +0000 Subject: [issue36607] asyncio.all_tasks() crashes if asyncio is used in multiple threads In-Reply-To: <1555006368.14.0.78767463153.issue36607@roundup.psfhosted.org> Message-ID: <1560266873.51.0.918978958738.issue36607@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13842 pull_request: https://github.com/python/cpython/pull/13975 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 11:28:01 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Jun 2019 15:28:01 +0000 Subject: [issue36607] asyncio.all_tasks() crashes if asyncio is used in multiple threads In-Reply-To: <1555006368.14.0.78767463153.issue36607@roundup.psfhosted.org> Message-ID: <1560266881.43.0.253440174453.issue36607@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13843 pull_request: https://github.com/python/cpython/pull/13976 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 11:33:40 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 11 Jun 2019 15:33:40 +0000 Subject: [issue36607] asyncio.all_tasks() crashes if asyncio is used in multiple threads In-Reply-To: <1555006368.14.0.78767463153.issue36607@roundup.psfhosted.org> Message-ID: <1560267220.09.0.190041240353.issue36607@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 11:35:03 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 11 Jun 2019 15:35:03 +0000 Subject: [issue37229] bisect: Allow a custom compare function In-Reply-To: <1560249413.65.0.773454068732.issue37229@roundup.psfhosted.org> Message-ID: <1560267303.11.0.450450352504.issue37229@roundup.psfhosted.org> Raymond Hettinger added the comment: Sorry, but we've intentionally removed generic compare functions in favor of objects supporting __lt__. That is now the one-way-to-do-it. If needed for convenience, you can use functools.cmp_to_key to automatically build a wrapper. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 11:38:34 2019 From: report at bugs.python.org (Ben Brown) Date: Tue, 11 Jun 2019 15:38:34 +0000 Subject: [issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range In-Reply-To: <1560242699.55.0.804750809475.issue37226@roundup.psfhosted.org> Message-ID: <1560267514.21.0.18284502436.issue37226@roundup.psfhosted.org> Ben Brown added the comment: I tested an older version of OpenSSL 1.0.2g and I get the same error on that ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 11:40:31 2019 From: report at bugs.python.org (G) Date: Tue, 11 Jun 2019 15:40:31 +0000 Subject: [issue37229] bisect: Allow a custom compare function In-Reply-To: <1560249413.65.0.773454068732.issue37229@roundup.psfhosted.org> Message-ID: <1560267631.78.0.189809720047.issue37229@roundup.psfhosted.org> G added the comment: What do you propose to do for objects outside your project? Replace their __lt__ method with a context manager which replaces the original implementation, for lists at a time? __lt__ is not good enough as a one-way-to-do-it solution. issue4356 is also a good-enough solution for me, but __lt__ definitely isn't. ---------- resolution: rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 11:45:18 2019 From: report at bugs.python.org (Matthew Kenigsberg) Date: Tue, 11 Jun 2019 15:45:18 +0000 Subject: [issue37235] urljoin behavior unclear/not following RFC 3986 Message-ID: <1560267918.98.0.870769323469.issue37235@roundup.psfhosted.org> New submission from Matthew Kenigsberg : Was trying to figure out the exact behavior of urljoin. As far as I can tell (see https://bugs.python.org/issue22118) it should follow RFC 3986. According to the algorithm in 5.2.2, I think this is wrong: >>> urljoin("ftp://netloc", "http://a/b/../c/d") 'http://a/b/../c/d' And the .. should get removed. Might be a separate issue, but at the very least, I think the docs should be updated to describe the exact behavior, or at least more directly state that the behavior defined in RFC 3986 is followed. Would be happy to write a patch if a change is needed. ---------- messages: 345243 nosy: Matthew Kenigsberg priority: normal severity: normal status: open title: urljoin behavior unclear/not following RFC 3986 type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 11:47:08 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 11 Jun 2019 15:47:08 +0000 Subject: [issue37234] error in variable In-Reply-To: <1560266786.16.0.932165098203.issue37234@roundup.psfhosted.org> Message-ID: <1560268028.41.0.58844456306.issue37234@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This tracker is for issues related to CPython. The examples presented in the report look more like user error with variables where N is not defined in the first examples. Can you please illustrate over the examples over how this is an issue with interpreter and the changes you are proposing? ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 11:51:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 15:51:43 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560268303.37.0.122504169473.issue35766@roundup.psfhosted.org> STINNER Victor added the comment: I don't see anything in What's New in Python 3.8?: https://docs.python.org/dev/whatsnew/3.8.html Would it be possible to document the change somewhere? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 11:55:10 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 11 Jun 2019 15:55:10 +0000 Subject: [issue37234] error in variable In-Reply-To: <1560266786.16.0.932165098203.issue37234@roundup.psfhosted.org> Message-ID: <1560268510.71.0.971514532694.issue37234@roundup.psfhosted.org> Steve Dower added the comment: This is intended behavior. When a variable has an assignment anywhere in a function, it becomes a local. Once a local variable exists, it will shadow the non-local variable. So by having the "n =", you are marking "n" as a local variable. When the "n + 1" tries to read the local, it has not yet been set, so it fails. If you want to read and write to "n" in the outer function, you will need the nonlocal statement - https://docs.python.org/3/reference/simple_stmts.html#the-nonlocal-statement ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 11:58:35 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 11 Jun 2019 15:58:35 +0000 Subject: [issue33758] Unexpected success of test_get_type_hints_modules_forwardref in test_typing In-Reply-To: <1528041121.47.0.592728768989.issue33758@psf.upfronthosting.co.za> Message-ID: <1560268715.05.0.50196524043.issue33758@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- keywords: +patch pull_requests: +13844 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13977 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 12:01:35 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Jun 2019 16:01:35 +0000 Subject: [issue36607] asyncio.all_tasks() crashes if asyncio is used in multiple threads In-Reply-To: <1555006368.14.0.78767463153.issue36607@roundup.psfhosted.org> Message-ID: <1560268895.97.0.830846096188.issue36607@roundup.psfhosted.org> miss-islington added the comment: New changeset 5d1d4e3179ffd4d2d72462d870cf86dcc11450ce by Miss Islington (bot) in branch '3.7': bpo-36607: Eliminate RuntimeError raised by asyncio.all_tasks() (GH-13971) https://github.com/python/cpython/commit/5d1d4e3179ffd4d2d72462d870cf86dcc11450ce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 12:05:07 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 11 Jun 2019 16:05:07 +0000 Subject: [issue37235] urljoin behavior unclear/not following RFC 3986 In-Reply-To: <1560267918.98.0.870769323469.issue37235@roundup.psfhosted.org> Message-ID: <1560269107.1.0.325729126021.issue37235@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- components: +Library (Lib) nosy: +orsenthil, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 12:06:46 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 11 Jun 2019 16:06:46 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560269206.9.0.573533594271.issue35766@roundup.psfhosted.org> Ivan Levkivskyi added the comment: > Would it be possible to document the change somewhere? Most of these things are in the docs for ast module. But indeed none of static typing related features have been added to What's New. I have an item on mypy todo list to add four typing PEPs plus new AST features (also adding `end_lineno` and `end_col_offset`) also there, but didn't have time last weekend. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 12:07:54 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 11 Jun 2019 16:07:54 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560269274.3.0.39994476059.issue35766@roundup.psfhosted.org> Ivan Levkivskyi added the comment: Typo: "mypy todo list" should be "my todo list" :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 12:18:36 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 11 Jun 2019 16:18:36 +0000 Subject: [issue33758] Unexpected success of test_get_type_hints_modules_forwardref in test_typing In-Reply-To: <1528041121.47.0.592728768989.issue33758@psf.upfronthosting.co.za> Message-ID: <1560269916.12.0.930086962256.issue33758@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 910b3fcb01c29f18ffd53086e36cd2cb9e5fae55 by Benjamin Peterson in branch 'master': closes bpo-33758: Skip test_get_type_hints_modules_forwardref. (GH-13977) https://github.com/python/cpython/commit/910b3fcb01c29f18ffd53086e36cd2cb9e5fae55 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 12:18:47 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Jun 2019 16:18:47 +0000 Subject: [issue33758] Unexpected success of test_get_type_hints_modules_forwardref in test_typing In-Reply-To: <1528041121.47.0.592728768989.issue33758@psf.upfronthosting.co.za> Message-ID: <1560269927.66.0.821447300782.issue33758@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13845 pull_request: https://github.com/python/cpython/pull/13978 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 12:18:56 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Jun 2019 16:18:56 +0000 Subject: [issue33758] Unexpected success of test_get_type_hints_modules_forwardref in test_typing In-Reply-To: <1528041121.47.0.592728768989.issue33758@psf.upfronthosting.co.za> Message-ID: <1560269936.81.0.669158975511.issue33758@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13846 pull_request: https://github.com/python/cpython/pull/13979 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 12:21:14 2019 From: report at bugs.python.org (Tal Einat) Date: Tue, 11 Jun 2019 16:21:14 +0000 Subject: [issue35922] robotparser crawl_delay and request_rate do not work with no matching entry In-Reply-To: <1549485183.59.0.634497522614.issue35922@roundup.psfhosted.org> Message-ID: <1560270074.92.0.897729726722.issue35922@roundup.psfhosted.org> Tal Einat added the comment: The PR is looking good, I'll likely merge it soon. I'm quite sure this should go into 3.8, but should it be backported to 3.7? This is certainly a bugfix, but still a slight change of behavior, so perhaps we should avoid changing this in 3.7? ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 12:38:12 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Jun 2019 16:38:12 +0000 Subject: [issue33758] Unexpected success of test_get_type_hints_modules_forwardref in test_typing In-Reply-To: <1528041121.47.0.592728768989.issue33758@psf.upfronthosting.co.za> Message-ID: <1560271092.1.0.502630353865.issue33758@roundup.psfhosted.org> miss-islington added the comment: New changeset 1c31d19e35172c7de1beec5c48a5b632d16385d9 by Miss Islington (bot) in branch '3.8': closes bpo-33758: Skip test_get_type_hints_modules_forwardref. (GH-13977) https://github.com/python/cpython/commit/1c31d19e35172c7de1beec5c48a5b632d16385d9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 12:52:41 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Jun 2019 16:52:41 +0000 Subject: [issue33758] Unexpected success of test_get_type_hints_modules_forwardref in test_typing In-Reply-To: <1528041121.47.0.592728768989.issue33758@psf.upfronthosting.co.za> Message-ID: <1560271961.9.0.265876983142.issue33758@roundup.psfhosted.org> miss-islington added the comment: New changeset fad89046e14b271b2eeb399f7c7b45131d65e5f2 by Miss Islington (bot) in branch '3.7': closes bpo-33758: Skip test_get_type_hints_modules_forwardref. (GH-13977) https://github.com/python/cpython/commit/fad89046e14b271b2eeb399f7c7b45131d65e5f2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 13:19:02 2019 From: report at bugs.python.org (Paul Monson) Date: Tue, 11 Jun 2019 17:19:02 +0000 Subject: [issue37236] fix test_complex for Windows arm64 Message-ID: <1560273542.8.0.377927810639.issue37236@roundup.psfhosted.org> New submission from Paul Monson : There is a compiler optimization error on Windows ARM64 that causes test_truediv (test.test_complex.ComplexTest) to fail with ZeroDivisionError: complex division by zero. Adding a pragma optimize around the affected function fixes the issue. I am also submitting a report to the compiler team ---------- components: Windows messages: 345254 nosy: Paul Monson, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: fix test_complex for Windows arm64 type: compile error versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 13:20:41 2019 From: report at bugs.python.org (Jilguero ostras) Date: Tue, 11 Jun 2019 17:20:41 +0000 Subject: [issue37237] python 2.16 from source on Ubuntu 18.04 Message-ID: <1560273641.16.0.656737490919.issue37237@roundup.psfhosted.org> New submission from Jilguero ostras : -Trying to install Python 2.16 from source on Ubuntu 18.04. Latest version is not in repositories. -Installation completes but I need to install pip from repositories -modules (e.g. numpy) installed by pip install on /usr/local/lib/python2.7/dist-packages -installed modules can not be imported on Python -path /usr/local/lib/python2.7/dist-packages is not listed on sys.path -when added manually, modules are imported with errors and they don't work -I am installing modules with -t option of pip, to be installed on /home/user01/.local/lib/python2.7/site-packages, because it is included on sys.path -modules are imported to Python with errors In addition to numpy, other modules fail. I think there is a problem with Python/pip after installation from source. ---------- messages: 345255 nosy: Jilguero ostras priority: normal severity: normal status: open title: python 2.16 from source on Ubuntu 18.04 type: resource usage versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 13:26:41 2019 From: report at bugs.python.org (Paul Monson) Date: Tue, 11 Jun 2019 17:26:41 +0000 Subject: [issue37236] fix test_complex for Windows arm64 In-Reply-To: <1560273542.8.0.377927810639.issue37236@roundup.psfhosted.org> Message-ID: <1560274001.73.0.728797545998.issue37236@roundup.psfhosted.org> Change by Paul Monson : ---------- keywords: +patch pull_requests: +13847 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13983 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 13:54:15 2019 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 11 Jun 2019 17:54:15 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560275655.93.0.752752525036.issue35766@roundup.psfhosted.org> Guido van Rossum added the comment: I'll create a PR that updates the What's New docs with news about all of these. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 14:03:12 2019 From: report at bugs.python.org (Noah) Date: Tue, 11 Jun 2019 18:03:12 +0000 Subject: [issue37184] suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):` In-Reply-To: <1559859389.6.0.41932196936.issue37184@roundup.psfhosted.org> Message-ID: <1560276192.97.0.522917201113.issue37184@roundup.psfhosted.org> Noah added the comment: I subscribed and emailed python-ideas at python.org but it still hasn't passed moderation I guess, hmm ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 14:09:20 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 11 Jun 2019 18:09:20 +0000 Subject: [issue37225] Signatures of Exceptions not documented In-Reply-To: <1560237102.52.0.133464005619.issue37225@roundup.psfhosted.org> Message-ID: <1560276560.88.0.0836193340253.issue37225@roundup.psfhosted.org> Brett Cannon added the comment: OSError does have its constructor documented at https://docs.python.org/3/library/exceptions.html#OSError (farther down the page I think you're reading; you didn't provide the URL you're referring to so I'm somewhat guessing). It is specifically vague because it varies from exception to exception and you need to check the exception you're using to see if it differs from BaseException. Thanks for letting us know about your concerns, but I'm closing as "not a bug". ---------- nosy: +brett.cannon resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 14:15:07 2019 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 11 Jun 2019 18:15:07 +0000 Subject: [issue35293] make doctest (Sphinx) emits a lot of warnings In-Reply-To: <1542835631.23.0.788709270274.issue35293@psf.upfronthosting.co.za> Message-ID: <1560276907.65.0.207621022273.issue35293@roundup.psfhosted.org> Guido van Rossum added the comment: I still get some warnings about docutils itself, e.g. /Users/guido/v38/lib/python3.8/site-packages/docutils/writers/_html_base.py:1035: SyntaxWarning: invalid escape sequence \( 'mathjax': ('\(%s\)', '\\begin{%s}\n%s\n\\end{%s}'), /Users/guido/v38/lib/python3.8/site-packages/docutils/utils/math/math2html.py:4103: SyntaxWarning: invalid escape sequence \{ """Check for an empty command: look for command disguised as ending. /Users/guido/v38/lib/python3.8/site-packages/docutils/utils/math/math2html.py:4563: SyntaxWarning: invalid escape sequence \e "A \\begin{}...\end command and what it entails (array, cases, aligned)" /Users/guido/v38/lib/python3.8/site-packages/docutils/utils/math/latex2mathml.py:154: SyntaxWarning: invalid escape sequence \i '\in': '\u2209', /Users/guido/v38/lib/python3.8/site-packages/docutils/utils/math/latex2mathml.py:155: SyntaxWarning: invalid escape sequence \e '\equiv': '\u2262'} /Users/guido/v38/lib/python3.8/site-packages/docutils/writers/latex2e/__init__.py:1197: SyntaxWarning: invalid escape sequence \w none ) = re.split('(\w+)(.*)', settings.literal_block_env) /Users/guido/v38/lib/python3.8/site-packages/docutils/writers/latex2e/__init__.py:1463: SyntaxWarning: invalid escape sequence \ """Return text with 'problematic' characters escaped. /Users/guido/v38/lib/python3.8/site-packages/docutils/writers/latex2e/__init__.py:1562: SyntaxWarning: invalid escape sequence \p """Return list of label definitions for all ids of `node` /Users/guido/v38/lib/python3.8/site-packages/docutils/writers/latex2e/__init__.py:1922: SyntaxWarning: invalid escape sequence \p self.title.insert(0, '\phantomsection%\n ') /Users/guido/v38/lib/python3.8/site-packages/docutils/writers/latex2e/__init__.py:2269: SyntaxWarning: invalid escape sequence \d match = re.match('(\d*\.?\d*)\s*(\S*)', length_str) /Users/guido/v38/lib/python3.8/site-packages/docutils/writers/latex2e/__init__.py:2381: SyntaxWarning: invalid escape sequence \i self.out.append('\item[] ') /Users/guido/v38/lib/python3.8/site-packages/docutils/writers/latex2e/__init__.py:2525: SyntaxWarning: invalid escape sequence \( wrapper = '\(%s\)' /Users/guido/v38/lib/python3.8/site-packages/docutils/writers/latex2e/__init__.py:2804: SyntaxWarning: invalid escape sequence \c self.out.append('\n\n{\color{red}%s/%s} in \\texttt{%s}%s\n' % /Users/guido/v38/lib/python3.8/site-packages/docutils/writers/latex2e/__init__.py:2892: SyntaxWarning: invalid escape sequence \l self.out.append('}] \leavevmode ') /Users/guido/v38/lib/python3.8/site-packages/docutils/writers/manpage.py:371: SyntaxWarning: invalid escape sequence \- "%(title)s \- %(subtitle)s\n") ---------- nosy: +gvanrossum versions: -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 14:16:35 2019 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 11 Jun 2019 18:16:35 +0000 Subject: [issue37236] fix test_complex for Windows arm64 In-Reply-To: <1560273542.8.0.377927810639.issue37236@roundup.psfhosted.org> Message-ID: <1560276995.46.0.912490971894.issue37236@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 14:33:15 2019 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 11 Jun 2019 18:33:15 +0000 Subject: [issue37237] python 2.16 from source on Ubuntu 18.04 In-Reply-To: <1560273641.16.0.656737490919.issue37237@roundup.psfhosted.org> Message-ID: <1560277995.82.0.778383386414.issue37237@roundup.psfhosted.org> Mark Dickinson added the comment: This report is a bit hard to understand. Please could you give more details? Can you tell us: - *exactly* what you did (what sequence of instructions you executed, where you got the Python source from, etc.) - what you expected to happen - what did happen, including any relevant tracebacks, error messages or logs. I don't understand what "Python 2.16" refers to: the latest version of Python 2 is Python 2.7. One possible cause of error is using the wrong pip command. Which "pip" command are you using, and where did it come from? In general, you need to use the "pip" for the corresponding Python installation. The safest way to do this is to always use "python -m pip" (with the right target Python) instead of plain "pip". To get an initial install of "pip", use "python -m ensurepip" (depending on Python version, but this is available for all recent Python 2.7.x and Python 3.x releases). ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 14:54:17 2019 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 11 Jun 2019 18:54:17 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560279257.01.0.529276407137.issue35766@roundup.psfhosted.org> Change by Guido van Rossum : ---------- pull_requests: +13848 pull_request: https://github.com/python/cpython/pull/13984 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 14:59:52 2019 From: report at bugs.python.org (Alex Willmer) Date: Tue, 11 Jun 2019 18:59:52 +0000 Subject: [issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer In-Reply-To: <1560111812.29.0.301182333638.issue37210@roundup.psfhosted.org> Message-ID: <1560279592.49.0.197704508501.issue37210@roundup.psfhosted.org> Alex Willmer added the comment: > it is probably not possible to write a pure Python PickleBuffer Fair enough > a usable pure Python Pickler, but without support for the PickleBuffer class. That makes sense. However, for third party packages (e.g. zodbpickle, pikl) wanting a pure Python pickle module to use as a basis, I think it would make more sense to use the CPython 3.7 branch as a basis. Adding a pickle._Pickler variant to the 3.8 stdlib that can't do protocol 5, just for third-parties imposes a maintenance burden on the core devs for zero benefit to anyone. I propose closing this ticket as WONTFIX. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 15:36:39 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 11 Jun 2019 19:36:39 +0000 Subject: [issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer In-Reply-To: <1560111812.29.0.301182333638.issue37210@roundup.psfhosted.org> Message-ID: <1560281799.87.0.854437812676.issue37210@roundup.psfhosted.org> Antoine Pitrou added the comment: Ok, closing then. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 15:49:05 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Tue, 11 Jun 2019 19:49:05 +0000 Subject: [issue28502] [Patch] Make os.chdir() optional In-Reply-To: <1477115195.1.0.580287867342.issue28502@psf.upfronthosting.co.za> Message-ID: <1560282545.98.0.492968220583.issue28502@roundup.psfhosted.org> Joannah Nanjekye added the comment: @ Ed Schouten, are you still interested in solving this? If so, please convert your patch into a PR. ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 16:10:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 20:10:30 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560283830.21.0.690247372897.issue35766@roundup.psfhosted.org> STINNER Victor added the comment: > ``feature_version=N`` allows specifying the minor version of an earlier Python 3 version. (For example, ``feature_version=4`` will treat ``async`` and ``await`` as non-reserved words.) What will happen with Python 4? Why not using "full" Python version like (3, 4) or 0x304? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 16:15:28 2019 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 11 Jun 2019 20:15:28 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560284128.95.0.623260243624.issue35766@roundup.psfhosted.org> Guido van Rossum added the comment: > What will happen with Python 4? Why not using "full" Python version like (3, 4) or 0x304? I don't think Python 4 is just around the corner, so I prefer to kick that problem down the road. I'm sure we can come up with a sufficiently backwards-compatible API. (I'd prefer not to go the hex route, because printing the value would show as 52, which is pretty meaningless.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 16:15:54 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 11 Jun 2019 20:15:54 +0000 Subject: [issue36607] asyncio.all_tasks() crashes if asyncio is used in multiple threads In-Reply-To: <1555006368.14.0.78767463153.issue36607@roundup.psfhosted.org> Message-ID: <1560284154.42.0.763589193639.issue36607@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: fixed -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 16:32:08 2019 From: report at bugs.python.org (Orivej Desh) Date: Tue, 11 Jun 2019 20:32:08 +0000 Subject: [issue26180] multiprocessing.util._afterfork_registry leak in threaded environment In-Reply-To: <1453476286.88.0.329468896089.issue26180@psf.upfronthosting.co.za> Message-ID: <1560285128.39.0.0290043522845.issue26180@roundup.psfhosted.org> Change by Orivej Desh : ---------- keywords: +patch pull_requests: +13849 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13986 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 16:32:28 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Jun 2019 20:32:28 +0000 Subject: [issue36607] asyncio.all_tasks() crashes if asyncio is used in multiple threads In-Reply-To: <1555006368.14.0.78767463153.issue36607@roundup.psfhosted.org> Message-ID: <1560285148.44.0.405774387734.issue36607@roundup.psfhosted.org> miss-islington added the comment: New changeset 83abd9658b4845299452be06c9ce92cbceee944d by Miss Islington (bot) in branch '3.8': bpo-36607: Eliminate RuntimeError raised by asyncio.all_tasks() (GH-13971) https://github.com/python/cpython/commit/83abd9658b4845299452be06c9ce92cbceee944d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 16:42:47 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Jun 2019 20:42:47 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560285767.38.0.0632575180215.issue35766@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13850 pull_request: https://github.com/python/cpython/pull/13987 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 16:42:51 2019 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 11 Jun 2019 20:42:51 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560285771.79.0.537867331802.issue35766@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 9b33ce48a7846dbdad32d4f8936b08e6b78a2faf by Guido van Rossum in branch 'master': bpo-35766: What's new in the ast and typing modules (#13984) https://github.com/python/cpython/commit/9b33ce48a7846dbdad32d4f8936b08e6b78a2faf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 16:53:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 20:53:44 +0000 Subject: [issue37213] Peeephole optimizer does not optimize functions with multiline expressions In-Reply-To: <1560155063.44.0.426038128869.issue37213@roundup.psfhosted.org> Message-ID: <1560286424.24.0.218967826713.issue37213@roundup.psfhosted.org> STINNER Victor added the comment: I removed the memchr(255) to see which tests fail: test_extended_opargs (test.test_modulefinder.ModuleFinderTest) ... python: Python/peephole.c:469: PyCode_Optimize: Assertion `cum_orig_offset % sizeof(_Py_CODEUNIT) == 0' failed. Fatal Python error: Aborted test_extended_arg (test.test_compile.TestSpecifics) ... python: Python/peephole.c:469: PyCode_Optimize: Assertion `cum_orig_offset % sizeof(_Py_CODEUNIT) == 0' failed. Fatal Python error: Aborted test_field_named_like_builtin (test.test_dataclasses.TestCase) ... python: Python/peephole.c:469: PyCode_Optimize: Assertion `cum_orig_offset % sizeof(_Py_CODEUNIT) == 0' failed. Fatal Python error: Aborted test_field_named_like_builtin_frozen (test.test_dataclasses.TestCase) ... python: Python/peephole.c:469: PyCode_Optimize: Assertion `cum_orig_offset % sizeof(_Py_CODEUNIT) == 0' failed. Fatal Python error: Aborted Does test_compile have unit tests test_modulefinder and test_dataclasses cases? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 16:54:52 2019 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 11 Jun 2019 20:54:52 +0000 Subject: [issue37213] Peeephole optimizer does not optimize functions with multiline expressions In-Reply-To: <1560155063.44.0.426038128869.issue37213@roundup.psfhosted.org> Message-ID: <1560286492.43.0.605958012923.issue37213@roundup.psfhosted.org> Change by Yury Selivanov : ---------- nosy: -yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 17:09:26 2019 From: report at bugs.python.org (Paul Monson) Date: Tue, 11 Jun 2019 21:09:26 +0000 Subject: [issue37238] Enable building for Windows using Visual Studio 2019 Message-ID: <1560287366.71.0.530978180943.issue37238@roundup.psfhosted.org> New submission from Paul Monson : What is the normal process for lighting up a new Visual Studio? ---------- components: Build, Windows messages: 345269 nosy: Paul Monson, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Enable building for Windows using Visual Studio 2019 versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 17:13:06 2019 From: report at bugs.python.org (Paul Monson) Date: Tue, 11 Jun 2019 21:13:06 +0000 Subject: [issue37238] Enable building for Windows using Visual Studio 2019 In-Reply-To: <1560287366.71.0.530978180943.issue37238@roundup.psfhosted.org> Message-ID: <1560287586.38.0.328333499576.issue37238@roundup.psfhosted.org> Change by Paul Monson : ---------- keywords: +patch pull_requests: +13851 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13988 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 17:13:35 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Jun 2019 21:13:35 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560287615.88.0.980121468556.issue35766@roundup.psfhosted.org> miss-islington added the comment: New changeset 785688832de699270530a9418e99c5c4caedbffb by Miss Islington (bot) in branch '3.8': bpo-35766: What's new in the ast and typing modules (GH-13984) https://github.com/python/cpython/commit/785688832de699270530a9418e99c5c4caedbffb ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 17:44:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 21:44:00 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560289440.69.0.485124860341.issue37221@roundup.psfhosted.org> STINNER Victor added the comment: I would prefer to revert PyCode_New() API (to Python 3.7 and older API), and add a *new* function for positional-only arguments. > I have created PR13959 in case we decide to go with the PyCode_NewEx path. I dislike "Ex" suffix. What will be next name? Ex2? NewEx? I prefer "With" naming. I suggest: PyCode_NewWithPosArgs(). IMHO it's way more explicit when you opt-in for this new function ;-) -- PyCode_New() was broken 8 times in the history of Python :-) https://bugs.python.org/issue37032#msg343377 It seems like more people are unhappy with this backward incompatible change, because Python popularity is still growing. It's a good sign of the health of time :-) -- > +1. You already broke backwards compatibility once in beta1, no need to do it again in beta2. It's not this easy. This issue mostly impact projects using Cython. For practical reasons, projects include C files generated by Cython (to avoid Cython dependency to install the project). Cython 0.29.8 is the first version supporting Python 3.8 (new PyCode_New API) was only released two weeks ago. Right now, I guess that almost all, if not all, tarballs on PyPI on projects using Cython still include C code only compatible with Python 3.7 (old PyCode_New API). There are 183k projets on PyPI. I would prefer to not have to have to manually regenerate the C code they include to support the new PyCode_New() API. We are still at beta stage. The role of beta releases is to detect backward incompatible changes like that. I'm in favor of reverting PyCode_New() API and add a new function for the very few people who care about building manually a code object with positional-only arguments. It's just a practical move to not break projects on PyPI. Please, synchronize with Cython to make sure that we can get a Cython release soon after beta2 with will emit code working on all Python version. Maybe the workaround for Python 3.8 alpha1 .. 3.8 beta1 can be simply removed from Cython? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 17:47:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 21:47:35 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560289655.1.0.557016244472.issue37221@roundup.psfhosted.org> STINNER Victor added the comment: It seems like very few pepople are testing Python 3.8 so far. I'm making this assumption because many projects using Cython cannot be installed on Python 3.8 and I didn't see much complain so far. My Python Maintenance team at Red Hat is working on fixing all the stuff for Python 3.8, and we are the most exposed by such backward incompatible change. FYI we modified a few Fedora packages to explicitly run Cython as part of the build to ensure that C files are always regenerated with Cython. So if PyCode_New() API change again in beta2 but Cython takes that into account, Fedora Rawhide will be unaffected. Note: we are not sure yet if Fedora 31 will be able to switch to Python 3.8 by default, the build of many package is still failing, for various reasons (sadly, this change is far from being the only reason!). More info: https://twitter.com/VictorStinner/status/1138067403341012997 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 17:49:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 21:49:33 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560289773.61.0.852495315637.issue35766@roundup.psfhosted.org> STINNER Victor added the comment: > I'm sure we can come up with a sufficiently backwards-compatible API. (I'd prefer not to go the hex route, because printing the value would show as 52, which is pretty meaningless.) I propose to replace 4 with (3, 4) to be more future-proof. This version format is already used by sys.version_info for example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 17:52:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 21:52:41 +0000 Subject: [issue36896] clarify in types.rst that FunctionTypes & co constructors don't have stable signature In-Reply-To: <1557698610.19.0.556381141599.issue36896@roundup.psfhosted.org> Message-ID: <1560289961.09.0.01747144436.issue36896@roundup.psfhosted.org> STINNER Victor added the comment: Would it be the right place to document the new CodeType.replace() method which is designed to help to write "future-proof" code? (not rely on the exact constructor API) ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 17:55:57 2019 From: report at bugs.python.org (Paul Monson) Date: Tue, 11 Jun 2019 21:55:57 +0000 Subject: [issue37239] Add headless development preset layout Message-ID: <1560290157.09.0.169248925355.issue37239@roundup.psfhosted.org> New submission from Paul Monson : Add preset-headless preset which has everything that preset-default has minus tcltk and idle ---------- components: Build, Windows messages: 345275 nosy: Paul Monson, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Add headless development preset layout type: enhancement versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 17:58:23 2019 From: report at bugs.python.org (Paul Monson) Date: Tue, 11 Jun 2019 21:58:23 +0000 Subject: [issue37239] Add headless development preset layout In-Reply-To: <1560290157.09.0.169248925355.issue37239@roundup.psfhosted.org> Message-ID: <1560290303.17.0.773565058291.issue37239@roundup.psfhosted.org> Change by Paul Monson : ---------- keywords: +patch pull_requests: +13852 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13989 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 18:03:20 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 11 Jun 2019 22:03:20 +0000 Subject: [issue37238] Enable building for Windows using Visual Studio 2019 In-Reply-To: <1560287366.71.0.530978180943.issue37238@roundup.psfhosted.org> Message-ID: <1560290600.77.0.704054788834.issue37238@roundup.psfhosted.org> Steve Dower added the comment: New changeset 04856c2193eb72d72c46b57fa08095235d732a73 by Steve Dower (Paul Monson) in branch 'master': bpo-37238: Enable building for Windows using Visual Studio 2019 (GH-13988) https://github.com/python/cpython/commit/04856c2193eb72d72c46b57fa08095235d732a73 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 18:03:41 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Jun 2019 22:03:41 +0000 Subject: [issue37238] Enable building for Windows using Visual Studio 2019 In-Reply-To: <1560287366.71.0.530978180943.issue37238@roundup.psfhosted.org> Message-ID: <1560290621.17.0.0286088900698.issue37238@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13853 pull_request: https://github.com/python/cpython/pull/13990 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 18:04:16 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 11 Jun 2019 22:04:16 +0000 Subject: [issue37238] Enable building for Windows using Visual Studio 2019 In-Reply-To: <1560287366.71.0.530978180943.issue37238@roundup.psfhosted.org> Message-ID: <1560290656.56.0.0385046352183.issue37238@roundup.psfhosted.org> Steve Dower added the comment: Not a whole lot of process, really. It's done now :) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 18:05:39 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 11 Jun 2019 22:05:39 +0000 Subject: [issue37239] Add headless development preset layout In-Reply-To: <1560290157.09.0.169248925355.issue37239@roundup.psfhosted.org> Message-ID: <1560290739.73.0.41602315768.issue37239@roundup.psfhosted.org> Steve Dower added the comment: Why is this different from the nuget package? Should we just add more things into that package? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 18:14:32 2019 From: report at bugs.python.org (Ammar Askar) Date: Tue, 11 Jun 2019 22:14:32 +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: <1560291272.96.0.36078427967.issue29505@roundup.psfhosted.org> Change by Ammar Askar : ---------- pull_requests: +13854 pull_request: https://github.com/python/cpython/pull/13991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 18:21:26 2019 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 11 Jun 2019 22:21:26 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560291686.69.0.965332581186.issue37221@roundup.psfhosted.org> Nick Coghlan added the comment: The key problem isn't Cython itself, the problem is that Cython generated libraries can't be rebuilt for 3.8 without regenerating their C files. I'd be fine with PyCode_NewWithPosArgs (Victor's right that a descriptive naming convention handles future changes better than Ex) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 18:35:58 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Jun 2019 22:35:58 +0000 Subject: [issue37238] Enable building for Windows using Visual Studio 2019 In-Reply-To: <1560287366.71.0.530978180943.issue37238@roundup.psfhosted.org> Message-ID: <1560292558.48.0.353540711949.issue37238@roundup.psfhosted.org> miss-islington added the comment: New changeset 36926df8341827fb2a5323f559daab8e34d33ed8 by Miss Islington (bot) in branch '3.8': bpo-37238: Enable building for Windows using Visual Studio 2019 (GH-13988) https://github.com/python/cpython/commit/36926df8341827fb2a5323f559daab8e34d33ed8 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 18:38:30 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 11 Jun 2019 22:38:30 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560292710.74.0.616599489689.issue37221@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I updated the PR and Victor reviewed it. Nick, could you review it as well? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 18:47:11 2019 From: report at bugs.python.org (Agrim Sachdeva) Date: Tue, 11 Jun 2019 22:47:11 +0000 Subject: [issue37240] Filename http.py breaks calls to urllib Message-ID: <1560293231.78.0.659598330159.issue37240@roundup.psfhosted.org> New submission from Agrim Sachdeva : If a script that uses urllib is named http.py, the following error occurs: Traceback (most recent call last): File ".\http.py", line 1, in import urllib.request, urllib.parse, urllib.error File "C:\Users\grim\AppData\Local\Programs\Python\Python37\lib\urllib\request.py", line 88, in import http.client File "C:\Python\http.py", line 11, in html = urllib.request.urlopen(url).read() AttributeError: module 'urllib' has no attribute 'request' ---------- components: Windows messages: 345282 nosy: Agrim Sachdeva2, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Filename http.py breaks calls to urllib type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 18:58:42 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Tue, 11 Jun 2019 22:58:42 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560293922.19.0.463517287302.issue37221@roundup.psfhosted.org> Neil Schemenauer added the comment: I suggest we change PyCode_New() back in the next beta, despite that change breaking Cython again. We could work with them so that they have a new release with a "PY_VERSION_HEX > 0x030800b1" test in it. Try to get that Cython version released before 3.8b2 hits. The window of a Cython version that doesn't support CPython >= 3.8b1 can be made pretty small. It would be nice to find these issues in alpha releases but finding them in beta is still early enough to fix it. Having to regenerate all of the Cython emitted code embedded in different packages is painful. I experienced having to update numpy so that I could test my software with 3.8b1. Avoiding that is why we should change PyCode_New back. Introducing a new API like PyCode_NewWithPosArgs() is going to work better. If we do have to make a similar incompatible change in the future, we should try hard to make it so there is an overlapping period of compatibility. It's bad to have an API change from one release to the next without giving time for projects like Cython time to catch up. ---------- nosy: +nascheme _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 19:08:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 23:08:35 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560294515.27.0.225911788076.issue37221@roundup.psfhosted.org> STINNER Victor added the comment: > If we do have to make a similar incompatible change in the future, (...) IMHO the most important learnt lesson here is that we lack a proper Continuous Integration of the master branch of Python and popular PyPI projects. We should be notified *before* a release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 19:09:14 2019 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 11 Jun 2019 23:09:14 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560294554.25.0.970484234154.issue35766@roundup.psfhosted.org> Guido van Rossum added the comment: But this is the format currently used by typed_ast. I think it would just cause a cascade of annoying failures for tools that switch between typed_ast and the 3.8 version of ast. Such as mypy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 19:14:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Jun 2019 23:14:26 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560294866.44.0.272981037502.issue35766@roundup.psfhosted.org> STINNER Victor added the comment: > But this is the format currently used by typed_ast. I think it would just cause a cascade of annoying failures for tools that switch between typed_ast and the 3.8 version of ast. Such as mypy. typed_ast is a 3rd party project. But here we are talking about Python stdlib. If a project moves from typed_ast to stdlib ast, IMHO it should be quite easy to replace 4 with (3, 4), especially if 4 raises an error, no? IMHO it's a good opportunity to fix it. I would prefer to not have to batch many backward incompatible changes into Python 4... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 19:27:16 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Jun 2019 23:27:16 +0000 Subject: [issue36520] Email header folded incorrectly In-Reply-To: <1554333300.49.0.663084865399.issue36520@roundup.psfhosted.org> Message-ID: <1560295636.3.0.39316792898.issue36520@roundup.psfhosted.org> miss-islington added the comment: New changeset 0745cc66db3acbe7951073071cf063db6337dd10 by Miss Islington (bot) (Abhilash Raj) in branch '3.7': [3.7] bpo-36520: Email header folded incorrectly (GH-13608) (GH-13910) https://github.com/python/cpython/commit/0745cc66db3acbe7951073071cf063db6337dd10 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 19:28:18 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 11 Jun 2019 23:28:18 +0000 Subject: [issue36520] Email header folded incorrectly In-Reply-To: <1554333300.49.0.663084865399.issue36520@roundup.psfhosted.org> Message-ID: <1560295698.05.0.419118261844.issue36520@roundup.psfhosted.org> miss-islington added the comment: New changeset 36eea7af48ca0a1c96b78c82bf95bbd29d2332da by Miss Islington (bot) (Abhilash Raj) in branch '3.8': [3.8] bpo-36520: Email header folded incorrectly (GH-13608) (GH-13909) https://github.com/python/cpython/commit/36eea7af48ca0a1c96b78c82bf95bbd29d2332da ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 19:40:47 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 11 Jun 2019 23:40:47 +0000 Subject: [issue37240] Filename http.py breaks calls to urllib In-Reply-To: <1560293231.78.0.659598330159.issue37240@roundup.psfhosted.org> Message-ID: <1560296447.53.0.906001504239.issue37240@roundup.psfhosted.org> Eric V. Smith added the comment: Closing as not a bug. This is how python works: you do not want to name a file the same as any standard library module. Use a file name other than http.py. ---------- components: +Library (Lib) -Windows nosy: +eric.smith -paul.moore, steve.dower, tim.golden, zach.ware resolution: -> not a bug stage: -> resolved status: open -> closed type: compile error -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 19:41:52 2019 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 11 Jun 2019 23:41:52 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560296512.68.0.0986719328834.issue35766@roundup.psfhosted.org> Change by Guido van Rossum : ---------- pull_requests: +13855 pull_request: https://github.com/python/cpython/pull/13992 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 20:13:05 2019 From: report at bugs.python.org (Jesse Bacon) Date: Wed, 12 Jun 2019 00:13:05 +0000 Subject: [issue37241] Item Count Error in Shelf Message-ID: <1560298385.81.0.460821118129.issue37241@roundup.psfhosted.org> New submission from Jesse Bacon : I have loaded the National Vulnerability Database from NIST for 2019 and it includes 3989 JSON Documents. This data I have placed in a shelf. when I run len(db.keys()) I get 3658. len(set(cves)) == 3989 : True When I extract the data from the shelf I have the right amount of records, 3989. I tested on python 3.7.3 and Python 3.6.5. I am concerned this is going to ruin a metric in a security report. For example, A risk exposure report may use the number of keys in a yearly vulnerability db as the baseline for a risk calculation which contrasts the number of patched CVE's. nvdcve-1.0-2019.json ---------- components: Library (Lib) files: KeyCount.png messages: 345290 nosy: jessembacon priority: normal severity: normal status: open title: Item Count Error in Shelf type: behavior versions: Python 3.6, Python 3.7 Added file: https://bugs.python.org/file48411/KeyCount.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 20:16:01 2019 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 12 Jun 2019 00:16:01 +0000 Subject: [issue37241] Item Count Error in Shelf In-Reply-To: <1560298385.81.0.460821118129.issue37241@roundup.psfhosted.org> Message-ID: <1560298561.26.0.461067504463.issue37241@roundup.psfhosted.org> Eric V. Smith added the comment: Please do not post images: we can't copy and paste from them, and they're unfriendly to visually impaired users. Can you create code that reproduces this? A small example, with no external dependencies would be best. Please attach the reproducer as a text file. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 20:23:17 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 00:23:17 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560298997.91.0.520122999449.issue35766@roundup.psfhosted.org> miss-islington added the comment: New changeset 10b55c1643b512b3a2cae8ab89c53683a13ca43e by Miss Islington (bot) (Guido van Rossum) in branch 'master': bpo-35766: Change format for feature_version to (major, minor) (GH-13992) https://github.com/python/cpython/commit/10b55c1643b512b3a2cae8ab89c53683a13ca43e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 20:23:27 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 00:23:27 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560299007.91.0.604133968692.issue35766@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13856 pull_request: https://github.com/python/cpython/pull/13993 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 20:34:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 00:34:58 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560299698.65.0.461931711274.issue35766@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13857 pull_request: https://github.com/python/cpython/pull/13994 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 20:52:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 00:52:24 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560300744.23.0.731083952777.issue35766@roundup.psfhosted.org> STINNER Victor added the comment: New changeset efdf6ca90f7702824e7aeee1ceca949e7c20288a by Victor Stinner in branch 'master': bpo-35766: compile(): rename feature_version parameter (GH-13994) https://github.com/python/cpython/commit/efdf6ca90f7702824e7aeee1ceca949e7c20288a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 20:52:27 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 00:52:27 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560300747.23.0.758979088128.issue35766@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13858 pull_request: https://github.com/python/cpython/pull/13995 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 20:55:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 00:55:31 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560300931.28.0.16529507434.issue35766@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 3ba21070c6ecab83c23cea41a92b42fa651c7ea2 by Victor Stinner (Miss Islington (bot)) in branch '3.8': bpo-35766: Change format for feature_version to (major, minor) (GH-13992) (GH-13993) https://github.com/python/cpython/commit/3ba21070c6ecab83c23cea41a92b42fa651c7ea2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 21:12:14 2019 From: report at bugs.python.org (Hong Xu) Date: Wed, 12 Jun 2019 01:12:14 +0000 Subject: [issue37225] Signatures of Exceptions not documented In-Reply-To: <1560237102.52.0.133464005619.issue37225@roundup.psfhosted.org> Message-ID: <1560301934.19.0.569993683039.issue37225@roundup.psfhosted.org> Hong Xu added the comment: Thanks for your answer, but I believe this is a real document bug. OSError does have its signature documented, but the majority of other exception classes do not do so, neither does BaseException explains a default behavior clearly (see my quote above). As an example, ValueError accepts multiple arguments and makes use of all of them when given, but from the document, I can barely guess this out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 21:36:42 2019 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 12 Jun 2019 01:36:42 +0000 Subject: [issue35922] robotparser crawl_delay and request_rate do not work with no matching entry In-Reply-To: <1549485183.59.0.634497522614.issue35922@roundup.psfhosted.org> Message-ID: <1560303402.86.0.467210714962.issue35922@roundup.psfhosted.org> Guido van Rossum added the comment: Yes, this looks like a bugfix. Who wants an AttributeError? :-) ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 21:42:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 01:42:10 +0000 Subject: [issue36918] ValueError warning in test_urllib due to io.IOBase destructor In-Reply-To: <1557856507.99.0.0146189740679.issue36918@roundup.psfhosted.org> Message-ID: <1560303730.94.0.79328904927.issue36918@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13859 pull_request: https://github.com/python/cpython/pull/13996 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 22:04:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 02:04:11 +0000 Subject: [issue26219] implement per-opcode cache in ceval In-Reply-To: <1453918500.26.0.0886095278127.issue26219@psf.upfronthosting.co.za> Message-ID: <1560305051.14.0.956940330624.issue26219@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13860 pull_request: https://github.com/python/cpython/pull/13997 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 22:07:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 02:07:42 +0000 Subject: [issue36918] ValueError warning in test_urllib due to io.IOBase destructor In-Reply-To: <1557856507.99.0.0146189740679.issue36918@roundup.psfhosted.org> Message-ID: <1560305262.07.0.704001528764.issue36918@roundup.psfhosted.org> STINNER Victor added the comment: New changeset eb976e47e261760330c1bed224019b073b05e994 by Victor Stinner in branch 'master': bpo-36918: Fix "Exception ignored in" in test_urllib (GH-13996) https://github.com/python/cpython/commit/eb976e47e261760330c1bed224019b073b05e994 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 22:07:50 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 02:07:50 +0000 Subject: [issue36918] ValueError warning in test_urllib due to io.IOBase destructor In-Reply-To: <1557856507.99.0.0146189740679.issue36918@roundup.psfhosted.org> Message-ID: <1560305270.34.0.274813011278.issue36918@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13861 pull_request: https://github.com/python/cpython/pull/13998 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 22:14:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 02:14:12 +0000 Subject: [issue37223] test_io logs Exception ignored in: warnings In-Reply-To: <1560210319.85.0.887484202288.issue37223@roundup.psfhosted.org> Message-ID: <1560305652.52.0.957110268185.issue37223@roundup.psfhosted.org> STINNER Victor added the comment: Oh. There are still 3 errors in 2 tests: test_writer_close_error_on_close (test.test_io.CBufferedRWPairTest) ... Exception ignored in: <_io.BufferedWriter> Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 611, in _callTestMethod method() ValueError: flush of closed file ok test_destructor (test.test_io.CBufferedRandomTest) ... Exception ignored in: <_io.BufferedRWPair object at 0x7fc9d1c230b0> Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/test/support/__init__.py", line 1627, in gc_collect gc.collect() ValueError: flush of closed file Exception ignored in: <_io.BufferedWriter> Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/test/support/__init__.py", line 1627, in gc_collect gc.collect() ValueError: flush of closed file ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 22:26:07 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 02:26:07 +0000 Subject: [issue36918] ValueError warning in test_urllib due to io.IOBase destructor In-Reply-To: <1557856507.99.0.0146189740679.issue36918@roundup.psfhosted.org> Message-ID: <1560306367.98.0.774138499793.issue36918@roundup.psfhosted.org> miss-islington added the comment: New changeset 9d37ae0bee25692572c201378cd0692df22fa2ac by Miss Islington (bot) in branch '3.8': bpo-36918: Fix "Exception ignored in" in test_urllib (GH-13996) https://github.com/python/cpython/commit/9d37ae0bee25692572c201378cd0692df22fa2ac ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 22:39:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 02:39:57 +0000 Subject: [issue37223] test_io logs Exception ignored in: warnings In-Reply-To: <1560210319.85.0.887484202288.issue37223@roundup.psfhosted.org> Message-ID: <1560307197.75.0.431519831852.issue37223@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13862 pull_request: https://github.com/python/cpython/pull/13999 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 22:41:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 02:41:22 +0000 Subject: [issue26219] implement per-opcode cache in ceval In-Reply-To: <1453918500.26.0.0886095278127.issue26219@psf.upfronthosting.co.za> Message-ID: <1560307282.05.0.231837113492.issue26219@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 376ce9852eec4e97745c723f0dd0fe64383c6cd3 by Victor Stinner in branch 'master': bpo-26219: Fix compiler warning in _PyCode_InitOpcache() (GH-13997) https://github.com/python/cpython/commit/376ce9852eec4e97745c723f0dd0fe64383c6cd3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 22:41:31 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 02:41:31 +0000 Subject: [issue26219] implement per-opcode cache in ceval In-Reply-To: <1453918500.26.0.0886095278127.issue26219@psf.upfronthosting.co.za> Message-ID: <1560307291.36.0.26473422128.issue26219@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13863 pull_request: https://github.com/python/cpython/pull/14000 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 22:42:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 02:42:40 +0000 Subject: [issue36918] ValueError warning in test_urllib due to io.IOBase destructor In-Reply-To: <1557856507.99.0.0146189740679.issue36918@roundup.psfhosted.org> Message-ID: <1560307360.11.0.797817754088.issue36918@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 22:45:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 02:45:39 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560307539.86.0.731417457983.issue35766@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13864 pull_request: https://github.com/python/cpython/pull/14001 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 23:42:36 2019 From: report at bugs.python.org (laike9m) Date: Wed, 12 Jun 2019 03:42:36 +0000 Subject: [issue32625] Update the dis module documentation to reflect switch to wordcode In-Reply-To: <1516642902.05.0.467229070634.issue32625@psf.upfronthosting.co.za> Message-ID: <1560310956.93.0.882280229237.issue32625@roundup.psfhosted.org> Change by laike9m : ---------- keywords: +patch pull_requests: +13865 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13985 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 23:46:13 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Jun 2019 03:46:13 +0000 Subject: [issue32625] Update the dis module documentation to reflect switch to wordcode In-Reply-To: <1516642902.05.0.467229070634.issue32625@psf.upfronthosting.co.za> Message-ID: <1560311173.56.0.0893883348865.issue32625@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 405f648db7c44b07348582b5101d4716e0ce5ac3 by Serhiy Storchaka (Yao Zuo) in branch 'master': bpo-32625: Updated documentation for EXTENDED_ARG. (GH-13985) https://github.com/python/cpython/commit/405f648db7c44b07348582b5101d4716e0ce5ac3 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 23:46:22 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 03:46:22 +0000 Subject: [issue32625] Update the dis module documentation to reflect switch to wordcode In-Reply-To: <1516642902.05.0.467229070634.issue32625@psf.upfronthosting.co.za> Message-ID: <1560311182.11.0.881948400309.issue32625@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13866 pull_request: https://github.com/python/cpython/pull/14002 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 23:46:28 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 03:46:28 +0000 Subject: [issue32625] Update the dis module documentation to reflect switch to wordcode In-Reply-To: <1516642902.05.0.467229070634.issue32625@psf.upfronthosting.co.za> Message-ID: <1560311188.68.0.0497501832621.issue32625@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13867 pull_request: https://github.com/python/cpython/pull/14003 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 23:51:45 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 03:51:45 +0000 Subject: [issue32625] Update the dis module documentation to reflect switch to wordcode In-Reply-To: <1516642902.05.0.467229070634.issue32625@psf.upfronthosting.co.za> Message-ID: <1560311505.21.0.54159213034.issue32625@roundup.psfhosted.org> miss-islington added the comment: New changeset f0cc1a91f72c7f60adc47ec9a4305d8d85dcb1f2 by Miss Islington (bot) in branch '3.7': bpo-32625: Updated documentation for EXTENDED_ARG. (GH-13985) https://github.com/python/cpython/commit/f0cc1a91f72c7f60adc47ec9a4305d8d85dcb1f2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 11 23:54:01 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 03:54:01 +0000 Subject: [issue32625] Update the dis module documentation to reflect switch to wordcode In-Reply-To: <1516642902.05.0.467229070634.issue32625@psf.upfronthosting.co.za> Message-ID: <1560311641.1.0.871520550031.issue32625@roundup.psfhosted.org> miss-islington added the comment: New changeset 811f84d55d156e3d05889806d00a8c028d304089 by Miss Islington (bot) in branch '3.8': bpo-32625: Updated documentation for EXTENDED_ARG. (GH-13985) https://github.com/python/cpython/commit/811f84d55d156e3d05889806d00a8c028d304089 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 00:30:46 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 04:30:46 +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: <1560313846.37.0.330926482195.issue29505@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13868 pull_request: https://github.com/python/cpython/pull/14005 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 00:30:53 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 04:30:53 +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: <1560313853.57.0.944768845303.issue29505@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13869 pull_request: https://github.com/python/cpython/pull/14006 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 00:30:59 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 12 Jun 2019 04:30:59 +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: <1560313859.6.0.284107178289.issue29505@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset a6e190e94b47324f14e22a09200c68b722d55699 by Gregory P. Smith (Ammar Askar) in branch 'master': bpo-29505: Fuzz json module, enforce size limit on int(x) fuzz (GH-13991) https://github.com/python/cpython/commit/a6e190e94b47324f14e22a09200c68b722d55699 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 00:42:27 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 12 Jun 2019 04:42:27 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560314547.42.0.971623121384.issue37221@roundup.psfhosted.org> Stefan Behnel added the comment: Note that PyCode_New() is not the only change in 3.8 beta1 that breaks Cython generated code. The renaming of "tp_print" to "tp_vectorcall" is equally disruptive, because Cython has (or had) a work-around for CPython (mis-)behaviour that reset the field explicitly to NULL after calling PyType_Ready(), which could set it arbitrarily without good reason. So, either revert that field renaming, too, or ignore Cython generated modules for the reasoning about the change in this ticket. I'm fine with keeping things as they are now in beta-1, but we could obviously adapt to whatever beta-2 wants to change again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 00:47:44 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 04:47:44 +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: <1560314864.96.0.798116122401.issue29505@roundup.psfhosted.org> miss-islington added the comment: New changeset 534136ac6790a701e24f364a9b7f1e34bf5f3ce7 by Miss Islington (bot) in branch '3.7': bpo-29505: Fuzz json module, enforce size limit on int(x) fuzz (GH-13991) https://github.com/python/cpython/commit/534136ac6790a701e24f364a9b7f1e34bf5f3ce7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 00:48:20 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 04:48:20 +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: <1560314900.9.0.258905724813.issue29505@roundup.psfhosted.org> miss-islington added the comment: New changeset 878227e7217f3363f9c095b7fb8c1dbdde1ec34f by Miss Islington (bot) in branch '3.8': bpo-29505: Fuzz json module, enforce size limit on int(x) fuzz (GH-13991) https://github.com/python/cpython/commit/878227e7217f3363f9c095b7fb8c1dbdde1ec34f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 01:33:05 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 12 Jun 2019 05:33:05 +0000 Subject: [issue37229] bisect: Allow a custom compare function In-Reply-To: <1560249413.65.0.773454068732.issue37229@roundup.psfhosted.org> Message-ID: <1560317585.92.0.888839807306.issue37229@roundup.psfhosted.org> Raymond Hettinger added the comment: > issue4356 is also a good-enough solution for me, Then please leave this closed and let that issue run its course. Also, please don't take an argumentative tone or abuse setting the tracker status. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 01:55:28 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 12 Jun 2019 05:55:28 +0000 Subject: [issue36901] Fix leaks in /PC/bdist_wininst/install.c In-Reply-To: <1557748667.87.0.123726768405.issue36901@roundup.psfhosted.org> Message-ID: <1560318928.33.0.5363517959.issue36901@roundup.psfhosted.org> Change by Zackery Spytz : ---------- pull_requests: +13870 pull_request: https://github.com/python/cpython/pull/14007 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 02:00:27 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Jun 2019 06:00:27 +0000 Subject: [issue37213] Peeephole optimizer does not optimize functions with multiline expressions In-Reply-To: <1560155063.44.0.426038128869.issue37213@roundup.psfhosted.org> Message-ID: <1560319227.84.0.953387962881.issue37213@roundup.psfhosted.org> Serhiy Storchaka added the comment: test_peepholer.diff adds tests which cover various peepholer optimizations not tested before. All of them are failed now and should be passed after merging PR 13969. Pablo, you can include these tests in PR 13969. ---------- Added file: https://bugs.python.org/file48412/test_peepholer.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 02:35:29 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 12 Jun 2019 06:35:29 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1560321329.86.0.34320242361.issue37111@roundup.psfhosted.org> Change by Vinay Sajip : ---------- pull_requests: +13871 pull_request: https://github.com/python/cpython/pull/14008 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 02:42:01 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 12 Jun 2019 06:42:01 +0000 Subject: [issue36901] Fix leaks in /PC/bdist_wininst/install.c In-Reply-To: <1557748667.87.0.123726768405.issue36901@roundup.psfhosted.org> Message-ID: <1560321721.66.0.32996143561.issue36901@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 04:35:31 2019 From: report at bugs.python.org (mrqianjinsi) Date: Wed, 12 Jun 2019 08:35:31 +0000 Subject: [issue37242] sub-process would be terminated when registered finalizer are working Message-ID: <1560328531.7.0.625749907508.issue37242@roundup.psfhosted.org> New submission from mrqianjinsi : Hi guys. I'm using multiprocessing module to accelerate my program. and I want to do some cleanup work when sub-process exit. but I found that sub-process would be terminated when registered finalizer are working. Is this behavior designed intentionally? code example: import multiprocessing as mp from multiprocessing.util import Finalize import os import time def finalizer(): time.sleep(0.2) # some time consuming work print('do cleanup work: {}'.format(os.getpid())) def worker(_): print('do some work: {}'.format(os.getpid())) def initializer(): # ref: https://github.com/python/cpython/blob/master/Lib/multiprocessing/util.py#L147 Finalize(None, finalizer, exitpriority=1) # atexit module don't work along with multiprocessing module # because sub-process exit via os._exit() # ref: https://docs.python.org/3/library/atexit.html # atexit.register(finalizer) # don't work print('main process ID: {}'.format(os.getpid())) with mp.Pool(4, initializer=initializer) as executor: executor.map(worker, range(20)) gist link: https://gist.github.com/MrQianJinSi/2daf5b6a9ef08b00facdfbea5200dd28 ---------- components: Library (Lib) messages: 345310 nosy: mrqianjinsi priority: normal severity: normal status: open title: sub-process would be terminated when registered finalizer are working type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 04:37:15 2019 From: report at bugs.python.org (mrqianjinsi) Date: Wed, 12 Jun 2019 08:37:15 +0000 Subject: [issue37242] sub-process would be terminated when registered finalizers are working In-Reply-To: <1560328531.7.0.625749907508.issue37242@roundup.psfhosted.org> Message-ID: <1560328635.51.0.290096437144.issue37242@roundup.psfhosted.org> Change by mrqianjinsi : ---------- title: sub-process would be terminated when registered finalizer are working -> sub-process would be terminated when registered finalizers are working _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 04:47:41 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 12 Jun 2019 08:47:41 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560329261.06.0.214374558772.issue37221@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Adding Petr, that was involved with the "tp_print" to "tp_vectorcall" renaming. ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 04:58:20 2019 From: report at bugs.python.org (Michael Felt) Date: Wed, 12 Jun 2019 08:58:20 +0000 Subject: [issue37087] Adding native id support for openbsd In-Reply-To: <1559147565.3.0.574292103957.issue37087@roundup.psfhosted.org> Message-ID: <1560329900.36.0.916466096884.issue37087@roundup.psfhosted.org> Change by Michael Felt : ---------- pull_requests: +13872 pull_request: https://github.com/python/cpython/pull/13624 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 05:38:07 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 12 Jun 2019 09:38:07 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560332287.93.0.67701681276.issue37221@roundup.psfhosted.org> Jeroen Demeyer added the comment: Technically, tp_print was replaced by tp_vectorcall_offset. But that doesn't answer the question how we should deal with tp_print backwards compatibility. Cython does FooType.tp_print = 0; With this in mind, simply replacing tp_print by tp_vectorcall_offset is unsafe as it would break types that actually use vectorcall (there aren't many for now, but who knows how this will change in the future). It would be safer to replace tp_print by tp_vectorcall since setting that to 0 won't break anything (neither for now, nor when PR 13930 is merged). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 05:48:30 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 12 Jun 2019 09:48:30 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560332910.17.0.0808365522023.issue37221@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +13873 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14009 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 05:49:42 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 12 Jun 2019 09:49:42 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560332982.91.0.130718411566.issue37221@roundup.psfhosted.org> Jeroen Demeyer added the comment: PR 14009 deals with tp_print ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 06:05:34 2019 From: report at bugs.python.org (Michael Felt) Date: Wed, 12 Jun 2019 10:05:34 +0000 Subject: [issue37243] test_sendfile in asyncio crashes when os.sendfile() is not supported Message-ID: <1560333934.74.0.973153336061.issue37243@roundup.psfhosted.org> New submission from Michael Felt : issue34655 added sendfile support to asyncio. However, the `test_sendfile` fails when called if there is no os.sendfile support. This patch will skip the test when @unittest.skipUnless(hasattr(os, 'sendfile'), 'test needs os.sendfile()') ---------- messages: 345314 nosy: Michael.Felt priority: normal severity: normal status: open title: test_sendfile in asyncio crashes when os.sendfile() is not supported _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 06:15:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 10:15:13 +0000 Subject: [issue26219] implement per-opcode cache in ceval In-Reply-To: <1453918500.26.0.0886095278127.issue26219@psf.upfronthosting.co.za> Message-ID: <1560334513.02.0.174181957733.issue26219@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 996e52623af3854552d41751e0c2522bc0a7e84f by Victor Stinner (Miss Islington (bot)) in branch '3.8': bpo-26219: Fix compiler warning in _PyCode_InitOpcache() (GH-13997) (GH-14000) https://github.com/python/cpython/commit/996e52623af3854552d41751e0c2522bc0a7e84f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 06:21:36 2019 From: report at bugs.python.org (mrqianjinsi) Date: Wed, 12 Jun 2019 10:21:36 +0000 Subject: [issue37242] sub-process would be terminated when registered finalizers are still running In-Reply-To: <1560328531.7.0.625749907508.issue37242@roundup.psfhosted.org> Message-ID: <1560334896.05.0.25147064267.issue37242@roundup.psfhosted.org> Change by mrqianjinsi : ---------- title: sub-process would be terminated when registered finalizers are working -> sub-process would be terminated when registered finalizers are still running _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 06:50:17 2019 From: report at bugs.python.org (Michael Felt) Date: Wed, 12 Jun 2019 10:50:17 +0000 Subject: [issue37243] test_sendfile in asyncio crashes when os.sendfile() is not supported In-Reply-To: <1560333934.74.0.973153336061.issue37243@roundup.psfhosted.org> Message-ID: <1560336617.3.0.222398788291.issue37243@roundup.psfhosted.org> Change by Michael Felt : ---------- keywords: +patch pull_requests: +13874 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14010 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 07:05:45 2019 From: report at bugs.python.org (Ben Brown) Date: Wed, 12 Jun 2019 11:05:45 +0000 Subject: [issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range In-Reply-To: <1560242699.55.0.804750809475.issue37226@roundup.psfhosted.org> Message-ID: <1560337545.34.0.554462048035.issue37226@roundup.psfhosted.org> Ben Brown added the comment: I have created a minimal example if that helps to show the issue https://gist.github.com/bobthemac/031213b8e37960ee805f2ae1e6990b60 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 07:08:58 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 12 Jun 2019 11:08:58 +0000 Subject: [issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range In-Reply-To: <1560242699.55.0.804750809475.issue37226@roundup.psfhosted.org> Message-ID: <1560337738.28.0.138088032907.issue37226@roundup.psfhosted.org> Andrew Svetlov added the comment: Thank you! Yuri, you might be interested too ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 07:17:06 2019 From: report at bugs.python.org (Michael Felt) Date: Wed, 12 Jun 2019 11:17:06 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1545303410.27.0.788709270274.issue35545@psf.upfronthosting.co.za> Message-ID: <1560338226.88.0.0278931302963.issue35545@roundup.psfhosted.org> Change by Michael Felt : ---------- pull_requests: +13875 pull_request: https://github.com/python/cpython/pull/14011 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 07:33:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 11:33:53 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560339233.63.0.593106326118.issue37221@roundup.psfhosted.org> STINNER Victor added the comment: > Note that PyCode_New() is not the only change in 3.8 beta1 that breaks Cython generated code. The renaming of "tp_print" to "tp_vectorcall" is equally disruptive, because Cython has (or had) a work-around for CPython (mis-)behaviour that reset the field explicitly to NULL after calling PyType_Ready(), which could set it arbitrarily without good reason. Can someone please open a separated issue to discuss tp_print backward incompatible change? This issue is about PyCode_New(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 07:34:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 11:34:47 +0000 Subject: [issue37087] Adding native id support for openbsd In-Reply-To: <1559147565.3.0.574292103957.issue37087@roundup.psfhosted.org> Message-ID: <1560339287.07.0.0444121264399.issue37087@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -13872 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 07:43:46 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 12 Jun 2019 11:43:46 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1560339826.77.0.984641807889.issue37111@roundup.psfhosted.org> Inada Naoki added the comment: Hmm,, about encoding, I agree that default encoding of open() should be used. If we change it, encoding of log files are changed unexpectedly after upgrading Python. On the other hand, couldn't we use different default error handler? "replace" or "backslashescape" seems better default error handler for the logging. Is this change affects too many users? ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 07:45:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 11:45:11 +0000 Subject: [issue37244] test_multiprocessing_forkserver: test_resource_tracker() failed on x86 Gentoo Refleaks 3.8 Message-ID: <1560339911.07.0.931464630019.issue37244@roundup.psfhosted.org> New submission from STINNER Victor : x86 Gentoo Refleaks 3.8: https://buildbot.python.org/all/#/builders/223/builds/9 3:22:46 load avg: 5.83 [423/423/2] test_multiprocessing_forkserver failed (5 min 10 sec) beginning 6 repetitions 123456 ./buildbot/buildarea/cpython/3.8.ware-gentoo-x86.refleak/build/Lib/test/_test_multiprocessing.py:5002: ResourceWarning: unclosed file <_io.BufferedReader name=10> p = subprocess.Popen([sys.executable, ResourceWarning: Enable tracemalloc to get the object allocation traceback test test_multiprocessing_forkserver failed -- Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.refleak/build/Lib/test/_test_multiprocessing.py", line 5015, in test_resource_tracker _resource_unlink(name2, rtype) AssertionError: OSError not raised /buildbot/buildarea/cpython/3.8.ware-gentoo-x86.refleak/build/Lib/multiprocessing/resource_tracker.py:203: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d ' /buildbot/buildarea/cpython/3.8.ware-gentoo-x86.refleak/build/Lib/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: '//psm_dfd85228': [Errno 2] No such file or directory: '//psm_dfd85228' warnings.warn('resource_tracker: %r: %s' % (name, e)) --- Test added by: commit f22cc69b012f52882d434a5c44a004bc3aa5c33c Author: Pierre Glaser Date: Fri May 10 22:59:08 2019 +0200 bpo-36867: Make semaphore_tracker track other system resources (GH-13222) The multiprocessing.resource_tracker replaces the multiprocessing.semaphore_tracker module. Other than semaphores, resource_tracker also tracks shared_memory segment s. Patch by Pierre Glaser. ---------- components: Tests messages: 345320 nosy: vstinner priority: normal severity: normal status: open title: test_multiprocessing_forkserver: test_resource_tracker() failed on x86 Gentoo Refleaks 3.8 versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 07:45:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 11:45:55 +0000 Subject: [issue36888] Create a way to check that the parent process is alive for deamonized processes In-Reply-To: <1557588992.87.0.32954176975.issue36888@roundup.psfhosted.org> Message-ID: <1560339955.86.0.776404133965.issue36888@roundup.psfhosted.org> STINNER Victor added the comment: This new test is not reliable, it failed on x86 Gentoo Refleaks 3.8: https://buildbot.python.org/all/#/builders/223/builds/9 Please fix the test or revert the change. The CI must remain green ;-) running: test_multiprocessing_spawn (31 min 51 sec), test_multiprocessing_forkserver (3 min 7 ms) 3:20:42 load avg: 6.89 [415/423/1] test_multiprocessing_spawn failed (31 min 30 sec) -- running: test_multiprocessing_forkserver (3 min 7 sec) beginning 6 repetitions 123456 ....Process Process-1588:1: Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.refleak/build/Lib/multiprocessing/process.py", line 313, in _bootstrap self.run() File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.refleak/build/Lib/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.refleak/build/Lib/test/_test_multiprocessing.py", line 326, in _test_report_parent_status wconn.send("alive" if parent_process().is_alive() else "not alive") File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.refleak/build/Lib/multiprocessing/connection.py", line 206, in send self._send_bytes(_ForkingPickler.dumps(obj)) File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.refleak/build/Lib/multiprocessing/connection.py", line 411, in _send_bytes self._send(header + buf) File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.refleak/build/Lib/multiprocessing/connection.py", line 368, in _send n = write(self._handle, buf) BrokenPipeError: [Errno 32] Broken pipe Warning -- Dangling processes: {} Warning -- Dangling processes: {} Warning -- multiprocessing.process._dangling was modified by test_multiprocessing_spawn Before: set() After: {} test test_multiprocessing_spawn failed -- Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.refleak/build/Lib/test/_test_multiprocessing.py", line 305, in test_parent_process raise AssertionError("Could not communicate with child process") AssertionError: Could not communicate with child process /buildbot/buildarea/cpython/3.8.ware-gentoo-x86.refleak/build/Lib/multiprocessing/resource_tracker.py:203: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d ' /buildbot/buildarea/cpython/3.8.ware-gentoo-x86.refleak/build/Lib/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: '//psm_b32d1a2f': [Errno 2] No such file or directory: '//psm_b32d1a2f' warnings.warn('resource_tracker: %r: %s' % (name, e)) (...) Re-running test_multiprocessing_spawn in verbose mode ====================================================================== FAIL: test_parent_process (test.test_multiprocessing_spawn.WithProcessesTestProcess) ---------------------------------------------------------------------- Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.refleak/build/Lib/test/_test_multiprocessing.py", line 305, in test_parent_process raise AssertionError("Could not communicate with child process") AssertionError: Could not communicate with child process ---------- nosy: +vstinner resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 07:47:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 11:47:36 +0000 Subject: [issue37244] test_multiprocessing_forkserver: test_resource_tracker() failed on x86 Gentoo Refleaks 3.8 In-Reply-To: <1560339911.07.0.931464630019.issue37244@roundup.psfhosted.org> Message-ID: <1560340056.63.0.90693420407.issue37244@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +pablogsal, pierreglaser, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 07:47:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 11:47:54 +0000 Subject: [issue36867] Make semaphore_tracker track other system resources In-Reply-To: <1557423361.05.0.0948606859067.issue36867@roundup.psfhosted.org> Message-ID: <1560340074.67.0.811218515471.issue36867@roundup.psfhosted.org> STINNER Victor added the comment: The new test is not reliable, see: bpo-37244 "test_multiprocessing_forkserver: test_resource_tracker() failed on x86 Gentoo Refleaks 3.8". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 07:48:23 2019 From: report at bugs.python.org (Erik Bray) Date: Wed, 12 Jun 2019 11:48:23 +0000 Subject: [issue9665] Buid issues on Cygwin - _curses, _curses_panel, and _io In-Reply-To: <1282599121.2.0.918330648156.issue9665@psf.upfronthosting.co.za> Message-ID: <1560340103.84.0.207201887263.issue9665@roundup.psfhosted.org> Erik Bray added the comment: I think this issue can probably be closed. It refers to a very old version of Cygwin as well as old versions of Python. I don't have any problem building the _curses or _io modules on recent versions of Cygwin (>=2.9) and with current cpython master (3.9.0a0). ---------- nosy: +erik.bray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 07:50:16 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 11:50:16 +0000 Subject: [issue31829] Portability issues with pickle In-Reply-To: <1508521289.37.0.213398074469.issue31829@psf.upfronthosting.co.za> Message-ID: <1560340216.83.0.837427453597.issue31829@roundup.psfhosted.org> miss-islington added the comment: New changeset d561f848b235f2011a43b705d112055b92fa2366 by Miss Islington (bot) in branch '3.7': bpo-31829: Make protocol 0 pickles be loadable in text mode in Python 2. (GH-11859) https://github.com/python/cpython/commit/d561f848b235f2011a43b705d112055b92fa2366 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 07:57:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 11:57:02 +0000 Subject: [issue37245] Azure Pipeline: sick macOS job on Python 3.8? Message-ID: <1560340622.3.0.842050597369.issue37245@roundup.psfhosted.org> New submission from STINNER Victor : I backported a change to 3.8: https://github.com/python/cpython/pull/14000 The macOS job of Azure Pipelines failed badly: https://dev.azure.com/Python/cpython/_build/results?buildId=45071&view=results * test_importlib/test_locks.py: test_deadlock() => TIMEOUT * test_multiprocessing_spawn: test_thread_safety() => TIMEOUT * test_concurrent_futures: test_pending_calls_race() => TIMEOUT * test_functools: test_threaded() => TIMEOUT * test_multiprocessing_forkserver: test_thread_safety() => TIMEOUT * test_threading: test_is_alive_after_fork() => TIMEOUT 0:20:21 load avg: 4.55 [155/423/1] test_importlib crashed (Exit code 1) -- running: test_concurrent_futures (16 min 12 sec), test_functools (13 min 30 sec), test_multiprocessing_spawn (18 min 51 sec) Timeout (0:20:00)! Thread 0x0000700004627000 (most recent call first): Thread 0x00007fff96f1a380 (most recent call first): File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/lock_tests.py", line 49 in __init__ File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/test_importlib/test_locks.py", line 84 in run_deadlock_avoidance_test File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/test_importlib/test_locks.py", line 89 in test_deadlock ... 0:21:30 load avg: 4.76 [160/423/2] test_multiprocessing_spawn crashed (Exit code 1) -- running: test_concurrent_futures (17 min 21 sec), test_functools (14 min 39 sec), test_threading (35 sec 923 ms) Timeout (0:20:00)! Thread 0x0000700000ff1000 (most recent call first): Thread 0x00007fff96f1a380 (most recent call first): File "/Users/vsts/agent/2.152.1/work/1/s/Lib/threading.py", line 847 in start File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/support/__init__.py", line 2299 in start_threads File "/Users/vsts/agent/2.152.1/work/1/s/Lib/contextlib.py", line 113 in __enter__ File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/_test_multiprocessing.py", line 4138 in test_thread_safety ... 0:24:09 load avg: 4.11 [207/423/3] test_concurrent_futures crashed (Exit code 1) -- running: test_functools (17 min 18 sec), test_timeout (34 sec 14 ms), test_threading (3 min 14 sec) Timeout (0:20:00)! Thread 0x0000700006644000 (most recent call first): File "/Users/vsts/agent/2.152.1/work/1/s/Lib/concurrent/futures/thread.py", line 78 in _worker File "/Users/vsts/agent/2.152.1/work/1/s/Lib/threading.py", line 865 in run File "/Users/vsts/agent/2.152.1/work/1/s/Lib/threading.py", line 923 in _bootstrap_inner File "/Users/vsts/agent/2.152.1/work/1/s/Lib/threading.py", line 885 in _bootstrap Thread 0x0000700006141000 (most recent call first): File "/Users/vsts/agent/2.152.1/work/1/s/Lib/concurrent/futures/thread.py", line 78 in _worker File "/Users/vsts/agent/2.152.1/work/1/s/Lib/threading.py", line 865 in run File "/Users/vsts/agent/2.152.1/work/1/s/Lib/threading.py", line 923 in _bootstrap_inner File "/Users/vsts/agent/2.152.1/work/1/s/Lib/threading.py", line 885 in _bootstrap Thread 0x0000700005c3e000 (most recent call first): File "/Users/vsts/agent/2.152.1/work/1/s/Lib/concurrent/futures/thread.py", line 78 in _worker File "/Users/vsts/agent/2.152.1/work/1/s/Lib/threading.py", line 865 in run File "/Users/vsts/agent/2.152.1/work/1/s/Lib/threading.py", line 923 in _bootstrap_inner File "/Users/vsts/agent/2.152.1/work/1/s/Lib/threading.py", line 885 in _bootstrap Thread 0x000070000573b000 (most recent call first): File "/Users/vsts/agent/2.152.1/work/1/s/Lib/concurrent/futures/thread.py", line 78 in _worker File "/Users/vsts/agent/2.152.1/work/1/s/Lib/threading.py", line 865 in run File "/Users/vsts/agent/2.152.1/work/1/s/Lib/threading.py", line 923 in _bootstrap_inner File "/Users/vsts/agent/2.152.1/work/1/s/Lib/threading.py", line 885 in _bootstrap Thread 0x0000700005238000 (most recent call first): File "/Users/vsts/agent/2.152.1/work/1/s/Lib/concurrent/futures/thread.py", line 78 in _worker File "/Users/vsts/agent/2.152.1/work/1/s/Lib/threading.py", line 865 in run File "/Users/vsts/agent/2.152.1/work/1/s/Lib/threading.py", line 923 in _bootstrap_inner File "/Users/vsts/agent/2.152.1/work/1/s/Lib/threading.py", line 885 in _bootstrap Thread 0x00007fff96f1a380 (most recent call first): File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/libregrtest/setup.py", line 92 in _test_audit_hook File "/Users/vsts/agent/2.152.1/work/1/s/Lib/concurrent/futures/_base.py", line 146 in __init__ File "/Users/vsts/agent/2.152.1/work/1/s/Lib/concurrent/futures/_base.py", line 288 in wait File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/test_concurrent_futures.py", line 565 in test_pending_calls_race File "/Users/vsts/agent/2.152.1/work/1/s/Lib/unittest/case.py", line 628 in _callTestMethod File "/Users/vsts/agent/2.152.1/work/1/s/Lib/unittest/case.py", line 671 in run File "/Users/vsts/agent/2.152.1/work/1/s/Lib/unittest/case.py", line 731 in __call__ File "/Users/vsts/agent/2.152.1/work/1/s/Lib/unittest/suite.py", line 122 in run File "/Users/vsts/agent/2.152.1/work/1/s/Lib/unittest/suite.py", line 84 in __call__ File "/Users/vsts/agent/2.152.1/work/1/s/Lib/unittest/suite.py", line 122 in run File "/Users/vsts/agent/2.152.1/work/1/s/Lib/unittest/suite.py", line 84 in __call__ File "/Users/vsts/agent/2.152.1/work/1/s/Lib/unittest/suite.py", line 122 in run File "/Users/vsts/agent/2.152.1/work/1/s/Lib/unittest/suite.py", line 84 in __call__ File "/Users/vsts/agent/2.152.1/work/1/s/Lib/unittest/runner.py", line 176 in run File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/support/__init__.py", line 1984 in _run_suite File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/support/__init__.py", line 2080 in run_unittest File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/test_concurrent_futures.py", line 1300 in test_main File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/support/__init__.py", line 2212 in decorator File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/libregrtest/runtest.py", line 228 in _runtest_inner2 File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/libregrtest/runtest.py", line 264 in _runtest_inner File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/libregrtest/runtest.py", line 135 in _runtest File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/libregrtest/runtest.py", line 187 in runtest File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/libregrtest/runtest_mp.py", line 66 in run_tests_worker File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/libregrtest/main.py", line 611 in _main File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/libregrtest/main.py", line 588 in main File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/libregrtest/main.py", line 663 in main File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/regrtest.py", line 46 in _main File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/regrtest.py", line 50 in File "/Users/vsts/agent/2.152.1/work/1/s/Lib/runpy.py", line 85 in _run_code File "/Users/vsts/agent/2.152.1/work/1/s/Lib/runpy.py", line 192 in _run_module_as_main 0:26:51 load avg: 5.14 [259/423/4] test_functools crashed (Exit code 1) -- running: test_io (1 min 11 sec), test_threading (5 min 56 sec) Timeout (0:20:00)! Thread 0x000070000666f000 (most recent call first): Thread 0x00007fff96f1a380 (most recent call first): File "/Users/vsts/agent/2.152.1/work/1/s/Lib/threading.py", line 847 in start File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/support/__init__.py", line 2299 in start_threads File "/Users/vsts/agent/2.152.1/work/1/s/Lib/contextlib.py", line 113 in __enter__ File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/test_functools.py", line 2464 in test_threaded ... 0:47:26 load avg: 1.71 [423/423/6] test_multiprocessing_forkserver crashed (Exit code 1) Timeout (0:20:00)! Thread 0x0000700009471000 (most recent call first): Thread 0x00007fff96f1a380 (most recent call first): File "/Users/vsts/agent/2.152.1/work/1/s/Lib/threading.py", line 246 in __enter__ File "/Users/vsts/agent/2.152.1/work/1/s/Lib/threading.py", line 555 in wait File "/Users/vsts/agent/2.152.1/work/1/s/Lib/threading.py", line 852 in start File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/support/__init__.py", line 2299 in start_threads File "/Users/vsts/agent/2.152.1/work/1/s/Lib/contextlib.py", line 113 in __enter__ File "/Users/vsts/agent/2.152.1/work/1/s/Lib/test/_test_multiprocessing.py", line 4138 in test_thread_safety ... 6 tests failed: test_concurrent_futures test_functools test_importlib test_multiprocessing_forkserver test_multiprocessing_spawn test_threading -- pythoninfo: 2019-06-12T02:45:41.9759180Z Py_DEBUG: Yes (sys.gettotalrefcount() present) 2019-06-12T02:45:41.9784500Z datetime.datetime.now: 2019-06-12 02:45:40.875495 2019-06-12T02:45:41.9806170Z platform.architecture: 64bit 2019-06-12T02:45:41.9797810Z os.environ[MACOSX_DEPLOYMENT_TARGET]: 10.13 2019-06-12T02:45:41.9806990Z platform.platform: macOS-10.13.6-x86_64-i386-64bit 2019-06-12T02:45:41.9801150Z os.login: _spotlight 2019-06-12T02:45:41.9817220Z socket.hostname: Mac-483.local 2019-06-12T02:45:41.9835490Z sys.version: 3.8.0b1+ (remotes/pull/14000/merge:ce71235d6, Jun 12 2019, 02:45:09) [Clang 10.0.0 (clang-1000.11.45.5)] ---------- components: Tests, macOS messages: 345325 nosy: ned.deily, ronaldoussoren, vstinner priority: normal severity: normal status: open title: Azure Pipeline: sick macOS job on Python 3.8? versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 07:57:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 11:57:58 +0000 Subject: [issue37245] Azure Pipeline: sick macOS job on Python 3.8? In-Reply-To: <1560340622.3.0.842050597369.issue37245@roundup.psfhosted.org> Message-ID: <1560340678.09.0.145895608603.issue37245@roundup.psfhosted.org> STINNER Victor added the comment: os.uname: posix.uname_result(sysname='Darwin', nodename='Mac-483.local', release='17.7.0', version='Darwin Kernel Version 17.7.0: Wed Apr 24 21:17:24 PDT 2019; root:xnu-4570.71.45~1/RELEASE_X86_64', machine='x86_64') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 07:59:44 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 12 Jun 2019 11:59:44 +0000 Subject: [issue37246] http.cookiejar.DefaultCookiePolicy should use current timestamp instead of last updated timestamp value for checking expiry Message-ID: <1560340784.82.0.908352351929.issue37246@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : In http.cookiejar module's DefaultCookiePolicy checking for cookie expiry uses the last updated value for _now [0] which is in three actions below. So if the cookies are extracted using the policy and the policy is used for expiry check later it could give incorrect values for expiry check. Like in below example I create a cookie with 1 second from now as expiry date. Sleeping for 1 second and using the same policy causing is_expired to work correctly but return_ok uses self._now with the older value returning the cookie. I propose using time.time() and update self._now or to change cookie.is_expired(self._now) to cookie.is_expired() where is_expired uses time.time() internally I think it's better to use the current time while using return_ok to compare the cookie expiry. One another error is that self._now is set only when one of the methods is called so evaluating a new policy against a cookie with expiry causes AttributeError since self._now is not yet set. Actions where self._now is updated * add_cookie_header * extract_cookies * set_cookie_if_ok import time from http.cookiejar import CookieJar, DefaultCookiePolicy, time2netscape from test.test_http_cookiejar import FakeResponse from urllib.request import Request delay = 1 now = time.time() + delay future = time2netscape(now) req = Request("https://example.com") headers = [f"Set-Cookie: a=b; expires={future};"] res = FakeResponse(headers, "https://example.com/") policy = DefaultCookiePolicy() jar = CookieJar(policy=policy) jar.extract_cookies(res, req) cookie = jar.make_cookies(res, req)[0] print(f"{cookie.expires = }") print(f"{policy.return_ok(cookie, req) = }") time.sleep(delay + 1) # Check for cookie expiry where is_expired() returns true print(f"Current time : {int(time.time())}") print(f"{cookie.is_expired() = }") # is_expired uses current timestamp so it returns True print(f"{policy.return_ok(cookie, req) = }") # Return now uses older timestamp and still returns the cookie as valid cookie # Output cookie.expires = 1560339939 policy.return_ok(cookie, req) = True Current time : 1560339940 cookie.is_expired() = True policy.return_ok(cookie, req) = True # Using above cookie variable against a new policy would throw AttributeError since self._now is not yet set req = Request("https://example.com") policy1 = DefaultCookiePolicy() print(policy1.return_ok(cookie, req)) # Output Traceback (most recent call last): File "/tmp/bar.py", line 31, in print(policy1.return_ok(cookie, req)) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/http/cookiejar.py", line 1096, in return_ok if not fn(cookie, request): File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/http/cookiejar.py", line 1128, in return_ok_expires if cookie.is_expired(self._now): AttributeError: 'DefaultCookiePolicy' object has no attribute '_now' [0] https://github.com/python/cpython/blob/a6e190e94b47324f14e22a09200c68b722d55699/Lib/http/cookiejar.py#L1128 ---------- components: Library (Lib) messages: 345327 nosy: martin.panter, orsenthil, serhiy.storchaka, xtreak priority: normal severity: normal status: open title: http.cookiejar.DefaultCookiePolicy should use current timestamp instead of last updated timestamp value for checking expiry type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 07:59:49 2019 From: report at bugs.python.org (Alejandro Gonzalez) Date: Wed, 12 Jun 2019 11:59:49 +0000 Subject: [issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call In-Reply-To: <1480885774.84.0.670239959771.issue28869@psf.upfronthosting.co.za> Message-ID: <1560340789.92.0.241857511785.issue28869@roundup.psfhosted.org> Alejandro Gonzalez added the comment: >I think we can proceed with option A, but only if doesn't cause visible slow-down for creating ABCs (which is already slower that normal classes). TBH, I don't want to document A as "official" recipe (maybe however mention the problem in the `pickle` module docs). I'll try using the same approach used in namedtuple, and see if there is any visible slow-down. Regarding the documentation, I see your point. Perhaps adding some section like "Notes on pickling dynamically-defined classes" in the `pickle` module would be more appropriate? That section would mention that you have to make sure to set the `__module__` attribute. >Note that other "class factories" in stdlib (like collections.namedtuple) do almost exactly option A. Thanks for the tip. Indeed it does. In fact, the API defines a module argument. Its documentation could be improved, though. It should mention why would you want to pass that argument (pickling seems to be the reason that argument was added in the first place). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 08:01:17 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 12:01:17 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1545303410.27.0.788709270274.issue35545@psf.upfronthosting.co.za> Message-ID: <1560340877.81.0.369105801475.issue35545@roundup.psfhosted.org> miss-islington added the comment: New changeset 32dda263e4e8c8e0fadc2bb29b9856e2f177dde9 by Miss Islington (bot) (Michael Felt) in branch 'master': bpo-35545: Skip `test_asyncio.test_create_connection_ipv6_scope` on AIX (GH-14011) https://github.com/python/cpython/commit/32dda263e4e8c8e0fadc2bb29b9856e2f177dde9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 08:01:27 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 12:01:27 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1545303410.27.0.788709270274.issue35545@psf.upfronthosting.co.za> Message-ID: <1560340887.68.0.285865401266.issue35545@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13876 pull_request: https://github.com/python/cpython/pull/14012 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 08:11:36 2019 From: report at bugs.python.org (Jeroen van den Hout) Date: Wed, 12 Jun 2019 12:11:36 +0000 Subject: [issue37247] swap distutils build_ext and build_py commands to allow proper SWIG extension installation Message-ID: <1560341496.09.0.819646109086.issue37247@roundup.psfhosted.org> New submission from Jeroen van den Hout : Currently when building an extension which lists a SWIG interface (.i) file as a source file, SWIG creates the files correctly in the build_ext command. Unfortunately this command is run after the build_py command, so the python files (.py) created in the build_ext command are never copied to the installation. To fix this, swap build_ext and build_py commands in the sub_commands attribute of the build command. ---------- components: Distutils messages: 345330 nosy: Jeroen van den Hout, dstufft, eric.araujo priority: normal severity: normal status: open title: swap distutils build_ext and build_py commands to allow proper SWIG extension installation type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 08:15:53 2019 From: report at bugs.python.org (Shen Han) Date: Wed, 12 Jun 2019 12:15:53 +0000 Subject: [issue37248] support conversion of `func(**{} if a else b)` Message-ID: <1560341753.77.0.566490049047.issue37248@roundup.psfhosted.org> Change by Shen Han : ---------- components: 2to3 (2.x to 3.x conversion tool) nosy: Shen Han priority: normal severity: normal status: open title: support conversion of `func(**{} if a else b)` type: enhancement versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 08:18:56 2019 From: report at bugs.python.org (Erik Bray) Date: Wed, 12 Jun 2019 12:18:56 +0000 Subject: [issue28459] _pyio module broken on Cygwin / setmode not usable In-Reply-To: <1476701892.4.0.598393414511.issue28459@psf.upfronthosting.co.za> Message-ID: <1560341936.27.0.356165996129.issue28459@roundup.psfhosted.org> Change by Erik Bray : ---------- pull_requests: +13877 pull_request: https://github.com/python/cpython/pull/14013 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 08:20:16 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 12:20:16 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1545303410.27.0.788709270274.issue35545@psf.upfronthosting.co.za> Message-ID: <1560342016.2.0.796960018331.issue35545@roundup.psfhosted.org> miss-islington added the comment: New changeset 70a4178ec47154fdcc3ff06c13149e178d014581 by Miss Islington (bot) in branch '3.8': bpo-35545: Skip `test_asyncio.test_create_connection_ipv6_scope` on AIX (GH-14011) https://github.com/python/cpython/commit/70a4178ec47154fdcc3ff06c13149e178d014581 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 08:20:53 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Wed, 12 Jun 2019 12:20:53 +0000 Subject: [issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call In-Reply-To: <1480885774.84.0.670239959771.issue28869@psf.upfronthosting.co.za> Message-ID: <1560342053.91.0.488564901994.issue28869@roundup.psfhosted.org> Ivan Levkivskyi added the comment: > Perhaps adding some section like "Notes on pickling dynamically-defined classes" in the `pickle` module would be more appropriate? I think just a note with few sentences would be enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 08:20:54 2019 From: report at bugs.python.org (Roundup Robot) Date: Wed, 12 Jun 2019 12:20:54 +0000 Subject: [issue37247] swap distutils build_ext and build_py commands to allow proper SWIG extension installation In-Reply-To: <1560341496.09.0.819646109086.issue37247@roundup.psfhosted.org> Message-ID: <1560342054.13.0.978891913489.issue37247@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +13878 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14014 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 08:36:15 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 12 Jun 2019 12:36:15 +0000 Subject: [issue37247] swap distutils build_ext and build_py commands to allow proper SWIG extension installation In-Reply-To: <1560341496.09.0.819646109086.issue37247@roundup.psfhosted.org> Message-ID: <1560342975.58.0.620447361379.issue37247@roundup.psfhosted.org> Jeroen Demeyer added the comment: > SWIG creates the files correctly in the build_ext command One could argue that running SWIG should be an entirely different step, not part of build_ext. I'm afraid that your idea of swapping build_ext and build_py will be rejected because it has a high chance of breaking stuff: we have always done build_py before build_ext and packages probably rely on this order. ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 08:37:54 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 12 Jun 2019 12:37:54 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560343074.52.0.155719144624.issue37221@roundup.psfhosted.org> Jeroen Demeyer added the comment: I think that the PyCode_New() compatibility problem and tp_print are sufficiently closely related that they can be discussed together. In any case, I agree that it makes little sense to fix just one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 08:49:12 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 12 Jun 2019 12:49:12 +0000 Subject: [issue26110] Speedup method calls 1.2x In-Reply-To: <1452791347.05.0.923215900831.issue26110@psf.upfronthosting.co.za> Message-ID: <1560343752.57.0.154615087679.issue26110@roundup.psfhosted.org> Jeroen Demeyer added the comment: Note that this idea has been generalized by PEP 590: any type can support this optimization by setting the Py_TPFLAGS_METHOD_DESCRIPTOR flag. ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 08:54:43 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 12 Jun 2019 12:54:43 +0000 Subject: [issue37249] Missing declaration of _PyObject_GetMethod Message-ID: <1560344083.09.0.0843105430865.issue37249@roundup.psfhosted.org> New submission from Jeroen Demeyer : The function _PyObject_GetMethod is internal and private, but it should still be declared properly. Currently, it is "manually" declared in two .c files where it's used. ---------- components: Interpreter Core messages: 345336 nosy: jdemeyer priority: normal severity: normal status: open title: Missing declaration of _PyObject_GetMethod versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 08:55:40 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 12 Jun 2019 12:55:40 +0000 Subject: [issue37249] Missing declaration of _PyObject_GetMethod In-Reply-To: <1560344083.09.0.0843105430865.issue37249@roundup.psfhosted.org> Message-ID: <1560344140.31.0.117848019967.issue37249@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:00:22 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 12 Jun 2019 13:00:22 +0000 Subject: [issue37249] Missing declaration of _PyObject_GetMethod In-Reply-To: <1560344083.09.0.0843105430865.issue37249@roundup.psfhosted.org> Message-ID: <1560344422.86.0.733574961655.issue37249@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +13879 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14015 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:08:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 13:08:30 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL Message-ID: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> New submission from STINNER Victor : Copy of Stefan Behnel's msg345305 in bpo-37221: """ Note that PyCode_New() is not the only change in 3.8 beta1 that breaks Cython generated code. The renaming of "tp_print" to "tp_vectorcall" is equally disruptive, because Cython has (or had) a work-around for CPython (mis-)behaviour that reset the field explicitly to NULL after calling PyType_Ready(), which could set it arbitrarily without good reason. So, either revert that field renaming, too, or ignore Cython generated modules for the reasoning about the change in this ticket. I'm fine with keeping things as they are now in beta-1, but we could obviously adapt to whatever beta-2 wants to change again. """ There are 2 problems: * source compatibility * ABI compatibility The following change removed PyTypeObject.tp_print and replaced it with PyTypeObject.tp_vectorcall_offset: commit aacc77fbd77640a8f03638216fa09372cc21673d Author: Jeroen Demeyer Date: Wed May 29 20:31:52 2019 +0200 bpo-36974: implement PEP 590 (GH-13185) Co-authored-by: Jeroen Demeyer Co-authored-by: Mark Shannon == ABI compatibility == In term of ABI, it means that C extensions using static type ("static PyTypeObject mytype = { .... };") is broken by this change. Honestly, I'm not sure if we ever provided any forward compatibility for static types. bpo-32388 removed "cross-version binary compatibility" on purpose in Python 3.8. It's an on-going topic, see also my notes about ABI and PyTypeObject: https://pythoncapi.readthedocs.io/type_object.html Maybe we can simply ignore this part of the problem. == Source compatibility == Cython generates C code setting tp_print explicitly to NULL. To avoid depending on Cython at installation, most (if not all) projects using Cython include C files generated by Cython in files they distribute (like tarballs). Because of that, the commit aacc77fbd77640a8f03638216fa09372cc21673d requires all these projects to regenerate their C files using Cython. In Fedora, we fixed many Python packages to always re-run Cython to regenerate all C files. But Fedora is just one way to distribute packages, it doesn't solve the problem of files distributed on PyPI, nor other Linux distribution (for example). Jeroen Demeyer proposed PR 14009 to fix the source compatibility: #define tp_print tp_vectorcall ---------- components: Interpreter Core messages: 345337 nosy: vstinner priority: normal severity: normal status: open title: C files generated by Cython set tp_print to NULL versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:09:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 13:09:45 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1560344985.75.0.470308822392.issue37221@roundup.psfhosted.org> STINNER Victor added the comment: Jeroen Demeyer: > I think that the PyCode_New() compatibility problem and tp_print are sufficiently closely related that they can be discussed together. IMHO these problems are different enough to justify to have a separated issue: I created https://bugs.python.org/issue37250 Please discuss tp_print issue there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:10:01 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 12 Jun 2019 13:10:01 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560345001.15.0.154217933503.issue37250@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +13880 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14009 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:11:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 13:11:22 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560345082.54.0.181234391083.issue37250@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: C files generated by Cython set tp_print to NULL -> C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:11:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 13:11:44 +0000 Subject: [issue32388] Remove cross-version binary compatibility In-Reply-To: <1513790879.02.0.213398074469.issue32388@psf.upfronthosting.co.za> Message-ID: <1560345104.26.0.0843423800085.issue32388@roundup.psfhosted.org> STINNER Victor added the comment: About ABI "foward compatibility", Python 3.8 introduced another backward incompatible change: bpo-37250 "C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:17:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 13:17:33 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560345453.67.0.201884543438.issue37250@roundup.psfhosted.org> STINNER Victor added the comment: "printfunc tp_print;" has been replaced with "Py_ssize_t tp_vectorcall_offset;": the type was basically a pointer and has been replaced with an integer. With "#define tp_print tp_vectorcall", "type->tp_print = NULL;" becomes "type->tp_vectorcall = NULL;". If -Werror is used, "type->tp_vectorcall = NULL;" would fail with a compilation error, since NULL is not exactly an integer, no? I'm not sure that it's an issue, I'm just thinking aloud. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:20:35 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 12 Jun 2019 13:20:35 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560345635.23.0.365900817823.issue37250@roundup.psfhosted.org> Jeroen Demeyer added the comment: Actually, Cython generates code setting tp_print to 0 (not NULL). ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:21:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 13:21:45 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560345705.45.0.95611792855.issue37250@roundup.psfhosted.org> STINNER Victor added the comment: inherit_slots() uses: /* Inherit tp_vectorcall_offset only if tp_call is not overridden */ if (!type->tp_call) { COPYSLOT(tp_vectorcall_offset); } PyType_Ready() contains the following assertion: /* Consistency checks for PEP 590: * - Py_TPFLAGS_METHOD_DESCRIPTOR requires tp_descr_get * - _Py_TPFLAGS_HAVE_VECTORCALL requires tp_call and * tp_vectorcall_offset > 0 * To avoid mistakes, we require this before inheriting. */ if (type->tp_flags & Py_TPFLAGS_METHOD_DESCRIPTOR) { _PyObject_ASSERT((PyObject *)type, type->tp_descr_get != NULL); } if (type->tp_flags & _Py_TPFLAGS_HAVE_VECTORCALL) { _PyObject_ASSERT((PyObject *)type, type->tp_vectorcall_offset > 0); _PyObject_ASSERT((PyObject *)type, type->tp_call != NULL); } I understand that tp_vectorcall_offset=0 is fine and the expected value for a type which doesn't have the flag _Py_TPFLAGS_HAVE_VECTORCALL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:24:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 13:24:21 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560345861.7.0.756637759891.issue37250@roundup.psfhosted.org> STINNER Victor added the comment: IMHO the simplest and safest option for this issue is to revert tp_print removal and move tp_vectorcall_offset at the end of PyTypeObject. Is PEP 590 fully public in Python 3.8? It seems like _Py_TPFLAGS_HAVE_VECTORCALL at least is private. Maybe we can attempt again to remove tp_print from Python 3.9? Once Cython will handle tp_print removal? Or even keep it in Python 3.9? Python 3 had unused tp_print for 10 years and nobody complained. There are a few PyTypeObject instances in a Python process. A single pointer isn't a giant waste of memory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:24:33 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 12 Jun 2019 13:24:33 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560345873.46.0.411778736938.issue37250@roundup.psfhosted.org> Jeroen Demeyer added the comment: > If -Werror is used, "type->tp_vectorcall = NULL;" would fail with a compilation error, since NULL is not exactly an integer, no? No because tp_vectorcall is a function pointer. You're confusing with tp_vectorcall_offset which is an integer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:26:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 13:26:27 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560345987.99.0.498971238697.issue37250@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +petr.viktorin, scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:28:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 13:28:12 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560346092.35.0.79273288174.issue37250@roundup.psfhosted.org> STINNER Victor added the comment: > No because tp_vectorcall is a function pointer. You're confusing with tp_vectorcall_offset which is an integer. Oh. I didn't notice that your PR makes tp_print an alias to tp_vectorcall rather than tp_vectorcall_offset. Ok. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:29:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 13:29:19 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560346159.58.0.364100952989.issue37250@roundup.psfhosted.org> STINNER Victor added the comment: If we decide to not reintroduce tp_print, tp_print removal must be documented at: https://docs.python.org/dev/whatsnew/3.8.html#changes-in-the-c-api ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:31:05 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 12 Jun 2019 13:31:05 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560346265.69.0.13493999676.issue37250@roundup.psfhosted.org> Jeroen Demeyer added the comment: > I understand that tp_vectorcall_offset=0 is fine and the expected value for a type which doesn't have the flag _Py_TPFLAGS_HAVE_VECTORCALL. Not necessarily. There are subtleties involved when subclassing: there are cases where tp_vectorcall_offset needs to be non-zero despite _Py_TPFLAGS_HAVE_VECTORCALL not being set. See also PR 13858. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:32:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 13:32:33 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560346353.54.0.678326142177.issue37250@roundup.psfhosted.org> STINNER Victor added the comment: Cython issue: https://github.com/cython/cython/issues/2976 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:35:00 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 12 Jun 2019 13:35:00 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560346500.54.0.530328086654.issue37250@roundup.psfhosted.org> Jeroen Demeyer added the comment: > IMHO the simplest and safest option for this issue is to revert tp_print removal and move tp_vectorcall_offset at the end of PyTypeObject. That's a drastic solution to a rather simple problem. PR 14009 would fix Cython just fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:36:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 13:36:43 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560346603.05.0.916903315017.issue37250@roundup.psfhosted.org> STINNER Victor added the comment: me: > I understand that tp_vectorcall_offset=0 is fine and the expected value for a type which doesn't have the flag _Py_TPFLAGS_HAVE_VECTORCALL. Jeroen Demeyer: > Not necessarily. There are subtleties involved when subclassing: there are cases where tp_vectorcall_offset needs to be non-zero despite _Py_TPFLAGS_HAVE_VECTORCALL not being set. See also PR 13858. Cython generates C code which looks like: if (PyType_Ready(type) < 0) { ... handle error ... } type->tp_print = 0; This code can cause subtle and annoying issue if PR 13858 is merged. So that's another argument in favor of reintroducing tp_print in Python 3.8. -- Cython has already been fixed to no longer set tp_print to 0 on Python 3.8: https://github.com/cython/cython/commit/f10a0a391edef10bd37095af87f521808cb362f7 But again, this problem is not about correctness, but more about practical backward compatibility issues (see my first message). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:38:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 13:38:09 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560346689.93.0.206524908712.issue37250@roundup.psfhosted.org> STINNER Victor added the comment: https://github.com/cython/cython/commit/f10a0a391edef10bd37095af87f521808cb362f7 Note for myself: this fix is already part of Cython 0.29.10 released at June 2 (10 days ago). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:39:49 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 12 Jun 2019 13:39:49 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560346789.83.0.039104558743.issue37250@roundup.psfhosted.org> Jeroen Demeyer added the comment: > This code can cause subtle and annoying issue if PR 13858 is merged. I don't see how this is related to PR 13858 at all. Please explain. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:40:21 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 12 Jun 2019 13:40:21 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560346821.8.0.873068536505.issue37250@roundup.psfhosted.org> Jeroen Demeyer added the comment: > If we decide to not reintroduce tp_print, tp_print removal must be documented at: https://docs.python.org/dev/whatsnew/3.8.html#changes-in-the-c-api I'll add that to PR 13844. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:40:47 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 12 Jun 2019 13:40:47 +0000 Subject: [issue37248] support conversion of `func(**{} if a else b)` Message-ID: <1560346847.18.0.350952603259.issue37248@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : Please, can you add some text with an explanation ? ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:41:43 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 12 Jun 2019 13:41:43 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560346903.33.0.866737332391.issue37250@roundup.psfhosted.org> Jeroen Demeyer added the comment: > This code can cause subtle and annoying issue if PR 13858 is merged. Or maybe you're confusing tp_vectorcall_offset and tp_vectorcall again? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:47:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 13:47:35 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560347255.02.0.420166742386.issue37250@roundup.psfhosted.org> STINNER Victor added the comment: > Or maybe you're confusing tp_vectorcall_offset and tp_vectorcall again? The two are related, no? Honestly, reintroducing tp_print looks simple and safe enough. I'm in favor of doing that. Is there any drawback? (as I wrote, I don't think that the size of PyTypeObject really matters in practice) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 09:57:36 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 12 Jun 2019 13:57:36 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560347856.83.0.742319874315.issue37250@roundup.psfhosted.org> Jeroen Demeyer added the comment: > Honestly, reintroducing tp_print looks simple and safe enough. Is there any drawback? 1. The one-time effort to change the code and documentation back. 2. Stefan Behnel wanted to use tp_print for backporting vectorcall in Cython to earlier Python versions. 3. Stable ABI incompatibility (the complaint that you incorrectly added to PR 13858 would become correct). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 10:00:18 2019 From: report at bugs.python.org (Jeremy Cline) Date: Wed, 12 Jun 2019 14:00:18 +0000 Subject: [issue37251] Mocking a MagicMock with a function spec results in an AsyncMock Message-ID: <1560348018.57.0.546920052201.issue37251@roundup.psfhosted.org> New submission from Jeremy Cline : This is related to the new AsyncMock[0] class in Python 3.8b1. A simple reproducer is: from unittest import mock mock_obj = mock.MagicMock() mock_obj.mock_func = mock.MagicMock(spec=lambda x: x) with mock.patch.object(mock_obj, "mock_func") as nested: print(type(nested)) Instead of a MagicMock (the behavior in Python 3.7) in Python 3.8b1 this results in an AsyncMock. [0]https://github.com/python/cpython/pull/9296 ---------- components: Library (Lib) messages: 345358 nosy: jcline priority: normal severity: normal status: open title: Mocking a MagicMock with a function spec results in an AsyncMock type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 10:00:18 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 12 Jun 2019 14:00:18 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560348018.7.0.675466224445.issue37250@roundup.psfhosted.org> Jeroen Demeyer added the comment: > The two are related, no? Related in the same way that tp_dictoffset and tp_dict are related (i.e. not that much). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 10:02:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 14:02:18 +0000 Subject: [issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer In-Reply-To: <1560111812.29.0.301182333638.issue37210@roundup.psfhosted.org> Message-ID: <1560348138.08.0.359770862259.issue37210@roundup.psfhosted.org> STINNER Victor added the comment: FYI pyperformance is affected by this issue: vstinner at apu$ env/bin/python ~/prog/python/pyperformance/pyperformance/benchmarks/bm_pickle.py unpickle --pure-python -v -p3 Traceback (most recent call last): File "/home/vstinner/prog/python/pyperformance/pyperformance/benchmarks/bm_pickle.py", line 287, in import pickle File "/home/vstinner/prog/python/master/Lib/pickle.py", line 39, in from _pickle import PickleBuffer ModuleNotFoundError: import of _pickle halted; None in sys.modules It is no longer possible to benchmark the pure Python implement of pickle. --pure-python uses this code path: def is_module_accelerated(module): return getattr(pickle.Pickler, '__module__', '') == 'pickle' (...) if six.PY3: sys.modules['_pickle'] = None import pickle if not is_module_accelerated(pickle): raise RuntimeError("Unexpected C accelerators for pickle") Should I remove the benchmark? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 10:06:24 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 12 Jun 2019 14:06:24 +0000 Subject: [issue37251] Mocking a MagicMock with a function spec results in an AsyncMock In-Reply-To: <1560348018.57.0.546920052201.issue37251@roundup.psfhosted.org> Message-ID: <1560348384.5.0.685760543063.issue37251@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +lisroach, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 10:11:26 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 12 Jun 2019 14:11:26 +0000 Subject: [issue37248] support conversion of `func(**{} if a else b)` In-Reply-To: <1560346847.18.0.350952603259.issue37248@roundup.psfhosted.org> Message-ID: <1560348686.56.0.812341975961.issue37248@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: >From the title is this similar to the PR https://github.com/python/cpython/pull/12703 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 10:11:44 2019 From: report at bugs.python.org (Mario Corchero) Date: Wed, 12 Jun 2019 14:11:44 +0000 Subject: [issue37251] Mocking a MagicMock with a function spec results in an AsyncMock In-Reply-To: <1560348018.57.0.546920052201.issue37251@roundup.psfhosted.org> Message-ID: <1560348704.02.0.690702241872.issue37251@roundup.psfhosted.org> Change by Mario Corchero : ---------- nosy: +mariocj89 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 10:12:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 14:12:12 +0000 Subject: [issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer In-Reply-To: <1560111812.29.0.301182333638.issue37210@roundup.psfhosted.org> Message-ID: <1560348732.65.0.931375779335.issue37210@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13881 pull_request: https://github.com/python/cpython/pull/14016 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 10:13:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 14:13:04 +0000 Subject: [issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer In-Reply-To: <1560111812.29.0.301182333638.issue37210@roundup.psfhosted.org> Message-ID: <1560348784.93.0.642363751131.issue37210@roundup.psfhosted.org> STINNER Victor added the comment: I wrote a simple PR, PR 14016, to fix the pure Python implementation of pickle: simply restrict pickle to protocol 4 if PickleBuffer is missing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 10:13:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 14:13:10 +0000 Subject: [issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer In-Reply-To: <1560111812.29.0.301182333638.issue37210@roundup.psfhosted.org> Message-ID: <1560348790.39.0.625572608747.issue37210@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: wont fix -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 10:13:23 2019 From: report at bugs.python.org (Cooper Lees) Date: Wed, 12 Jun 2019 14:13:23 +0000 Subject: [issue34058] Default Python 3.7 install broken on openSUSE Leap 42.3: $PYTHONHOME/lib64/python3.7/lib-dynload/ not linked to $PYTHONHOME/lib/python3.7/lib-dynload/ In-Reply-To: <1530838420.77.0.56676864532.issue34058@psf.upfronthosting.co.za> Message-ID: <1560348803.46.0.981476204296.issue34058@roundup.psfhosted.org> Cooper Lees added the comment: I also have the same problem with _socket that was Fixed on the latest version of CentOS 7 building with gcc 4.8.5. Adding: sudo ln -s /usr/local/lib64/python3.7/lib-dynload/ /usr/local/lib/python3.7/lib-dynload Allowed the .so to be found and the import to work. ---------- nosy: +cooperlees _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 10:17:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 14:17:16 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560349036.92.0.670186153308.issue35766@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b2fd32b2f041402bb9fc8607f01566c055aafed9 by Victor Stinner in branch '3.8': bpo-35766: compile(): rename feature_version parameter (GH-13994) (GH-14001) https://github.com/python/cpython/commit/b2fd32b2f041402bb9fc8607f01566c055aafed9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 10:20:14 2019 From: report at bugs.python.org (Jakub Kulik) Date: Wed, 12 Jun 2019 14:20:14 +0000 Subject: [issue37252] devpoll test failures on Solaris Message-ID: <1560349214.7.0.192767880732.issue37252@roundup.psfhosted.org> New submission from Jakub Kulik : test_devpoll currently ends with two failures with Python 3.8 on Solaris. First one is wrong number of arguments to devpoll.register function (which thrown the same error as expected in 3.7 but now acts differently). Second one is that register and modify no longer throw OverflowError when negative number is given as second argument, but rather a ValueError. I am not sure whether this is just a small semantics change or some bigger problem (documentation doesn't mention what error should be thrown). So I fixed it in attached pull request by changing the expected thrown error but there might be other problem as well. ---------- components: Extension Modules messages: 345365 nosy: kulikjak priority: normal severity: normal status: open title: devpoll test failures on Solaris versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 10:21:52 2019 From: report at bugs.python.org (Jakub Kulik) Date: Wed, 12 Jun 2019 14:21:52 +0000 Subject: [issue37252] devpoll test failures on Solaris In-Reply-To: <1560349214.7.0.192767880732.issue37252@roundup.psfhosted.org> Message-ID: <1560349312.95.0.688803081732.issue37252@roundup.psfhosted.org> Change by Jakub Kulik : ---------- keywords: +patch pull_requests: +13882 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14017 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 10:30:21 2019 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 12 Jun 2019 14:30:21 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1560349036.92.0.670186153308.issue35766@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: Thanks for taking care of this! -- --Guido (mobile) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 10:35:13 2019 From: report at bugs.python.org (Erik Bray) Date: Wed, 12 Jun 2019 14:35:13 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540478010.12.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: <1560350113.85.0.703026867764.issue35066@roundup.psfhosted.org> Erik Bray added the comment: FWIW (unsurprisingly) the new test added here is broken on Cygwin, whose libc's (newlib) behavior in this undefined case. So I get: >>> from datetime import date >>> t = date(2005, 1, 1) >>> t.strftime("%Y") # ok '2005' >>> t.strftime("%%") # ok '%' >>> t.strftime("%") # undefined behavior '' >>> t.strftime("%Y %") # undefined behavior; discards the whole format string '' >>> t.strftime("%Y%Q") # undefined format; discards the whole format string '' This behavior is user-hostile I think; it should raise a ValueError instead of just return an empty string. I would have suggested the same for the trailing '%' case, though I understand the goal of this issue was consistency. Also worth noting that both before and after this patch: >>> import time >>> time.strftime('%') '' So the question of consistency between the interfaces, which was the main point of this issue, was already resolved in this case, and the *inconsistency* observed was dependent on system-dependent behavior. For now I might propose doing away with this test in its current form, and just test assert t.strftime('%') == time.strftime('%') or something like that. I agree with Victor that trying to make the strftime experience consistent across system-dependent quirks is a worthy goal, but that goes deeper than just this trailing '%' case. ---------- nosy: +erik.bray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 11:05:33 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Wed, 12 Jun 2019 15:05:33 +0000 Subject: [issue37251] Mocking a MagicMock with a function spec results in an AsyncMock In-Reply-To: <1560348018.57.0.546920052201.issue37251@roundup.psfhosted.org> Message-ID: <1560351933.32.0.611822218751.issue37251@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 11:15:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 15:15:01 +0000 Subject: [issue37253] PyCompilerFlags got a new cf_feature_version field Message-ID: <1560352501.33.0.419965733273.issue37253@roundup.psfhosted.org> New submission from STINNER Victor : The commit dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c of bpo-35766 added a new cf_feature_version field to PyCompilerFlags. Each PyCompilerFlags variable must properly initialize this new field to PY_MINOR_VERSION. I propose to add a new _PyCompilerFlags_INIT macro to statically initialize such variable. I'm not sure if it should be public or not. The PyCompilerFlags structure is excluded from the stable ABI (PEP 384), but it's documented in the "The Very High Level Layer" C API documentation: https://docs.python.org/dev/c-api/veryhigh.html#c.PyCompilerFlags Structure fields are documented there: struct PyCompilerFlags { int cf_flags; } The doc is outdated. I'm not sure if it's on purpose or not. Moreover, the new PyCompilerFlags.cf_feature_version field is not documented in https://docs.python.org/dev/whatsnew/3.8.html#changes-in-the-c-api whereas C extensions using PyCompilerFlags should initialize cf_feature_version to PY_MINOR_VERSION? I'm not sure if C extensions really *must* initialize cf_feature_version, since the field is only used if PyCF_ONLY_AST flag is set in the cf_flags field. Something else, ast.parse() has been modified to use a (major, minor) version tuple rather an integer to specify the Python version in feature_version, but PyCompilerFlags still only uses the minor major. This API will be broken once the Python major version will be increased to 4, no? Would it make sense to use PY_VERSION_HEX format which includes the major version instead? Or cf_feature_version could be a structure with major and minor fields, but that might be overkill? ---------- components: Interpreter Core messages: 345368 nosy: vstinner priority: normal severity: normal status: open title: PyCompilerFlags got a new cf_feature_version field versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 11:16:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 15:16:37 +0000 Subject: [issue37253] PyCompilerFlags got a new cf_feature_version field In-Reply-To: <1560352501.33.0.419965733273.issue37253@roundup.psfhosted.org> Message-ID: <1560352597.49.0.327179848378.issue37253@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13883 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14018 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 11:18:14 2019 From: report at bugs.python.org (Jesse Bacon) Date: Wed, 12 Jun 2019 15:18:14 +0000 Subject: [issue37241] Item Count Error in Shelf In-Reply-To: <1560298385.81.0.460821118129.issue37241@roundup.psfhosted.org> Message-ID: <1560352694.1.0.536594542137.issue37241@roundup.psfhosted.org> Jesse Bacon added the comment: I am missing keys, when extracting the data back out with todays NVD pull. --------------------------------------------------------------------------- KeyError Traceback (most recent call last) ~/anaconda3/lib/python3.6/shelve.py in __getitem__(self, key) 110 try: --> 111 value = self.cache[key] 112 except KeyError: KeyError: 'CVE-2019-1842' During handling of the above exception, another exception occurred: KeyError Traceback (most recent call last) in 1 results = [] 2 for x in raw_cves: ----> 3 results.append(db[x]) ~/anaconda3/lib/python3.6/shelve.py in __getitem__(self, key) 111 value = self.cache[key] 112 except KeyError: --> 113 f = BytesIO(self.dict[key.encode(self.keyencoding)]) 114 value = Unpickler(f).load() 115 if self.writeback: KeyError: b'CVE-2019-1842' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 11:24:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 15:24:09 +0000 Subject: [issue37253] PyCompilerFlags got a new cf_feature_version field In-Reply-To: <1560352501.33.0.419965733273.issue37253@roundup.psfhosted.org> Message-ID: <1560353049.21.0.532711753534.issue37253@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13884 pull_request: https://github.com/python/cpython/pull/14019 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 11:24:48 2019 From: report at bugs.python.org (shajianrui) Date: Wed, 12 Jun 2019 15:24:48 +0000 Subject: [issue37254] POST large file to server (using http.server.CGIHTTPRequestHandler), always reset by server. Message-ID: <1560353088.37.0.536818039185.issue37254@roundup.psfhosted.org> New submission from shajianrui : Windows 10, python 3.7 I met a problem when using the http.server module. I set up a base server with class HTTPServer and CGIHTTPRequestHandler(Not using thread or fork) and tried to POST a large file (>2MB), then I find the server always reset the connection. In some very rare situation the post operation could be finished(Very slow) but the CGI script I'm posting to always show that an incomplete file is received(Called "incomplete file issue"). ==========First Try=========== At first I think (Actually a misunderstanding but lead to a passable walkaround) that "self.rfile.read(nbytes) " at LINE 1199 is not blocking, so it finish receiving just before the POST operation finished. Then I modify the line like this below: 1198 if self.command.lower() == "post" and nbytes > 0: 1199 #data = self.rfile.read(nbytes) ?The original line, I comment out it.? databuf = bytearray(nbytes) datacount = 0 while datacount + 1 < nbytes: buf = self.rfile.read(self.request.getsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF) #print("Get " + str(len(buf)) + " bytes.") for i in range(len(buf)): databuf[datacount] = buf[i] datacount += 1 if datacount == nbytes: #print("Done.") break data = bytes(databuf) ?Now get the data.? In this modification I just try to repeatedly read 65536(Default number of socket) bytes from rfile until I get nbytes of bytes. Now it works well(Correct file received), and is much faster then the POSTing process when using the original http.server module(If "incomplete file issue" appear). ==========Second Try========== However, now I know that there is no problem with "whether it is blocking" because "self.rfile.read()" should be blocked if the file is not POSTed completely. I check the tcp stream with wireshark and find that in the middle of the transfer, the recv window of server is always 256, so I think that the problem is at the variable "rbufsize", which is transfered to makefile() when the rfile of the XXXRequestHandler Object is created. At least it is the problem of the low speed. But I dont know whether it lead to the reset operation and the incomplete file issue. I go back to the original version of the http.server module. Then I make a subclass of socketserver.StreamRequestHandler, override its setup() method(firstly I copy the codes of setup() from StreamRequestHandler, and modify Line770)(770 is the line number in socketserver module, but I create the new subclass in a new file.): 770 #self.rfile = self.connection.makefile('rb', self.rbufsize) self.rfile = self.connection.makefile('rb', 65536) Then the POST process become much faster(Then my first modification)! But the server print Error: File "c:\Users\Administrator\Desktop\cgi-server-test\modified_http_server_bad.py", line 1204, in run_cgi ?A copy of http.server module? while select.select([self.rfile._sock], [], [], 0)[0]: ?at line 1204? AttributeError: '_io.BufferedReader' object has no attribute '_sock' Because I know it want to get the socket of the current RequestHandler, I just modify http.server module and change "self.rfile._sock" into "self.connection"(I dont know if it would cause problem, it is just a walkaround). OK, It now work well again. The CGI script can get the correct file(return the correct SHA1 of the file uploaded), and the POST process is REALLY MUCH FASTER! ========= Question ========= So here is the problem: 1- What cause the server resetting the connection? Seem it is because the default buffer size of the rfile is too small. 2- What cause the cgi script getting the incomplete file? I really have no idea about it. Seems this problem also disappear if I enlarge the buffer. Other information: 1- The "incomplete file issue" usually appear at the first POST to the server, and almost all of the other POST connections are reset. 2- If the server start resetting connections, another "incomplete file issue" will never appear anymore (Actually it happen, but Chrome only show a RESET page, see 4- below.). 3- If the server start resetting connections, it take a long time to terminate the server with Ctrl+C. 4- When the connection is reset, the response printed by the cgi script is received correctly and it show that cgi script receive an incomplete file, the byte count is much fewer than correct number.(I use Chrome to do the POST, so it just show a reset message and the real response is ignored) Please help. ---------- components: Library (Lib) messages: 345370 nosy: shajianrui priority: normal severity: normal status: open title: POST large file to server (using http.server.CGIHTTPRequestHandler), always reset by server. type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 11:25:50 2019 From: report at bugs.python.org (Jesse Bacon) Date: Wed, 12 Jun 2019 15:25:50 +0000 Subject: [issue37241] Item Count Error in Shelf In-Reply-To: <1560298385.81.0.460821118129.issue37241@roundup.psfhosted.org> Message-ID: <1560353150.71.0.375505109206.issue37241@roundup.psfhosted.org> Change by Jesse Bacon : Added file: https://bugs.python.org/file48413/ShelfKeys.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 11:32:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 15:32:16 +0000 Subject: [issue37253] PyCompilerFlags got a new cf_feature_version field In-Reply-To: <1560352501.33.0.419965733273.issue37253@roundup.psfhosted.org> Message-ID: <1560353536.14.0.736516304437.issue37253@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13885 pull_request: https://github.com/python/cpython/pull/14020 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 11:34:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 15:34:00 +0000 Subject: [issue37253] PyCompilerFlags got a new cf_feature_version field In-Reply-To: <1560352501.33.0.419965733273.issue37253@roundup.psfhosted.org> Message-ID: <1560353640.79.0.718084347544.issue37253@roundup.psfhosted.org> STINNER Victor added the comment: > Something else, ast.parse() has been modified to use a (major, minor) version tuple rather an integer to specify the Python version in feature_version, but PyCompilerFlags still only uses the minor major. This API will be broken once the Python major version will be increased to 4, no? Would it make sense to use PY_VERSION_HEX format which includes the major version instead? I can work on a PR to change cf_feature_version format, but I would prefer to agree here on what is the best format ;-) Note: compile() has a private keyword-only _feature_version which is also the Python minor version (int): don't include the major version. If we change cf_feature_version, we may also change compile(_feature_version=N) format. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 11:34:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 15:34:26 +0000 Subject: [issue35766] Merge typed_ast back into CPython In-Reply-To: <1547771581.08.0.389360423635.issue35766@roundup.psfhosted.org> Message-ID: <1560353666.53.0.811094524813.issue35766@roundup.psfhosted.org> STINNER Victor added the comment: I created bpo-37253: "PyCompilerFlags got a new cf_feature_version field". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 11:38:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 15:38:01 +0000 Subject: [issue37160] thread native id netbsd support Message-ID: <1560353881.69.0.553442974045.issue37160@roundup.psfhosted.org> New submission from STINNER Victor : New changeset 5287022eeeb3c017d49fc8580b52e18377bf23f3 by Victor Stinner (David Carlier) in branch 'master': bpo-37160: Thread native ID NetBSD support (GH-13835) https://github.com/python/cpython/commit/5287022eeeb3c017d49fc8580b52e18377bf23f3 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 11:38:29 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 15:38:29 +0000 Subject: [issue37160] thread native id netbsd support In-Reply-To: <1560353881.69.0.553442974045.issue37160@roundup.psfhosted.org> Message-ID: <1560353909.71.0.424891680535.issue37160@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch pull_requests: +13886 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14021 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 11:39:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 15:39:12 +0000 Subject: [issue37160] thread native id netbsd support In-Reply-To: <1560353881.69.0.553442974045.issue37160@roundup.psfhosted.org> Message-ID: <1560353952.7.0.312105811563.issue37160@roundup.psfhosted.org> STINNER Victor added the comment: Since threading.get_native_id() is a new feature in Python 3.8 and the PR is small enough, IMHO it's fine to backport the change to 3.8. ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 12:03:28 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 16:03:28 +0000 Subject: [issue37160] thread native id netbsd support In-Reply-To: <1560353881.69.0.553442974045.issue37160@roundup.psfhosted.org> Message-ID: <1560355408.18.0.378540234048.issue37160@roundup.psfhosted.org> miss-islington added the comment: New changeset c9ca96dd968176580a011e852066c95a48aab7e0 by Miss Islington (bot) in branch '3.8': bpo-37160: Thread native ID NetBSD support (GH-13835) https://github.com/python/cpython/commit/c9ca96dd968176580a011e852066c95a48aab7e0 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 12:12:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 16:12:00 +0000 Subject: [issue37160] thread native id netbsd support In-Reply-To: <1560353881.69.0.553442974045.issue37160@roundup.psfhosted.org> Message-ID: <1560355920.28.0.101008746306.issue37160@roundup.psfhosted.org> STINNER Victor added the comment: Thanks David Carlier! It's now merged into 3.8 and master. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 12:14:41 2019 From: report at bugs.python.org (Lisa Roach) Date: Wed, 12 Jun 2019 16:14:41 +0000 Subject: [issue37251] Mocking a MagicMock with a function spec results in an AsyncMock In-Reply-To: <1560348018.57.0.546920052201.issue37251@roundup.psfhosted.org> Message-ID: <1560356081.05.0.876698158261.issue37251@roundup.psfhosted.org> Lisa Roach added the comment: Following up from xtreak's proposal (https://github.com/python/cpython/pull/9296) I think checking if __code__ is actually a CodeType is a good idea. It's simple and doesn't change any other functionality in an unwanted way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 12:15:33 2019 From: report at bugs.python.org (=?utf-8?q?Carlos_Andr=C3=A9_Dantas_de_Lima?=) Date: Wed, 12 Jun 2019 16:15:33 +0000 Subject: [issue37176] super() docs don't say what super() does In-Reply-To: <1559837218.79.0.128349910274.issue37176@roundup.psfhosted.org> Message-ID: <1560356133.64.0.49098742878.issue37176@roundup.psfhosted.org> Carlos Andr? Dantas de Lima added the comment: The method says who you will use some recursion. ---------- nosy: +Carlos Andr? Dantas de Lima _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 12:49:14 2019 From: report at bugs.python.org (Andrea Moro) Date: Wed, 12 Jun 2019 16:49:14 +0000 Subject: [issue37255] Pathlib: Add an expandUserPath method or argument Message-ID: <1560358154.87.0.642844029976.issue37255@roundup.psfhosted.org> New submission from Andrea Moro : Assuming the given path contains a '~' character, it would be nice to have a function to expand the given path so any further calls to an .exists doesn't fail. A prototype of the function could be # Expand the home path in *ix based systems if any if '~' in s: x = [x for x in Path(s).parts if x not in '~'] p = Path.home() for item in x: p = p.joinpath(item) ---------- components: Library (Lib) messages: 345379 nosy: Andrea Moro priority: normal severity: normal status: open title: Pathlib: Add an expandUserPath method or argument type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 12:54:54 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 12 Jun 2019 16:54:54 +0000 Subject: [issue36607] asyncio.all_tasks() crashes if asyncio is used in multiple threads In-Reply-To: <1555006368.14.0.78767463153.issue36607@roundup.psfhosted.org> Message-ID: <1560358494.97.0.33677329376.issue36607@roundup.psfhosted.org> ?ukasz Langa added the comment: Note: there's a discussion on GitHub on PR 13971 being a bad solution: https://github.com/python/cpython/pull/13971#issuecomment-500908198 They should be reverted (or fixed forward) for 3.8 and 3.9. I'm OK with this modifying the AbstractEventLoop API if need be for 3.8. Just have a PR ready in the next two weeks. ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 12:56:44 2019 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 12 Jun 2019 16:56:44 +0000 Subject: [issue37241] Item Count Error in Shelf In-Reply-To: <1560298385.81.0.460821118129.issue37241@roundup.psfhosted.org> Message-ID: <1560358604.64.0.244154444486.issue37241@roundup.psfhosted.org> Eric V. Smith added the comment: This still isn't an example we can copy and paste to reproduce, so I'm going to be unable to help you. Sorry. Again: please don't post images, for the reasons I previously stated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 13:04:37 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 12 Jun 2019 17:04:37 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560359077.78.0.535383464767.issue37250@roundup.psfhosted.org> Steve Dower added the comment: "tp_print" has been marked as reserved for all of Python 3. To me, that means deprecated and do not use. (But perhaps that ought to have been properly defined in the docs?) Cython should not be using this field directly. If all they're doing is setting it to NULL, they can equally easily zero out the entire structure and ignore it without changing behavior on any Python 3.x. I have no problem changing the names of deprecated/reserved fields in PyTypeObject between releases. Source compatibility guarantees do not extend that far. ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 13:06:22 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 12 Jun 2019 17:06:22 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560359182.22.0.651069357769.issue37250@roundup.psfhosted.org> Steve Dower added the comment: > Jeroen Demeyer proposed PR 14009 to fix the source compatibility: > > #define tp_print tp_vectorcall This is a terrible idea, FWIW. Please don't do this. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 13:07:42 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 12 Jun 2019 17:07:42 +0000 Subject: [issue37255] Pathlib: Add an expandUserPath method or argument In-Reply-To: <1560358154.87.0.642844029976.issue37255@roundup.psfhosted.org> Message-ID: <1560359262.29.0.910051359616.issue37255@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: There is expanduser : https://docs.python.org/3/library/pathlib.html#pathlib.Path.expanduser. os.path.expanduser also accepts a path like object. Is this report different from these two functions? ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 13:10:51 2019 From: report at bugs.python.org (N.P. Khelili) Date: Wed, 12 Jun 2019 17:10:51 +0000 Subject: [issue37130] pathlib does not handle '..' directory In-Reply-To: <1559438292.33.0.601764456145.issue37130@roundup.psfhosted.org> Message-ID: <1560359451.47.0.61157940292.issue37130@roundup.psfhosted.org> Change by N.P. Khelili : ---------- keywords: +patch pull_requests: +13887 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/14022 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 13:13:29 2019 From: report at bugs.python.org (N.P. Khelili) Date: Wed, 12 Jun 2019 17:13:29 +0000 Subject: [issue37130] pathlib does not handle '..' directory In-Reply-To: <1559438292.33.0.601764456145.issue37130@roundup.psfhosted.org> Message-ID: <1560359609.56.0.975633458392.issue37130@roundup.psfhosted.org> N.P. Khelili added the comment: After digging the question,I'd rather go for a minimal change. - setting .name to '' for '..' - let it be known in the doc - special-casing Path('..').stem (to keep the old behaviour) - update tests More could be done, but I don't feel like rewriting too much of it. A global design change should set a special treatment for '..' as well as '.' But I'd rather see small steps being accepted than big ones rejected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 13:16:46 2019 From: report at bugs.python.org (Andrea Moro) Date: Wed, 12 Jun 2019 17:16:46 +0000 Subject: [issue37255] Pathlib: Add an expandUserPath method or argument In-Reply-To: <1560358154.87.0.642844029976.issue37255@roundup.psfhosted.org> Message-ID: <1560359806.55.0.467767758078.issue37255@roundup.psfhosted.org> Andrea Moro added the comment: I have completely missed it. Thanks for flagging it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 13:16:54 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 12 Jun 2019 17:16:54 +0000 Subject: [issue37201] fix test_distutils failures for Windows ARM64 In-Reply-To: <1559940477.37.0.824825377046.issue37201@roundup.psfhosted.org> Message-ID: <1560359814.09.0.775781676118.issue37201@roundup.psfhosted.org> Steve Dower added the comment: New changeset daf62627518ad97ce66a48c49496aa0573cf0731 by Steve Dower (Paul Monson) in branch 'master': bpo-37201: fix test_distutils failures for Windows ARM64 (GH-13902) https://github.com/python/cpython/commit/daf62627518ad97ce66a48c49496aa0573cf0731 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 13:17:01 2019 From: report at bugs.python.org (Andrea Moro) Date: Wed, 12 Jun 2019 17:17:01 +0000 Subject: [issue37255] Pathlib: Add an expandUserPath method or argument In-Reply-To: <1560358154.87.0.642844029976.issue37255@roundup.psfhosted.org> Message-ID: <1560359821.32.0.31870149167.issue37255@roundup.psfhosted.org> Change by Andrea Moro : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 13:21:18 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 17:21:18 +0000 Subject: [issue37201] fix test_distutils failures for Windows ARM64 In-Reply-To: <1559940477.37.0.824825377046.issue37201@roundup.psfhosted.org> Message-ID: <1560360078.34.0.994531044329.issue37201@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13889 pull_request: https://github.com/python/cpython/pull/14023 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 13:26:52 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 12 Jun 2019 17:26:52 +0000 Subject: [issue36607] asyncio.all_tasks() crashes if asyncio is used in multiple threads In-Reply-To: <1555006368.14.0.78767463153.issue36607@roundup.psfhosted.org> Message-ID: <1560360412.57.0.19277940869.issue36607@roundup.psfhosted.org> Andrew Svetlov added the comment: Lukasz, please don't rush. Applied PR makes asyncio more stable, not worse. I see the only way to make it perfect: get rid of weak refs entirely. Otherwise there is always a chance to catch GC run and set element deletion on iteration over the set. Sorry, that's how weakrefs work. There is such possibility: call asyncio._unregister_task() explicitly when the task is done (finished with success or failure or cancelled). By this, we can replace weakset with a regular set. The only requirement is that task should call this _unregister_task() method. No public API change is needed. At the time of work on 3.7, Yuri and I considered this implementation but rejected it because there was a (very low) chance that somebody may implement own task, register custom task factory and don't call _unregister_task(). I never see a code that implements asyncio task from scratch, people always reuse existing asyncio.Task. So, maybe the idea is not such bad. It can be implemented easily. I'm volunteered to make a PR with the proposal demonstration in a day or two, depending on my free time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 13:29:27 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 12 Jun 2019 17:29:27 +0000 Subject: [issue37239] Add headless development preset layout In-Reply-To: <1560290157.09.0.169248925355.issue37239@roundup.psfhosted.org> Message-ID: <1560360567.33.0.74762856188.issue37239@roundup.psfhosted.org> Steve Dower added the comment: In fact, any reason you can't use "--preset-nuget --include-..."? to add in whatever else you need? They are designed to compose like this deliberately. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 13:44:50 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 17:44:50 +0000 Subject: [issue37201] fix test_distutils failures for Windows ARM64 In-Reply-To: <1559940477.37.0.824825377046.issue37201@roundup.psfhosted.org> Message-ID: <1560361490.77.0.412189372634.issue37201@roundup.psfhosted.org> miss-islington added the comment: New changeset bb3e8a68b2554b2bd94cf0cd9a0311f4561c1a25 by Miss Islington (bot) in branch '3.8': bpo-37201: fix test_distutils failures for Windows ARM64 (GH-13902) https://github.com/python/cpython/commit/bb3e8a68b2554b2bd94cf0cd9a0311f4561c1a25 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 13:46:15 2019 From: report at bugs.python.org (Paul Monson) Date: Wed, 12 Jun 2019 17:46:15 +0000 Subject: [issue37239] Add headless development preset layout In-Reply-To: <1560290157.09.0.169248925355.issue37239@roundup.psfhosted.org> Message-ID: <1560361575.04.0.974387665412.issue37239@roundup.psfhosted.org> Paul Monson added the comment: Thanks for the feedback Steve Looking at the differences between the change I proposed and the nuget package I agree that "--preset-nuget --include-..." is a better approach. Closing this issue and the pull request. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 13:47:38 2019 From: report at bugs.python.org (Paul Monson) Date: Wed, 12 Jun 2019 17:47:38 +0000 Subject: [issue37239] Add headless development preset layout In-Reply-To: <1560290157.09.0.169248925355.issue37239@roundup.psfhosted.org> Message-ID: <1560361658.43.0.294254232958.issue37239@roundup.psfhosted.org> Change by Paul Monson : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 13:56:35 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 12 Jun 2019 17:56:35 +0000 Subject: [issue37225] Document BaseException constructor In-Reply-To: <1560237102.52.0.133464005619.issue37225@roundup.psfhosted.org> Message-ID: <1560362195.89.0.474243881682.issue37225@roundup.psfhosted.org> Brett Cannon added the comment: Fair enough. I've changed the title to point out only BaseException needs its constructor documented as every other extension inherits from it and so its cascades down. ---------- resolution: not a bug -> status: closed -> open title: Signatures of Exceptions not documented -> Document BaseException constructor versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 13:57:26 2019 From: report at bugs.python.org (Paul Monson) Date: Wed, 12 Jun 2019 17:57:26 +0000 Subject: [issue37140] ctypes change made clang fail to build In-Reply-To: <1559553697.78.0.201685591504.issue37140@roundup.psfhosted.org> Message-ID: <1560362246.29.0.847262697979.issue37140@roundup.psfhosted.org> Paul Monson added the comment: I did some reading about parameter passing and it's still not clear to me whether https://bugs.python.org/issue37140 is a bug in CPython or whether the clang bindings were relying on incorrect parameter passing behavior to work. The change in https://github.com/python/cpython/pull/13796 restores the previous behavior where Windows and non-Windows builds pass structs differently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 14:06:27 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 12 Jun 2019 18:06:27 +0000 Subject: [issue37130] pathlib does not handle '..' directory In-Reply-To: <1559438292.33.0.601764456145.issue37130@roundup.psfhosted.org> Message-ID: <1560362787.2.0.739941507126.issue37130@roundup.psfhosted.org> Brett Cannon added the comment: @Antoine: was there a design reason behind setting 'name' to '' when a Path objects was initialized with '.'? Is it to implicitly represent the current directory? @N.P.: we will have to think through the implications of this as I don't know if normalizing to 'name' being '' is the best way to resolve this inconsistency. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 14:09:06 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 12 Jun 2019 18:09:06 +0000 Subject: [issue37236] fix test_complex for Windows arm64 In-Reply-To: <1560273542.8.0.377927810639.issue37236@roundup.psfhosted.org> Message-ID: <1560362946.2.0.914577405062.issue37236@roundup.psfhosted.org> Steve Dower added the comment: New changeset ff6bb0aa95259413f359d42410526ff0b4dccfb7 by Steve Dower (Paul Monson) in branch 'master': bpo-37236: pragma optimize off for _Py_c_quot on Windows arm64 (GH-13983) https://github.com/python/cpython/commit/ff6bb0aa95259413f359d42410526ff0b4dccfb7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 14:09:06 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 18:09:06 +0000 Subject: [issue37236] fix test_complex for Windows arm64 In-Reply-To: <1560273542.8.0.377927810639.issue37236@roundup.psfhosted.org> Message-ID: <1560362946.99.0.00139355887144.issue37236@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13890 pull_request: https://github.com/python/cpython/pull/14024 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 14:13:27 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 12 Jun 2019 18:13:27 +0000 Subject: [issue25599] asyncio.iscoroutinefunction returns unexpected results when presented with unittest.mock.Mock In-Reply-To: <1447176382.09.0.498269327302.issue25599@psf.upfronthosting.co.za> Message-ID: <1560363207.45.0.321808195338.issue25599@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I guess the inconsistency in original report is fixed with issue28703 where both inspect.iscoroutinefunction and asyncio.iscoroutinefunction return False for Mock(). The fix is available from 3.5.3 . There is also async support for mock added in 3.8 with issue26467. I am closing this as part of triaging. Feel free to reopen this if I am missing something. Thanks. # Python 3.5 python3.5 Python 3.5.2 (default, Nov 12 2018, 13:43:14) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import asyncio >>> from unittest.mock import * >>> asyncio.iscoroutinefunction(Mock()) # Master ./python.exe Python 3.9.0a0 (heads/master:daf6262751, Jun 12 2019, 23:12:37) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from unittest.mock import Mock >>> import asyncio, inspect >>> inspect.iscoroutinefunction(Mock()) False >>> asyncio.iscoroutinefunction(Mock()) False ---------- nosy: +xtreak resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 14:14:43 2019 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 12 Jun 2019 18:14:43 +0000 Subject: [issue37253] PyCompilerFlags got a new cf_feature_version field In-Reply-To: <1560352501.33.0.419965733273.issue37253@roundup.psfhosted.org> Message-ID: <1560363283.74.0.0738348280742.issue37253@roundup.psfhosted.org> Guido van Rossum added the comment: It's fine to document the current state. I don't think you should spend any time *changing* the API to "future-proof" it. I am hoping that larger changes to the compiler implementation will happen before Python 4, which will make the whole API moot (including the "parser" module, which should be deprecated ASAP). The compiler is excluded from the ABI for a reason. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 14:16:29 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 12 Jun 2019 18:16:29 +0000 Subject: [issue37251] Mocking a MagicMock with a function spec results in an AsyncMock In-Reply-To: <1560348018.57.0.546920052201.issue37251@roundup.psfhosted.org> Message-ID: <1560363389.76.0.327416170224.issue37251@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I will wait for a couple of days for suggestions and will raise a PR to check for __code__ to be a CodeType. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 14:18:55 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 12 Jun 2019 18:18:55 +0000 Subject: [issue26140] inspect.iscoroutinefunction raises TypeError when checks Mock of function or coroutinefunction In-Reply-To: <1453030972.84.0.0646105171888.issue26140@psf.upfronthosting.co.za> Message-ID: <1560363535.78.0.916621673223.issue26140@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +lisroach, xtreak versions: +Python 3.8, Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 14:27:20 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 18:27:20 +0000 Subject: [issue37236] fix test_complex for Windows arm64 In-Reply-To: <1560273542.8.0.377927810639.issue37236@roundup.psfhosted.org> Message-ID: <1560364040.32.0.00952359529572.issue37236@roundup.psfhosted.org> miss-islington added the comment: New changeset f72886a066ba7d3a3aa077cfc3cad2ca0b2cdbf6 by Miss Islington (bot) in branch '3.8': bpo-37236: pragma optimize off for _Py_c_quot on Windows arm64 (GH-13983) https://github.com/python/cpython/commit/f72886a066ba7d3a3aa077cfc3cad2ca0b2cdbf6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 14:38:28 2019 From: report at bugs.python.org (Nathaniel Smith) Date: Wed, 12 Jun 2019 18:38:28 +0000 Subject: [issue28708] Low FD_SETSIZE limit on Windows In-Reply-To: <1479250358.07.0.768722440644.issue28708@psf.upfronthosting.co.za> Message-ID: <1560364708.29.0.91285569918.issue28708@roundup.psfhosted.org> Nathaniel Smith added the comment: Traditionally on Unix, sockets are represented by file descriptors. File descriptors are small integers. (POSIX actually mandates the "small" part: whenever a new fd is created, the OS has to assign it the smallest integer value that's not already being used.) So when select was designed, they decided to be "clever" and use a bitmask to represent the FD sets. If all your fds have values less than 64, then you can use a single 64-bit integer to represent any arbitrary subset of them, sweet, it's super efficient. It's also extremely weird. No other API cares about the actual integer value of an fd, they're just opaque tokens. Select is almost unique in being O(highest fd value). Of course this microoptimization stopped making sense decades ago, so poll() was added. The big innovation with poll() is that it takes an array of descriptors like a normal function, instead of this wacky bitmask thing. So its O(number of fds), and it doesn't matter whether you're checking fd #1 or fd #1000. EXCEPT windows has a totally different history. On Windows, sockets are represented as handles. And handles are just like fds, EXCEPT that handles are allowed to have arbitrary values; they didn't copy POSIX's weird (and expensive) rule about alwaysv using the smallest possible integer. So when Windows went to implement select(), the bitmask optimization never made any sense at all ? even if you only have 1 socket, its handle might be, like, 0x9f57be3a or something. So you'd need a bitmask with 2**32 entries, which is silly. So on Windows, select() is secretly poll(). They copied the FD_* macros for compatibility, but fd_set is really just an array of opaque values + an explicit length, and you can pass in as many or as few as you want. I know this is mostly rehashing conclusions that are in the thread already but I thought it might make more sense to have it laid out all together. ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 14:48:39 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 12 Jun 2019 18:48:39 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560365319.08.0.305075838795.issue37250@roundup.psfhosted.org> Stefan Behnel added the comment: > they can equally easily zero out the entire structure and ignore it without changing behavior on any Python 3.x. Any solution that we apply in Cython will require users to regenerate their .c sources with a new Cython version in order to make it compile in Py3.8. The main decision point in this ticket is: should they need to or not? Everything else is just minor technicalities. (I didn't bring up this topic, but the question is up on the table now.) > I have no problem changing the names of deprecated/reserved fields in PyTypeObject between releases. Source compatibility guarantees do not extend that far. Fair enough, and I'm ok with letting CPython move forward cleanly and break things that are easily fixed on user side. My point is that it makes no sense to justify bpo-37221 with the goal of not breaking Cython modules, when at the same time another change (the one discussed here) has already broken them. Either we find a striking justification for bpo-37221 that *excludes* Cython generated modules, or we take back *both* changes and restore full source code compatibility. Everything in between is just causing useless code churn and annoyance on all sides. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 15:12:35 2019 From: report at bugs.python.org (Alan De Smet) Date: Wed, 12 Jun 2019 19:12:35 +0000 Subject: [issue37256] urllib.request.Request documentation erroneously refers to the "final two" Message-ID: <1560366755.97.0.221740241329.issue37256@roundup.psfhosted.org> New submission from Alan De Smet : In Doc/library/urllib.request.rst, in the documentation for the class `Request`, it says ``` The final two arguments are only of interest for correct handling of third-party HTTP cookies: ``` However, three arguments follow, not two, and the last is not necessarily related to third-party cookie handling. I believe replacing "final" with "next" will correct the sentence: ``` The next two arguments are only of interest for correct handling of third-party HTTP cookies: ``` Verified present in the source releases for CPython 3.5.7, 3.6.8, 3.7.3, 3.8.0b1. It is _not_ present in 2.7.16 (as the third parameter didn't yet exist, so the existing phrasing is correct.) ---------- assignee: docs at python components: Documentation messages: 345403 nosy: Alan De Smet, docs at python priority: normal severity: normal status: open title: urllib.request.Request documentation erroneously refers to the "final two" type: enhancement versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 15:13:32 2019 From: report at bugs.python.org (Alan De Smet) Date: Wed, 12 Jun 2019 19:13:32 +0000 Subject: [issue37256] urllib.request.Request documentation erroneously refers to the "final two" In-Reply-To: <1560366755.97.0.221740241329.issue37256@roundup.psfhosted.org> Message-ID: <1560366812.83.0.854845056602.issue37256@roundup.psfhosted.org> Alan De Smet added the comment: Oops, used to GitHub/GitLab, where Markdown is fair game. Sorry about that. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 15:32:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 19:32:10 +0000 Subject: [issue26140] inspect.iscoroutinefunction raises TypeError when checks Mock of function or coroutinefunction In-Reply-To: <1453030972.84.0.0646105171888.issue26140@psf.upfronthosting.co.za> Message-ID: <1560367930.11.0.365584194528.issue26140@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 16:26:04 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 12 Jun 2019 20:26:04 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560371164.72.0.864279153342.issue37250@roundup.psfhosted.org> Stefan Behnel added the comment: (I forgot to state the obvious third option, which is: don't do anything and leave everything as it is now in beta-1.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 16:52:09 2019 From: report at bugs.python.org (N.P. Khelili) Date: Wed, 12 Jun 2019 20:52:09 +0000 Subject: [issue37130] pathlib does not handle '..' directory In-Reply-To: <1559438292.33.0.601764456145.issue37130@roundup.psfhosted.org> Message-ID: <1560372729.0.0.430659764505.issue37130@roundup.psfhosted.org> N.P. Khelili added the comment: @Brett: Honestly.... I don't think it is the best way. But fact is: nono at ACER ~ % cd / nono at ACER / % python Python 3.7.3 (default, Mar 26 2019, 21:43:19) [GCC 8.2.1 20181127] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from pathlib import Path >>> Path('.') == Path('/') False In my humble and *very personal* opinion, this result could be understood in the case of a PurePath (or some kind of system call free) object. But that is not what people expect in the case of a 'normal' path... I also think that one day we may see the rise of a new Os that wouldn't use . and .. The first Unix used 'd' for directory and 'dd' for directory's directory ! Those were hand-made links in a file system that otherwise had no concept of hierarchy... I think each flavour should have a special_dirs variable (fact that linux and MsWin share the same being an accident). And that the concept of a system-call free path implementation, is fragile. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 16:55:31 2019 From: report at bugs.python.org (Tim Peters) Date: Wed, 12 Jun 2019 20:55:31 +0000 Subject: [issue37257] obmalloc: stop simple arena thrashing Message-ID: <1560372931.23.0.979771460507.issue37257@roundup.psfhosted.org> New submission from Tim Peters : Scenario: all arenas are fully used. A program then runs a loop like: while whatever: p = malloc(n) ... free(p) At the top, a new arena has to be created, and a single object is taken out of a single pool. At the bottom, that object is freed, so the arena is empty again, and so is returned to the system. Which cycle continues so long as the loop runs. Very expensive. This is "something like" what happens in practice, and has been reported anecdotally for years, but I've never been clear on _exactly_ what programs were doing in such cases. Neil S pointed out this recent report here: https://mail.python.org/pipermail/python-dev/2019-February/156529.html Which may or may not be relevant. Inada? The "fix" proposed there: - if (nf == ao->ntotalpools) { + if (nf == ao->ntotalpools && ao != usable_arenas) { doesn't appeal to me, because it can lead to states where obmalloc never returns empty arenas, no matter how many pile up. For example, picture a thousand arenas each with just one used pool. The head of the arena list becomes free, so is left alone, but moves to the end of the list (which is sorted by number of free pools). Then the new head of the list becomes free, and ditto. On & on. We're left with a list containing a thousand wholly unused arenas. So I suggest instead: + if (nf == ao->ntotalpools && ao->nextarena != NULL) { That is, instead of exempting the head of the list, exempt the tail of the list. In the example above, the first 999 arenas are returned to the system, but the last one remains in the list for reuse. In general, the change would allow for at most one empty arena in the list. We can't in general predict the future, but this would be enough to stop the thrashing in the specific scenario given at the top, with no apparent serious failure modes (potentially "wasting" one arena is minor). ---------- assignee: tim.peters components: Interpreter Core messages: 345407 nosy: inada.naoki, nascheme, tim.peters priority: normal severity: normal stage: test needed status: open title: obmalloc: stop simple arena thrashing versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 17:09:19 2019 From: report at bugs.python.org (Jeroen van den Hout) Date: Wed, 12 Jun 2019 21:09:19 +0000 Subject: [issue37247] swap distutils build_ext and build_py commands to allow proper SWIG extension installation In-Reply-To: <1560341496.09.0.819646109086.issue37247@roundup.psfhosted.org> Message-ID: <1560373759.98.0.479227614943.issue37247@roundup.psfhosted.org> Jeroen van den Hout added the comment: Well, if I look at the source code build_ext explicitly calls for SWIG to handle interface files. Also, in case of commands like 'pip install ', the build sequence is predefined anyways, unless you explicitly define your own sequence in a custom command, in which case you are already tempering with default behavior. That's why I argue that building and copying SWIG generated files correctly should be the default behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 17:09:47 2019 From: report at bugs.python.org (hodai goldman) Date: Wed, 12 Jun 2019 21:09:47 +0000 Subject: [issue37198] _parse_localename fail to parse 'en_IL' In-Reply-To: <1559925201.97.0.400746291459.issue37198@roundup.psfhosted.org> Message-ID: <1560373787.99.0.714955280035.issue37198@roundup.psfhosted.org> Change by hodai goldman : ---------- keywords: +patch pull_requests: +13891 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14027 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 17:18:33 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 12 Jun 2019 21:18:33 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560374313.31.0.0925443852651.issue37250@roundup.psfhosted.org> Steve Dower added the comment: > Any solution that we apply in Cython will require users to regenerate their .c sources with a new Cython version in order to make it compile in Py3.8. The main decision point in this ticket is: should they need to or not? Considering Cython had a bug when it generated those sources (directly using a reserved field), then yes, users should have to regenerate with a fixed version. > My point is that it makes no sense to justify bpo-37221 with the goal of not breaking Cython modules, when at the same time another change (the one discussed here) has already broken them. I agree. Here's my distinction: bpo-37221 breaks any user who correctly followed the documentation: https://docs.python.org/3.7/c-api/code.html#c.PyCode_New This issue breaks users who did not follow the documentation: https://docs.python.org/3.7/c-api/typeobj.html#c.PyTypeObject.tp_print ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 17:19:24 2019 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 12 Jun 2019 21:19:24 +0000 Subject: [issue36689] docs: os.path.commonpath raises ValueError for different drives In-Reply-To: <1555837758.83.0.507858438764.issue36689@roundup.psfhosted.org> Message-ID: <1560374364.13.0.0882900203528.issue36689@roundup.psfhosted.org> Guido van Rossum added the comment: Flagging as Windows issue. ---------- components: +Windows nosy: +gvanrossum, paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 17:24:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 21:24:02 +0000 Subject: [issue37223] test_io logs Exception ignored in: warnings In-Reply-To: <1560210319.85.0.887484202288.issue37223@roundup.psfhosted.org> Message-ID: <1560374642.66.0.887834761139.issue37223@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13892 pull_request: https://github.com/python/cpython/pull/14028 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 17:26:54 2019 From: report at bugs.python.org (Tim Peters) Date: Wed, 12 Jun 2019 21:26:54 +0000 Subject: [issue37257] obmalloc: stop simple arena thrashing In-Reply-To: <1560372931.23.0.979771460507.issue37257@roundup.psfhosted.org> Message-ID: <1560374814.21.0.437218741403.issue37257@roundup.psfhosted.org> Change by Tim Peters : ---------- type: -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 17:32:45 2019 From: report at bugs.python.org (sushma) Date: Wed, 12 Jun 2019 21:32:45 +0000 Subject: [issue30754] textwrap.dedent mishandles empty lines In-Reply-To: <1498404324.65.0.525714137023.issue30754@psf.upfronthosting.co.za> Message-ID: <1560375165.99.0.766754212659.issue30754@roundup.psfhosted.org> sushma added the comment: I'm going to try and contribute this documentation fix. ---------- nosy: +syadlapalli _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 17:33:58 2019 From: report at bugs.python.org (Jesse Bacon) Date: Wed, 12 Jun 2019 21:33:58 +0000 Subject: [issue37241] Item Count Error in Shelf In-Reply-To: <1560298385.81.0.460821118129.issue37241@roundup.psfhosted.org> Message-ID: <1560375238.4.0.0113442911841.issue37241@roundup.psfhosted.org> Change by Jesse Bacon : Added file: https://bugs.python.org/file48414/Python Proof.ipynb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 17:34:45 2019 From: report at bugs.python.org (Jesse Bacon) Date: Wed, 12 Jun 2019 21:34:45 +0000 Subject: [issue37241] Item Count Error in Shelf In-Reply-To: <1560298385.81.0.460821118129.issue37241@roundup.psfhosted.org> Message-ID: <1560375285.97.0.303572261146.issue37241@roundup.psfhosted.org> Change by Jesse Bacon : Added file: https://bugs.python.org/file48415/pbr37241_Jesse_Bacon.py.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 17:39:46 2019 From: report at bugs.python.org (Jesse Bacon) Date: Wed, 12 Jun 2019 21:39:46 +0000 Subject: [issue37241] Item Count Error in Shelf In-Reply-To: <1560298385.81.0.460821118129.issue37241@roundup.psfhosted.org> Message-ID: <1560375586.4.0.0310001433503.issue37241@roundup.psfhosted.org> Jesse Bacon added the comment: Eric, The interpreter said something about passing a negative value when I converted the db.keys to a list. I have attached a script in txt format and a Jupyter notebook for further analysis. I apologize for posting images, I just saw your note. I'll go ahead and look at the shelve source while you determine if this information is sufficient. Thank you for your time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 17:40:18 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 12 Jun 2019 21:40:18 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1560375618.07.0.641980423674.issue37111@roundup.psfhosted.org> Vinay Sajip added the comment: > On the other hand, couldn't we use different default error handler? "replace" or "backslashescape" seems better default error handler for the logging. I've left it as is using the same rationale as I guess open() has at the moment - "Errors should never pass silently. Unless explicitly silenced". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 17:40:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 21:40:34 +0000 Subject: [issue37223] test_io logs Exception ignored in: warnings In-Reply-To: <1560210319.85.0.887484202288.issue37223@roundup.psfhosted.org> Message-ID: <1560375634.03.0.168006754651.issue37223@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13893 pull_request: https://github.com/python/cpython/pull/14029 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 17:48:28 2019 From: report at bugs.python.org (David Wang) Date: Wed, 12 Jun 2019 21:48:28 +0000 Subject: [issue37258] Logging cache not cleared properly when setting level Message-ID: <1560376108.37.0.126278550075.issue37258@roundup.psfhosted.org> New submission from David Wang : If you call setLevel() on a subclass of logging.Logger, it does not reset the cache for that logger. This mean that if you make some logging calls, then call setLevel(), the logger still acts like it still has its old level. See the attached python file for a reference. Currently, the user has to call logger._cache.clear() to manually clear the cache after calling setLevel(). To fix this in Python, we would have to change Logger.setLevel() in /logging/__init__.py to have the following code ``` self.level = _checkLevel(level) self.manager._clear_cache() self._cache.clear() ``` Note the following: - I made sure the subclass has a handler attached so setLevel() should work - This bug does not occur if you use logging.getLogger(). This is because logging.getLogger() returns the root logger, and the cache clear specifically targets the root logger's cache to be cleared. It occurs when the logger is specifically subclassed from logging.getLoggerClass() - The cache was added in Python 3.7, so this bug is specific to this version of python. ---------- components: Library (Lib) files: test.py messages: 345414 nosy: David Wang priority: normal severity: normal status: open title: Logging cache not cleared properly when setting level type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48416/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 17:52:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 21:52:44 +0000 Subject: [issue37224] test__xxsubinterpreters failed on AMD64 Windows8.1 Refleaks 3.8 In-Reply-To: <1560214681.61.0.906498246375.issue37224@roundup.psfhosted.org> Message-ID: <1560376364.8.0.630949543453.issue37224@roundup.psfhosted.org> STINNER Victor added the comment: Failure on AppVeyor on my PR 14029 (which is unrelated): test_subinterpreter (test.test__xxsubinterpreters.IsRunningTests) ... Exception in thread Thread-8: Traceback (most recent call last): File "C:\projects\cpython\lib\threading.py", line 923, in _bootstrap_inner self.run() File "C:\projects\cpython\lib\threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "C:\projects\cpython\lib\test\test__xxsubinterpreters.py", line 51, in run interpreters.run_string(interp, dedent(f""" RuntimeError: unrecognized interpreter ID 46 FAIL FAIL: test_subinterpreter (test.test__xxsubinterpreters.IsRunningTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\test\test__xxsubinterpreters.py", line 492, in test_subinterpreter self.assertTrue(interpreters.is_running(interp)) AssertionError: False is not true test__xxsubinterpreters passed when run again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 17:57:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 21:57:16 +0000 Subject: [issue37223] test_io logs Exception ignored in: warnings In-Reply-To: <1560210319.85.0.887484202288.issue37223@roundup.psfhosted.org> Message-ID: <1560376636.31.0.513566304983.issue37223@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 913fa1c8245d1cde6edb4254f4fb965cc91786ef by Victor Stinner in branch 'master': bpo-37223, test_io: silence last 'Exception ignored in:' (GH-14029) https://github.com/python/cpython/commit/913fa1c8245d1cde6edb4254f4fb965cc91786ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 17:58:06 2019 From: report at bugs.python.org (Tal Einat) Date: Wed, 12 Jun 2019 21:58:06 +0000 Subject: [issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default. In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1560376686.41.0.633432823206.issue17535@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +13894 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/14030 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 17:59:30 2019 From: report at bugs.python.org (Tal Einat) Date: Wed, 12 Jun 2019 21:59:30 +0000 Subject: [issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default. In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1560376770.44.0.0421473348309.issue17535@roundup.psfhosted.org> Tal Einat added the comment: Please see updated PR, GH-14030. It's not 100% ready yet. At this point the goal is to have some people try it and give feedback. So please, give it a go and let me know what you think! ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 18:04:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 22:04:22 +0000 Subject: [issue37223] test_io logs Exception ignored in: warnings In-Reply-To: <1560210319.85.0.887484202288.issue37223@roundup.psfhosted.org> Message-ID: <1560377062.44.0.949777157023.issue37223@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13895 pull_request: https://github.com/python/cpython/pull/14031 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 18:05:08 2019 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 12 Jun 2019 22:05:08 +0000 Subject: [issue36689] docs: os.path.commonpath raises ValueError for different drives In-Reply-To: <1555837758.83.0.507858438764.issue36689@roundup.psfhosted.org> Message-ID: <1560377108.28.0.157919258621.issue36689@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 18:05:19 2019 From: report at bugs.python.org (Tal Einat) Date: Wed, 12 Jun 2019 22:05:19 +0000 Subject: [issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default. In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1560377119.4.0.656018488886.issue17535@roundup.psfhosted.org> Tal Einat added the comment: In reference to previous discussion here about the effect of toggling line numbers on future opened windows: IMO toggling shouldn't affect future windows; those should behave according to the configured default state. The default state should be changed only by editing the config (whether via the config dialog or by editing the config files.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 18:05:32 2019 From: report at bugs.python.org (Tal Einat) Date: Wed, 12 Jun 2019 22:05:32 +0000 Subject: [issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default. In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1560377132.92.0.504329617391.issue17535@roundup.psfhosted.org> Change by Tal Einat : ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 18:05:40 2019 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 12 Jun 2019 22:05:40 +0000 Subject: [issue30754] textwrap.dedent mishandles empty lines In-Reply-To: <1498404324.65.0.525714137023.issue30754@psf.upfronthosting.co.za> Message-ID: <1560377140.31.0.958110252704.issue30754@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 18:06:49 2019 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 12 Jun 2019 22:06:49 +0000 Subject: [issue37241] Item Count Error in Shelf In-Reply-To: <1560298385.81.0.460821118129.issue37241@roundup.psfhosted.org> Message-ID: <1560377209.33.0.857556656469.issue37241@roundup.psfhosted.org> Eric V. Smith added the comment: After fixing a missing import (import urllib.request), this is what I get: $ /usr/local/bin/python3.6 pbr37241_Jesse_Bacon.py Fetching nvdcve-1.0-2019.json.gz Storing Gzipped File Loading JSON Content 4275 records 4275 unique records Creating Shelve: cve_2019.shelf Assembling Big Dictionary of 2019 Data in shelve shelve reports 4275 unique records Extracting data by keys from shelve 4275 extracted records Number of missing records 0 data match Are you seeing failures? This is on a python3.6 that I compiled from source on an old Fedora box. What OS are you using? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 18:15:06 2019 From: report at bugs.python.org (Julian Berman) Date: Wed, 12 Jun 2019 22:15:06 +0000 Subject: [issue30754] textwrap.dedent mishandles empty lines In-Reply-To: <1560377140.33.0.913882022989.issue30754@roundup.psfhosted.org> Message-ID: Julian Berman added the comment: I still disagree :) but docs are better than nothing. On Wed, Jun 12, 2019, 18:05 Guido van Rossum wrote: > > Change by Guido van Rossum : > > > ---------- > nosy: +gvanrossum > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 18:23:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 22:23:55 +0000 Subject: [issue37223] test_io logs Exception ignored in: warnings In-Reply-To: <1560210319.85.0.887484202288.issue37223@roundup.psfhosted.org> Message-ID: <1560378235.1.0.524208137442.issue37223@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c15a682603a47f5aef5025f6a2e3babb699273d6 by Victor Stinner in branch '3.8': bpo-37223: test_io: silence destructor errors (GH-14031) https://github.com/python/cpython/commit/c15a682603a47f5aef5025f6a2e3babb699273d6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 18:23:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 22:23:55 +0000 Subject: [issue18748] io.IOBase destructor silence I/O error on close() by default In-Reply-To: <1376572242.37.0.931026549367.issue18748@psf.upfronthosting.co.za> Message-ID: <1560378235.13.0.292986083152.issue18748@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c15a682603a47f5aef5025f6a2e3babb699273d6 by Victor Stinner in branch '3.8': bpo-37223: test_io: silence destructor errors (GH-14031) https://github.com/python/cpython/commit/c15a682603a47f5aef5025f6a2e3babb699273d6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 18:24:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 22:24:34 +0000 Subject: [issue37223] test_io logs Exception ignored in: warnings In-Reply-To: <1560210319.85.0.887484202288.issue37223@roundup.psfhosted.org> Message-ID: <1560378274.11.0.703741583072.issue37223@roundup.psfhosted.org> STINNER Victor added the comment: Ok, all errors have been fixed in 3.8 and master. I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 18:33:27 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 12 Jun 2019 22:33:27 +0000 Subject: [issue37130] pathlib does not handle '..' directory In-Reply-To: <1559438292.33.0.601764456145.issue37130@roundup.psfhosted.org> Message-ID: <1560378807.04.0.412410762103.issue37130@roundup.psfhosted.org> Antoine Pitrou added the comment: I'm sorry, but I don't understand the issue here. Instead of posting isolated snippets, could you explain what are you trying to do? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 19:09:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 23:09:07 +0000 Subject: [issue37069] regrtest: log unraisable exceptions and uncaught thread exceptions In-Reply-To: <1558997484.87.0.618934402283.issue37069@roundup.psfhosted.org> Message-ID: <1560380947.42.0.250916629179.issue37069@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 95f61c8b1619e736bd5e29a0da0183234634b6e8 by Victor Stinner in branch 'master': bpo-37069: regrtest uses sys.unraisablehook (GH-13759) https://github.com/python/cpython/commit/95f61c8b1619e736bd5e29a0da0183234634b6e8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 19:13:30 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 23:13:30 +0000 Subject: [issue36779] time.tzname returns empty string on Windows if default codepage is a Unicode codepage In-Reply-To: <1556844322.34.0.979846087129.issue36779@roundup.psfhosted.org> Message-ID: <1560381210.76.0.106335662119.issue36779@roundup.psfhosted.org> miss-islington added the comment: New changeset b4c7defe58695a6670a8fdeaef67a638bbb47e42 by Miss Islington (bot) (Paul Monson) in branch 'master': bpo-36779: time.tzname returns empty string on Windows if default cod? (GH-13073) https://github.com/python/cpython/commit/b4c7defe58695a6670a8fdeaef67a638bbb47e42 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 19:13:53 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 23:13:53 +0000 Subject: [issue36779] time.tzname returns empty string on Windows if default codepage is a Unicode codepage In-Reply-To: <1556844322.34.0.979846087129.issue36779@roundup.psfhosted.org> Message-ID: <1560381233.01.0.797202358063.issue36779@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13896 pull_request: https://github.com/python/cpython/pull/14032 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 19:14:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 23:14:43 +0000 Subject: [issue18748] io.IOBase destructor silence I/O error on close() by default In-Reply-To: <1376572242.37.0.931026549367.issue18748@psf.upfronthosting.co.za> Message-ID: <1560381283.18.0.15324838557.issue18748@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 19:19:19 2019 From: report at bugs.python.org (Jeroen van den Hout) Date: Wed, 12 Jun 2019 23:19:19 +0000 Subject: [issue37247] swap distutils build_ext and build_py commands to allow proper SWIG extension installation In-Reply-To: <1560341496.09.0.819646109086.issue37247@roundup.psfhosted.org> Message-ID: <1560381559.51.0.291235565337.issue37247@roundup.psfhosted.org> Jeroen van den Hout added the comment: I'm sorry, I read your comment completely wrong, so please disregard my previous comment. I would argue the sequence doesn't really matter that much for non SWIG packages, since those will install correctly no matter if the extensions are built and copied first or not. In the non-SWIG case they are truly independent commands. It is only in the SWIG packages that they become dependent on each other. On top of that I see more and more questions on stack exchange and other forums asking why their SWIG builds fail to install correctly, implying that more and more developers are using this awesome feature and start to rely on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 19:23:48 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Wed, 12 Jun 2019 23:23:48 +0000 Subject: [issue29982] tempfile.TemporaryDirectory fails to delete itself In-Reply-To: <1491330378.49.0.274398190766.issue29982@psf.upfronthosting.co.za> Message-ID: <1560381828.24.0.259337761958.issue29982@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 19:24:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 23:24:52 +0000 Subject: [issue18748] io.IOBase destructor silence I/O error on close() by default In-Reply-To: <1376572242.37.0.931026549367.issue18748@psf.upfronthosting.co.za> Message-ID: <1560381892.13.0.161109226096.issue18748@roundup.psfhosted.org> STINNER Victor added the comment: I closed the issue. I consider that the initial issue has been fixed and all related issues have been fixed as well: * Python 3.8 now logs close() exception in file finalizer in development mode (-X dev) and debug mode (./configure --with-pydebug) * I added sys.unraisablehook to Python 3.8 which allows to decide how these unraisable exceptions are handled * Tests no longer log any "unraisable exception" in file finalizers (test_io and test_urllib have been fixed) * regrtest now marks a test as ENV_CHANGED if it logs an unraisable exception (like the close() exception) -- For Python 3.7, there is no known workaround. It seems like Python 2.7 in debug mode logs an error: $ python2.7-dbg bug.py close failed in file object destructor: IOError: [Errno 9] Bad file descriptor ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 19:30:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 23:30:20 +0000 Subject: [issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1560382220.24.0.0501649294907.issue36402@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 468e5fec8a2f534f1685d59da3ca4fad425c38dd by Victor Stinner in branch 'master': bpo-36402: Fix threading._shutdown() race condition (GH-13948) https://github.com/python/cpython/commit/468e5fec8a2f534f1685d59da3ca4fad425c38dd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 19:30:28 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 23:30:28 +0000 Subject: [issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1560382228.7.0.983438281495.issue36402@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13897 pull_request: https://github.com/python/cpython/pull/14033 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 19:30:37 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 12 Jun 2019 23:30:37 +0000 Subject: [issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1560382237.17.0.128237937577.issue36402@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13898 pull_request: https://github.com/python/cpython/pull/14034 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 19:31:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jun 2019 23:31:59 +0000 Subject: [issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1560382319.68.0.264408600771.issue36402@roundup.psfhosted.org> Change by STINNER Victor : ---------- versions: +Python 3.7, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 19:52:58 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 12 Jun 2019 23:52:58 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1560383578.37.0.964437769921.issue37111@roundup.psfhosted.org> Inada Naoki added the comment: > I've left it as is using the same rationale as I guess open() has at the moment - "Errors should never pass silently. Unless explicitly silenced". But open() is general purpose, and logging is for logging. Note that stderr uses 'backslashreplace', even when PYTHONIOENCODING=ascii:strict is used. And if we don't log something due to encoding error, doesn't it mean "errors may ignored completely silently by default"? What logging does when UnicodeEncodeError is happened? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 19:54:23 2019 From: report at bugs.python.org (Paul Monson) Date: Wed, 12 Jun 2019 23:54:23 +0000 Subject: [issue36779] time.tzname returns empty string on Windows if default codepage is a Unicode codepage In-Reply-To: <1556844322.34.0.979846087129.issue36779@roundup.psfhosted.org> Message-ID: <1560383663.77.0.208950266672.issue36779@roundup.psfhosted.org> Change by Paul Monson : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 20:01:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 00:01:32 +0000 Subject: [issue37253] PyCompilerFlags got a new cf_feature_version field In-Reply-To: <1560352501.33.0.419965733273.issue37253@roundup.psfhosted.org> Message-ID: <1560384092.46.0.285837354182.issue37253@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 2c9b498759f4fc74da82a0a96d059d666fa73f16 by Victor Stinner in branch 'master': bpo-37253: Document PyCompilerFlags.cf_feature_version (GH-14019) https://github.com/python/cpython/commit/2c9b498759f4fc74da82a0a96d059d666fa73f16 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 20:01:40 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 00:01:40 +0000 Subject: [issue37253] PyCompilerFlags got a new cf_feature_version field In-Reply-To: <1560352501.33.0.419965733273.issue37253@roundup.psfhosted.org> Message-ID: <1560384100.1.0.719809009846.issue37253@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13899 pull_request: https://github.com/python/cpython/pull/14035 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 20:02:53 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Thu, 13 Jun 2019 00:02:53 +0000 Subject: [issue36422] tempfile.TemporaryDirectory() removes entire directory tree even if it's a mount-point In-Reply-To: <1553512605.72.0.860422023516.issue36422@roundup.psfhosted.org> Message-ID: <1560384173.29.0.268319770199.issue36422@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +giampaolo.rodola, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 20:10:25 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 13 Jun 2019 00:10:25 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1560384625.29.0.702302599764.issue37111@roundup.psfhosted.org> Inada Naoki added the comment: > What logging does when UnicodeEncodeError is happened? Hm, it seems logging does best job, show enough information to stderr. But sometime, Python is embedded in web servers and there is no stderr. pythonw.exe may not have stderr too.... I still feel backslashreplace is better default error handler. But it's not strong opinion and it shouldn't block this issue. Go ahead. $ cat x.py import logging logging.basicConfig(filename="mylog.txt") msg = "hello, ???" logging.error(msg) $ LC_ALL=en_US.US-ASCII python3 x.py --- Logging error --- Traceback (most recent call last): File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 1037, in emit stream.write(msg + self.terminator) UnicodeEncodeError: 'ascii' codec can't encode characters in position 18-20: ordinal not in range(128) Call stack: File "x.py", line 5, in logging.error(msg) Message: 'hello, \u306f\u308d\u30fc' Arguments: () ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 20:11:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 00:11:33 +0000 Subject: [issue37253] PyCompilerFlags got a new cf_feature_version field In-Reply-To: <1560352501.33.0.419965733273.issue37253@roundup.psfhosted.org> Message-ID: <1560384693.79.0.818998552598.issue37253@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13900 pull_request: https://github.com/python/cpython/pull/14036 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 20:14:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 00:14:31 +0000 Subject: [issue37259] Missing Doc/whatsnew/3.9.rst file Message-ID: <1560384871.35.0.2265684667.issue37259@roundup.psfhosted.org> New submission from STINNER Victor : There is no Doc/whatsnew/3.9.rst file yet. How should new features of Python 3.9 be documented? Does someone know how to create a template for this file? ---------- assignee: docs at python components: Documentation messages: 345433 nosy: docs at python, lukasz.langa, ned.deily, vstinner priority: normal severity: normal status: open title: Missing Doc/whatsnew/3.9.rst file versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 20:16:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 00:16:44 +0000 Subject: [issue37253] PyCompilerFlags got a new cf_feature_version field In-Reply-To: <1560352501.33.0.419965733273.issue37253@roundup.psfhosted.org> Message-ID: <1560385004.46.0.239015036869.issue37253@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 37d66d7d4bc7dbac9809d69966a774ebb32563be by Victor Stinner in branch 'master': bpo-37253: Add _PyCompilerFlags_INIT macro (GH-14018) https://github.com/python/cpython/commit/37d66d7d4bc7dbac9809d69966a774ebb32563be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 20:16:59 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 00:16:59 +0000 Subject: [issue37253] PyCompilerFlags got a new cf_feature_version field In-Reply-To: <1560352501.33.0.419965733273.issue37253@roundup.psfhosted.org> Message-ID: <1560385019.49.0.63482307292.issue37253@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13901 pull_request: https://github.com/python/cpython/pull/14037 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 20:17:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 00:17:17 +0000 Subject: [issue37253] PyCompilerFlags got a new cf_feature_version field In-Reply-To: <1560352501.33.0.419965733273.issue37253@roundup.psfhosted.org> Message-ID: <1560385037.07.0.37091403413.issue37253@roundup.psfhosted.org> STINNER Victor added the comment: New changeset a04ea4f92ccbe20ffdbb5fa9b6bb93ee8da50f5d by Victor Stinner in branch 'master': bpo-37253: Fix typo in PyCompilerFlags doc (GH-14036) https://github.com/python/cpython/commit/a04ea4f92ccbe20ffdbb5fa9b6bb93ee8da50f5d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 20:19:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 00:19:40 +0000 Subject: [issue37253] PyCompilerFlags got a new cf_feature_version field In-Reply-To: <1560352501.33.0.419965733273.issue37253@roundup.psfhosted.org> Message-ID: <1560385180.96.0.687518526861.issue37253@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13902 pull_request: https://github.com/python/cpython/pull/14038 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 20:21:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 00:21:04 +0000 Subject: [issue37253] PyCompilerFlags got a new cf_feature_version field In-Reply-To: <1560352501.33.0.419965733273.issue37253@roundup.psfhosted.org> Message-ID: <1560385264.11.0.00375887533021.issue37253@roundup.psfhosted.org> STINNER Victor added the comment: Many PyRun_xxx() functions of the public C API accept a "PyCompilerFlags* flags" parameter. So yeah, I documented the new cf_feature_version. PyCompilerFlags structure is kind of public ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 20:23:05 2019 From: report at bugs.python.org (Shen Han) Date: Thu, 13 Jun 2019 00:23:05 +0000 Subject: [issue37248] support conversion of `func(**{} if a else b)` In-Reply-To: <1560346847.18.0.350952603259.issue37248@roundup.psfhosted.org> Message-ID: <1560385385.94.0.818931024946.issue37248@roundup.psfhosted.org> Shen Han added the comment: The 2to3 tool cannot convert the following code: 1. `func(**{} if a else b)` 2. `func(*[] if a else b)` I think that problem is rooted the outdated Grammar.txt. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 20:24:25 2019 From: report at bugs.python.org (Shen Han) Date: Thu, 13 Jun 2019 00:24:25 +0000 Subject: [issue37248] support conversion of `func(**{} if a else b)` In-Reply-To: <1560346847.18.0.350952603259.issue37248@roundup.psfhosted.org> Message-ID: <1560385465.19.0.459102106732.issue37248@roundup.psfhosted.org> Shen Han added the comment: This PR https://github.com/python/cpython/pull/12703 solves this problem. But haven't been merged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 20:33:50 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 13 Jun 2019 00:33:50 +0000 Subject: [issue37258] Logging cache not cleared properly when setting level In-Reply-To: <1560376108.37.0.126278550075.issue37258@roundup.psfhosted.org> Message-ID: <1560386030.71.0.316408895602.issue37258@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 20:36:05 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 00:36:05 +0000 Subject: [issue37253] PyCompilerFlags got a new cf_feature_version field In-Reply-To: <1560352501.33.0.419965733273.issue37253@roundup.psfhosted.org> Message-ID: <1560386165.95.0.430696987151.issue37253@roundup.psfhosted.org> miss-islington added the comment: New changeset 92e836c7dcaf74f7b8617250414224d24d1eb1f2 by Miss Islington (bot) in branch '3.8': bpo-37253: Add _PyCompilerFlags_INIT macro (GH-14018) https://github.com/python/cpython/commit/92e836c7dcaf74f7b8617250414224d24d1eb1f2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 20:40:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 00:40:44 +0000 Subject: [issue37253] PyCompilerFlags got a new cf_feature_version field In-Reply-To: <1560352501.33.0.419965733273.issue37253@roundup.psfhosted.org> Message-ID: <1560386444.99.0.672996676052.issue37253@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f9445a391e6a91103fbe88bff4d3adc07f526c73 by Victor Stinner in branch '3.8': [3.8] bpo-37253: Document PyCompilerFlags.cf_feature_version (GH-14019) (GH-14038) https://github.com/python/cpython/commit/f9445a391e6a91103fbe88bff4d3adc07f526c73 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 20:57:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 00:57:52 +0000 Subject: [issue37154] test_utf8_mode: test_env_var() fails on AMD64 Fedora Rawhide Clang Installed 3.7 In-Reply-To: <1559667302.55.0.345195224781.issue37154@roundup.psfhosted.org> Message-ID: <1560387472.7.0.959555915008.issue37154@roundup.psfhosted.org> STINNER Victor added the comment: It seems like test_utf8_mode has a bug, but sadly I'm no longer able to reproduce it and so I cannot test my fix: diff --git a/Lib/test/test_utf8_mode.py b/Lib/test/test_utf8_mode.py index bdb93457cf..c22b95d54d 100644 --- a/Lib/test/test_utf8_mode.py +++ b/Lib/test/test_utf8_mode.py @@ -22,6 +22,16 @@ class UTF8ModeTests(unittest.TestCase): } def posix_locale(self): + try: + import _testinternalcapi + except ImportError: + pass + else: + pre_config = _testinternalcapi.get_configs()["pre_config"] + if pre_config["coerce_c_locale"] > 0: + # C locale has been coerced + return True + loc = locale.setlocale(locale.LC_CTYPE, None) return (loc in POSIX_LOCALES) I close the issue. Reopen it if you are able to reproduce the bug. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 21:05:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 01:05:17 +0000 Subject: [issue37191] Python.h contains intermingled declarations In-Reply-To: <1559898837.19.0.323720820169.issue37191@roundup.psfhosted.org> Message-ID: <1560387917.73.0.56052338554.issue37191@roundup.psfhosted.org> STINNER Victor added the comment: Petr Viktorin fixed the issue, thanks ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 21:09:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 01:09:26 +0000 Subject: [issue36631] test_urllib2net: test_ftp_no_timeout() killed after a timeout of 15 min In-Reply-To: <1555324751.9.0.575658866792.issue36631@roundup.psfhosted.org> Message-ID: <1560388166.68.0.792293408929.issue36631@roundup.psfhosted.org> STINNER Victor added the comment: I only saw this issue once, two months ago, so I close it. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 21:09:48 2019 From: report at bugs.python.org (Nathaniel Smith) Date: Thu, 13 Jun 2019 01:09:48 +0000 Subject: [issue37136] Travis CI: Documentation tests fails with Sphinx 2.1 In-Reply-To: <1559524162.91.0.6239630561.issue37136@roundup.psfhosted.org> Message-ID: <1560388188.7.0.499295417746.issue37136@roundup.psfhosted.org> Nathaniel Smith added the comment: One of Guido's mentees (I don't know her bpo account name) also ran into this: https://python.zulipchat.com/#narrow/stream/116742-core.2Fhelp/topic/Weird.20sphinx.20error Some analysis shows that we do have a bug in the docs ? the sphinx '.. module::' directive is only supposed to be used once per module, because it means "this is the canonical documentation for this module, that should be linked to whenever anyone mentions this module". But we have two documents that use '.. module:: email.message': Doc/library/email.message.rst Doc/library/email.compat32-message.rst I don't know enough about the email module to know what the right fix is, so I'll CC the email-interest-area folks too... maybe email.compat32-message.rst should be using '.. currentmodule:: email.message' instead of '.. module::'? It's not clear why this error is appearing and disappearing for different people. The sphinx 2.1 release did make some changes in this area: https://github.com/sphinx-doc/sphinx/commit/259be8716ad4b2332aa4d7693d73400eb06fa7d7 but that doesn't explain why it appears and disappears randomly. Probably not worth tracking down though, given that we can just fix the underlying problem. ---------- nosy: +barry, gvanrossum, maxking, njs, r.david.murray resolution: not a bug -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 21:10:41 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Thu, 13 Jun 2019 01:10:41 +0000 Subject: [issue37260] shutil.rmtree() FileNotFoundError race condition Message-ID: <1560388241.37.0.285109327745.issue37260@roundup.psfhosted.org> New submission from Jeffrey Kintscher : shutil.rmtree() is susceptible to a race condition that can needlessly raise OSError: 1. os.scandir() returns the list of entries in a directory 2. while iterating over the list, another thread or process deletes one or more of the entries not yet iterated 3. os.unlink() or stat() raises OSError for the already deleted entry It should check for and ignore, at a minimum, FileNotFoundError because we were going to delete the entry anyways. For comparison, the 'rm -r' shell command handles this race condition by ignoring entries deleted from under it. I will submit a PR when I work out some test cases to include. ---------- components: Library (Lib) messages: 345445 nosy: Jeffrey.Kintscher, giampaolo.rodola, tarek priority: normal severity: normal status: open title: shutil.rmtree() FileNotFoundError race condition versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 21:11:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 01:11:31 +0000 Subject: [issue35425] test_eintr fails randomly on AMD64 FreeBSD 10-STABLE Non-Debug 3.7: TypeError: 'int' object is not callable In-Reply-To: <1544099308.26.0.788709270274.issue35425@psf.upfronthosting.co.za> Message-ID: <1560388291.34.0.911990939252.issue35425@roundup.psfhosted.org> STINNER Victor added the comment: I didn't see this issue recently, so I close it. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 21:13:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 01:13:56 +0000 Subject: [issue35385] time module: why not using tzname from the glibc? In-Reply-To: <1543834589.7.0.788709270274.issue35385@psf.upfronthosting.co.za> Message-ID: <1560388436.07.0.719261817466.issue35385@roundup.psfhosted.org> STINNER Victor added the comment: This issue isn't really a bug. The current code just works. I close the issue. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 21:14:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 01:14:37 +0000 Subject: [issue35462] test_imaplib.test_enable_UTF8_True_append() failed on AMD64 FreeBSD 10-STABLE Non-Debug 3.7 In-Reply-To: <1544536562.99.0.788709270274.issue35462@psf.upfronthosting.co.za> Message-ID: <1560388477.12.0.15310900951.issue35462@roundup.psfhosted.org> STINNER Victor added the comment: I only saw the issue once, 6 months ago. I close the issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 21:43:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 01:43:10 +0000 Subject: [issue37261] test_io leaks references on AMD64 Fedora Rawhide Refleaks 3.8 Message-ID: <1560390190.75.0.577750929769.issue37261@roundup.psfhosted.org> New submission from STINNER Victor : test_io leaks references on AMD64 Fedora Rawhide Refleaks 3.8: https://buildbot.python.org/all/#/builders/229/builds/10 test_io leaked [23208, 23204, 23208] references, sum=69620 test_io leaked [7657, 7655, 7657] memory blocks, sum=22969 The issue has been introduced by my change: commit c15a682603a47f5aef5025f6a2e3babb699273d6 Author: Victor Stinner Date: Thu Jun 13 00:23:49 2019 +0200 bpo-37223: test_io: silence destructor errors (GH-14031) * bpo-18748: Fix _pyio.IOBase destructor (closed case) (GH-13952) _pyio.IOBase destructor now does nothing if getting the closed attribute fails to better mimick _io.IOBase finalizer. (cherry picked from commit 4f6f7c5a611905fb6b81671547f268c226bc646a) * bpo-37223: test_io: silence destructor errors (GH-13954) Implement also MockNonBlockWriterIO.seek() method. (cherry picked from commit b589cef9c4dada2fb84ce0fae5040ecf16d9d5ef) * bpo-37223, test_io: silence last 'Exception ignored in:' (GH-14029) Use catch_unraisable_exception() to ignore 'Exception ignored in:' error when the internal BufferedWriter of the BufferedRWPair is destroyed. The C implementation doesn't give access to the internal BufferedWriter, so just ignore the warning instead. (cherry picked from commit 913fa1c8245d1cde6edb4254f4fb965cc91786ef) It seems like the root issue is the usage of catch_unraisable_exception() in test_io. class catch_unraisable_exception: def __init__(self): self.unraisable = None self._old_hook = None def _hook(self, unraisable): self.unraisable = unraisable def __enter__(self): self._old_hook = sys.unraisablehook sys.unraisablehook = self._hook return self def __exit__(self, *exc_info): # Clear the unraisable exception to explicitly break a reference cycle del self.unraisable sys.unraisablehook = self._old_hook *Sometimes* "del self.unraisable" of __exit__() triggers a new unraisable exception which calls again the _hook() method which sets again the unraisable attribute. catch_unraisable_exception resurects _io.BufferedWriter objects, and then "del self.unraisable" calls again their finalizer: iobase_finalize() is called again, and iobase_finalize() calls PyErr_WriteUnraisable() on close() failure. ---------- messages: 345449 nosy: vstinner priority: normal severity: normal status: open title: test_io leaks references on AMD64 Fedora Rawhide Refleaks 3.8 versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 21:46:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 01:46:43 +0000 Subject: [issue37261] test_io leaks references on AMD64 Fedora Rawhide Refleaks 3.8 In-Reply-To: <1560390190.75.0.577750929769.issue37261@roundup.psfhosted.org> Message-ID: <1560390403.97.0.828117958695.issue37261@roundup.psfhosted.org> STINNER Victor added the comment: gdb traceback on "del self.unraisable": (gdb) where #0 _PyErr_WriteUnraisableDefaultHook ( args=(, ValueError('flush of closed file',), , None, <_io.BufferedWriter at remote 0x7fffe9bcb890>)) at Python/errors.c:1294 #1 0x00000000005726ec in sys_unraisablehook (module=, unraisable=(, ValueError('flush of closed file',), , None, <_io.BufferedWriter at remote 0x7fffe9bcb890>)) at ./Python/sysmodule.c:702 #2 0x0000000000435741 in _PyMethodDef_RawFastCallKeywords (method=0x7bb2e0 , self=, args=0x7ffffffd1d00, nargs=1, kwnames=0x0) at Objects/call.c:650 #3 0x00000000004359f4 in _PyCFunction_Vectorcall (func=, args=0x7ffffffd1d00, nargsf=1, kwnames=0x0) at Objects/call.c:737 #4 0x0000000000534666 in _PyObject_Vectorcall (callable=, args=0x7ffffffd1d00, nargsf=1, kwnames=0x0) at ./Include/cpython/abstract.h:127 #5 0x00000000005346b1 in _PyObject_FastCall (func=, args=0x7ffffffd1d00, nargs=1) at ./Include/cpython/abstract.h:147 #6 0x0000000000536da4 in _PyErr_WriteUnraisableMsg (err_msg_str=0x0, obj=<_io.BufferedWriter at remote 0x7fffe9bcb890>) at Python/errors.c:1379 #7 0x0000000000536ee6 in PyErr_WriteUnraisable (obj=<_io.BufferedWriter at remote 0x7fffe9bcb890>) at Python/errors.c:1425 #8 0x00000000005eb97d in iobase_finalize (self=<_io.BufferedWriter at remote 0x7fffe9bcb890>) at ./Modules/_io/iobase.c:299 #9 0x0000000000479fd2 in PyObject_CallFinalizer (self=<_io.BufferedWriter at remote 0x7fffe9bcb890>) at Objects/object.c:307 #10 0x000000000047a044 in PyObject_CallFinalizerFromDealloc (self=<_io.BufferedWriter at remote 0x7fffe9bcb890>) at Objects/object.c:325 #11 0x00000000005eb9e0 in _PyIOBase_finalize (self=<_io.BufferedWriter at remote 0x7fffe9bcb890>) at ./Modules/_io/iobase.c:320 #12 0x00000000005f27d3 in buffered_dealloc (self=0x7fffe9bcb890) at ./Modules/_io/bufferedio.c:387 #13 0x000000000047ebff in _Py_Dealloc (op=<_io.BufferedWriter at remote 0x7fffe9bcb890>) at Objects/object.c:2213 #14 0x00000000005f210a in _Py_DECREF (filename=0x71eef3 "./Modules/_io/bufferedio.c", lineno=2138, op=<_io.BufferedWriter at remote 0x7fffe9bcb890>) at ./Include/object.h:478 #15 0x00000000005f716a in bufferedrwpair_dealloc (self=0x7fffe9a90d70) at ./Modules/_io/bufferedio.c:2138 #16 0x000000000047ebff in _Py_Dealloc (op=<_io.BufferedRWPair at remote 0x7fffe9a90d70>) at Objects/object.c:2213 #17 0x000000000048d1b6 in _Py_DECREF (filename=0x69fe40 "./Include/object.h", lineno=541, op=<_io.BufferedRWPair at remote 0x7fffe9a90d70>) at ./Include/object.h:478 #18 0x000000000048d1e2 in _Py_XDECREF (op=<_io.BufferedRWPair at remote 0x7fffe9a90d70>) at ./Include/object.h:541 # del UnraisableHookArgs #19 0x000000000048d569 in structseq_dealloc (obj=0x7fffe9ad1360) at Objects/structseq.c:85 #20 0x000000000047ebff in _Py_Dealloc ( op=(, ValueError('flush of closed file',), , None, <_io.BufferedRWPair at remote 0x7fffe9a90d70>)) at Objects/object.c:2213 #21 0x0000000000463be6 in _Py_DECREF (filename=0x696dc9 "Objects/dictobject.c", lineno=1585, op=(, ValueError('flush of closed file',), , None, <_io.BufferedRWPair at remote 0x7fffe9a90d70>)) at ./Include/object.h:478 #22 0x0000000000468428 in delitem_common (mp=0x7fffe9b17950, hash=-822296730167156087, ix=0, old_value=(, ValueError('flush of closed file',), , None, <_io.BufferedRWPair at remote 0x7fffe9a90d70>)) at Objects/dictobject.c:1585 #23 0x0000000000468663 in _PyDict_DelItem_KnownHash (op={'_old_hook': }, key='unraisable', hash=-822296730167156087) at Objects/dictobject.c:1637 #24 0x00000000004684e5 in PyDict_DelItem (op={'_old_hook': }, key='unraisable') at Objects/dictobject.c:1603 # del self.unraisable #25 0x000000000046ef21 in _PyObjectDict_SetItem (tp=0xa58830, dictptr=0x7fffe9a8ad30, key='unraisable', value=0x0) at Objects/dictobject.c:4614 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 22:16:51 2019 From: report at bugs.python.org (Tim Peters) Date: Thu, 13 Jun 2019 02:16:51 +0000 Subject: [issue37257] obmalloc: stop simple arena thrashing In-Reply-To: <1560372931.23.0.979771460507.issue37257@roundup.psfhosted.org> Message-ID: <1560392211.21.0.627605539194.issue37257@roundup.psfhosted.org> Change by Tim Peters : ---------- keywords: +patch pull_requests: +13903 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/14039 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 23:35:34 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 13 Jun 2019 03:35:34 +0000 Subject: [issue37259] Missing Doc/whatsnew/3.9.rst file In-Reply-To: <1560384871.35.0.2265684667.issue37259@roundup.psfhosted.org> Message-ID: <1560396934.21.0.425660499701.issue37259@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the report. Fixed in PR 14040 (3a2883c313be3aff34c61a42e586f8507ba5945f) in master. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 23:36:35 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 13 Jun 2019 03:36:35 +0000 Subject: [issue37248] support conversion of `func(**{} if a else b)` In-Reply-To: <1560346847.18.0.350952603259.issue37248@roundup.psfhosted.org> Message-ID: <1560396995.18.0.720045189749.issue37248@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: https://bugs.python.org/issue36541 already tracks it. So can this be closed as a duplicate? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 23:41:19 2019 From: report at bugs.python.org (Tim Peters) Date: Thu, 13 Jun 2019 03:41:19 +0000 Subject: [issue37257] obmalloc: stop simple arena thrashing In-Reply-To: <1560372931.23.0.979771460507.issue37257@roundup.psfhosted.org> Message-ID: <1560397279.07.0.580409279975.issue37257@roundup.psfhosted.org> Tim Peters added the comment: New changeset d1c85a27ea9fe70163cad3443d5e534d94f08284 by Tim Peters in branch 'master': bpo-37257: obmalloc: stop simple arena thrashing (#14039) https://github.com/python/cpython/commit/d1c85a27ea9fe70163cad3443d5e534d94f08284 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 23:46:02 2019 From: report at bugs.python.org (Eryk Sun) Date: Thu, 13 Jun 2019 03:46:02 +0000 Subject: [issue37198] _parse_localename fail to parse 'en_IL' In-Reply-To: <1559925201.97.0.400746291459.issue37198@roundup.psfhosted.org> Message-ID: <1560397562.8.0.376189634106.issue37198@roundup.psfhosted.org> Eryk Sun added the comment: Windows prefers locale names based on RFC 4646 language tags, which use a hyphen instead of an underscore (e.g. "en-UK"). This name format doesn't include an encoding. The C runtime (not the Windows API) makes one exception to support ".utf8" and ".utf-8" (e.g. "en-UK.utf8"). If UTF-8 is not specified, setlocale implicitly uses the ANSI codepage of the given locale (which is not to be confused with the ANSI codepage of the system locale). As noted in this issue, _parse_localename currently fails if there's no encoding. hodai's PR 14027 addresses this case by looking for underscore in the name. In Windows, it should also look for hyphen. Also, instead of using None for the encoding in this case, in Windows we can look it up via ___lc_codepage_func [1]. This could be added as _locale._lc_codepage_func. [1] https://docs.microsoft.com/en-us/cpp/c-runtime-library/lc-codepage-func?view=vs-2019 ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 12 23:46:07 2019 From: report at bugs.python.org (Tim Peters) Date: Thu, 13 Jun 2019 03:46:07 +0000 Subject: [issue37257] obmalloc: stop simple arena thrashing In-Reply-To: <1560372931.23.0.979771460507.issue37257@roundup.psfhosted.org> Message-ID: <1560397567.79.0.188398840787.issue37257@roundup.psfhosted.org> Change by Tim Peters : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 00:07:11 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 13 Jun 2019 04:07:11 +0000 Subject: [issue37136] Travis CI: Documentation tests fails with Sphinx 2.1 In-Reply-To: <1559524162.91.0.6239630561.issue37136@roundup.psfhosted.org> Message-ID: <1560398831.68.0.557825703503.issue37136@roundup.psfhosted.org> Ned Deily added the comment: The problem with the duplicate `.. module:: email.message` was fixed about 10 days ago with PR 13742 and backports; the fix adds a :noindex: to the duplicate entry. I'm guessing that people seeing this problem had upgraded to Sphinx 2.1 but had not recently done a rebase of their feature branch to pick up that fix. ---------- nosy: +ned.deily resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 01:04:19 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 13 Jun 2019 05:04:19 +0000 Subject: [issue37216] "Using Python on a Macintosh" chapter of "Python Setup and Usage" doc is out-of-date In-Reply-To: <1560181222.28.0.0831029476518.issue37216@roundup.psfhosted.org> Message-ID: <1560402259.86.0.357277970922.issue37216@roundup.psfhosted.org> Ned Deily added the comment: New changeset 905e19a9bf9afd6439ea44fc6a4f3c8631750d6d by Ned Deily (Makdon) in branch 'master': bpo-37216: update version to 3.9 in mac using document (GH-13966) https://github.com/python/cpython/commit/905e19a9bf9afd6439ea44fc6a4f3c8631750d6d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 01:07:14 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 13 Jun 2019 05:07:14 +0000 Subject: [issue37216] "Using Python on a Macintosh" chapter of "Python Setup and Usage" doc is out-of-date In-Reply-To: <1560181222.28.0.0831029476518.issue37216@roundup.psfhosted.org> Message-ID: <1560402434.59.0.869625179644.issue37216@roundup.psfhosted.org> Ned Deily added the comment: Thanks for contributing the PRs! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 01:11:18 2019 From: report at bugs.python.org (paul j3) Date: Thu, 13 Jun 2019 05:11:18 +0000 Subject: [issue37227] Wrong parse long argument In-Reply-To: <1560243186.93.0.426375916497.issue37227@roundup.psfhosted.org> Message-ID: <1560402678.97.0.844180987838.issue37227@roundup.psfhosted.org> Change by paul j3 : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 02:21:29 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 13 Jun 2019 06:21:29 +0000 Subject: [issue37245] Azure Pipeline 3.8 CI: multiple tests hung and timed out on macOS 10.13 In-Reply-To: <1560340622.3.0.842050597369.issue37245@roundup.psfhosted.org> Message-ID: <1560406889.5.0.920605925337.issue37245@roundup.psfhosted.org> Ned Deily added the comment: FWIW, I tried reproducing with 3.8 at 996e52623af3854552d41751e0c2522bc0a7e84f (the PR 14000 checkin) on both a current 10.14.5 Mojave system and on a 10.13.6 High Sierra system (the version used in the failed Azure test) and did not see any unusual failures. I don't recall seeing a timeout like in test_concurrent_futures, at least recently!, but, if it is due to some race condition, there might be a more significant difference, like number of CPUs available, that might precipitate the failure. I'll leave it up to you, Victor, on whether or how long to leave this issue open but I don't see that there is anything practical to do until it can be reproduced. ---------- title: Azure Pipeline: sick macOS job on Python 3.8? -> Azure Pipeline 3.8 CI: multiple tests hung and timed out on macOS 10.13 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 02:46:14 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 13 Jun 2019 06:46:14 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560408374.66.0.1380788203.issue37250@roundup.psfhosted.org> Jeroen Demeyer added the comment: > This is a terrible idea, FWIW. Please don't do this. Why not? It's a simple pragmatic solution that fixes an actual problem at essentially no cost to CPython. You're right of course that Cython shouldn't set tp_print to 0 on Python 3. But I don't think that's a relevant argument. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 03:01:26 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 13 Jun 2019 07:01:26 +0000 Subject: [issue37247] swap distutils build_ext and build_py commands to allow proper SWIG extension installation In-Reply-To: <1560341496.09.0.819646109086.issue37247@roundup.psfhosted.org> Message-ID: <1560409286.87.0.749612056391.issue37247@roundup.psfhosted.org> Jeroen Demeyer added the comment: > I would argue the sequence doesn't really matter that much for non SWIG packages I don't think that this is correct. Or at least, it's not obvious to me that this is correct. It's not uncommon for projects to extend distutils in various ways and the proposed change may break those packages. Adding a separate build step for SWIG (then the order would be build_swig, build_py, build_ext) would be safer and IMHO also more logical. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 03:01:35 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 13 Jun 2019 07:01:35 +0000 Subject: [issue35070] test_getgrouplist may fail on macOS if user in too many groups In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1560409295.53.0.574769716981.issue35070@roundup.psfhosted.org> Ned Deily added the comment: New changeset 8725c83ed5ca8959195ad8326db99d564a921749 by Ned Deily (Jeffrey Kintscher) in branch 'master': bpo-35070: test_getgrouplist may fail on macOS if too many groups (GH-13071) https://github.com/python/cpython/commit/8725c83ed5ca8959195ad8326db99d564a921749 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 03:01:40 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 07:01:40 +0000 Subject: [issue35070] test_getgrouplist may fail on macOS if user in too many groups In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1560409300.14.0.721242951596.issue35070@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13904 pull_request: https://github.com/python/cpython/pull/14042 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 03:01:57 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 07:01:57 +0000 Subject: [issue35070] test_getgrouplist may fail on macOS if user in too many groups In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1560409317.17.0.949926803213.issue35070@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13905 pull_request: https://github.com/python/cpython/pull/14043 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 03:11:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 07:11:37 +0000 Subject: [issue37259] Missing Doc/whatsnew/3.9.rst file In-Reply-To: <1560396934.21.0.425660499701.issue37259@roundup.psfhosted.org> Message-ID: STINNER Victor added the comment: Thanks Ned! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 03:15:04 2019 From: report at bugs.python.org (Pascal Chambon) Date: Thu, 13 Jun 2019 07:15:04 +0000 Subject: [issue37262] Make unittest assertions staticmethods/classmethods Message-ID: <1560410104.79.0.196722798693.issue37262@roundup.psfhosted.org> New submission from Pascal Chambon : Is there any reasons why assertXXX methods in TestCase are instance methods and not staticmethods/classmethods? Since they (to my knowledge) don't need to access an instance dict, they could be turned into instance-less methods, and thus be usable from other testing frameworks (like pytest, for those who want to use all the power of fixtures and yet benefit from advanced assertions, like Django's TestCase's assertXXX). Am I missing something here? ---------- components: Tests messages: 345463 nosy: pakal priority: normal severity: normal status: open title: Make unittest assertions staticmethods/classmethods type: enhancement versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 03:18:29 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 07:18:29 +0000 Subject: [issue35070] test_getgrouplist may fail on macOS if user in too many groups In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1560410309.41.0.323608613645.issue35070@roundup.psfhosted.org> miss-islington added the comment: New changeset b4c8ef7c67712c6639ee896bf7cb8ca1c204946d by Miss Islington (bot) in branch '3.7': bpo-35070: test_getgrouplist may fail on macOS if too many groups (GH-13071) https://github.com/python/cpython/commit/b4c8ef7c67712c6639ee896bf7cb8ca1c204946d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 03:18:48 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 07:18:48 +0000 Subject: [issue37253] PyCompilerFlags got a new cf_feature_version field In-Reply-To: <1560352501.33.0.419965733273.issue37253@roundup.psfhosted.org> Message-ID: <1560410328.33.0.125121147992.issue37253@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 022ac0a497b668d8b15e34e582a6396ead1a35e1 by Victor Stinner in branch 'master': bpo-37253: Remove PyAST_obj2mod_ex() function (GH-14020) https://github.com/python/cpython/commit/022ac0a497b668d8b15e34e582a6396ead1a35e1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 03:18:56 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 07:18:56 +0000 Subject: [issue37253] PyCompilerFlags got a new cf_feature_version field In-Reply-To: <1560352501.33.0.419965733273.issue37253@roundup.psfhosted.org> Message-ID: <1560410336.45.0.0838832961889.issue37253@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13906 pull_request: https://github.com/python/cpython/pull/14044 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 03:27:27 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 07:27:27 +0000 Subject: [issue35070] test_getgrouplist may fail on macOS if user in too many groups In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1560410847.52.0.314085920514.issue35070@roundup.psfhosted.org> miss-islington added the comment: New changeset c80183e6ca8c0ce834fc6444a71c7f31a3eb05b7 by Miss Islington (bot) in branch '3.8': bpo-35070: test_getgrouplist may fail on macOS if too many groups (GH-13071) https://github.com/python/cpython/commit/c80183e6ca8c0ce834fc6444a71c7f31a3eb05b7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 03:29:59 2019 From: report at bugs.python.org (Roundup Robot) Date: Thu, 13 Jun 2019 07:29:59 +0000 Subject: [issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True In-Reply-To: <1250066038.48.0.373766477997.issue6689@psf.upfronthosting.co.za> Message-ID: <1560410999.3.0.266077717943.issue6689@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +13907 pull_request: https://github.com/python/cpython/pull/14045 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 03:30:06 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 13 Jun 2019 07:30:06 +0000 Subject: [issue35070] test_getgrouplist may fail on macOS if user in too many groups In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1560411006.0.0.729556281148.issue35070@roundup.psfhosted.org> Ned Deily added the comment: Merged for release in 3.8.0b2 and 3.7.4. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 03:30:13 2019 From: report at bugs.python.org (makdon) Date: Thu, 13 Jun 2019 07:30:13 +0000 Subject: [issue36689] docs: os.path.commonpath raises ValueError for different drives In-Reply-To: <1555837758.83.0.507858438764.issue36689@roundup.psfhosted.org> Message-ID: <1560411013.65.0.154320032488.issue36689@roundup.psfhosted.org> makdon added the comment: I create a PR according Windson Yang's suggestion. ---------- keywords: +patch message_count: 4.0 -> 5.0 nosy: +makdon nosy_count: 8.0 -> 9.0 pull_requests: +13908 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14045 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 03:46:15 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 07:46:15 +0000 Subject: [issue37253] PyCompilerFlags got a new cf_feature_version field In-Reply-To: <1560352501.33.0.419965733273.issue37253@roundup.psfhosted.org> Message-ID: <1560411975.21.0.345528870185.issue37253@roundup.psfhosted.org> miss-islington added the comment: New changeset 032bf30643fff49b5595b53f9c1ce5b2cd2df504 by Miss Islington (bot) in branch '3.8': bpo-37253: Remove PyAST_obj2mod_ex() function (GH-14020) https://github.com/python/cpython/commit/032bf30643fff49b5595b53f9c1ce5b2cd2df504 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 03:47:57 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 13 Jun 2019 07:47:57 +0000 Subject: [issue35070] test_getgrouplist may fail on macOS if user in too many groups In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1560412077.21.0.0178042391204.issue35070@roundup.psfhosted.org> Ned Deily added the comment: This issue has roamed quite a bit so it is a little bit difficult to tell what problem(s) have been seen here. But, clearly Jeffrey's PR fixes a real and now reproducible problem so I'm declaring victory and have closed this issue now. Thanks everyonw! I am going to leave Issue33223 open (thanks xtreak!) for further investigation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 03:49:03 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 13 Jun 2019 07:49:03 +0000 Subject: [issue33223] test_posix fails ERRNO 0 In-Reply-To: <1522851219.93.0.682650639539.issue33223@psf.upfronthosting.co.za> Message-ID: <1560412143.63.0.530043562587.issue33223@roundup.psfhosted.org> Ned Deily added the comment: See also the discussion and fix merged in Issue35070. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 03:58:27 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 13 Jun 2019 07:58:27 +0000 Subject: [issue37263] spawn asyncio subprocesses in a thread pool Message-ID: <1560412707.67.0.811242566129.issue37263@roundup.psfhosted.org> New submission from Andrew Svetlov : Subprocess starting can be a long blocking operation, see https://github.com/python-trio/trio/issues/1109 for discussion ---------- messages: 345472 nosy: asvetlov priority: normal severity: normal status: open title: spawn asyncio subprocesses in a thread pool _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 04:20:11 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 13 Jun 2019 08:20:11 +0000 Subject: [issue26180] multiprocessing.util._afterfork_registry leak in threaded environment In-Reply-To: <1453476286.88.0.329468896089.issue26180@psf.upfronthosting.co.za> Message-ID: <1560414011.32.0.0928445728746.issue26180@roundup.psfhosted.org> Jeroen Demeyer added the comment: Why is it that __init__ is called multiple times? I'm just wondering if we could somehow ensure that __init__ is called only once. ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 04:21:40 2019 From: report at bugs.python.org (Massimo Fidanza) Date: Thu, 13 Jun 2019 08:21:40 +0000 Subject: [issue37264] Python 3.7.3 win 64bit - unresolved external symbol PyOS_AfterFork_Child Message-ID: <1560414100.26.0.196764764517.issue37264@roundup.psfhosted.org> New submission from Massimo Fidanza : I need to build mod_wsgi under Windows 10 64bit, but I get a linking error mod_wsgi.obj : error LNK2001: unresolved external symbol PyOS_AfterFork_Child build\lib.win-amd64-3.7\mod_wsgi\server\mod_wsgi.cp37-win_amd64.pyd : fatal error LNK1120: 1 unresolved externals error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1120 I checked my installation and found that inside include\intrcheck.h, PyOS_AfterFork_Child is declared, but if I run dumpbin /exports on libs\* (libpython37.a, python3.lib and python37.lib) there is only PyOS_AfterFork exported, and not PyOS_AfterFork_Child, PyOS_AfterFork_Parent and PyOS_BeforeFork. I have installed Python3.7.3 using "Windows x86-64 executable installer" (python-3.7.3-amd64.exe) downloaded from python.org ---------- components: Library (Lib) messages: 345474 nosy: Massimo Fidanza priority: normal severity: normal status: open title: Python 3.7.3 win 64bit - unresolved external symbol PyOS_AfterFork_Child type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 04:24:46 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 13 Jun 2019 08:24:46 +0000 Subject: [issue37264] Python 3.7.3 win 64bit - unresolved external symbol PyOS_AfterFork_Child In-Reply-To: <1560414100.26.0.196764764517.issue37264@roundup.psfhosted.org> Message-ID: <1560414286.64.0.060239946459.issue37264@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 04:43:56 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 13 Jun 2019 08:43:56 +0000 Subject: [issue37262] Make unittest assertions staticmethods/classmethods In-Reply-To: <1560410104.79.0.196722798693.issue37262@roundup.psfhosted.org> Message-ID: <1560415436.3.0.493409195822.issue37262@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: See also issue19645 which seems to be a slightly related discussion ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 04:44:34 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 13 Jun 2019 08:44:34 +0000 Subject: [issue37262] Make unittest assertions staticmethods/classmethods In-Reply-To: <1560410104.79.0.196722798693.issue37262@roundup.psfhosted.org> Message-ID: <1560415474.21.0.740882581984.issue37262@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- components: +Library (Lib) -Tests nosy: +ezio.melotti, michael.foord, rbcollins versions: -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 04:48:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 08:48:58 +0000 Subject: [issue37265] Memory leaks regression caused by: Fix threading._shutdown() race condition Message-ID: <1560415738.53.0.302497815956.issue37265@roundup.psfhosted.org> New submission from STINNER Victor : https://buildbot.python.org/all/#/builders/189/builds/60 Examples: test_ssl leaked [3, 3, 3] references, sum=9 test_ssl leaked [3, 3, 3] memory blocks, sum=9 test_decimal leaked [4, 4, 4] references, sum=12 test_decimal leaked [4, 4, 4] memory blocks, sum=12 test_httplib leaked [1, 1, 1] references, sum=3 test_httplib leaked [1, 1, 1] memory blocks, sum=3 test_multiprocessing_fork leaked [27, 27, 27] references, sum=81 test_multiprocessing_fork leaked [27, 27, 27] memory blocks, sum=81 test_multiprocessing_forkserver leaked [27, 27, 27] references, sum=81 test_multiprocessing_forkserver leaked [27, 27, 27] memory blocks, sum=81 test_socketserver leaked [15, 15, 15] references, sum=45 test_socketserver leaked [15, 15, 15] memory blocks, sum=45 test_capi leaked [17, 17, 17] references, sum=51 test_capi leaked [17, 17, 17] memory blocks, sum=51 test_smtplib leaked [47, 47, 47] references, sum=141 test_smtplib leaked [47, 47, 47] memory blocks, sum=141 test_io leaked [23254, 23250, 23254] references, sum=69758 test_io leaked [7703, 7701, 7703] memory blocks, sum=23107 test_pickle leaked [6, 6, 6] references, sum=18 test_pickle leaked [6, 6, 6] memory blocks, sum=18 test_httpservers leaked [43, 43, 43] references, sum=129 test_httpservers leaked [43, 43, 43] memory blocks, sum=129 test_nntplib leaked [1, 1, 1] references, sum=3 test_nntplib leaked [1, 1, 1] memory blocks, sum=3 test_os leaked [5, 5, 5] references, sum=15 test_os leaked [5, 5, 5] memory blocks, sum=15 test_subprocess leaked [4, 4, 4] references, sum=12 test_subprocess leaked [4, 4, 4] memory blocks, sum=12 test_socket leaked [7, 7, 7] references, sum=21 test_socket leaked [7, 7, 7] memory blocks, sum=21 test_multiprocessing_spawn leaked [27, 27, 27] references, sum=81 test_multiprocessing_spawn leaked [27, 27, 27] memory blocks, sum=81 test_concurrent_futures leaked [3, 3, 3] references, sum=9 test_concurrent_futures leaked [3, 3, 3] memory blocks, sum=9 test_asyncio leaked [62, 62, 62] references, sum=186 test_asyncio leaked [62, 62, 62] memory blocks, sum=186 I used git bisect and I found... my own change :-) commit 468e5fec8a2f534f1685d59da3ca4fad425c38dd Author: Victor Stinner Date: Thu Jun 13 01:30:17 2019 +0200 bpo-36402: Fix threading._shutdown() race condition (GH-13948) Fix a race condition at Python shutdown when waiting for threads. Wait until the Python thread state of all non-daemon threads get deleted (join all non-daemon threads), rather than just wait until Python threads complete. * Add threading._shutdown_locks: set of Thread._tstate_lock locks of non-daemon threads used by _shutdown() to wait until all Python thread states get deleted. See Thread._set_tstate_lock(). * Add also threading._shutdown_locks_lock to protect access to threading._shutdown_locks. * Add test_finalization_shutdown() test. ---------- components: Library (Lib) messages: 345476 nosy: vstinner priority: normal severity: normal status: open title: Memory leaks regression caused by: Fix threading._shutdown() race condition versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 04:58:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 08:58:13 +0000 Subject: [issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1560416292.98.0.981289705483.issue36402@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13909 pull_request: https://github.com/python/cpython/pull/14047 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 04:59:39 2019 From: report at bugs.python.org (Robert Collins) Date: Thu, 13 Jun 2019 08:59:39 +0000 Subject: [issue19645] decouple unittest assertions from the TestCase class In-Reply-To: <1384785494.56.0.149196031493.issue19645@psf.upfronthosting.co.za> Message-ID: <1560416379.4.0.196907326158.issue19645@roundup.psfhosted.org> Robert Collins added the comment: Sorry for the slow reply here; There are API breaks involved in any decoupling that involves the exception raising because of the failureException attribute. Something with signalling that can be adapted by other test suites etc might have merit, but I think we are lacking a clear use case for doing this to the existing exceptions. Setting up a way for new things to be more easily used by users of other test frameworks is quite attractive; perhaps just writing them as separate functions with an adapter to failureException would be sufficient. ---------- versions: +Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 05:00:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 09:00:09 +0000 Subject: [issue37265] Memory leaks regression caused by: Fix threading._shutdown() race condition In-Reply-To: <1560415738.53.0.302497815956.issue37265@roundup.psfhosted.org> Message-ID: <1560416409.04.0.587862586668.issue37265@roundup.psfhosted.org> STINNER Victor added the comment: Oh. It's a stupid bug: will be fixed by PR 14047. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 05:02:03 2019 From: report at bugs.python.org (Robert Collins) Date: Thu, 13 Jun 2019 09:02:03 +0000 Subject: [issue37262] Make unittest assertions staticmethods/classmethods In-Reply-To: <1560410104.79.0.196722798693.issue37262@roundup.psfhosted.org> Message-ID: <1560416523.46.0.674455051522.issue37262@roundup.psfhosted.org> Robert Collins added the comment: I think this is strictly redundant with that other ticket and I'm going to close it. That said, they need access to self.failureException. https://docs.python.org/3/library/unittest.html#unittest.TestCase.failureException ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 05:15:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 09:15:11 +0000 Subject: [issue35070] test_getgrouplist may fail on macOS if user in too many groups In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1560417311.74.0.766768348133.issue35070@roundup.psfhosted.org> STINNER Victor added the comment: > clearly Jeffrey's PR fixes a real and now reproducible problem so I'm declaring victory and have closed this issue now. Thanks everyone! Well done Jeffrey Kintscher! The test was failing randomly for years, I recall many bugs and many people complaining, but nobody succeeded to come up with a fix. Note: this off-by-one looks magic to me, but I'm happy that it works :-) /* * NGROUPS_MAX is defined by POSIX.1 as the maximum * number of supplimental groups a users can belong to. * We have to increment it by one because * getgrouplist() returns both the supplemental groups * and the primary group, i.e. all of the groups the * user belongs to. */ ngroups = 1 + MAX_GROUPS; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 05:20:50 2019 From: report at bugs.python.org (Pascal Chambon) Date: Thu, 13 Jun 2019 09:20:50 +0000 Subject: [issue37262] Make unittest assertions staticmethods/classmethods In-Reply-To: <1560410104.79.0.196722798693.issue37262@roundup.psfhosted.org> Message-ID: <1560417650.5.0.94696731713.issue37262@roundup.psfhosted.org> Pascal Chambon added the comment: Indeed I missed this ticket, thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 05:26:50 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 13 Jun 2019 09:26:50 +0000 Subject: [issue37231] Optimize calling special methods In-Reply-To: <1560258460.83.0.570346812053.issue37231@roundup.psfhosted.org> Message-ID: <1560418010.56.0.0872040328771.issue37231@roundup.psfhosted.org> Inada Naoki added the comment: New changeset b4b814b3988abf69f07f8492d82e855c51b2a75d by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-37231: optimize calls of special methods (GH-13973) https://github.com/python/cpython/commit/b4b814b3988abf69f07f8492d82e855c51b2a75d ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 05:28:55 2019 From: report at bugs.python.org (Pascal Chambon) Date: Thu, 13 Jun 2019 09:28:55 +0000 Subject: [issue19645] decouple unittest assertions from the TestCase class In-Reply-To: <1384785494.56.0.149196031493.issue19645@psf.upfronthosting.co.za> Message-ID: <1560418135.51.0.216239411499.issue19645@roundup.psfhosted.org> Pascal Chambon added the comment: (Redirected here from https://bugs.python.org/issue37262) I haven't dug the assertThat() idea, but why not make, as a first step, turn assertion methods in TestCase to staticmethods/classmethods, instead of instance methods? Since they (to my knowledge) don't need to access an instance dict, they could be turned into such instance-less methods, and thus be usable from other testing frameworks (like pytest, for those who want to use pytest fixtures and yet benefit from advanced assertions like Django's TestCase's assertions). "failureException" and others are meant to be (sub)class attributes, so no backwards incompatible change should occur (unless someone did really weird things with manually instantiated TestCases). ---------- nosy: +pakal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 05:30:53 2019 From: report at bugs.python.org (Michael Foord) Date: Thu, 13 Jun 2019 09:30:53 +0000 Subject: [issue19645] decouple unittest assertions from the TestCase class In-Reply-To: <1384785494.56.0.149196031493.issue19645@psf.upfronthosting.co.za> Message-ID: <1560418253.98.0.0270044389225.issue19645@roundup.psfhosted.org> Michael Foord added the comment: Has anyone seen any real world use cases for failureException? It's a real hindrance to a whole bunch of changes sounds decoupling. On the other hand something like assertThat could catch a custom exception from the matchers (subclass of AssertionError) and raise failureException ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 05:36:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 09:36:05 +0000 Subject: [issue37266] Daemon threads must be forbidden in subinterpreters Message-ID: <1560418565.72.0.288239825756.issue37266@roundup.psfhosted.org> New submission from STINNER Victor : Py_EndInterpreter() calls threading._shutdown() which waits for non-daemon threads spawned in the subinterpreters. Problem: daemon threads continue to run after threading._shutdown(), but they rely on an interpreter which is being finalized and then deleted. Attached example shows the problem: $ ./python subinterp_daemon_thread.py hello from daemon thread Fatal Python error: Py_EndInterpreter: not the last thread Current thread 0x00007f13e5926740 (most recent call first): File "subinterp_daemon_thread.py", line 23 in Aborted (core dumped) Catching the bug in Py_EndInterpreter() is too late. IMHO we must simply deny daemon threads by design in subinterpreters for safety. In the main interpreter, we provide best effort to prevent crash at exit, but IMHO the implementation is ugly :-( ceval.c uses exit_thread_if_finalizing(): it immediately exit the current daemon thread if the threads attempts to acquire or release the GIL, whereas the interpreter is gone. Problem: we cannot release/clear some data structure at Python exit because of that. So Py_Finalize() may leak some memory by design, because of daemon threads. IMHO we can be way stricter in subinterpreters. I suggest to only modify Python 3.9. ---------- components: Interpreter Core files: subinterp_daemon_thread.py messages: 345485 nosy: vstinner priority: normal severity: normal status: open title: Daemon threads must be forbidden in subinterpreters versions: Python 3.9 Added file: https://bugs.python.org/file48417/subinterp_daemon_thread.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 05:39:16 2019 From: report at bugs.python.org (Michael Felt) Date: Thu, 13 Jun 2019 09:39:16 +0000 Subject: [issue28009] core logic of uuid.getnode() is broken for netstat In-Reply-To: <1473290315.48.0.840701308825.issue28009@psf.upfronthosting.co.za> Message-ID: <1560418756.79.0.480626600733.issue28009@roundup.psfhosted.org> Michael Felt added the comment: I have modified - _NODE_GETTERS_WIN32 = [_windll_getnode, _netbios_getnode, _ipconfig_getnode] _NODE_GETTERS_UNIX = [_unix_getnode, _ifconfig_getnode, _ip_getnode, _arp_getnode, _lanscan_getnode, _netstat_getnode] to: +683 # _OS_GETTERS, when known, are targetted for a specific OS or platform. +684 # The order is by 'common practice' on the specified platform. +685 # Note: 'posix' and 'windows' _OS_GETTERS are prefixed by a dll/dlload() method +686 # which, when successful, means none of these "external" methods are called. +687 # _GETTERS is (also) used by test_uuid.py to SkipUnless(), e.g., +688 # @unittest.skipUnless(_uuid._ifconfig_getnode in _uuid._GETTERS, ...) +689 if _LINUX: +690 _OS_GETTERS = [_ip_getnode, _ifconfig_getnode] +691 elif _DARWIN: +692 _OS_GETTERS = [_ifconfig_getnode, _arp_getnode, _netstat_getnode] +693 elif _WINDOWS: +694 _OS_GETTERS = [_netbios_getnode, _ipconfig_getnode] +695 elif _AIX: +696 _OS_GETTERS = [_netstat_getnode] +697 else: +698 _OS_GETTERS = [_ifconfig_getnode, _ip_getnode, _arp_getnode, +699 _netstat_getnode, _lanscan_getnode] +700 if os.name == 'posix': +701 _GETTERS = [_unix_getnode] + _OS_GETTERS +702 elif os.name == 'nt': +703 _GETTERS = [_windll_getnode] + _OS_GETTERS +704 else: +705 _GETTERS = _OS_GETTERS The shortened list, and in particular the move of _ip_getnode before _ifconfig_getnode is my experience that the "old" programs such as ifconfig, arp, and netstat are (occasionally) not available - with "ip" being the replacement for all. Further, re: linux, on the two distros I could test (centos and debian) neither arp nor netstat return a (useable) MACADDR aka "node" value. Requesting verification from people with other platforms. Also, would like to know specifics for other platforms (e.g., OpenBSD, HPUX, Solaris). More generally speaking - if os.name is "posix" or "windows" - this lists are almost irrelevant because the "DLL" _uuid module should provide the needed value. The "plus" is that on systems that audit such things, there are fewer calls to non-existent programs and/or negative side-effects from calling programs that can/do not provide any useful data. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 05:39:29 2019 From: report at bugs.python.org (Michael Felt) Date: Thu, 13 Jun 2019 09:39:29 +0000 Subject: [issue28009] core logic of uuid.getnode() is broken for netstat In-Reply-To: <1473290315.48.0.840701308825.issue28009@psf.upfronthosting.co.za> Message-ID: <1560418769.89.0.211731817112.issue28009@roundup.psfhosted.org> Change by Michael Felt : ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 05:42:35 2019 From: report at bugs.python.org (Ma Lin) Date: Thu, 13 Jun 2019 09:42:35 +0000 Subject: [issue21872] LZMA library sometimes fails to decompress a file In-Reply-To: <1403720935.87.0.990494824612.issue21872@psf.upfronthosting.co.za> Message-ID: <1560418955.16.0.219793610642.issue21872@roundup.psfhosted.org> Change by Ma Lin : ---------- pull_requests: +13910 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14048 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 05:50:01 2019 From: report at bugs.python.org (Pascal Chambon) Date: Thu, 13 Jun 2019 09:50:01 +0000 Subject: [issue19645] decouple unittest assertions from the TestCase class In-Reply-To: <1384785494.56.0.149196031493.issue19645@psf.upfronthosting.co.za> Message-ID: <1560419401.29.0.138239180994.issue19645@roundup.psfhosted.org> Pascal Chambon added the comment: I don't get it, why would failureException block anything ? The unittest.TestCase API must remain the same anyway, but it could become just a wrapper towards external assertions. For example : class TestCase: assertEqual = wrap(assertions.assert_equal) Where "wrap" for example is some kind of functools.partial() injecting into external assertions a parameter "failure_exception_class". Having all these external assertions take such a parameter (defaulting to AssertionError) would be a great plus for adaptability anyway. ---------- versions: +Python 3.5 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 05:51:04 2019 From: report at bugs.python.org (Michael Felt) Date: Thu, 13 Jun 2019 09:51:04 +0000 Subject: [issue28009] core logic of uuid.getnode() needs refresh In-Reply-To: <1473290315.48.0.840701308825.issue28009@psf.upfronthosting.co.za> Message-ID: <1560419464.11.0.406750152627.issue28009@roundup.psfhosted.org> Michael Felt added the comment: p.s. - changed the title: way back when I first started on this I was mainly concerned that the _netstat_getnode() routine was broken for AIX. During the research and follow-up discussions it has become clear that it is more than just an AIX issue. There are multiple aspects that need attention. Footnote: For most platforms, most of the data accessed via Lib/uuid is actually retrieved via Modules/_uuid. The majority of issues with Lib/uuid occur during testing: ./python -m test test_uuid At least two PR (8672 - fix bug for AIX), (12777 - make "_getters" lists platform specific when possible). FYI: the first PR (5183) was when I was trying to patch multiple issues. ---------- title: core logic of uuid.getnode() is broken for netstat -> core logic of uuid.getnode() needs refresh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 05:51:07 2019 From: report at bugs.python.org (hai shi) Date: Thu, 13 Jun 2019 09:51:07 +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: <1560419467.27.0.874722256313.issue18299@roundup.psfhosted.org> hai shi added the comment: spawn_python in script_helper is good enough, so this bug looks like cloud be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 06:01:27 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 13 Jun 2019 10:01:27 +0000 Subject: [issue37258] Logging cache not cleared properly when setting level In-Reply-To: <1560376108.37.0.126278550075.issue37258@roundup.psfhosted.org> Message-ID: <1560420087.63.0.880956683612.issue37258@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: A unittest patch for this issue. This occurs in master and 3.8 too. diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index 50148dc2f2..30fd9ee37a 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -4172,6 +4172,27 @@ class ModuleLevelMiscTest(BaseTest): logging.setLoggerClass(logging.Logger) self.assertEqual(logging.getLoggerClass(), logging.Logger) + def test_subclass_logger_cache(self): + + class MyLogger(logging.getLoggerClass()): + pass + + logger = MyLogger('test') + stream = io.StringIO() + h = logging.StreamHandler(stream) + logger.addHandler(h) + + logger.setLevel(logging.DEBUG) + logger.debug("hello") + self.assertEqual(stream.getvalue().strip(), "hello") + + stream.truncate(0) + stream.seek(0) + + logger.setLevel(logging.INFO) + logger.debug("hello") + self.assertEqual(stream.getvalue(), "") + @support.requires_type_collecting def test_logging_at_shutdown(self): # Issue #20037 ---------- nosy: +xtreak versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 06:03:43 2019 From: report at bugs.python.org (Ma Lin) Date: Thu, 13 Jun 2019 10:03:43 +0000 Subject: [issue21872] LZMA library sometimes fails to decompress a file In-Reply-To: <1403720935.87.0.990494824612.issue21872@psf.upfronthosting.co.za> Message-ID: <1560420223.16.0.41686442479.issue21872@roundup.psfhosted.org> Ma Lin added the comment: I wrote a review guide in PR 14048. ---------- versions: +Python 3.8, Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 06:05:26 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 13 Jun 2019 10:05:26 +0000 Subject: [issue37266] Daemon threads must be forbidden in subinterpreters In-Reply-To: <1560418565.72.0.288239825756.issue37266@roundup.psfhosted.org> Message-ID: <1560420326.7.0.377381766197.issue37266@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 06:06:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 10:06:30 +0000 Subject: [issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1560420390.1.0.631202603584.issue36402@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 6f75c873752a16a7ad8f35855b1e29f59d048e84 by Victor Stinner in branch 'master': tbpo-36402: Fix threading.Thread._stop() (GH-14047) https://github.com/python/cpython/commit/6f75c873752a16a7ad8f35855b1e29f59d048e84 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 06:07:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 10:07:07 +0000 Subject: [issue37266] Daemon threads must be forbidden in subinterpreters In-Reply-To: <1560418565.72.0.288239825756.issue37266@roundup.psfhosted.org> Message-ID: <1560420427.6.0.166491853025.issue37266@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13911 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14049 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 06:07:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 10:07:45 +0000 Subject: [issue37265] Memory leaks regression caused by: Fix threading._shutdown() race condition In-Reply-To: <1560415738.53.0.302497815956.issue37265@roundup.psfhosted.org> Message-ID: <1560420465.87.0.44066070748.issue37265@roundup.psfhosted.org> STINNER Victor added the comment: commit 6f75c873752a16a7ad8f35855b1e29f59d048e84 (HEAD -> master, upstream/master) Author: Victor Stinner Date: Thu Jun 13 12:06:24 2019 +0200 tbpo-36402: Fix threading.Thread._stop() (GH-14047) Remove the _tstate_lock from _shutdown_locks, don't remove None. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 06:11:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 10:11:05 +0000 Subject: [issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1560420665.59.0.171151081615.issue36402@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13912 pull_request: https://github.com/python/cpython/pull/14050 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 06:12:30 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 13 Jun 2019 10:12:30 +0000 Subject: [issue37267] os.dup() creates an inheritable fd when handling a character file on Windows Message-ID: <1560420750.69.0.156424123047.issue37267@roundup.psfhosted.org> New submission from Zackery Spytz : In PR 13739, Eryk Sun mentioned that the Windows implementation of os.dup() returns an inheritable fd when handling a character file. A comment in _Py_dup() makes it seem as though this is due to a belief that handles for character files cannot be made non-inheritable (which is wrong). ---------- components: Extension Modules, Windows messages: 345494 nosy: ZackerySpytz, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: os.dup() creates an inheritable fd when handling a character file on Windows type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 06:19:15 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 13 Jun 2019 10:19:15 +0000 Subject: [issue37267] os.dup() creates an inheritable fd when handling a character file on Windows In-Reply-To: <1560420750.69.0.156424123047.issue37267@roundup.psfhosted.org> Message-ID: <1560421155.25.0.0503182869529.issue37267@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +13913 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14051 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 06:20:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 10:20:32 +0000 Subject: [issue37261] test_io leaks references on AMD64 Fedora Rawhide Refleaks 3.8 In-Reply-To: <1560390190.75.0.577750929769.issue37261@roundup.psfhosted.org> Message-ID: <1560421232.34.0.972488822833.issue37261@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13914 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14052 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 06:33:38 2019 From: report at bugs.python.org (Jeroen van den Hout) Date: Thu, 13 Jun 2019 10:33:38 +0000 Subject: [issue37247] swap distutils build_ext and build_py commands to allow proper SWIG extension installation In-Reply-To: <1560341496.09.0.819646109086.issue37247@roundup.psfhosted.org> Message-ID: <1560422018.69.0.718114959504.issue37247@roundup.psfhosted.org> Jeroen van den Hout added the comment: > Adding a separate build step for SWIG (then the order would be build_swig, build_py, build_ext) would be safer and IMHO also more logical. I like this suggestion and contemplated it. However SWIG interface files are defined in Extension instances, which are inherently tight to the build_ext command. Breaking this link would require introspection of extensions before deciding on which command to invoke, or a completely separate SWIG Extension class, both of which require a change in usage. > It's not uncommon for projects to extend distutils in various ways and the proposed change may break those packages. I argue that those packages are already tempering with default behavior of distutils, while the change I am proposing is fixing a flaw in basic functionality and might I say 'implied behavior' of distutils (as the docs say distutils understands SWIG, while it isn't currently even capable of installing correctly when SWIG files are used). The build_ext and build_py commands are truly separate commands, except when SWIG interface files are used: - build_py is responsible for copying pure python files to their correct directories, potentially compiling them to .pyc files. - build_ext is responsible for compiling and linking C/C++ files and copying resultant files to their correct directories. It is only when SWIG files are supplied that a .py file is produced, which quite neatly would be picked up by build_py, given the chance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 07:02:27 2019 From: report at bugs.python.org (Michael Foord) Date: Thu, 13 Jun 2019 11:02:27 +0000 Subject: [issue19645] decouple unittest assertions from the TestCase class In-Reply-To: <1384785494.56.0.149196031493.issue19645@psf.upfronthosting.co.za> Message-ID: <1560423747.68.0.91538609739.issue19645@roundup.psfhosted.org> Michael Foord added the comment: Suppose failureException is set to TypeError on that TestCase class, how would your assertEquals signal failure to the test runner? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 07:03:45 2019 From: report at bugs.python.org (Michael Foord) Date: Thu, 13 Jun 2019 11:03:45 +0000 Subject: [issue19645] decouple unittest assertions from the TestCase class In-Reply-To: <1384785494.56.0.149196031493.issue19645@psf.upfronthosting.co.za> Message-ID: <1560423825.77.0.58179833746.issue19645@roundup.psfhosted.org> Michael Foord added the comment: Hmm, it could be done by __init_subclass__ potentially. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 07:04:53 2019 From: report at bugs.python.org (Michael Foord) Date: Thu, 13 Jun 2019 11:04:53 +0000 Subject: [issue19645] decouple unittest assertions from the TestCase class In-Reply-To: <1384785494.56.0.149196031493.issue19645@psf.upfronthosting.co.za> Message-ID: <1560423893.01.0.446544879003.issue19645@roundup.psfhosted.org> Michael Foord added the comment: Or even making the assert methods into custom descriptors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 07:11:20 2019 From: report at bugs.python.org (Robert Collins) Date: Thu, 13 Jun 2019 11:11:20 +0000 Subject: [issue19645] decouple unittest assertions from the TestCase class In-Reply-To: <1384785494.56.0.149196031493.issue19645@psf.upfronthosting.co.za> Message-ID: <1560424280.02.0.662536833273.issue19645@roundup.psfhosted.org> Robert Collins added the comment: Right now that attribute could be set by each test separately, or even varied within a test. TBH I'm not sure that the attribute really should be supported; perhaps thinking about breaking the API is worth doing. But - what are we solving for here. The OP here seems interested in using the assertion like things entirely outside of a test context. What would a nice clean API for that be? (Yes I like matchers, but put that aside - if the APIs aren't close enough, lets make sure we do a good job for each audience rather than a compromise..) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 07:42:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 11:42:55 +0000 Subject: [issue20443] __code__. co_filename should always be an absolute path In-Reply-To: <1391048115.83.0.412883752117.issue20443@psf.upfronthosting.co.za> Message-ID: <1560426175.51.0.898647655662.issue20443@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13915 pull_request: https://github.com/python/cpython/pull/14053 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 07:43:48 2019 From: report at bugs.python.org (Pascal Chambon) Date: Thu, 13 Jun 2019 11:43:48 +0000 Subject: [issue19645] decouple unittest assertions from the TestCase class In-Reply-To: <1384785494.56.0.149196031493.issue19645@psf.upfronthosting.co.za> Message-ID: <1560426228.2.0.645981972677.issue19645@roundup.psfhosted.org> Pascal Chambon added the comment: "Suppose failureException is set to TypeError on that TestCase class, how would your assertEquals signal failure to the test runner?" failureException is an artefact from unittest.TestCase. It's only supposed to be used in a TestCase context, with an unittest-compatible runner. If people corrupt it, I guess it's their problem? The point of decoupling is imho that other test runner might use the separate set of assertions. These assertions should raise a sensible default (i.e AssertionError) when encountering troubles, and accepting an alternate class as parameter will allow each test framework to customize the way these assertions behave for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 07:43:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 11:43:55 +0000 Subject: [issue20443] __code__. co_filename should always be an absolute path In-Reply-To: <1391048115.83.0.412883752117.issue20443@psf.upfronthosting.co.za> Message-ID: <1560426235.08.0.159408269828.issue20443@roundup.psfhosted.org> STINNER Victor added the comment: PR 14053 is a different approach than PR 13527: compute the absolute path to the script filename in PyConfig_Read() just after parsing the command line. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 07:44:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 11:44:29 +0000 Subject: [issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1560426269.88.0.436014383262.issue36402@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e40a97a721d46307dfdc2b0322028ccded6eb571 by Victor Stinner in branch '3.8': [3.8] bpo-36402: Fix threading._shutdown() race condition (GH-13948) (GH-14050) https://github.com/python/cpython/commit/e40a97a721d46307dfdc2b0322028ccded6eb571 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 07:45:00 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 11:45:00 +0000 Subject: [issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1560426300.54.0.753715134564.issue36402@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13916 pull_request: https://github.com/python/cpython/pull/14054 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 07:59:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 11:59:02 +0000 Subject: [issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer In-Reply-To: <1560111812.29.0.301182333638.issue37210@roundup.psfhosted.org> Message-ID: <1560427142.51.0.707898128062.issue37210@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 63ab4ba07b492448844940c347787ba30735b7f2 by Victor Stinner in branch 'master': bpo-37210: Fix pure Python pickle when _pickle is unavailable (GH-14016) https://github.com/python/cpython/commit/63ab4ba07b492448844940c347787ba30735b7f2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 07:59:03 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 11:59:03 +0000 Subject: [issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer In-Reply-To: <1560111812.29.0.301182333638.issue37210@roundup.psfhosted.org> Message-ID: <1560427143.7.0.21329595835.issue37210@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch pull_requests: +13917 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/14055 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 08:09:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 12:09:00 +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: <1560427740.1.0.488013793637.issue18299@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 08:11:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 12:11:39 +0000 Subject: [issue37268] Deprecate the parser module Message-ID: <1560427899.74.0.436857498848.issue37268@roundup.psfhosted.org> New submission from STINNER Victor : The parser module should be deprecated as soon as possible according to Pablo Galindo Salgo and Guido van Rossum: * https://mail.python.org/pipermail/python-dev/2019-May/157464.html * https://bugs.python.org/issue37253#msg345398 I propose to deprecate it in Python 3.8: add a note in the documentation and emit a DeprecationWarning on "import parser". ---------- components: Library (Lib) messages: 345504 nosy: vstinner priority: normal severity: normal status: open title: Deprecate the parser module versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 08:12:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 12:12:39 +0000 Subject: [issue37253] PyCompilerFlags got a new cf_feature_version field In-Reply-To: <1560352501.33.0.419965733273.issue37253@roundup.psfhosted.org> Message-ID: <1560427959.38.0.0983683322874.issue37253@roundup.psfhosted.org> STINNER Victor added the comment: > It's fine to document the current state. I don't think you should spend any time *changing* the API to "future-proof" it. Ok. > I am hoping that larger changes to the compiler implementation will happen before Python 4, which will make the whole API moot (including the "parser" module, which should be deprecated ASAP). The compiler is excluded from the ABI for a reason. Aha, that sounds exciting :-) I created bpo-37268 to propose to deprecate the parser module in Python 3.8. -- PyCompilerFlags changes are now documented. I made the small code changes that I wanted to do in 3.8 and master. I close the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 08:16:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 12:16:34 +0000 Subject: [issue37268] Deprecate the parser module In-Reply-To: <1560427899.74.0.436857498848.issue37268@roundup.psfhosted.org> Message-ID: <1560428194.03.0.440115959227.issue37268@roundup.psfhosted.org> STINNER Victor added the comment: I searched for "import parser" in GitHub code search, but I failed to find any project using the Python stdlib parser module. I only found copies of the CPython code source which has on "import parser" in Lib/test/test_parser.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 08:16:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 12:16:50 +0000 Subject: [issue37268] Deprecate the parser module In-Reply-To: <1560427899.74.0.436857498848.issue37268@roundup.psfhosted.org> Message-ID: <1560428210.53.0.334324186724.issue37268@roundup.psfhosted.org> STINNER Victor added the comment: Pablo: Are you interested to implement this change? ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 08:17:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 12:17:00 +0000 Subject: [issue37253] PyCompilerFlags got a new cf_feature_version field In-Reply-To: <1560352501.33.0.419965733273.issue37253@roundup.psfhosted.org> Message-ID: <1560428220.29.0.144356905157.issue37253@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 08:22:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 12:22:25 +0000 Subject: [issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1560428545.34.0.599329867053.issue36402@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 6eb2878e42152e9c45d7ee5e6f889532d753e67c by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-36402: Fix threading._shutdown() race condition (GH-13948) (GH-14050) (GH-14054) https://github.com/python/cpython/commit/6eb2878e42152e9c45d7ee5e6f889532d753e67c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 08:27:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 12:27:13 +0000 Subject: [issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1560428833.2.0.627452789806.issue36402@roundup.psfhosted.org> STINNER Victor added the comment: The bpo-18808 "Thread.join returns before PyThreadState is destroyed" was not fixed in Python 2.7: threading.Thread has no _tstate_lock attribute. I'm not comfortable to backport bpo-18808 "feature" or "bugfix" to Python 2.7, not to backport this change. Python 2.7 works as it is, and it's going to reach its end of life at the end of the year. I guess that people learnt how to work around Python 2.7 limitation like bpo-18808. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 08:28:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 12:28:09 +0000 Subject: [issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly In-Reply-To: <1553296704.08.0.921014854557.issue36402@roundup.psfhosted.org> Message-ID: <1560428889.93.0.539702145544.issue36402@roundup.psfhosted.org> STINNER Victor added the comment: Ok, the root issue (threading._shutdown() race condition) has been fixed in Python 3.7, 3.8 and master branches. I close the issue. Thanks for the reviews! ---------- components: +Library (Lib) -Tests resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 08:28:21 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 12:28:21 +0000 Subject: [issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer In-Reply-To: <1560111812.29.0.301182333638.issue37210@roundup.psfhosted.org> Message-ID: <1560428901.36.0.263791166876.issue37210@roundup.psfhosted.org> miss-islington added the comment: New changeset cbda40db7b604b377acfd3f04e19407ca33748a7 by Miss Islington (bot) in branch '3.8': bpo-37210: Fix pure Python pickle when _pickle is unavailable (GH-14016) https://github.com/python/cpython/commit/cbda40db7b604b377acfd3f04e19407ca33748a7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 08:28:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 12:28:44 +0000 Subject: [issue37210] Pure Python pickle module should not depend on _pickle.PickleBuffer In-Reply-To: <1560111812.29.0.301182333638.issue37210@roundup.psfhosted.org> Message-ID: <1560428924.15.0.693681727437.issue37210@roundup.psfhosted.org> STINNER Victor added the comment: I pushed my change to 3.8 and master branches. I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 08:44:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 12:44:39 +0000 Subject: [issue37267] os.dup() creates an inheritable fd when handling a character file on Windows In-Reply-To: <1560420750.69.0.156424123047.issue37267@roundup.psfhosted.org> Message-ID: <1560429879.0.0.757663486993.issue37267@roundup.psfhosted.org> STINNER Victor added the comment: If you care of inherited handles on Windows, please have a look at: * https://github.com/python/cpython/pull/7827 from https://bugs.python.org/issue18174 * https://github.com/python/cpython/pull/7966 from https://bugs.python.org/issue33966 ref: https://pythondev.readthedocs.io/unstable_tests.html#windows-handles I decided to give up because of multiprocessing race conditions. I failed to fix them. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 08:45:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 12:45:00 +0000 Subject: [issue37261] test_io leaks references on AMD64 Fedora Rawhide Refleaks 3.8 In-Reply-To: <1560390190.75.0.577750929769.issue37261@roundup.psfhosted.org> Message-ID: <1560429900.83.0.967942988667.issue37261@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 6d22cc8e90ccb1e1965b1a4bc79456e2cc1e5a3e by Victor Stinner in branch 'master': bpo-37261: Fix support.catch_unraisable_exception() (GH-14052) https://github.com/python/cpython/commit/6d22cc8e90ccb1e1965b1a4bc79456e2cc1e5a3e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 08:45:28 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 12:45:28 +0000 Subject: [issue37261] test_io leaks references on AMD64 Fedora Rawhide Refleaks 3.8 In-Reply-To: <1560390190.75.0.577750929769.issue37261@roundup.psfhosted.org> Message-ID: <1560429928.68.0.248608373937.issue37261@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13918 pull_request: https://github.com/python/cpython/pull/14056 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 09:22:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 13:22:57 +0000 Subject: [issue36779] time.tzname returns empty string on Windows if default codepage is a Unicode codepage In-Reply-To: <1556844322.34.0.979846087129.issue36779@roundup.psfhosted.org> Message-ID: <1560432177.32.0.278476917927.issue36779@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 0a9baec16c17d261377fb8a31a57d8c397e25af6 by Victor Stinner (Miss Islington (bot)) in branch '3.8': bpo-36779: time.tzname returns empty string on Windows if default cod? (GH-13073) (GH-14032) https://github.com/python/cpython/commit/0a9baec16c17d261377fb8a31a57d8c397e25af6 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 09:23:33 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 13:23:33 +0000 Subject: [issue36779] time.tzname returns empty string on Windows if default codepage is a Unicode codepage In-Reply-To: <1556844322.34.0.979846087129.issue36779@roundup.psfhosted.org> Message-ID: <1560432213.88.0.443285835441.issue36779@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13919 pull_request: https://github.com/python/cpython/pull/14057 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 09:26:04 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 13:26:04 +0000 Subject: [issue37261] test_io leaks references on AMD64 Fedora Rawhide Refleaks 3.8 In-Reply-To: <1560390190.75.0.577750929769.issue37261@roundup.psfhosted.org> Message-ID: <1560432364.37.0.962798875515.issue37261@roundup.psfhosted.org> miss-islington added the comment: New changeset b4f5b212535e75503fc33513676837089037bb48 by Miss Islington (bot) in branch '3.8': bpo-37261: Fix support.catch_unraisable_exception() (GH-14052) https://github.com/python/cpython/commit/b4f5b212535e75503fc33513676837089037bb48 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 09:42:55 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 13:42:55 +0000 Subject: [issue36779] time.tzname returns empty string on Windows if default codepage is a Unicode codepage In-Reply-To: <1556844322.34.0.979846087129.issue36779@roundup.psfhosted.org> Message-ID: <1560433375.57.0.644989604342.issue36779@roundup.psfhosted.org> miss-islington added the comment: New changeset 6a433f5ae63de72a85d20b05ff826c6f72d529b7 by Miss Islington (bot) in branch '3.7': bpo-36779: time.tzname returns empty string on Windows if default cod? (GH-13073) https://github.com/python/cpython/commit/6a433f5ae63de72a85d20b05ff826c6f72d529b7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 09:45:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 13:45:26 +0000 Subject: [issue37261] test_io leaks references on AMD64 Fedora Rawhide Refleaks 3.8 In-Reply-To: <1560390190.75.0.577750929769.issue37261@roundup.psfhosted.org> Message-ID: <1560433526.17.0.434908143248.issue37261@roundup.psfhosted.org> STINNER Victor added the comment: I tested manually "./python -m test test_io -m CBufferedRWPairTest -R 3:3": it failed before the fix, it now pass on 3.8 and master with the fix. I close the issue. Enjoy resurrected objects... ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 10:00:18 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 14:00:18 +0000 Subject: [issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True In-Reply-To: <1250066038.48.0.373766477997.issue6689@psf.upfronthosting.co.za> Message-ID: <1560434418.41.0.562597945385.issue6689@roundup.psfhosted.org> miss-islington added the comment: New changeset 95492032c48fef20b9c7076a23fe7e46927a4688 by Miss Islington (bot) (Makdon) in branch 'master': bpo-6689: os.path.commonpath raises ValueError for different drives isn't documented (GH-14045) https://github.com/python/cpython/commit/95492032c48fef20b9c7076a23fe7e46927a4688 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 10:00:37 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 14:00:37 +0000 Subject: [issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True In-Reply-To: <1250066038.48.0.373766477997.issue6689@psf.upfronthosting.co.za> Message-ID: <1560434437.15.0.580561398909.issue6689@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13920 pull_request: https://github.com/python/cpython/pull/14058 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 10:13:15 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 14:13:15 +0000 Subject: [issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True In-Reply-To: <1250066038.48.0.373766477997.issue6689@psf.upfronthosting.co.za> Message-ID: <1560435195.76.0.549107375227.issue6689@roundup.psfhosted.org> miss-islington added the comment: New changeset ec3839a215a68cf35ff1f90cb6823f67a5abdce3 by Miss Islington (bot) in branch '3.8': bpo-6689: os.path.commonpath raises ValueError for different drives isn't documented (GH-14045) https://github.com/python/cpython/commit/ec3839a215a68cf35ff1f90cb6823f67a5abdce3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 10:23:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 14:23:58 +0000 Subject: [issue37261] test_io leaks references on AMD64 Fedora Rawhide Refleaks 3.8 In-Reply-To: <1560390190.75.0.577750929769.issue37261@roundup.psfhosted.org> Message-ID: <1560435838.94.0.557736593246.issue37261@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13921 pull_request: https://github.com/python/cpython/pull/14059 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 10:30:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 14:30:46 +0000 Subject: [issue20443] __code__. co_filename should always be an absolute path In-Reply-To: <1391048115.83.0.412883752117.issue20443@psf.upfronthosting.co.za> Message-ID: <1560436246.0.0.117652152917.issue20443@roundup.psfhosted.org> STINNER Victor added the comment: One of the side effect of my PR 14053 is that tracebacks are more verbose: the filename is now absolute rather than relative. Currently: $ python3 x.py Traceback (most recent call last): File "x.py", line 4, in func() File "x.py", line 2, in func bug NameError: name 'bug' is not defined With my PR: $ ./python x.py Traceback (most recent call last): File "/home/vstinner/prog/python/master/x.py", line 4, in func() File "/home/vstinner/prog/python/master/x.py", line 2, in func bug NameError: name 'bug' is not defined ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 10:34:32 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 13 Jun 2019 14:34:32 +0000 Subject: [issue37268] Deprecate the parser module In-Reply-To: <1560427899.74.0.436857498848.issue37268@roundup.psfhosted.org> Message-ID: <1560436472.93.0.644758840378.issue37268@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Yep, will make a PR soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 10:51:41 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 13 Jun 2019 14:51:41 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1560437501.5.0.837256035659.issue37111@roundup.psfhosted.org> Steve Dower added the comment: I think Vinay gets to make the call, but I also agree that some sort of error handling by default makes sense for logging. Especially now that it's (about to be) easier to override the default. FWIW, I'd leave the default arguments as None and just coerce it as late as possible, before TextIOWrapper does it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 11:47:23 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 13 Jun 2019 15:47:23 +0000 Subject: [issue26180] multiprocessing.util._afterfork_registry leak in threaded environment In-Reply-To: <1453476286.88.0.329468896089.issue26180@psf.upfronthosting.co.za> Message-ID: <1560440843.61.0.280701194635.issue26180@roundup.psfhosted.org> Terry J. Reedy added the comment: With master and Windows 10, the output looks like (0, 61333912, ): (1, 63524512, . at 0x03CA2940>): (2, 60787504, . at 0x03CA2760>): ProcessLocalSet() (5, 63524512, . at 0x03CA2C60>): ... <8 more lines like the two with ForkAwareLocal.__init__....> I am not familiar with multiprocessing Managers and the doc is not completely clear to me. Does bug3.py only run in one process or does it result in multiple processes? If the latter, I expect it would need an "if __name__ == '__main__':" clause, at least on Windows. (Milan, I should have asked what OS you used, as mp has OS-specific behaviors.) (https://docs.python.org/3/library/multiprocessing.html#the-spawn-and-forkserver-start-methods, Safe importing of main module) ---------- versions: +Python 3.9 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 12:11:27 2019 From: report at bugs.python.org (Jesse Bacon) Date: Thu, 13 Jun 2019 16:11:27 +0000 Subject: [issue37241] Item Count Error in Shelf In-Reply-To: <1560298385.81.0.460821118129.issue37241@roundup.psfhosted.org> Message-ID: <1560442287.73.0.551871269059.issue37241@roundup.psfhosted.org> Jesse Bacon added the comment: I was using anaconda distribution on OSX. It failed for 3.6 and 3.7. I pulled off anaconda and compiled from source and the script executed correctly regardless of whether or not "--enable-optimizations" was set. Anaconda claims to be geared towards scientists so this is alarming. Thank you for your time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 12:13:03 2019 From: report at bugs.python.org (Jesse Bacon) Date: Thu, 13 Jun 2019 16:13:03 +0000 Subject: [issue37241] Item Count Error in Shelf In-Reply-To: <1560298385.81.0.460821118129.issue37241@roundup.psfhosted.org> Message-ID: <1560442383.87.0.263718451774.issue37241@roundup.psfhosted.org> Change by Jesse Bacon : ---------- resolution: -> third party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 12:15:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 16:15:02 +0000 Subject: [issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable In-Reply-To: <1556110680.79.0.127639989845.issue36710@roundup.psfhosted.org> Message-ID: <1560442502.66.0.508210096543.issue36710@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13922 pull_request: https://github.com/python/cpython/pull/14060 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 12:23:15 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 13 Jun 2019 16:23:15 +0000 Subject: [issue37264] Python 3.7.3 win 64bit - unresolved external symbol PyOS_AfterFork_Child In-Reply-To: <1560414100.26.0.196764764517.issue37264@roundup.psfhosted.org> Message-ID: <1560442995.02.0.248499169643.issue37264@roundup.psfhosted.org> Steve Dower added the comment: Windows does not have fork, and so the fork functionality is not built into it (PyOS_AfterFork() is empty). You will need to report this to mod_wsgi to be able to build without fork support. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 12:24:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 16:24:37 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1560443077.18.0.449632192713.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: Two interesting TODO. sysmodule.c: get_xoptions() /* PEP432 TODO: we can reach this if xoptions is NULL in the main * interpreter config. When that happens, we need to properly set * the `xoptions` reference in the main interpreter config as well. * * For Python 3.7, we shouldn't be able to get here due to the * combination of how _PyMainInterpreter_ReadConfig and _PySys_EndInit * work, but we expect 3.8+ to make the _PyMainInterpreter_ReadConfig * call optional for embedding applications, thus making this * reachable again. */ sysmodule.c: get_warnoptions() /* PEP432 TODO: we can reach this if warnoptions is NULL in the main * interpreter config. When that happens, we need to properly set * the `warnoptions` reference in the main interpreter config as well. * * For Python 3.7, we shouldn't be able to get here due to the * combination of how _PyMainInterpreter_ReadConfig and _PySys_EndInit * work, but we expect 3.8+ to make the _PyMainInterpreter_ReadConfig * call optional for embedding applications, thus making this * reachable again. */ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 12:29:52 2019 From: report at bugs.python.org (SilentGhost) Date: Thu, 13 Jun 2019 16:29:52 +0000 Subject: [issue37241] Item Count Error in Shelf In-Reply-To: <1560298385.81.0.460821118129.issue37241@roundup.psfhosted.org> Message-ID: <1560443392.72.0.781311915411.issue37241@roundup.psfhosted.org> Change by SilentGhost : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 12:33:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 16:33:16 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1560443596.04.0.92935251256.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: _PySys_ReadPreInitOptions() code should be moved somewhere closer to PyConfig_Read(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 14:16:26 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 13 Jun 2019 18:16:26 +0000 Subject: [issue37213] Peeephole optimizer does not optimize functions with multiline expressions In-Reply-To: <1560155063.44.0.426038128869.issue37213@roundup.psfhosted.org> Message-ID: <1560449786.94.0.937944308038.issue37213@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 3498c642f4e83f3d8e2214654c0fa8e0d51cebe5 by Pablo Galindo in branch 'master': bpo-37213: Handle negative line deltas correctly in the peephole optimizer (GH-13969) https://github.com/python/cpython/commit/3498c642f4e83f3d8e2214654c0fa8e0d51cebe5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 14:17:04 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 18:17:04 +0000 Subject: [issue37213] Peeephole optimizer does not optimize functions with multiline expressions In-Reply-To: <1560155063.44.0.426038128869.issue37213@roundup.psfhosted.org> Message-ID: <1560449824.1.0.213606275411.issue37213@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13923 pull_request: https://github.com/python/cpython/pull/14063 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 14:30:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 18:30:07 +0000 Subject: [issue37213] Peeephole optimizer does not optimize functions with multiline expressions In-Reply-To: <1560155063.44.0.426038128869.issue37213@roundup.psfhosted.org> Message-ID: <1560450607.38.0.556940891107.issue37213@roundup.psfhosted.org> STINNER Victor added the comment: > The optimization is skipped if lnotab contains 255. It was very uncommon in older versions (only when the function contains very large expressions, larger than hundreds of lines or bytecode instructions), but in 3.8 this situation is common. Do you know why 255 became more common? Is it the side effect if an AST optimization? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 14:36:03 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 18:36:03 +0000 Subject: [issue37213] Peeephole optimizer does not optimize functions with multiline expressions In-Reply-To: <1560155063.44.0.426038128869.issue37213@roundup.psfhosted.org> Message-ID: <1560450963.83.0.615756599392.issue37213@roundup.psfhosted.org> miss-islington added the comment: New changeset 5282b3b1d2e0bdf13899b1616aea20a6e3c4e13e by Miss Islington (bot) in branch '3.8': bpo-37213: Handle negative line deltas correctly in the peephole optimizer (GH-13969) https://github.com/python/cpython/commit/5282b3b1d2e0bdf13899b1616aea20a6e3c4e13e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 14:51:17 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 13 Jun 2019 18:51:17 +0000 Subject: [issue37213] Peeephole optimizer does not optimize functions with multiline expressions In-Reply-To: <1560155063.44.0.426038128869.issue37213@roundup.psfhosted.org> Message-ID: <1560451877.87.0.0449033117685.issue37213@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Should we backport this to 3.7 as well? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 14:56:04 2019 From: report at bugs.python.org (Marius Gedminas) Date: Thu, 13 Jun 2019 18:56:04 +0000 Subject: [issue37269] Python 3.8b1 miscompiles conditional expressions containing __debug__ Message-ID: <1560452164.81.0.0834317425739.issue37269@roundup.psfhosted.org> New submission from Marius Gedminas : Python 3.8 miscompiles the following code: $ cat /tmp/wat.py enable_debug = False if not enable_debug or not __debug__: print("you shall not pass!") $ python3.7 /tmp/wat.py you shall not pass! $ python3.8 /tmp/wat.py (no output is produced.) This is a distilled example from zope.traversing's codebase (https://github.com/zopefoundation/zope.traversing/issues/13). ---------- components: Interpreter Core messages: 345533 nosy: mgedmin priority: normal severity: normal status: open title: Python 3.8b1 miscompiles conditional expressions containing __debug__ versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 15:00:03 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 13 Jun 2019 19:00:03 +0000 Subject: [issue37213] Peeephole optimizer does not optimize functions with multiline expressions In-Reply-To: <1560155063.44.0.426038128869.issue37213@roundup.psfhosted.org> Message-ID: <1560452403.33.0.843982156062.issue37213@roundup.psfhosted.org> Ned Deily added the comment: > Should we backport this to 3.7 as well? Not unless someone can show how this is a major problem in 3.7 and then only if the changes will not introduce any 3.7.x compatibility problems. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 15:01:58 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 13 Jun 2019 19:01:58 +0000 Subject: [issue37213] Peeephole optimizer does not optimize functions with multiline expressions In-Reply-To: <1560155063.44.0.426038128869.issue37213@roundup.psfhosted.org> Message-ID: <1560452518.02.0.967471548835.issue37213@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Not unless someone can show how this is a major problem in 3.7 I would say is not a major problem in 3.7 I will close the issue then. Thanks everyone who participated! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 15:15:00 2019 From: report at bugs.python.org (Brett Cannon) Date: Thu, 13 Jun 2019 19:15:00 +0000 Subject: [issue37130] pathlib.Path.with_name() handles '.' and '..' inconsistently In-Reply-To: <1559438292.33.0.601764456145.issue37130@roundup.psfhosted.org> Message-ID: <1560453300.23.0.868635300203.issue37130@roundup.psfhosted.org> Brett Cannon added the comment: @Antoine: Basically Path.with_name() fails under '.' but works with '..' although with a somewhat odd result. And then after that is the fact that Path('.').name is the empty string but for Path('..').name it's '..' (which is what causes Path('.').with_name() to fail). ---------- title: pathlib does not handle '..' directory -> pathlib.Path.with_name() handles '.' and '..' inconsistently _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 16:00:07 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Thu, 13 Jun 2019 20:00:07 +0000 Subject: [issue37260] shutil.rmtree() FileNotFoundError race condition In-Reply-To: <1560388241.37.0.285109327745.issue37260@roundup.psfhosted.org> Message-ID: <1560456007.35.0.852505186703.issue37260@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- keywords: +patch pull_requests: +13924 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14064 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 16:41:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 20:41:47 +0000 Subject: [issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable In-Reply-To: <1556110680.79.0.127639989845.issue36710@roundup.psfhosted.org> Message-ID: <1560458507.42.0.307579384838.issue36710@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 838f26402de82640698c38ea9d2be65c6cf780d6 by Victor Stinner in branch 'master': bpo-36710: Pass explicitly tstate in sysmodule.c (GH-14060) https://github.com/python/cpython/commit/838f26402de82640698c38ea9d2be65c6cf780d6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 16:42:49 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Jun 2019 20:42:49 +0000 Subject: [issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable In-Reply-To: <1556110680.79.0.127639989845.issue36710@roundup.psfhosted.org> Message-ID: <1560458569.27.0.786262478767.issue36710@roundup.psfhosted.org> STINNER Victor added the comment: I wrote my notes on this issue there: https://pythoncapi.readthedocs.io/runtime.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 17:31:34 2019 From: report at bugs.python.org (Joe Jevnik) Date: Thu, 13 Jun 2019 21:31:34 +0000 Subject: [issue37270] Manage memory lifetime for all type-related objects. Message-ID: <1560461494.72.0.39613394712.issue37270@roundup.psfhosted.org> New submission from Joe Jevnik : When using PyType_FromSpec, the memory for PyType_Spec.name, Py_tp_methods, and Py_tp_members needs to somehow outlive the resulting type. This makes it hard to use this interface to generate types without just leaking the memory for these arrays, which is bad if you are programatically creating short-lived types. I posted about this on capi-sig, and the response seemed to be that it would be to replace the things that currently hold pointers into the array with copies of the data. Remove internal usages of PyMethodDef and PyGetSetDef. For PyMethodDef, change PyCFunctionObject to replace the PyMethodDef* member with a PyCFunctionBase member. The PyCFunctionBase is a new struct to hold the managed values of a PyMethodDef. This type is shared between PyCFunction and the various callable descriptor objects. A PyCFunctionBase is like a PyMethodDef but replaces the char* members with PyObject* members. For PyGetSetDef, inline the members on the resulting PyGetSetDescrObject, replacing all char* members with PyObject* members. The memory for the closure is *not* managed, adding support for that would likely require an API change and can be done in a future change. For the tp_name field, instead of setting it directly to the value of PyType_Spec.name, set it to the result of PyUnicode_AsUTF8(ht_name), where ht_name is the PyUnicode object created from the original spec name. This is the same trick used to properly manage this pointer for heap types when the __name__ is reassigned. ---------- components: Extension Modules messages: 345539 nosy: llllllllll priority: normal severity: normal status: open title: Manage memory lifetime for all type-related objects. versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 17:33:06 2019 From: report at bugs.python.org (Joe Jevnik) Date: Thu, 13 Jun 2019 21:33:06 +0000 Subject: [issue37270] Manage memory lifetime for all type-related objects. In-Reply-To: <1560461494.72.0.39613394712.issue37270@roundup.psfhosted.org> Message-ID: <1560461586.25.0.431674082001.issue37270@roundup.psfhosted.org> Change by Joe Jevnik : ---------- keywords: +patch pull_requests: +13925 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14066 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 18:35:09 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 22:35:09 +0000 Subject: [issue37077] Threading: add builtin TID attribute to Thread objects for AIX In-Reply-To: <1559042935.56.0.899309127578.issue37077@roundup.psfhosted.org> Message-ID: <1560465309.91.0.0602837541732.issue37077@roundup.psfhosted.org> miss-islington added the comment: New changeset d0eeb936d8daf05d7d89f6935e3f4c0dee49c5be by Miss Islington (bot) (Michael Felt) in branch 'master': bpo-37077: Add native thread ID (TID) for AIX (GH-13624) https://github.com/python/cpython/commit/d0eeb936d8daf05d7d89f6935e3f4c0dee49c5be ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 18:35:13 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 22:35:13 +0000 Subject: [issue37077] Threading: add builtin TID attribute to Thread objects for AIX In-Reply-To: <1559042935.56.0.899309127578.issue37077@roundup.psfhosted.org> Message-ID: <1560465313.83.0.547887326712.issue37077@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13926 pull_request: https://github.com/python/cpython/pull/14067 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 18:36:07 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 13 Jun 2019 22:36:07 +0000 Subject: [issue37077] Threading: add builtin TID attribute to Thread objects for AIX In-Reply-To: <1559042935.56.0.899309127578.issue37077@roundup.psfhosted.org> Message-ID: <1560465367.02.0.554596615018.issue37077@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 18:54:12 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 13 Jun 2019 22:54:12 +0000 Subject: [issue37077] Threading: add builtin TID attribute to Thread objects for AIX In-Reply-To: <1559042935.56.0.899309127578.issue37077@roundup.psfhosted.org> Message-ID: <1560466452.49.0.218671861293.issue37077@roundup.psfhosted.org> miss-islington added the comment: New changeset 886d83e5aa8df2dd2e93421d2f614438a3244a1c by Miss Islington (bot) in branch '3.8': bpo-37077: Add native thread ID (TID) for AIX (GH-13624) https://github.com/python/cpython/commit/886d83e5aa8df2dd2e93421d2f614438a3244a1c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 21:38:43 2019 From: report at bugs.python.org (Mark Grandi) Date: Fri, 14 Jun 2019 01:38:43 +0000 Subject: [issue9694] argparse required arguments displayed under "optional arguments" In-Reply-To: <1282846759.11.0.900867962743.issue9694@psf.upfronthosting.co.za> Message-ID: <1560476323.71.0.734801202833.issue9694@roundup.psfhosted.org> Mark Grandi added the comment: Is there anything that can be done to help this issue move along? I just ran into it just now ---------- nosy: +markgrandi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 21:58:30 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 14 Jun 2019 01:58:30 +0000 Subject: [issue37271] Make multiple passes of the peephole optimizer until bytecode cannot be optimized further Message-ID: <1560477510.59.0.491449903314.issue37271@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : The peephole optimizer currently does not optimize the result of its own optimization when its possible. For example, consider the following code: if a: if b: if (c or d): foo() else: bar() else: baz() The bytecode for this is: 2 0 LOAD_GLOBAL 0 (a) 2 POP_JUMP_IF_FALSE 32 4 4 LOAD_GLOBAL 1 (b) 6 POP_JUMP_IF_FALSE 24 5 8 LOAD_GLOBAL 2 (c) 10 POP_JUMP_IF_TRUE 16 6 12 LOAD_GLOBAL 3 (d) 14 POP_JUMP_IF_FALSE 30 7 >> 16 LOAD_GLOBAL 4 (foo) 18 CALL_FUNCTION 0 20 POP_TOP 22 JUMP_ABSOLUTE 38 9 >> 24 LOAD_GLOBAL 5 (bar) 26 CALL_FUNCTION 0 28 POP_TOP >> 30 JUMP_FORWARD 6 (to 38) 11 >> 32 LOAD_GLOBAL 6 (baz) 34 CALL_FUNCTION 0 36 POP_TOP >> 38 LOAD_CONST 0 (None) 40 RETURN_VALUE Notice that the 14 POP_JUMP_IF_FALSE 30 jumps to another jump (30 JUMP_FORWARD 6 (to 38)). If we repeat the optimizations until the resulting bytecode does not change more we get: 2 0 LOAD_GLOBAL 0 (a) 2 POP_JUMP_IF_FALSE 32 4 4 LOAD_GLOBAL 1 (b) 6 POP_JUMP_IF_FALSE 24 5 8 LOAD_GLOBAL 2 (c) 10 POP_JUMP_IF_TRUE 16 6 12 LOAD_GLOBAL 3 (d) 5 14 POP_JUMP_IF_FALSE 38 7 >> 16 LOAD_GLOBAL 4 (foo) 18 CALL_FUNCTION 0 20 POP_TOP 22 JUMP_ABSOLUTE 38 9 >> 24 LOAD_GLOBAL 5 (bar) 26 CALL_FUNCTION 0 28 POP_TOP 30 JUMP_FORWARD 6 (to 38) 11 >> 32 LOAD_GLOBAL 6 (baz) 34 CALL_FUNCTION 0 36 POP_TOP >> 38 LOAD_CONST Notice that in this example the original instruction now is (14 POP_JUMP_IF_FALSE 38). ---------- components: Interpreter Core messages: 345543 nosy: pablogsal priority: normal severity: normal status: open title: Make multiple passes of the peephole optimizer until bytecode cannot be optimized further versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 21:58:49 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 14 Jun 2019 01:58:49 +0000 Subject: [issue37271] Make multiple passes of the peephole optimizer until bytecode cannot be optimized further In-Reply-To: <1560477510.59.0.491449903314.issue37271@roundup.psfhosted.org> Message-ID: <1560477529.57.0.919838020045.issue37271@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +13927 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14068 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 22:00:32 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 14 Jun 2019 02:00:32 +0000 Subject: [issue37271] Make multiple passes of the peephole optimizer until bytecode cannot be optimized further In-Reply-To: <1560477510.59.0.491449903314.issue37271@roundup.psfhosted.org> Message-ID: <1560477632.05.0.19478350288.issue37271@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 23:34:40 2019 From: report at bugs.python.org (Dull Bananas) Date: Fri, 14 Jun 2019 03:34:40 +0000 Subject: [issue37272] pygit2 won't build Message-ID: <1560483280.0.0.881909893602.issue37272@roundup.psfhosted.org> New submission from Dull Bananas : I am not sure if this is an issue with Python or pygit2, but Pyhton 3.8 and 3.9 are unable to build the pygit2 package, and an error with gcc occurs. This is causing errors on my Travis CI build; here is a link where you can see build logs for my project that depends on pygit2: https://travis-ci.org/dullbananas/shellp ---------- components: Extension Modules messages: 345544 nosy: Dull Bananas priority: normal severity: normal status: open title: pygit2 won't build type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 23:39:55 2019 From: report at bugs.python.org (paul j3) Date: Fri, 14 Jun 2019 03:39:55 +0000 Subject: [issue9694] argparse required arguments displayed under "optional arguments" In-Reply-To: <1282846759.11.0.900867962743.issue9694@psf.upfronthosting.co.za> Message-ID: <1560483595.81.0.777330334855.issue9694@roundup.psfhosted.org> paul j3 added the comment: Mark, Have you tried defining your own Argument Group? If that didn't work, what fix do you want? Why? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 23:49:16 2019 From: report at bugs.python.org (Luiz Amaral) Date: Fri, 14 Jun 2019 03:49:16 +0000 Subject: [issue37273] from pickle import rick Message-ID: <1560484156.23.0.547175119772.issue37273@roundup.psfhosted.org> New submission from Luiz Amaral : from pickle import rick print(rick) ---------- components: Library (Lib) messages: 345546 nosy: luxedo priority: normal pull_requests: 13928 severity: normal status: open title: from pickle import rick versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 13 23:49:24 2019 From: report at bugs.python.org (Luiz Amaral) Date: Fri, 14 Jun 2019 03:49:24 +0000 Subject: [issue37273] from pickle import rick In-Reply-To: <1560484156.23.0.547175119772.issue37273@roundup.psfhosted.org> Message-ID: <1560484164.9.0.272963075645.issue37273@roundup.psfhosted.org> Change by Luiz Amaral : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 00:03:29 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 14 Jun 2019 04:03:29 +0000 Subject: [issue37273] from pickle import rick In-Reply-To: <1560484156.23.0.547175119772.issue37273@roundup.psfhosted.org> Message-ID: <1560485009.6.0.0839363658173.issue37273@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Can you please add a description over why you want to include the text in PR as part of pickle and the improvement it provides to the user? ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 00:08:33 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 14 Jun 2019 04:08:33 +0000 Subject: [issue37273] from pickle import rick In-Reply-To: <1560484156.23.0.547175119772.issue37273@roundup.psfhosted.org> Message-ID: <1560485313.48.0.827866272554.issue37273@roundup.psfhosted.org> Steven D'Aprano added the comment: This looks like some sort of spam or joke. There's no explanation given of what this enhancement does, the PR seems to add only a rather suspicious looking triple-quoted string. (Possibly really bad ASCII art of a finger?) In the absence of any meaningful description of what the enhancement is supposed to do, or why it should be added as an enhancement, I'm closing this as Rejected. ---------- nosy: +steven.daprano resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 00:46:37 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Fri, 14 Jun 2019 04:46:37 +0000 Subject: [issue37273] from pickle import rick In-Reply-To: <1560484156.23.0.547175119772.issue37273@roundup.psfhosted.org> Message-ID: <1560487597.78.0.858882103814.issue37273@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: It is Pickle Rick from Rick and Morty. https://en.wikipedia.org/wiki/Pickle_Rick No need to be in python libraries. But you can make your own library on github with this kind of art. :) ---------- nosy: +aldwinaldwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 00:50:52 2019 From: report at bugs.python.org (Hansol Moon) Date: Fri, 14 Jun 2019 04:50:52 +0000 Subject: [issue37274] Scripts folder is empty in python 3.7.3 for windows. Message-ID: <1560487852.05.0.608471969466.issue37274@roundup.psfhosted.org> New submission from Hansol Moon : I downloaded python 3.7.3 which is the latest version of python for windows. And I was going to download Pygame via pip in Python. and I found out that the scripts folder in Python is literally empty. so I was not able to use pip to install Pygame.. I tried reinstalling over and over, but I have kept getting the empty scripts folder. I have no idea how to fix this. ---------- components: Installation messages: 345550 nosy: Hansol Moon priority: normal severity: normal status: open title: Scripts folder is empty in python 3.7.3 for windows. type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 01:10:06 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 14 Jun 2019 05:10:06 +0000 Subject: [issue37274] Scripts folder is empty in python 3.7.3 for windows. In-Reply-To: <1560487852.05.0.608471969466.issue37274@roundup.psfhosted.org> Message-ID: <1560489006.93.0.215687668369.issue37274@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 01:21:05 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 14 Jun 2019 05:21:05 +0000 Subject: [issue37258] Logging cache not cleared properly when setting level In-Reply-To: <1560376108.37.0.126278550075.issue37258@roundup.psfhosted.org> Message-ID: <1560489665.84.0.86365092708.issue37258@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 01:27:43 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 14 Jun 2019 05:27:43 +0000 Subject: [issue37269] Python 3.8b1 miscompiles conditional expressions containing __debug__ In-Reply-To: <1560452164.81.0.0834317425739.issue37269@roundup.psfhosted.org> Message-ID: <1560490063.78.0.441216380327.issue37269@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +13929 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14071 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 01:38:27 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 14 Jun 2019 05:38:27 +0000 Subject: [issue37269] Python 3.8b1 miscompiles conditional expressions containing __debug__ In-Reply-To: <1560452164.81.0.0834317425739.issue37269@roundup.psfhosted.org> Message-ID: <1560490707.93.0.396499061993.issue37269@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 01:46:30 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 14 Jun 2019 05:46:30 +0000 Subject: [issue37275] GetConsole(Output)CP is used even when stdin/stdout is redirected Message-ID: <1560491190.29.0.949105060129.issue37275@roundup.psfhosted.org> New submission from Inada Naoki : When stdout is redirected to file and cp65001 is used, stdout encoding is unexpectable: # Power Shell 6 (use cp65001 by default) PS C:?> python3 -c "print('????')" > ps.txt # cmd.exe C:?> chcp 65001 C:?> python3 -c "print('????')" > cmd.txt Now, ps.txt is encoded by UTF-8, but cmd.txt is encoded by cp932 (ACP). This is because: * TextIOWrapper tries `os.device_encoding(1)` * `os.device_encoding(1)` use GetConsoleOutputCP() without checking stdout is console In the example above, a console is attached when python is called from Power Shell 6, but it is not attached when python is called from cmd.exe. I think using GetConsoleOutputCP() for non console is abusing. --- There is a relating issue: UTF-8 mode doesn't override stdin,stdout,stderr encoding when console is attached. On Unix, os.device_encoding() uses locale encoding and UTF-8 mode overrides locale encoding. Good. But on Windows, os.device_encoding() uses GetConsole(Output)CP(). UTF-8 mode doesn't override it. If we stop abusing GetConsoleOutputCP(), this issue is fixed automatically. But if we keep using GetConsoleOutputCP() for stdout which is not a console, UTF-8 mode should override it. ---------- components: Windows messages: 345551 nosy: inada.naoki, paul.moore, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal status: open title: GetConsole(Output)CP is used even when stdin/stdout is redirected type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 01:55:00 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 14 Jun 2019 05:55:00 +0000 Subject: [issue37269] Python 3.8b1 miscompiles conditional expressions containing __debug__ In-Reply-To: <1560452164.81.0.0834317425739.issue37269@roundup.psfhosted.org> Message-ID: <1560491700.91.0.36282340648.issue37269@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 05f831865545b08c9a21cfb7773af58b76ec64cb by Pablo Galindo in branch 'master': bpo-37269: Correctly optimise conditionals with constant booleans (GH-14071) https://github.com/python/cpython/commit/05f831865545b08c9a21cfb7773af58b76ec64cb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 01:55:26 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Jun 2019 05:55:26 +0000 Subject: [issue37269] Python 3.8b1 miscompiles conditional expressions containing __debug__ In-Reply-To: <1560452164.81.0.0834317425739.issue37269@roundup.psfhosted.org> Message-ID: <1560491726.24.0.78668387655.issue37269@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13930 pull_request: https://github.com/python/cpython/pull/14072 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 01:58:22 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 14 Jun 2019 05:58:22 +0000 Subject: [issue37269] Python 3.8b1 miscompiles conditional expressions containing __debug__ In-Reply-To: <1560452164.81.0.0834317425739.issue37269@roundup.psfhosted.org> Message-ID: <1560491902.38.0.579800816719.issue37269@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +13931 pull_request: https://github.com/python/cpython/pull/14073 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 02:08:05 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Fri, 14 Jun 2019 06:08:05 +0000 Subject: [issue37276] Incorrect number of running calls in ProcessPoolExecutor Message-ID: <1560492485.93.0.0515191207525.issue37276@roundup.psfhosted.org> New submission from G?ry : In the `concurrent.futures` standard module, the number of running calls in a `ProcessPoolExecutor` is `max_workers + 1` (unexpected) instead of `max_workers` (expected) like in a `ThreadingPoolExecutor`. The following code snippet which submits 8 calls to 2 workers in a `ProcessPoolExecutor`: import concurrent.futures import time def call(): while True: time.sleep(1) if __name__ == "__main__": with concurrent.futures.ProcessPoolExecutor(max_workers=2) as executor: futures = [executor.submit(call) for _ in range(8)] for future in futures: print(future.running()) prints this (3 running calls; unexpected since there are 2 workers): > True > True > True > False > False > False > False > False while using a `ThreadPoolExecutor` prints this (2 running calls; expected): > True > True > False > False > False > False > False > False Tested on both Windows 10 and MacOS 10.14. ---------- components: Library (Lib) messages: 345553 nosy: asvetlov, bquinlan, inada.naoki, lukasz.langa, maggyero, ned.deily, pitrou, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Incorrect number of running calls in ProcessPoolExecutor type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 02:13:28 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Jun 2019 06:13:28 +0000 Subject: [issue37269] Python 3.8b1 miscompiles conditional expressions containing __debug__ In-Reply-To: <1560452164.81.0.0834317425739.issue37269@roundup.psfhosted.org> Message-ID: <1560492808.76.0.311775796496.issue37269@roundup.psfhosted.org> miss-islington added the comment: New changeset 7cd581a6bf82309b3c9b9251c54067d442732485 by Miss Islington (bot) in branch '3.8': bpo-37269: Correctly optimise conditionals with constant booleans (GH-14071) https://github.com/python/cpython/commit/7cd581a6bf82309b3c9b9251c54067d442732485 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 02:18:54 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 14 Jun 2019 06:18:54 +0000 Subject: [issue37269] Python 3.8b1 miscompiles conditional expressions containing __debug__ In-Reply-To: <1560452164.81.0.0834317425739.issue37269@roundup.psfhosted.org> Message-ID: <1560493134.59.0.814156533321.issue37269@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 5292179afc6fd0dc533add054d4790773c9766d0 by Pablo Galindo in branch '3.7': [3.7] bpo-37269: Correctly optimise conditionals with constant booleans (GH-14071) (GH-14073) https://github.com/python/cpython/commit/5292179afc6fd0dc533add054d4790773c9766d0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 02:19:13 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 14 Jun 2019 06:19:13 +0000 Subject: [issue37269] Python 3.8b1 miscompiles conditional expressions containing __debug__ In-Reply-To: <1560452164.81.0.0834317425739.issue37269@roundup.psfhosted.org> Message-ID: <1560493153.95.0.396019831188.issue37269@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thanks, Marius for the report! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 02:20:31 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Jun 2019 06:20:31 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences In-Reply-To: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> Message-ID: <1560493231.09.0.888871160269.issue32912@roundup.psfhosted.org> Serhiy Storchaka added the comment: In the particular case of pyparsing there was a bug in the docstring. def sub(self, repl): """ Return Regex with an attached parse action to transform the parsed result as if called using `re.sub(expr, repl, string) `_. Example:: make_html = Regex(r"(\w+):(.*?):").sub(r"<\1>\2") print(make_html.transformString("h1:main title:")) # prints "

main title

" """ \1 and \2 were interpreted as control characters U+0001 and U+0002, so the user could see make_html = Regex(r"(\w+):(.*?):").sub(r"<^A>^B") or make_html = Regex(r"(\w+):(.*?):").sub(r"?") or make_html = Regex(r"(\w+):(.*?):").sub(r"<>") depending on the output device. So this examples proves the usefulness of the new warning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 02:30:26 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 14 Jun 2019 06:30:26 +0000 Subject: [issue37275] GetConsole(Output)CP is used even when stdin/stdout is redirected In-Reply-To: <1560491190.29.0.949105060129.issue37275@roundup.psfhosted.org> Message-ID: <1560493826.09.0.214935747753.issue37275@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 02:36:15 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Jun 2019 06:36:15 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences In-Reply-To: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> Message-ID: <1560494175.1.0.762428746363.issue32912@roundup.psfhosted.org> Serhiy Storchaka added the comment: Aaron, you have reported several different issues in your message: * compiler warnings are emitted only once, therefore it is easy to miss them and hard to reproduce. * warnings for multiline expressions (and multiline string literals in particularly) could be better. * strange output of spaces in some cases. And maybe more. I think all of them deserve opening separate issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 02:36:36 2019 From: report at bugs.python.org (Christoph Reiter) Date: Fri, 14 Jun 2019 06:36:36 +0000 Subject: [issue37272] pygit2 won't build In-Reply-To: <1560483280.0.0.881909893602.issue37272@roundup.psfhosted.org> Message-ID: <1560494196.1.0.249832817333.issue37272@roundup.psfhosted.org> Christoph Reiter added the comment: pygit2 requires libgit2 to build which means you need to install the "libgit2-dev" package through apt. See https://docs.travis-ci.com/user/installing-dependencies/ for how to install packages in your travis-ci setup. The reason it works with stable Python versions is that pygit2 provides pre-built wheels on pypi for those: https://pypi.org/project/pygit2/#files ---------- nosy: +lazka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 02:52:19 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 14 Jun 2019 06:52:19 +0000 Subject: [issue37272] pygit2 won't build In-Reply-To: <1560483280.0.0.881909893602.issue37272@roundup.psfhosted.org> Message-ID: <1560495139.03.0.181525346247.issue37272@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks @lazka for the details. I am closing this as third party issue. ---------- nosy: +xtreak resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 03:05:58 2019 From: report at bugs.python.org (Milan Zamazal) Date: Fri, 14 Jun 2019 07:05:58 +0000 Subject: [issue26180] multiprocessing.util._afterfork_registry leak in threaded environment In-Reply-To: <1453476286.88.0.329468896089.issue26180@psf.upfronthosting.co.za> Message-ID: <1560495958.66.0.0129424965297.issue26180@roundup.psfhosted.org> Milan Zamazal added the comment: I used Linux. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 03:10:34 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Jun 2019 07:10:34 +0000 Subject: [issue37213] Peeephole optimizer does not optimize functions with multiline expressions In-Reply-To: <1560155063.44.0.426038128869.issue37213@roundup.psfhosted.org> Message-ID: <1560496234.31.0.0177439424143.issue37213@roundup.psfhosted.org> Serhiy Storchaka added the comment: > Do you know why 255 became more common? Because the line number is now correctly set for every bytecode instruction. Compare the output in msg345108 for 3.8 with the corresponding output in 3.7: 1 0 BUILD_LIST 0 2 LOAD_FAST 0 (.0) >> 4 FOR_ITER 12 (to 18) 2 6 STORE_FAST 1 (x) 8 LOAD_FAST 1 (x) 10 POP_JUMP_IF_FALSE 4 12 LOAD_FAST 1 (x) 14 LIST_APPEND 2 16 JUMP_ABSOLUTE 4 >> 18 RETURN_VALUE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 04:41:30 2019 From: report at bugs.python.org (Konstantin Enchant) Date: Fri, 14 Jun 2019 08:41:30 +0000 Subject: [issue37277] http.cookies.SimpleCookie does not parse attribute without value (rfc2109) Message-ID: <1560501690.14.0.434114387204.issue37277@roundup.psfhosted.org> New submission from Konstantin Enchant : Very strange case but https://www.ietf.org/rfc/rfc2109.txt (see 4.1 Syntax: General) defines that "= value" is optional for attribute-value pairs for header Cookie. And SimpleCookie fully broken if meets attribute without value, example: ``` >>> from http.cookies import SimpleCookie # all ok >>> SimpleCookie('a=1') # parse fully broken and does not parse not only `test` but `a` too >>> SimpleCookie('test; a=1') # or >>> SimpleCookie('a=1; test; b=2') ``` I think the problem hasn't been noticed for so long because people usually use frameworks, for example, Django parse it correctly because has workaround - https://github.com/django/django/blob/master/django/http/cookie.py#L20. Also Go Lang handle that case too, example - https://play.golang.org/p/y0eFXVq6byK (How can you see Go Lang and Django has different behavior for that case and I think Go Lang more better do it.) The problem seems minor not but aiohttp use SimpleCookie as is (https://github.com/aio-libs/aiohttp/blob/3.5/aiohttp/web_request.py#L482) and if request has that strange cookie value mixed with other normal values - all cookies can not be parsed by aiohttp (just request.cookies is empty). In real world in my web application (based on aiohttp) it fully break authentication for request based on cookies. I hope that will be fixed for SimpleCookie without implement workaround for aiohttp like Django. ---------- messages: 345563 nosy: sirkonst priority: normal severity: normal status: open title: http.cookies.SimpleCookie does not parse attribute without value (rfc2109) versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 05:07:19 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 14 Jun 2019 09:07:19 +0000 Subject: [issue37277] http.cookies.SimpleCookie does not parse attribute without value (rfc2109) In-Reply-To: <1560501690.14.0.434114387204.issue37277@roundup.psfhosted.org> Message-ID: <1560503239.46.0.0308233542698.issue37277@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This could be due to issue22796. See also https://bugs.python.org/issue27828#msg273355. ? cpython git:(master) ? git checkout b1e36073cdde71468efa27e88016aa6dd46f3ec7~1 Lib/http/cookies.py ? cpython git:(master) ? ./python.exe -c 'from http.cookies import SimpleCookie; print(SimpleCookie("a=1; test;"))' # parses a=1 Set-Cookie: a=1 ? cpython git:(master) ? git checkout b1e36073cdde71468efa27e88016aa6dd46f3ec7 Lib/http/cookies.py ? cpython git:(master) ? ./python.exe -c 'from http.cookies import SimpleCookie; print(SimpleCookie("a=1; test;"))' # No value printed ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 05:14:30 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 14 Jun 2019 09:14:30 +0000 Subject: [issue37277] http.cookies.SimpleCookie does not parse attribute without value (rfc2109) In-Reply-To: <1560501690.14.0.434114387204.issue37277@roundup.psfhosted.org> Message-ID: <1560503670.87.0.313731667563.issue37277@roundup.psfhosted.org> SilentGhost added the comment: This was previously reported in #27828 and was introduced by #22796 in order to fix potential security issue. Not every attribute would cause the failure to parse, but only an unusual ones (that is normally occurring "reserved" httponly or secure attributes are handled just fine). I'd propose that a more appropriate course of action would be to stop claiming compliance with RFC 2109 and instead refer to the RFC 6265 as its behaviour is being currently implemented. ---------- nosy: +SilentGhost, pitrou -xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 05:14:43 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 14 Jun 2019 09:14:43 +0000 Subject: [issue37277] http.cookies.SimpleCookie does not parse attribute without value (rfc2109) In-Reply-To: <1560501690.14.0.434114387204.issue37277@roundup.psfhosted.org> Message-ID: <1560503683.53.0.32859654787.issue37277@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 05:49:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 09:49:54 +0000 Subject: [issue37213] Peeephole optimizer does not optimize functions with multiline expressions In-Reply-To: <1560155063.44.0.426038128869.issue37213@roundup.psfhosted.org> Message-ID: <1560505794.78.0.843995565885.issue37213@roundup.psfhosted.org> STINNER Victor added the comment: > Because the line number is now correctly set for every bytecode instruction. That's a great enhancement! Should it be documented in https://docs.python.org/3.8/whatsnew/3.8.html ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 05:51:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 09:51:13 +0000 Subject: [issue37276] Incorrect number of running calls in ProcessPoolExecutor In-Reply-To: <1560492485.93.0.0515191207525.issue37276@roundup.psfhosted.org> Message-ID: <1560505873.83.0.0444975704813.issue37276@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 05:54:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 09:54:38 +0000 Subject: [issue37214] Add new EncodingWarning warning category: emitted when the locale encoding is used implicitly In-Reply-To: <1560163177.73.0.639513289421.issue37214@roundup.psfhosted.org> Message-ID: <1560506078.63.0.369636545217.issue37214@roundup.psfhosted.org> STINNER Victor added the comment: I wrote this issue to discuss https://www.python.org/dev/peps/pep-0597/ but it's unrelated to the implementation of this PEP :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 05:55:44 2019 From: report at bugs.python.org (Rahul Virpara) Date: Fri, 14 Jun 2019 09:55:44 +0000 Subject: [issue37274] Scripts folder is empty in python 3.7.3 for windows. In-Reply-To: <1560487852.05.0.608471969466.issue37274@roundup.psfhosted.org> Message-ID: <1560506144.23.0.958115634326.issue37274@roundup.psfhosted.org> Rahul Virpara added the comment: This happened to me when I used customized option and unticked "pip". I assume you are not doing the same. ---------- nosy: +Rahul Virpara _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 05:56:39 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Fri, 14 Jun 2019 09:56:39 +0000 Subject: [issue25567] shlex.quote doesn't work on bytestrings In-Reply-To: <1446814343.82.0.823951892686.issue25567@psf.upfronthosting.co.za> Message-ID: <1560506199.62.0.439765568631.issue25567@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: Python 3.9.0a0 [GCC 7.3.0] on linux >>> import re >>> find_unsafe_bytes = re.compile(b'[^\w@%+=:,./-]').search :1: SyntaxWarning: invalid escape sequence \w when removing \w, all the tests pass (my regex knowledge is close to None.) "\w stands for "word character". It always matches the ASCII characters [A-Za-z0-9_]" replace \w with A-Za-z0-9_ ?? (all the tests pass) ---------- nosy: +aldwinaldwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 06:19:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 10:19:11 +0000 Subject: [issue37278] test_asyncio: ProactorLoopCtrlC leaks one reference Message-ID: <1560507551.61.0.999190887785.issue37278@roundup.psfhosted.org> New submission from STINNER Victor : vstinner at WIN C:\vstinner\python\master>python -m test -R 3:3 test_asyncio -m test.test_asyncio.test_windows_events.ProactorLoopCtrlC.test_ctrl_c Running Debug|x64 interpreter... Run tests sequentially 0:00:00 load avg: 0.00 [1/1] test_asyncio beginning 6 repetitions 123456 ...... test_asyncio leaked [1, 1, 1] references, sum=3 test_asyncio leaked [2, 1, 1] memory blocks, sum=4 test_asyncio failed == Tests result: FAILURE == 1 test failed: test_asyncio Total duration: 13 sec 391 ms Tests result: FAILURE Attached PR fix the issue by joining the thread. ---------- components: Tests, asyncio messages: 345570 nosy: asvetlov, vstinner, yselivanov priority: normal severity: normal status: open title: test_asyncio: ProactorLoopCtrlC leaks one reference versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 06:21:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 10:21:19 +0000 Subject: [issue37278] test_asyncio: ProactorLoopCtrlC leaks one reference In-Reply-To: <1560507551.61.0.999190887785.issue37278@roundup.psfhosted.org> Message-ID: <1560507679.74.0.546525222283.issue37278@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13932 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14074 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 06:25:04 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 14 Jun 2019 10:25:04 +0000 Subject: [issue37279] asyncio sendfile sends extra data in the last chunk in fallback mode Message-ID: <1560507904.77.0.354970791225.issue37279@roundup.psfhosted.org> New submission from Andrew Svetlov : My fault introduced in 3.7 in initial async sendfile implementation ---------- components: asyncio messages: 345571 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: asyncio sendfile sends extra data in the last chunk in fallback mode type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 06:26:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 10:26:17 +0000 Subject: [issue34520] test_asyncio leaked [2, 2, 2] references, sum=6 in AMD64 Windows8.1 Refleaks 3.7 In-Reply-To: <1535386947.0.0.56676864532.issue34520@psf.upfronthosting.co.za> Message-ID: <1560507977.11.0.190566567802.issue34520@roundup.psfhosted.org> STINNER Victor added the comment: Sadly, without much information, it's hard to guess what leaked nor if the issue has been fixed in the meanwhile. So I close the issue as outdated. I just found a leak in test_asyncio ProactorLoopCtrlC and I proposed a fix: https://bugs.python.org/issue37278 ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 06:26:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 10:26:43 +0000 Subject: [issue37278] test_asyncio: ProactorLoopCtrlC leaks one reference In-Reply-To: <1560507551.61.0.999190887785.issue37278@roundup.psfhosted.org> Message-ID: <1560508003.19.0.237028795661.issue37278@roundup.psfhosted.org> STINNER Victor added the comment: bpo-34520 *might* be an old duplicate of this bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 06:27:13 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 14 Jun 2019 10:27:13 +0000 Subject: [issue37279] asyncio sendfile sends extra data in the last chunk in fallback mode In-Reply-To: <1560507904.77.0.354970791225.issue37279@roundup.psfhosted.org> Message-ID: <1560508033.34.0.631519305043.issue37279@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +13933 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14075 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 06:29:49 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 14 Jun 2019 10:29:49 +0000 Subject: [issue37280] Use threadpool for reading from file for sendfile fallback mode Message-ID: <1560508189.12.0.504777268427.issue37280@roundup.psfhosted.org> New submission from Andrew Svetlov : We use thread pool executor for loop.sock_sendfile(), there is no reason to call blocking code for loop.sendfile() ---------- components: asyncio messages: 345574 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Use threadpool for reading from file for sendfile fallback mode type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 06:32:04 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 14 Jun 2019 10:32:04 +0000 Subject: [issue37280] Use threadpool for reading from file for sendfile fallback mode In-Reply-To: <1560508189.12.0.504777268427.issue37280@roundup.psfhosted.org> Message-ID: <1560508324.05.0.894603074976.issue37280@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +13934 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14076 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 06:32:18 2019 From: report at bugs.python.org (=?utf-8?b?0JLQsNC70LXQvdGC0LjQvSDQkdGD0YDRh9C10L3Rjw==?=) Date: Fri, 14 Jun 2019 10:32:18 +0000 Subject: [issue37281] asyncio Task._fut_waiter done callback Message-ID: <1560508338.36.0.821334369353.issue37281@roundup.psfhosted.org> New submission from ???????? ??????? : Future has a done_callback, but Task not, why ? Is a safe to use Task._fut_waiter future done_callback? ---------- messages: 345575 nosy: ???????? ??????? priority: normal severity: normal status: open title: asyncio Task._fut_waiter done callback type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 06:37:19 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 14 Jun 2019 10:37:19 +0000 Subject: [issue37249] Missing declaration of _PyObject_GetMethod In-Reply-To: <1560344083.09.0.0843105430865.issue37249@roundup.psfhosted.org> Message-ID: <1560508639.72.0.328389985524.issue37249@roundup.psfhosted.org> Inada Naoki added the comment: New changeset b2f94730d947f25b8507c5f76202e917683e76f7 by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-37249: add declaration of _PyObject_GetMethod (GH-14015) https://github.com/python/cpython/commit/b2f94730d947f25b8507c5f76202e917683e76f7 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 06:37:37 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 14 Jun 2019 10:37:37 +0000 Subject: [issue37249] Missing declaration of _PyObject_GetMethod In-Reply-To: <1560344083.09.0.0843105430865.issue37249@roundup.psfhosted.org> Message-ID: <1560508657.21.0.365051731309.issue37249@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 06:38:02 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 14 Jun 2019 10:38:02 +0000 Subject: [issue37281] asyncio Task._fut_waiter done callback In-Reply-To: <1560508338.36.0.821334369353.issue37281@roundup.psfhosted.org> Message-ID: <1560508682.95.0.97135517916.issue37281@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- components: +asyncio nosy: +asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 06:40:27 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 14 Jun 2019 10:40:27 +0000 Subject: [issue28805] Add documentation for METH_FASTCALL and _PyObject_FastCall*() In-Reply-To: <1480158534.61.0.510309261592.issue28805@psf.upfronthosting.co.za> Message-ID: <1560508827.7.0.955888044882.issue28805@roundup.psfhosted.org> Jeroen Demeyer added the comment: Victor, of the four functions you mentioned: - _PyObject_FastCallDict: documented by PEP 590 - _PyObject_FastCallKeywords: renamed _PyObject_Vectorcall and documented by PEP 590 - _PyObject_FastCall: not sure if it's useful enough (just use _PyObject_Vectorcall with kwnames=NULL) - _PyObject_CallNoArg: see #37194 So that leaves documenting METH_FASTCALL. ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 06:44:26 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 14 Jun 2019 10:44:26 +0000 Subject: [issue37281] asyncio Task._fut_waiter done callback In-Reply-To: <1560508338.36.0.821334369353.issue37281@roundup.psfhosted.org> Message-ID: <1560509066.12.0.926618401815.issue37281@roundup.psfhosted.org> Andrew Svetlov added the comment: 1. Task._fut_waiter is a private API, please avoid it 2. Task class is derived from Future, thus it HAS add_done_callback() method. The other question is that from my experience if the application-level code uses add_done_callback() the design is not perfect and error-prone. add_done_callback() is useful for relatively low-level libraries. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 06:46:22 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 14 Jun 2019 10:46:22 +0000 Subject: [issue37278] test_asyncio: ProactorLoopCtrlC leaks one reference In-Reply-To: <1560507551.61.0.999190887785.issue37278@roundup.psfhosted.org> Message-ID: <1560509182.33.0.971881876998.issue37278@roundup.psfhosted.org> Andrew Svetlov added the comment: Maybe. Agree with your decision to close bpo-34520 as duplicate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 07:01:44 2019 From: report at bugs.python.org (=?utf-8?q?Jonat=C3=A3_Bolzan_Loss?=) Date: Fri, 14 Jun 2019 11:01:44 +0000 Subject: [issue37282] os problems on absolute paths containing unicode characters on windows Message-ID: <1560510104.32.0.366432757935.issue37282@roundup.psfhosted.org> New submission from Jonat? Bolzan Loss : If a absolute path is provided for some function on os module, it returns "WinError 3". Example (considering you are on C:\Users\username): import os os.mkdir(u'Exam?pl?') os.listdir(u'C:\\Users\username\Exam?pl?') Result: Traceback (most recent call last): File "", line 1, in FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\username\\Exam?pl?' ---------- components: Windows messages: 345580 nosy: Jonat? Bolzan Loss, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: os problems on absolute paths containing unicode characters on windows versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 07:03:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 11:03:06 +0000 Subject: [issue37278] test_asyncio: ProactorLoopCtrlC leaks one reference In-Reply-To: <1560507551.61.0.999190887785.issue37278@roundup.psfhosted.org> Message-ID: <1560510186.59.0.0553157746938.issue37278@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 07559450b2d9179e4c99e0af088ce7550e549f94 by Victor Stinner in branch 'master': bpo-37278: Fix test_asyncio ProactorLoopCtrlC (GH-14074) https://github.com/python/cpython/commit/07559450b2d9179e4c99e0af088ce7550e549f94 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 07:03:24 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Jun 2019 11:03:24 +0000 Subject: [issue37278] test_asyncio: ProactorLoopCtrlC leaks one reference In-Reply-To: <1560507551.61.0.999190887785.issue37278@roundup.psfhosted.org> Message-ID: <1560510204.65.0.848181924706.issue37278@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13935 pull_request: https://github.com/python/cpython/pull/14077 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 07:04:58 2019 From: report at bugs.python.org (=?utf-8?b?0JLQsNC70LXQvdGC0LjQvSDQkdGD0YDRh9C10L3Rjw==?=) Date: Fri, 14 Jun 2019 11:04:58 +0000 Subject: [issue37281] asyncio Task._fut_waiter done callback In-Reply-To: <1560508338.36.0.821334369353.issue37281@roundup.psfhosted.org> Message-ID: <1560510298.69.0.624595615932.issue37281@roundup.psfhosted.org> ???????? ??????? added the comment: Sorry, you right! But why not set_result and set_exception? My code: waiter_task.add_done_callback(lambda f: f.result()) because i don't wont to store my running tasks in the array but i must query awaiteable for the result. Thank you for a reply. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 07:07:06 2019 From: report at bugs.python.org (Paul Moore) Date: Fri, 14 Jun 2019 11:07:06 +0000 Subject: [issue37282] os problems on absolute paths containing unicode characters on windows In-Reply-To: <1560510104.32.0.366432757935.issue37282@roundup.psfhosted.org> Message-ID: <1560510426.17.0.878653288315.issue37282@roundup.psfhosted.org> Paul Moore added the comment: This works for me on Python 3.7. Can you confirm if you see the problem on 3.7, and if so, provide a more detailed example of how to reproduce? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 07:09:33 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 14 Jun 2019 11:09:33 +0000 Subject: [issue37281] asyncio Task._fut_waiter done callback In-Reply-To: <1560508338.36.0.821334369353.issue37281@roundup.psfhosted.org> Message-ID: <1560510573.55.0.190182418416.issue37281@roundup.psfhosted.org> Andrew Svetlov added the comment: See bpo-32363 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 07:13:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 11:13:33 +0000 Subject: [issue20443] __code__. co_filename should always be an absolute path In-Reply-To: <1391048115.83.0.412883752117.issue20443@psf.upfronthosting.co.za> Message-ID: <1560510813.27.0.459581465553.issue20443@roundup.psfhosted.org> STINNER Victor added the comment: The site module tries to compute the absolute path of __file__ and __cached__ attributes of all modules in sys.modules: def abs_paths(): """Set all module __file__ and __cached__ attributes to an absolute path""" for m in set(sys.modules.values()): if (getattr(getattr(m, '__loader__', None), '__module__', None) not in ('_frozen_importlib', '_frozen_importlib_external')): continue # don't mess with a PEP 302-supplied __file__ try: m.__file__ = os.path.abspath(m.__file__) except (AttributeError, OSError, TypeError): pass try: m.__cached__ = os.path.abspath(m.__cached__) except (AttributeError, OSError, TypeError): pass The __path__ attribute isn't updated. Another approach would be to hack importlib to compute the absolute path before loading a module, rather than trying to fix it *afterwards*. One pratical problem: posixpath and ntpath are not available when importlib is setup, these modules are implemented in pure Python and so must be imported. Maybe importlib could use a naive implementation of os.path.abspath(). Maybe the C function _Py_abspath() that I implemented in PR 14053 should be exposed somehow to importlib as a private function using a builtin module like _imp, so it can be used directly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 07:15:23 2019 From: report at bugs.python.org (=?utf-8?b?0JLQsNC70LXQvdGC0LjQvSDQkdGD0YDRh9C10L3Rjw==?=) Date: Fri, 14 Jun 2019 11:15:23 +0000 Subject: [issue37281] asyncio Task._fut_waiter done callback In-Reply-To: <1560508338.36.0.821334369353.issue37281@roundup.psfhosted.org> Message-ID: <1560510923.55.0.824065561891.issue37281@roundup.psfhosted.org> ???????? ??????? added the comment: Thanks ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 07:33:36 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Jun 2019 11:33:36 +0000 Subject: [issue37278] test_asyncio: ProactorLoopCtrlC leaks one reference In-Reply-To: <1560507551.61.0.999190887785.issue37278@roundup.psfhosted.org> Message-ID: <1560512016.16.0.102802718983.issue37278@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13936 pull_request: https://github.com/python/cpython/pull/14078 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 07:39:24 2019 From: report at bugs.python.org (=?utf-8?q?Jonat=C3=A3_Bolzan_Loss?=) Date: Fri, 14 Jun 2019 11:39:24 +0000 Subject: [issue37282] os problems on absolute paths containing unicode characters on windows In-Reply-To: <1560510104.32.0.366432757935.issue37282@roundup.psfhosted.org> Message-ID: <1560512364.91.0.640046971104.issue37282@roundup.psfhosted.org> Jonat? Bolzan Loss added the comment: You are right, my mistake. Sorry about this and thanks for checking :) . ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 07:52:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 11:52:29 +0000 Subject: [issue35081] Move internal headers to Include/internal/ In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za> Message-ID: <1560513149.39.0.620575100243.issue35081@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13937 pull_request: https://github.com/python/cpython/pull/13890 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 07:53:19 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Jun 2019 11:53:19 +0000 Subject: [issue37278] test_asyncio: ProactorLoopCtrlC leaks one reference In-Reply-To: <1560507551.61.0.999190887785.issue37278@roundup.psfhosted.org> Message-ID: <1560513199.88.0.049433448517.issue37278@roundup.psfhosted.org> miss-islington added the comment: New changeset 8b66dbb212d7dffbf9fb545dad2a3400aead1461 by Miss Islington (bot) in branch '3.8': bpo-37278: Fix test_asyncio ProactorLoopCtrlC (GH-14074) https://github.com/python/cpython/commit/8b66dbb212d7dffbf9fb545dad2a3400aead1461 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 08:05:01 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 14 Jun 2019 12:05:01 +0000 Subject: [issue28805] Add documentation for METH_FASTCALL and _PyObject_FastCall*() In-Reply-To: <1480158534.61.0.510309261592.issue28805@psf.upfronthosting.co.za> Message-ID: <1560513901.41.0.0638906934584.issue28805@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +13938 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14079 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 08:09:47 2019 From: report at bugs.python.org (=?utf-8?q?J=C3=B6rn_Jacobi?=) Date: Fri, 14 Jun 2019 12:09:47 +0000 Subject: [issue37283] Unexpected behavior when running installer a second time with the same arguments or unattend.xml Message-ID: <1560514187.3.0.83059947509.issue37283@roundup.psfhosted.org> New submission from J?rn Jacobi : When executing the installer with arguments or using the unattend.xml to run it without UI as documented in https://python.readthedocs.io/en/stable/using/windows.html#installing-without-ui the installer ignores the arguments or unattend.xml when it's executed again. The second time, the installer (running i modify mode) uses the default values (hereby removing the Prepenpath if set the first time) (testet with version 3.6.6-amd64 to 3.7.3-amd64 of the executable installer) To recreate, run the following : step 1 : python-3.6.6-amd64.exe /passive InstallAllUsers=1 PrependPath=1 Include_doc=0 Include_dev=0 Include_tcltk=0 Include_test=0 SimpleInstall=1 now python is install as expected. step 2 : python-3.6.6-amd64.exe /passive InstallAllUsers=1 PrependPath=1 Include_doc=0 Include_dev=0 Include_tcltk=0 Include_test=0 SimpleInstall=1 even though the options are exactly the same, the installer now removes python from path and installs tcltk, documentation, test and dev. step 3 : python-3.6.6-amd64.exe /passive InstallAllUsers=1 PrependPath=1 Include_doc=0 Include_dev=0 Include_tcltk=0 Include_test=0 SimpleInstall=1 now the installer only makes a quick check, what i would have expected in step 2, but hare only the default values are used. ---------- components: Installation messages: 345589 nosy: J?rn Jacobi priority: normal severity: normal status: open title: Unexpected behavior when running installer a second time with the same arguments or unattend.xml type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 08:15:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 12:15:31 +0000 Subject: [issue37278] test_asyncio: ProactorLoopCtrlC leaks one reference In-Reply-To: <1560507551.61.0.999190887785.issue37278@roundup.psfhosted.org> Message-ID: <1560514531.73.0.260972970566.issue37278@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 08:15:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 12:15:46 +0000 Subject: [issue37278] test_asyncio: ProactorLoopCtrlC leaks one reference In-Reply-To: <1560507551.61.0.999190887785.issue37278@roundup.psfhosted.org> Message-ID: <1560514546.11.0.189555304089.issue37278@roundup.psfhosted.org> STINNER Victor added the comment: Thanks for the review Andrew. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 08:26:35 2019 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 14 Jun 2019 12:26:35 +0000 Subject: [issue37250] C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1560515195.09.0.0584047565667.issue37250@roundup.psfhosted.org> Stefan Behnel added the comment: I agree with Steve that broadly redefining a global name in a widely used header file is not a good idea. You never know what names users have in their code. Yes, you can work around it by undef-ing it again, but honestly, in that case, both sides are hacks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 08:43:46 2019 From: report at bugs.python.org (kev levrone) Date: Fri, 14 Jun 2019 12:43:46 +0000 Subject: [issue12857] Expose called function on frame object In-Reply-To: <1314683667.85.0.876885324202.issue12857@psf.upfronthosting.co.za> Message-ID: <1560516226.0.0.588153930628.issue12857@roundup.psfhosted.org> kev levrone added the comment: def enable_ki_protection(func): func._trio_keyboard_interrupt_protection_enabled = True return func ---------- nosy: +kevlevrone Added file: https://bugs.python.org/file48418/122.pdf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 08:45:06 2019 From: report at bugs.python.org (kev levrone) Date: Fri, 14 Jun 2019 12:45:06 +0000 Subject: [issue26145] [WIP] PEP 511: Add sys.set_code_transformers() In-Reply-To: <1453108257.94.0.438143755637.issue26145@psf.upfronthosting.co.za> Message-ID: <1560516306.27.0.553061815699.issue26145@roundup.psfhosted.org> Change by kev levrone : Added file: https://bugs.python.org/file48419/123.pdf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 08:46:23 2019 From: report at bugs.python.org (Luiz Amaral) Date: Fri, 14 Jun 2019 12:46:23 +0000 Subject: [issue37273] from pickle import rick In-Reply-To: <1560484156.23.0.547175119772.issue37273@roundup.psfhosted.org> Message-ID: <1560516383.15.0.797613895712.issue37273@roundup.psfhosted.org> Luiz Amaral added the comment: It seemed a good idea when I made the PR, now I feel bad for wasting your time ? sorry guys. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 08:49:21 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 14 Jun 2019 12:49:21 +0000 Subject: [issue37283] Unexpected behavior when running installer a second time with the same arguments or unattend.xml In-Reply-To: <1560514187.3.0.83059947509.issue37283@roundup.psfhosted.org> Message-ID: <1560516561.77.0.364684994118.issue37283@roundup.psfhosted.org> Change by SilentGhost : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 09:30:48 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 14 Jun 2019 13:30:48 +0000 Subject: [issue37278] test_asyncio: ProactorLoopCtrlC leaks one reference In-Reply-To: <1560507551.61.0.999190887785.issue37278@roundup.psfhosted.org> Message-ID: <1560519048.05.0.107888891524.issue37278@roundup.psfhosted.org> Andrew Svetlov added the comment: Welcome! Thanks for the fix! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 10:02:14 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 14 Jun 2019 14:02:14 +0000 Subject: [issue37202] Future.cancelled is not set to true immediately after calling Future.cancel In-Reply-To: <1559992040.91.0.159243641871.issue37202@roundup.psfhosted.org> Message-ID: <1560520934.93.0.000287259407927.issue37202@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 10:04:48 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 14 Jun 2019 14:04:48 +0000 Subject: [issue37081] Test with OpenSSL 1.1.1c In-Reply-To: <1559058292.64.0.780398663722.issue37081@roundup.psfhosted.org> Message-ID: <1560521088.83.0.128026874481.issue37081@roundup.psfhosted.org> Andrew Svetlov added the comment: Duplicate of #35998 ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 10:13:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 14:13:43 +0000 Subject: [issue26145] [WIP] PEP 511: Add sys.set_code_transformers() In-Reply-To: <1453108257.94.0.438143755637.issue26145@psf.upfronthosting.co.za> Message-ID: <1560521623.97.0.426972587399.issue26145@roundup.psfhosted.org> Change by STINNER Victor : Removed file: https://bugs.python.org/file48419/123.pdf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 10:14:30 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 14 Jun 2019 14:14:30 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1560521670.57.0.149188088717.issue35998@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +13939 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14080 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 10:33:31 2019 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 14 Jun 2019 14:33:31 +0000 Subject: [issue19865] create_unicode_buffer() fails on non-BMP strings on Windows In-Reply-To: <1386013006.0.0.412572088185.issue19865@psf.upfronthosting.co.za> Message-ID: <1560522811.21.0.864639409407.issue19865@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +13940 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14081 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 10:36:53 2019 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 14 Jun 2019 14:36:53 +0000 Subject: [issue19865] create_unicode_buffer() fails on non-BMP strings on Windows In-Reply-To: <1386013006.0.0.412572088185.issue19865@psf.upfronthosting.co.za> Message-ID: <1560523013.63.0.750301110726.issue19865@roundup.psfhosted.org> Zackery Spytz added the comment: I have created a pull request for this issue. Please take a look. ---------- nosy: +ZackerySpytz versions: +Python 3.9 -Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 10:43:48 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 14 Jun 2019 14:43:48 +0000 Subject: [issue12857] Expose called function on frame object In-Reply-To: <1314683667.85.0.876885324202.issue12857@psf.upfronthosting.co.za> Message-ID: <1560523428.45.0.513617024161.issue12857@roundup.psfhosted.org> Change by Eric Snow : Removed file: https://bugs.python.org/file48418/122.pdf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 11:26:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 15:26:45 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1560526005.11.0.972229522466.issue35998@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f0749da9a535375f05a2015e8960e8ae54877349 by Victor Stinner (Andrew Svetlov) in branch 'master': bpo-35998: Avoid TimeoutError in test_asyncio: test_start_tls_server_1() (GH-14080) https://github.com/python/cpython/commit/f0749da9a535375f05a2015e8960e8ae54877349 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 11:26:49 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Jun 2019 15:26:49 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1560526009.06.0.720673439995.issue35998@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13941 pull_request: https://github.com/python/cpython/pull/14084 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 11:42:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 15:42:12 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1560526932.56.0.664224068873.issue35998@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13942 pull_request: https://github.com/python/cpython/pull/14086 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 11:46:07 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 14 Jun 2019 15:46:07 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1560527167.01.0.677302036277.issue35998@roundup.psfhosted.org> Andrew Svetlov added the comment: Finally fixed ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 11:49:42 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 14 Jun 2019 15:49:42 +0000 Subject: [issue34651] Disallow fork in a subinterpreter. In-Reply-To: <1536786263.28.0.956365154283.issue34651@psf.upfronthosting.co.za> Message-ID: <1560527382.2.0.471380466463.issue34651@roundup.psfhosted.org> Eric Snow added the comment: FYI, I plan on looking into this either today or next Friday. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 11:50:52 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 14 Jun 2019 15:50:52 +0000 Subject: [issue37274] Scripts folder is empty in python 3.7.3 for windows. In-Reply-To: <1560487852.05.0.608471969466.issue37274@roundup.psfhosted.org> Message-ID: <1560527452.04.0.974321126027.issue37274@roundup.psfhosted.org> Steve Dower added the comment: You should have a set of log files in %TEMP%. Can you zip those up and attach them here? Pip may be failing to install for some reason, and while this ought to be reported, it is not supposed to cause the entire installation to fail. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 11:54:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 15:54:04 +0000 Subject: [issue19865] create_unicode_buffer() fails on non-BMP strings on Windows In-Reply-To: <1386013006.0.0.412572088185.issue19865@psf.upfronthosting.co.za> Message-ID: <1560527644.09.0.497769932063.issue19865@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 9765efcb39fc03d5b1abec3924388974470a8bd5 by Victor Stinner (Zackery Spytz) in branch 'master': bpo-19865: ctypes.create_unicode_buffer() supports non-BMP strings on Windows (GH-14081) https://github.com/python/cpython/commit/9765efcb39fc03d5b1abec3924388974470a8bd5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 11:54:20 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 14 Jun 2019 15:54:20 +0000 Subject: [issue37275] GetConsole(Output)CP is used even when stdin/stdout is redirected In-Reply-To: <1560491190.29.0.949105060129.issue37275@roundup.psfhosted.org> Message-ID: <1560527660.47.0.337399077679.issue37275@roundup.psfhosted.org> Steve Dower added the comment: Isn't the point that device_encoding(FD) gets the encoding of the specified file? In this case stdout? It seems odd that chcp doesn't actually update the console code page here, as that is its entire purpose. Perhaps TextIOWrapper is actually getting ACP rather than the console encoding through some other path? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 11:55:09 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Jun 2019 15:55:09 +0000 Subject: [issue19865] create_unicode_buffer() fails on non-BMP strings on Windows In-Reply-To: <1386013006.0.0.412572088185.issue19865@psf.upfronthosting.co.za> Message-ID: <1560527709.68.0.910751670692.issue19865@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13944 pull_request: https://github.com/python/cpython/pull/14088 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 11:55:01 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Jun 2019 15:55:01 +0000 Subject: [issue19865] create_unicode_buffer() fails on non-BMP strings on Windows In-Reply-To: <1386013006.0.0.412572088185.issue19865@psf.upfronthosting.co.za> Message-ID: <1560527701.13.0.0880382324509.issue19865@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13943 pull_request: https://github.com/python/cpython/pull/14087 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 12:01:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 16:01:52 +0000 Subject: [issue34651] Disallow fork in a subinterpreter. In-Reply-To: <1536786263.28.0.956365154283.issue34651@psf.upfronthosting.co.za> Message-ID: <1560528112.57.0.839609202509.issue34651@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-37266: "Daemon threads must be forbidden in subinterpreters". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 12:03:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 16:03:31 +0000 Subject: [issue37261] test_io leaks references on AMD64 Fedora Rawhide Refleaks 3.8 In-Reply-To: <1560390190.75.0.577750929769.issue37261@roundup.psfhosted.org> Message-ID: <1560528211.78.0.154125378575.issue37261@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 212646cae6b7c4ddc8d98c8b9b6d39a5f259e864 by Victor Stinner in branch 'master': bpo-37261: Document sys.unraisablehook corner cases (GH-14059) https://github.com/python/cpython/commit/212646cae6b7c4ddc8d98c8b9b6d39a5f259e864 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 12:03:34 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Jun 2019 16:03:34 +0000 Subject: [issue37261] test_io leaks references on AMD64 Fedora Rawhide Refleaks 3.8 In-Reply-To: <1560390190.75.0.577750929769.issue37261@roundup.psfhosted.org> Message-ID: <1560528214.01.0.511331972572.issue37261@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13945 pull_request: https://github.com/python/cpython/pull/14089 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 12:05:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 16:05:04 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1560528304.1.0.997828585058.issue35998@roundup.psfhosted.org> STINNER Victor added the comment: > Finally fixed Thank you very much! I looked at this issue 2 or 3 times but I failed to fix it. This bug was super annoying: it failed multiple times per week on Fedora buildbots. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 12:07:44 2019 From: report at bugs.python.org (Wei Li) Date: Fri, 14 Jun 2019 16:07:44 +0000 Subject: [issue37193] Memory leak while running TCP/UDPServer with socketserver.ThreadingMixIn In-Reply-To: <1559908419.41.0.390422965351.issue37193@roundup.psfhosted.org> Message-ID: <1560528464.46.0.0105379368321.issue37193@roundup.psfhosted.org> Wei Li added the comment: I got the same problem when uing the ThreadingTCPServer. I think adding "self._threads = list(filter(lambda x: x.is_alive(), self._threads))" at the last line in process_request method is a potential way to fix the bug ---------- nosy: +Wei Li _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 12:12:55 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Jun 2019 16:12:55 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1560528775.02.0.964899467674.issue35998@roundup.psfhosted.org> miss-islington added the comment: New changeset 0c2eb6d21013d77e1160250d3cf69ca80215d064 by Miss Islington (bot) in branch '3.8': bpo-35998: Avoid TimeoutError in test_asyncio: test_start_tls_server_1() (GH-14080) https://github.com/python/cpython/commit/0c2eb6d21013d77e1160250d3cf69ca80215d064 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 12:26:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 16:26:43 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1560529603.47.0.506296625581.issue35998@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 33feb2e1a391cde91aefcb8d9cf5144b5fbc5d87 by Victor Stinner in branch '3.7': bpo-35998: Avoid TimeoutError in test_asyncio: test_start_tls_server_1() (GH-14080) (GH-14086) https://github.com/python/cpython/commit/33feb2e1a391cde91aefcb8d9cf5144b5fbc5d87 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 12:30:30 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Jun 2019 16:30:30 +0000 Subject: [issue19865] create_unicode_buffer() fails on non-BMP strings on Windows In-Reply-To: <1386013006.0.0.412572088185.issue19865@psf.upfronthosting.co.za> Message-ID: <1560529830.78.0.996353394652.issue19865@roundup.psfhosted.org> miss-islington added the comment: New changeset 0b592d513b073cd3a4ba7632907c25b8282f15ce by Miss Islington (bot) in branch '3.7': bpo-19865: ctypes.create_unicode_buffer() supports non-BMP strings on Windows (GH-14081) https://github.com/python/cpython/commit/0b592d513b073cd3a4ba7632907c25b8282f15ce ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 12:43:26 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Jun 2019 16:43:26 +0000 Subject: [issue19865] create_unicode_buffer() fails on non-BMP strings on Windows In-Reply-To: <1386013006.0.0.412572088185.issue19865@psf.upfronthosting.co.za> Message-ID: <1560530606.07.0.582326371079.issue19865@roundup.psfhosted.org> miss-islington added the comment: New changeset b0f6fa8d7d4c6d8263094124df9ef9cf816bbed6 by Miss Islington (bot) in branch '3.8': bpo-19865: ctypes.create_unicode_buffer() supports non-BMP strings on Windows (GH-14081) https://github.com/python/cpython/commit/b0f6fa8d7d4c6d8263094124df9ef9cf816bbed6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 12:52:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 16:52:17 +0000 Subject: [issue36707] The "m" ABI flag of SOABI for pymalloc is no longer needed In-Reply-To: <1556065645.57.0.820338293941.issue36707@roundup.psfhosted.org> Message-ID: <1560531137.36.0.930023156189.issue36707@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13946 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14090 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 12:54:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 16:54:21 +0000 Subject: [issue19865] create_unicode_buffer() fails on non-BMP strings on Windows In-Reply-To: <1386013006.0.0.412572088185.issue19865@psf.upfronthosting.co.za> Message-ID: <1560531261.05.0.454275962424.issue19865@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Zackery Spytz for the fix. Thanks Gergely Erd?lyi for the bug report! Sorry for the long delay. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 12:55:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 16:55:27 +0000 Subject: [issue37266] Daemon threads must be forbidden in subinterpreters In-Reply-To: <1560418565.72.0.288239825756.issue37266@roundup.psfhosted.org> Message-ID: <1560531327.93.0.419606069345.issue37266@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 066e5b1a917ec2134e8997d2cadd815724314252 by Victor Stinner in branch 'master': bpo-37266: Daemon threads are now denied in subinterpreters (GH-14049) https://github.com/python/cpython/commit/066e5b1a917ec2134e8997d2cadd815724314252 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 12:56:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 16:56:51 +0000 Subject: [issue37266] Daemon threads must be forbidden in subinterpreters In-Reply-To: <1560418565.72.0.288239825756.issue37266@roundup.psfhosted.org> Message-ID: <1560531411.84.0.0392903269484.issue37266@roundup.psfhosted.org> STINNER Victor added the comment: Daemon threads must die. That's a first step towards their death! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 12:59:57 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Jun 2019 16:59:57 +0000 Subject: [issue37261] test_io leaks references on AMD64 Fedora Rawhide Refleaks 3.8 In-Reply-To: <1560390190.75.0.577750929769.issue37261@roundup.psfhosted.org> Message-ID: <1560531597.99.0.839821261931.issue37261@roundup.psfhosted.org> miss-islington added the comment: New changeset 3b976d19c8c09e83eec63a5b62daf4d55bfd6aeb by Miss Islington (bot) in branch '3.8': bpo-37261: Document sys.unraisablehook corner cases (GH-14059) https://github.com/python/cpython/commit/3b976d19c8c09e83eec63a5b62daf4d55bfd6aeb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 13:10:53 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 14 Jun 2019 17:10:53 +0000 Subject: [issue37283] Unexpected behavior when running installer a second time with the same arguments or unattend.xml In-Reply-To: <1560514187.3.0.83059947509.issue37283@roundup.psfhosted.org> Message-ID: <1560532253.19.0.0101444002549.issue37283@roundup.psfhosted.org> Steve Dower added the comment: Hmm... interesting. Thanks for the heads-up, I think I know what this may be (there's a conditional planning stage in the bootstrapper that is probably being skipped on Modify). I'll take a look when I get a chance. ---------- assignee: -> steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 13:29:23 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 14 Jun 2019 17:29:23 +0000 Subject: [issue32280] Expose `_PyRuntime` through a section name In-Reply-To: <1513034681.19.0.213398074469.issue32280@psf.upfronthosting.co.za> Message-ID: <1560533363.46.0.383618111478.issue32280@roundup.psfhosted.org> Eric Snow added the comment: (Sorry for the delay!) Is the need for a named section due to the fact that _PyRuntime is part of the "internal" C-API (hidden behind the Py_BUILD_CORE macro)? I.E. would it help to build with Py_BUILD_CORE? Regarding the GIL: The plan for 3.9 is to have one GIL per interpreter, so the relevant struct would be PyInterpreterState (a part of the public C-API). That would be accessible at runtime via the fields of _PyRuntime.interpreters. Regarding what I said before about multiple runtimes per process: Honestly, I've yet to see any use case that would justify providing multi-runtime support. However, there are code-health benefits to keeping *all* runtime state out of static globals. So eliminating the _PyRuntime static variable is still a realistic possibility (for 3.9 or maybe later). If that happens then there would have to be a new embedding C-API oriented around (opaque) PyRuntimestate pointers. See PEP 432 and 587 for ongoing work to improve the embedding experience (for runtime initialization), including what the successors to Py_Initialize() look like. ---------- versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 13:31:48 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 17:31:48 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1560533508.0.0.98995660211.issue35537@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 5884043252473ac733aba1d3251d4debe72511e5 by Victor Stinner in branch 'master': bpo-35537: Rewrite setsid test for os.posix_spawn (GH-11721) https://github.com/python/cpython/commit/5884043252473ac733aba1d3251d4debe72511e5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 13:31:48 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 17:31:48 +0000 Subject: [issue35876] test_start_new_session for posix_spawnp fails In-Reply-To: <1549018399.45.0.971138800303.issue35876@roundup.psfhosted.org> Message-ID: <1560533508.13.0.532294768913.issue35876@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 5884043252473ac733aba1d3251d4debe72511e5 by Victor Stinner in branch 'master': bpo-35537: Rewrite setsid test for os.posix_spawn (GH-11721) https://github.com/python/cpython/commit/5884043252473ac733aba1d3251d4debe72511e5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 13:32:18 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Jun 2019 17:32:18 +0000 Subject: [issue35876] test_start_new_session for posix_spawnp fails In-Reply-To: <1549018399.45.0.971138800303.issue35876@roundup.psfhosted.org> Message-ID: <1560533538.18.0.0597487707881.issue35876@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13948 pull_request: https://github.com/python/cpython/pull/14093 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 13:32:18 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Jun 2019 17:32:18 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1560533538.07.0.612725948096.issue35537@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13947 pull_request: https://github.com/python/cpython/pull/14093 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 13:35:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 17:35:33 +0000 Subject: [issue35876] test_start_new_session for posix_spawnp fails In-Reply-To: <1549018399.45.0.971138800303.issue35876@roundup.psfhosted.org> Message-ID: <1560533733.06.0.292727640746.issue35876@roundup.psfhosted.org> STINNER Victor added the comment: I rewrote and reenabled the test. It should now be fixed in master, and the 3.8 backport is coming soon. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 13:43:31 2019 From: report at bugs.python.org (Eryk Sun) Date: Fri, 14 Jun 2019 17:43:31 +0000 Subject: [issue37275] GetConsole(Output)CP is used even when stdin/stdout is redirected In-Reply-To: <1560491190.29.0.949105060129.issue37275@roundup.psfhosted.org> Message-ID: <1560534211.78.0.175735060516.issue37275@roundup.psfhosted.org> Eryk Sun added the comment: > # Power Shell 6 (use cp65001 by default) > PS C:?> python3 -c "print('????')" > ps.txt PowerShell standard I/O redirection is different from any shell I've ever used. In this case, it runs Python with StandardOutput set to a handle for a pipe instead of a handle for the file. It decodes Python's output using whatever encoding is configured for input and re-encodes it with whatever encoding is configured for output. To see what Python is actually writing, try using Start-Process with StandardOutput redirected to the file. For example: Start-Process -FilePath python3.exe -ArgumentList "-c `"print('????')`"" -NoNewWindow -Wait -RedirectStandardOutput ps.txt > # cmd.exe > C:?> chcp 65001 > C:?> python3 -c "print('????')" > cmd.txt CMD uses simple redirection, like every other shell I've ever used. It runs python3.exe with a handle for the file as its StandardOutput. So "cmd.txt" contains exactly what Python writes. > * TextIOWrapper tries `os.device_encoding(1)` > * `os.device_encoding(1)` use GetConsoleOutputCP() without checking stdout is console No, _Py_device_encoding returns None if the isatty(fd) is false, i.e. for a pipe or disk file. In this case, TextIOWrapper defaults to the encoding from locale.getpreferredencoding(). The current preferred encoding is the system ANSI codepage from GetACP(). Changing the default to UTF-8 would be disruptive. You can use UTF-8 mode (i.e. -X utf8). Or, to override just stdin, stdout, and stderr, set the environment variable "PYTHONIOENCODING=utf-8". > In the example above, a console is attached when python is called from > Power Shell 6, but it is not attached when python is called from > cmd.exe. In both cases the Python process inherits the console of the parent shell. The only way to run python.exe without a console is to use the CreateProcess creation flag DETACHED_PROCESS. > There is a relating issue: UTF-8 mode doesn't override > stdin,stdout,stderr encoding when console is attached. It works for me. For example, testing with stdout redirected to a pipe: C:\>python -c "import sys;print(sys.stdout.encoding)" | more cp1252 C:\>python -X utf8 -c "import sys;print(sys.stdout.encoding)" | more utf-8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 13:49:26 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Jun 2019 17:49:26 +0000 Subject: [issue35537] use os.posix_spawn in subprocess In-Reply-To: <1545238079.48.0.788709270274.issue35537@psf.upfronthosting.co.za> Message-ID: <1560534566.67.0.954966529227.issue35537@roundup.psfhosted.org> miss-islington added the comment: New changeset e696b15a62dd0c85fe6ed3c9698b5f889c0bb1b3 by Miss Islington (bot) in branch '3.8': bpo-35537: Rewrite setsid test for os.posix_spawn (GH-11721) https://github.com/python/cpython/commit/e696b15a62dd0c85fe6ed3c9698b5f889c0bb1b3 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 13:49:26 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 14 Jun 2019 17:49:26 +0000 Subject: [issue35876] test_start_new_session for posix_spawnp fails In-Reply-To: <1549018399.45.0.971138800303.issue35876@roundup.psfhosted.org> Message-ID: <1560534566.81.0.87765344276.issue35876@roundup.psfhosted.org> miss-islington added the comment: New changeset e696b15a62dd0c85fe6ed3c9698b5f889c0bb1b3 by Miss Islington (bot) in branch '3.8': bpo-35537: Rewrite setsid test for os.posix_spawn (GH-11721) https://github.com/python/cpython/commit/e696b15a62dd0c85fe6ed3c9698b5f889c0bb1b3 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 13:52:28 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 14 Jun 2019 17:52:28 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1560534748.24.0.182608518728.issue35998@roundup.psfhosted.org> Andrew Svetlov added the comment: Thanks for the review, Victor! I have had to fix it much earlier :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 14:02:41 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 14 Jun 2019 18:02:41 +0000 Subject: [issue37284] Not obvious that new required attrs of sys.implementation must have a PEP. Message-ID: <1560535361.35.0.573554677552.issue37284@roundup.psfhosted.org> New submission from Eric Snow : PEP 421 added sys.implementation for Python implementors to provide values required by stdlib code (e.g. importlib). That PEP indicates that any new required attributes must go through the PEP process. [1] That requirement isn't obvious. To fix that we should add a brief note to the sys.implementation docs [2] identifying the requirement. [1] https://www.python.org/dev/peps/pep-0421/#adding-new-required-attributes [2] https://docs.python.org/3/library/sys.html#sys.implementation ---------- assignee: docs at python components: Documentation keywords: easy messages: 345624 nosy: cheryl.sabella, docs at python, eric.snow priority: normal severity: normal stage: needs patch status: open title: Not obvious that new required attrs of sys.implementation must have a PEP. versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 14:10:51 2019 From: report at bugs.python.org (Brett Cannon) Date: Fri, 14 Jun 2019 18:10:51 +0000 Subject: [issue37271] Make multiple passes of the peephole optimizer until bytecode cannot be optimized further In-Reply-To: <1560477510.59.0.491449903314.issue37271@roundup.psfhosted.org> Message-ID: <1560535851.44.0.025714199676.issue37271@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 14:12:04 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 14 Jun 2019 18:12:04 +0000 Subject: [issue36785] Implement PEP 574 In-Reply-To: <1556908101.83.0.107763193732.issue36785@roundup.psfhosted.org> Message-ID: <1560535924.25.0.653810644651.issue36785@roundup.psfhosted.org> Antoine Pitrou added the comment: Now complete, closing :-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 14:29:57 2019 From: report at bugs.python.org (=?utf-8?q?Misty_De_M=C3=A9o?=) Date: Fri, 14 Jun 2019 18:29:57 +0000 Subject: [issue37285] Python 2.7 setup.py incorrectly double-joins SDKROOT Message-ID: <1560536997.94.0.77736391692.issue37285@roundup.psfhosted.org> New submission from Misty De M?o : Python 2.7's setup.py has incorrect behaviour when adding the SDKROOT to the beginning of the include path while searching. When searching paths, find_file first checks is_macosx_sdk_path to see if it needs to add the sdk_root: https://github.com/python/cpython/blob/2.7/setup.py#L87-L88 This is mostly correct, except one of the path prefixes it checks is /Library: https://github.com/python/cpython/blob/2.7/setup.py#L64 The Xcode CLT path is located in /Library, so this check passes. That means the /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk portion of the path gets repeated, leading to an invalid path. I recognize Python 2.7 isn't in active development, but I have a minimal patch to fix this that I will be submitting. ---------- components: Build messages: 345626 nosy: mistydemeo priority: normal severity: normal status: open title: Python 2.7 setup.py incorrectly double-joins SDKROOT type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 14:30:43 2019 From: report at bugs.python.org (=?utf-8?q?Misty_De_M=C3=A9o?=) Date: Fri, 14 Jun 2019 18:30:43 +0000 Subject: [issue37285] Python 2.7 setup.py incorrectly double-joins SDKROOT In-Reply-To: <1560536997.94.0.77736391692.issue37285@roundup.psfhosted.org> Message-ID: <1560537043.05.0.776304750045.issue37285@roundup.psfhosted.org> Change by Misty De M?o : ---------- keywords: +patch pull_requests: +13949 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14095 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 14:42:22 2019 From: report at bugs.python.org (Abhilash Raj) Date: Fri, 14 Jun 2019 18:42:22 +0000 Subject: [issue32178] Some invalid email address groups cause an IndexError instead of a HeaderParseError In-Reply-To: <1512038434.94.0.213398074469.issue32178@psf.upfronthosting.co.za> Message-ID: <1560537742.47.0.458659885655.issue32178@roundup.psfhosted.org> Abhilash Raj added the comment: I don't think this is an issue anymore, I guess this was fixed as a part of some other PR. I tested this out on a recent branch: >>> import email >>> msg = email.message_from_string('From: Abhilash ') >>> msg['From'] 'Abhilash ' @david, @barry: I think we can close this issue. ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 14:45:08 2019 From: report at bugs.python.org (Abhilash Raj) Date: Fri, 14 Jun 2019 18:45:08 +0000 Subject: [issue32179] Empty email address in headers triggers an IndexError In-Reply-To: <1512041238.12.0.213398074469.issue32179@psf.upfronthosting.co.za> Message-ID: <1560537908.29.0.049520353056.issue32179@roundup.psfhosted.org> Abhilash Raj added the comment: I wasn't able to reproduce this on the latest master. Probably fixed as a part of some other PR. >>> msg = email.message_from_string('ReplyTo: ""') >>> msg >>> msg['ReplyTo'] '""' I think this issue can be closed. ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 14:52:51 2019 From: report at bugs.python.org (Abhilash Raj) Date: Fri, 14 Jun 2019 18:52:51 +0000 Subject: [issue31445] Index out of range in get of message.EmailMessage.get() In-Reply-To: <1505296401.08.0.196475452437.issue31445@psf.upfronthosting.co.za> Message-ID: <1560538371.39.0.224817923589.issue31445@roundup.psfhosted.org> Abhilash Raj added the comment: I can't reproduce this issue on the latest master branch. This seems to be fixed as a part of a different PR I suppose. >>> import email >>> msg = email.message_from_string("From: Bonifac Karaka : bonikar at gmail.com") >>> msg['From'] 'Bonifac Karaka : bonikar at gmail.com' This is very similar to bpo-32178, which also is now fixed. @david, @barry, I think we can close this issue. ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 14:53:22 2019 From: report at bugs.python.org (=?utf-8?q?Mi=C5=82osz?=) Date: Fri, 14 Jun 2019 18:53:22 +0000 Subject: [issue37286] Pasting emoji crashes IDLE Message-ID: <1560538402.62.0.439555493533.issue37286@roundup.psfhosted.org> New submission from Mi?osz : On Windows 10 ---------- assignee: terry.reedy components: IDLE messages: 345630 nosy: md37, terry.reedy priority: normal severity: normal status: open title: Pasting emoji crashes IDLE type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 15:02:10 2019 From: report at bugs.python.org (Abhilash Raj) Date: Fri, 14 Jun 2019 19:02:10 +0000 Subject: [issue29412] IndexError thrown on email.message.Message.get In-Reply-To: <1485957201.62.0.708721670813.issue29412@psf.upfronthosting.co.za> Message-ID: <1560538930.55.0.86274672757.issue29412@roundup.psfhosted.org> Abhilash Raj added the comment: I can't reproduce this problem with the latest master branch, it was perhaps fixed with some other PR. This is also a dupe of bpo-31445. @barry, @david: I think this issue can be closed. ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 15:04:12 2019 From: report at bugs.python.org (Abhilash Raj) Date: Fri, 14 Jun 2019 19:04:12 +0000 Subject: [issue29412] IndexError thrown on email.message.Message.get In-Reply-To: <1485957201.62.0.708721670813.issue29412@psf.upfronthosting.co.za> Message-ID: <1560539052.11.0.241701281041.issue29412@roundup.psfhosted.org> Abhilash Raj added the comment: For the record, this is how I tested using the master branch: >>> msg = email.message_from_string(' To: (Recipient list suppressed)') >>> msg['To'] >>> import email.policy >>> msg = email.message_from_string(' To: (Recipient list suppressed)', policy=email.policy.default) >>> msg >>> msg['To'] >>> msg.get('to') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 15:07:13 2019 From: report at bugs.python.org (Abhilash Raj) Date: Fri, 14 Jun 2019 19:07:13 +0000 Subject: [issue29412] IndexError thrown on email.message.Message.get In-Reply-To: <1485957201.62.0.708721670813.issue29412@psf.upfronthosting.co.za> Message-ID: <1560539233.38.0.783901581161.issue29412@roundup.psfhosted.org> Abhilash Raj added the comment: Nevermind, I was wrong, I was able to reproduce it: >>> msg = email.message_from_string('To: (Recipient list suppressed)', policy=email.policy.default)) File "", line 1 SyntaxError: unmatched ')' >>> msg = email.message_from_string('To: (Recipient list suppressed)', policy=email.policy.default) >>> msg.get('to') Traceback (most recent call last): File "", line 1, in File "/home/maxking/Documents/cpython/Lib/email/message.py", line 471, in get return self.policy.header_fetch_parse(k, v) File "/home/maxking/Documents/cpython/Lib/email/policy.py", line 163, in header_fetch_parse return self.header_factory(name, value) File "/home/maxking/Documents/cpython/Lib/email/headerregistry.py", line 589, in __call__ return self[name](name, value) File "/home/maxking/Documents/cpython/Lib/email/headerregistry.py", line 197, in __new__ cls.parse(value, kwds) File "/home/maxking/Documents/cpython/Lib/email/headerregistry.py", line 340, in parse kwds['parse_tree'] = address_list = cls.value_parser(value) File "/home/maxking/Documents/cpython/Lib/email/headerregistry.py", line 331, in value_parser address_list, value = parser.get_address_list(value) File "/home/maxking/Documents/cpython/Lib/email/_header_value_parser.py", line 1951, in get_address_list token, value = get_address(value) File "/home/maxking/Documents/cpython/Lib/email/_header_value_parser.py", line 1928, in get_address token, value = get_group(value) File "/home/maxking/Documents/cpython/Lib/email/_header_value_parser.py", line 1884, in get_group token, value = get_display_name(value) File "/home/maxking/Documents/cpython/Lib/email/_header_value_parser.py", line 1710, in get_display_name token, value = get_phrase(value) File "/home/maxking/Documents/cpython/Lib/email/_header_value_parser.py", line 1385, in get_phrase token, value = get_word(value) File "/home/maxking/Documents/cpython/Lib/email/_header_value_parser.py", line 1360, in get_word if value[0]=='"': IndexError: string index out of range ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 15:32:58 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 14 Jun 2019 19:32:58 +0000 Subject: [issue37286] Pasting emoji crashes IDLE In-Reply-To: <1560538402.62.0.439555493533.issue37286@roundup.psfhosted.org> Message-ID: <1560540778.88.0.893809327141.issue37286@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Can you please add a traceback if any? See also https://bugs.python.org/issue13153 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 15:42:18 2019 From: report at bugs.python.org (Brian Quinlan) Date: Fri, 14 Jun 2019 19:42:18 +0000 Subject: [issue24980] Allow for providing 'on_new_thread' callback to 'concurrent.futures.ThreadPoolExecutor' In-Reply-To: <1441134792.06.0.689087897304.issue24980@psf.upfronthosting.co.za> Message-ID: <1560541338.66.0.326853759868.issue24980@roundup.psfhosted.org> Brian Quinlan added the comment: Joshua, I'm closing this since I haven't heard from you in a month. Please re-open if you use case isn't handled by `initializer` and `initargs`. ---------- assignee: -> bquinlan resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 15:51:36 2019 From: report at bugs.python.org (Zachary Ware) Date: Fri, 14 Jun 2019 19:51:36 +0000 Subject: [issue12857] Expose called function on frame object In-Reply-To: <1314683667.85.0.876885324202.issue12857@psf.upfronthosting.co.za> Message-ID: <1560541896.79.0.334940657838.issue12857@roundup.psfhosted.org> Change by Zachary Ware : ---------- Removed message: https://bugs.python.org/msg345592 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 16:41:30 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 14 Jun 2019 20:41:30 +0000 Subject: [issue23892] Introduce sys.implementation.opt_levels In-Reply-To: <1428529304.36.0.272921433795.issue23892@psf.upfronthosting.co.za> Message-ID: <1560544890.74.0.0876994851114.issue23892@roundup.psfhosted.org> Eric Snow added the comment: (Sorry for taking so long!) Thanks for doing this, Cheryl! I'm leaving a review on your PR. :) Also, in PEP 421 it says that you need a PEP for this. [1] "Such a PEP need not be long, just long enough." (I just realized that the requirement isn't obvious so I've opened issue #37284.) [1] https://www.python.org/dev/peps/pep-0421/#adding-new-required-attributes ---------- versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 16:48:26 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 14 Jun 2019 20:48:26 +0000 Subject: [issue37285] Python 2.7 setup.py incorrectly double-joins SDKROOT In-Reply-To: <1560536997.94.0.77736391692.issue37285@roundup.psfhosted.org> Message-ID: <1560545306.65.0.919027919719.issue37285@roundup.psfhosted.org> Change by Ned Deily : ---------- assignee: -> ned.deily nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 16:49:37 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Jun 2019 20:49:37 +0000 Subject: [issue37286] Pasting emoji crashes IDLE In-Reply-To: <1560538402.62.0.439555493533.issue37286@roundup.psfhosted.org> Message-ID: <1560545377.9.0.0407148690468.issue37286@roundup.psfhosted.org> Terry J. Reedy added the comment: In the absence of evidence otherwise (the string that you pasted and the full traceback), I assume that you pasted a non-BMP codepoint, making this a duplicate of #13153. If you think otherwise, please supply more info. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> IDLE 3.x on Windows crashes when pasting non-BMP unicode _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 17:40:08 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 14 Jun 2019 21:40:08 +0000 Subject: [issue37271] Make multiple passes of the peephole optimizer until bytecode cannot be optimized further In-Reply-To: <1560477510.59.0.491449903314.issue37271@roundup.psfhosted.org> Message-ID: <1560548408.9.0.18686608729.issue37271@roundup.psfhosted.org> Raymond Hettinger added the comment: FWIW, when the peephole optimizer was originally accepted, it was partly on the condition that we kept it simple and fast. Perhaps, the sentiment has changed, perhaps not. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 17:45:33 2019 From: report at bugs.python.org (Aaron Meurer) Date: Fri, 14 Jun 2019 21:45:33 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences In-Reply-To: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> Message-ID: <1560548733.59.0.509162104675.issue32912@roundup.psfhosted.org> Aaron Meurer added the comment: I agree. Please someone else do that. I don't know what already has issues and I unfortunately don't have time right now to help out with any of this. I simply mentioned all these things as arguments why Python should not (yet) make these warnings errors, which is the point of this issue. Also, for the pyparsing example, you would have gotten lucky because it also contained \w, which is not a valid escape. If it didn't, you wouldn't be warned. So clearly this will help things, but it will also be good to have linting tools that, for example, warn about any escape sequences inside docstrings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 17:51:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 21:51:07 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1560534748.24.0.182608518728.issue35998@roundup.psfhosted.org> Message-ID: STINNER Victor added the comment: > I have had to fix it much earlier :( That's fine. If this bug was more annoying, I would have it fixed myself earlier. But I had other more critical bugs to fix before that one. The important part is that it is fixed now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 17:52:04 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 14 Jun 2019 21:52:04 +0000 Subject: [issue23892] Introduce sys.implementation.opt_levels In-Reply-To: <1428529304.36.0.272921433795.issue23892@psf.upfronthosting.co.za> Message-ID: <1560549124.61.0.646541863019.issue23892@roundup.psfhosted.org> Eric Snow added the comment: There are (solvable) problems with my original recommendation: 1. sys.implementation is by definition not suitable for third-party import hooks to modify + it is set during the Python implementation during runtime init + it is effectively read-only after that 2. "opt_levels" is too specific to the CPython status quo + there are other ways to encode the optimizations of a bytecode file [1] + "optimizations" would probably be more correct + that opens a whole can of worms (e.g. what does sys.flags.optimize mean) So we may want to think this over a bit before going any further. I'm going to collect my thoughts on this and write more later. :) [1] In PEP 488 it says: It is expected that beyond Python's own two optimization levels, third-party code will use a hash of optimization names to specify the optimization level, e.g. hashlib.sha256(','.join(['no dead code', 'const folding'])).hexdigest(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 18:05:05 2019 From: report at bugs.python.org (Brian Quinlan) Date: Fri, 14 Jun 2019 22:05:05 +0000 Subject: [issue37208] Weird exception behaviour in ProcessPoolExecutor In-Reply-To: <1560078240.39.0.310143322777.issue37208@roundup.psfhosted.org> Message-ID: <1560549905.2.0.221184005071.issue37208@roundup.psfhosted.org> Brian Quinlan added the comment: That's a super interesting bug! It looks like this issue is that your exception can't be round-tripped using pickle i.e. >>> class PoolBreaker(Exception): ... def __init__(self, num): ... super().__init__() ... self.num = num ... >>> import pickle >>> pickle.loads(pickle.dumps(PoolBreaker(5))) Traceback (most recent call last): File "", line 1, in TypeError: __init__() missing 1 required positional argument: 'num' ---------- assignee: -> bquinlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 18:14:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 22:14:08 +0000 Subject: [issue37155] test_asyncio: test_stdin_broken_pipe() failed on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1559669895.88.0.0230112144047.issue37155@roundup.psfhosted.org> Message-ID: <1560550448.6.0.147360573733.issue37155@roundup.psfhosted.org> STINNER Victor added the comment: x86 Windows7 3.x: https://buildbot.python.org/all/#/builders/58/builds/2627 FAIL: test_stdin_broken_pipe (test.test_asyncio.test_subprocess.SubprocessProactorTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_asyncio\test_subprocess.py", line 243, in test_stdin_broken_pipe self.assertRaises((BrokenPipeError, ConnectionResetError), AssertionError: (, ) not raised by run_until_complete ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 18:14:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 22:14:29 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1560550469.22.0.618992038383.issue35998@roundup.psfhosted.org> STINNER Victor added the comment: Sadly, the fix is not perfect, the test failed on the very "x86 Windows7 3.x" buildbot: https://buildbot.python.org/all/#/builders/58/builds/2627 ERROR: test_start_tls_server_1 (test.test_asyncio.test_sslproto.SelectorStartTLSTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_asyncio\test_sslproto.py", line 578, in test_start_tls_server_1 self.loop.run_until_complete(run_main()) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\asyncio\base_events.py", line 606, in run_until_complete raise RuntimeError('Event loop stopped before Future completed.') RuntimeError: Event loop stopped before Future completed. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 18:16:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Jun 2019 22:16:45 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1560550605.38.0.231752560803.issue35998@roundup.psfhosted.org> STINNER Victor added the comment: x86 Windows7 3.7: https://buildbot.python.org/all/#/builders/111/builds/1123 test_start_tls_server_1 (test.test_asyncio.test_sslproto.SelectorStartTLSTests) ... Exception in thread test-client: Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\test_asyncio\functional.py", line 198, in run self._prog(TestSocketWrapper(self._sock)) File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\test_asyncio\test_sslproto.py", line 565, in with self.tcp_client(lambda sock: client(sock, addr), File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\test_asyncio\test_sslproto.py", line 510, in client answer = sock.recv_all(len(ANSWER)) File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\test_asyncio\functional.py", line 138, in recv_all data = self.recv(n - len(buf)) File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\ssl.py", line 1045, in recv return self.read(buflen) File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\ssl.py", line 920, in read return self._sslobj.read(len) ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:2488) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 926, in _bootstrap_inner self.run() File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\test_asyncio\functional.py", line 200, in run self._test._abort_socket_test(ex) File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\test_asyncio\functional.py", line 122, in _abort_socket_test self.fail(ex) File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\case.py", line 693, in fail raise self.failureException(msg) AssertionError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:2488) D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py:960: ResourceWarning: unclosed del exc_type, exc_value, exc_tb ResourceWarning: Enable tracemalloc to get the object allocation traceback ERROR ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 19:21:54 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 14 Jun 2019 23:21:54 +0000 Subject: [issue37275] GetConsole(Output)CP is used even when stdin/stdout is redirected In-Reply-To: <1560491190.29.0.949105060129.issue37275@roundup.psfhosted.org> Message-ID: <1560554514.11.0.333966997971.issue37275@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 19:22:05 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 14 Jun 2019 23:22:05 +0000 Subject: [issue37275] GetConsole(Output)CP is used even when stdin/stdout is redirected In-Reply-To: <1560534211.78.0.175735060516.issue37275@roundup.psfhosted.org> Message-ID: Inada Naoki added the comment: On Sat, Jun 15, 2019 at 2:43 AM Eryk Sun wrote: > > Eryk Sun added the comment: > > > # Power Shell 6 (use cp65001 by default) > > PS C:?> python3 -c "print('????')" > ps.txt > > PowerShell standard I/O redirection is different from any shell I've ever used. In this case, it runs Python with StandardOutput set to a handle for a pipe instead of a handle for the file. It decodes Python's output using whatever encoding is configured for input and re-encodes it with whatever encoding is configured for output. I'm sorry, I mixed my assumption. I checked `os.device_encoding()` in cmd, but forgot to check it on Power Shell. All I said about Power Shell was just my assumption and it was wrong. And thank you for clarifying. I confirmed writing UTF-8 to pipe cause mojibake, because Power Shell decodes it using cp932. ``` PS C:\Users\inada-n> python3 -Xutf8 -c "import os,sys; print(os.device_encoding(1), sys.stdout.encoding, file=sys.stderr); print('?????')" >x None utf-8 PS C:\Users\inada-n> type x ``` Hmm, how can I teach to Power Shell about python3 is using UTF-8 for stdout? It seems cmd.exe with chcp 65001 and PYTHONUTF8=1 is better than PowerShell when I want to use UTF-8 on Windows. Anyway, nothing is wrong about python. I just didn't understand PowerShell at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 19:30:45 2019 From: report at bugs.python.org (Brian Quinlan) Date: Fri, 14 Jun 2019 23:30:45 +0000 Subject: [issue37287] picke cannot dump exceptions subclasses with different super() args Message-ID: <1560555045.5.0.822054090592.issue37287@roundup.psfhosted.org> New submission from Brian Quinlan : $ ./python.exe nopickle.py TypeError: __init__() missing 1 required positional argument: 'num' The issue is that the arguments passed to Exception.__init__ (via `super()`) are collected into `args` and then serialized by pickle e.g. >>> PickleBreaker(5).args () >>> PickleBreaker(5).__reduce_ex__(3) (, (), {'num': 5}) >>> # The 1st index is the `args` tuple Then, during load, the `args` tuple is used to initialize the Exception i.e. PickleBreaker(), which results in the `TypeError` See https://github.com/python/cpython/blob/master/Modules/_pickle.c#L6769 ---------- components: Library (Lib) files: nopickle.py messages: 345647 nosy: bquinlan priority: normal severity: normal status: open title: picke cannot dump exceptions subclasses with different super() args versions: Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48420/nopickle.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 19:31:56 2019 From: report at bugs.python.org (Brian Quinlan) Date: Fri, 14 Jun 2019 23:31:56 +0000 Subject: [issue37287] picke cannot dump Exception subclasses with different super() args In-Reply-To: <1560555045.5.0.822054090592.issue37287@roundup.psfhosted.org> Message-ID: <1560555116.79.0.722546430534.issue37287@roundup.psfhosted.org> Change by Brian Quinlan : ---------- title: picke cannot dump exceptions subclasses with different super() args -> picke cannot dump Exception subclasses with different super() args _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 19:33:41 2019 From: report at bugs.python.org (Brian Quinlan) Date: Fri, 14 Jun 2019 23:33:41 +0000 Subject: [issue37208] Weird exception behaviour in ProcessPoolExecutor In-Reply-To: <1560078240.39.0.310143322777.issue37208@roundup.psfhosted.org> Message-ID: <1560555221.04.0.312253992986.issue37208@roundup.psfhosted.org> Change by Brian Quinlan : ---------- resolution: -> duplicate superseder: -> picke cannot dump Exception subclasses with different super() args _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 19:36:17 2019 From: report at bugs.python.org (Paul Monson) Date: Fri, 14 Jun 2019 23:36:17 +0000 Subject: [issue37288] Windows arm32 buildbot build is broken Message-ID: <1560555377.03.0.131397449861.issue37288@roundup.psfhosted.org> New submission from Paul Monson : https://github.com/python/cpython/pull/14065 breaks building with --no-tkinter. Which breaks the Windows arm32 buildbot `C:\Users\buildbot\buildarea\3.x.monson-win-arm32.nondebug\build\PCbuild\python.vcxproj(158,9): error MSB4184: The expression "[System.IO.File]::ReadAllText(C:\Users\buildbot\buildarea\3.x.monson-win-arm32.nondebug\build\externals\tcltk-8.6.9.0\arm32\tcllicense.terms)" cannot be evaluated. Could not find a part of the path 'C:\Users\buildbot\buildarea\3.x.monson-win-arm32.nondebug\build\externals\tcltk-8.6.9.0\arm32\tcllicense.terms'.` ---------- components: Build, Windows messages: 345648 nosy: Paul Monson, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Windows arm32 buildbot build is broken type: compile error versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 19:52:46 2019 From: report at bugs.python.org (Paul Monson) Date: Fri, 14 Jun 2019 23:52:46 +0000 Subject: [issue37288] Fix Windows build when --no-tkinter is specified In-Reply-To: <1560555377.03.0.131397449861.issue37288@roundup.psfhosted.org> Message-ID: <1560556366.76.0.0941692643213.issue37288@roundup.psfhosted.org> Paul Monson added the comment: Change title: Fix Windows build when --no-tkinter is specified I noticed this because the Windows arm32 buildbot build was broken. ---------- title: Windows arm32 buildbot build is broken -> Fix Windows build when --no-tkinter is specified _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 19:54:10 2019 From: report at bugs.python.org (Paul Monson) Date: Fri, 14 Jun 2019 23:54:10 +0000 Subject: [issue37288] Fix Windows build when --no-tkinter is specified In-Reply-To: <1560555377.03.0.131397449861.issue37288@roundup.psfhosted.org> Message-ID: <1560556450.16.0.715985923856.issue37288@roundup.psfhosted.org> Change by Paul Monson : ---------- keywords: +patch pull_requests: +13951 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14096 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 20:06:08 2019 From: report at bugs.python.org (Julien Palard) Date: Sat, 15 Jun 2019 00:06:08 +0000 Subject: [issue31200] address sanitizer build fails In-Reply-To: <1502702493.31.0.645434199194.issue31200@psf.upfronthosting.co.za> Message-ID: <1560557168.99.0.779021131342.issue31200@roundup.psfhosted.org> Change by Julien Palard : ---------- pull_requests: +13952 pull_request: https://github.com/python/cpython/pull/13168 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 20:08:37 2019 From: report at bugs.python.org (Inada Naoki) Date: Sat, 15 Jun 2019 00:08:37 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: <1560557317.34.0.641631299791.issue32846@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: wont fix -> stage: resolved -> status: closed -> open versions: +Python 3.9 -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 21:24:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 15 Jun 2019 01:24:44 +0000 Subject: [issue36707] The "m" ABI flag of SOABI for pymalloc is no longer needed In-Reply-To: <1556065645.57.0.820338293941.issue36707@roundup.psfhosted.org> Message-ID: <1560561884.5.0.339110066489.issue36707@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 7efc526e5cfb929a79c192ac2dcf7eb78d3a4401 by Victor Stinner in branch 'master': bpo-36707: Document "m" removal from sys.abiflags (GH-14090) https://github.com/python/cpython/commit/7efc526e5cfb929a79c192ac2dcf7eb78d3a4401 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 21:25:03 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 15 Jun 2019 01:25:03 +0000 Subject: [issue36707] The "m" ABI flag of SOABI for pymalloc is no longer needed In-Reply-To: <1556065645.57.0.820338293941.issue36707@roundup.psfhosted.org> Message-ID: <1560561903.17.0.524098290921.issue36707@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13953 pull_request: https://github.com/python/cpython/pull/14097 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 21:31:48 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 15 Jun 2019 01:31:48 +0000 Subject: [issue36707] The "m" ABI flag of SOABI for pymalloc is no longer needed In-Reply-To: <1556065645.57.0.820338293941.issue36707@roundup.psfhosted.org> Message-ID: <1560562308.14.0.117129505182.issue36707@roundup.psfhosted.org> miss-islington added the comment: New changeset 3fde750cc4e4057076650a92946ec1d492464799 by Miss Islington (bot) in branch '3.8': bpo-36707: Document "m" removal from sys.abiflags (GH-14090) https://github.com/python/cpython/commit/3fde750cc4e4057076650a92946ec1d492464799 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 21:52:51 2019 From: report at bugs.python.org (Tim Peters) Date: Sat, 15 Jun 2019 01:52:51 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: <1560563571.29.0.785238156168.issue32846@roundup.psfhosted.org> Tim Peters added the comment: Looks likely that the _major_ cause of the quadratic-time delete behavior was due to that obmalloc used a linear-time method to keep its linked list of usable arenas sorted in order of number of free pools. When a pool became unused, its arena's count of free pools increased by one, and then order was restored by moving the arena "to the right" in the linked list, one slot at a time. When there were only a few hundred arenas, nobody noticed. But programs with thousands of arenas could suffer very noticeable sloth, and programs with hundreds of thousands could appear to hang (could require days to complete deleting). This was fixed in issue #37029, using a constant-time method to restore sorted order, scheduled for release in Python 3.8. ---------- stage: -> resolved versions: +Python 3.8 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 21:53:54 2019 From: report at bugs.python.org (Tim Peters) Date: Sat, 15 Jun 2019 01:53:54 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: <1560563634.83.0.909848134309.issue32846@roundup.psfhosted.org> Change by Tim Peters : ---------- stage: resolved -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 22:01:45 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 15 Jun 2019 02:01:45 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: <1560564105.84.0.185809681766.issue32846@roundup.psfhosted.org> Raymond Hettinger added the comment: Can we close this now? ISTM the issue has less to do with sets and more to do with memory allocation quirks and that on modern CPUs random memory accesses are slower than sequential memory accesses. It is not a bug that sets are unordered collections that iterate over elements in a difference order than they were inserted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 22:12:43 2019 From: report at bugs.python.org (Tim Peters) Date: Sat, 15 Jun 2019 02:12:43 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: <1560564763.29.0.882089488345.issue32846@roundup.psfhosted.org> Tim Peters added the comment: Raymond, please read my very recent comment one above yours. A (overall) quadratic-time algorithm (O(A**2) where A is the number of arenas) in obmalloc.c is (to my eyes) probably the _primary_ cause of the sloth here. That's been fixed for 3.8, but I don't have enough RAM even to run Terry's test code to confirm it. I can confirm that there's no quadratic-time behavior anymore deleting large sets of strings, but only until I run out of RAM. Neither is the behavior linear, but it's much closer to linear than quadratic now. If someone with more RAM can confirm this for larger sets, then fine by me if this is closed again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 22:23:36 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 15 Jun 2019 02:23: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: <1560565416.95.0.5976004525.issue4963@roundup.psfhosted.org> Change by Abhilash Raj : ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 22:24:55 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 15 Jun 2019 02:24:55 +0000 Subject: [issue26543] [EASY] imaplib noop Debug: bytes vs Unicode bug in debug mode In-Reply-To: <1457738623.54.0.0867122071018.issue26543@psf.upfronthosting.co.za> Message-ID: <1560565495.38.0.0669147032506.issue26543@roundup.psfhosted.org> Change by Abhilash Raj : ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 14 23:43:32 2019 From: report at bugs.python.org (Thomas Caswell) Date: Sat, 15 Jun 2019 03:43:32 +0000 Subject: [issue37289] regression in cython due to peephole optomization Message-ID: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> New submission from Thomas Caswell : The fix for https://bugs.python.org/issue37213 in 3498c642f4e83f3d8e2214654c0fa8e0d51cebe5 (https://github.com/python/cpython/pull/13969) seems to break building numpy (master) with cython (master) due to a pickle failure. The traceback (which is mostly in the cython source) is in an attachment. I bisected it back to this commit and tested that reverting this commit fixes the numpy build. ---------- files: np_fail.txt messages: 345655 nosy: pablogsal, scoder, serhiy.storchaka, tcaswell, vstinner priority: normal severity: normal status: open title: regression in cython due to peephole optomization type: behavior versions: Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48421/np_fail.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 00:17:42 2019 From: report at bugs.python.org (Andrei Zene) Date: Sat, 15 Jun 2019 04:17:42 +0000 Subject: [issue28708] Low FD_SETSIZE limit on Windows In-Reply-To: <1479250358.07.0.768722440644.issue28708@psf.upfronthosting.co.za> Message-ID: <1560572262.49.0.986576271951.issue28708@roundup.psfhosted.org> Andrei Zene added the comment: That's actually a great explanation Nathaniel. Thanks for putting that all together. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 00:25:07 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 15 Jun 2019 04:25:07 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: <1560572707.05.0.88382712458.issue32846@roundup.psfhosted.org> Terry J. Reedy added the comment: I reran the code in msg312188. Ints as before, string deletion +- linear up to 100 million, much better than before. millions old strings new strings of items create delete create delete 4 1.55 .36 1.7 .38 8 3.18 .76 3.6 .78 16 6.48 1.80 7.3 1.71 32 13.6 5.56 14.8 3.8 64 28 19 30 8.4 100 56 80 50 14.3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 00:47:44 2019 From: report at bugs.python.org (Thomas Caswell) Date: Sat, 15 Jun 2019 04:47:44 +0000 Subject: [issue37289] regression in cython due to peephole optomization In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560574064.22.0.293488746309.issue37289@roundup.psfhosted.org> Thomas Caswell added the comment: This change also causes failures in the cython test suite (see attached). ---------- Added file: https://bugs.python.org/file48422/cython_test_log.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 02:36:32 2019 From: report at bugs.python.org (p) Date: Sat, 15 Jun 2019 06:36:32 +0000 Subject: [issue37290] Mistranslation Message-ID: <1560580592.41.0.231348186327.issue37290@roundup.psfhosted.org> New submission from p : https://docs.python.org/ja/3.5/library/multiprocessing.html?highlight=multiprocessing#module-multiprocessing (?????????????????????????????????????????????????????????????????????????????????) -->??????????????????????????????????????????????????????????????????????? ---------- assignee: docs at python components: Documentation messages: 345659 nosy: docs at python, p priority: normal severity: normal status: open title: Mistranslation versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 03:06:29 2019 From: report at bugs.python.org (Martin Panter) Date: Sat, 15 Jun 2019 07:06:29 +0000 Subject: [issue37290] Mistranslation (Japanese) In-Reply-To: <1560580592.41.0.231348186327.issue37290@roundup.psfhosted.org> Message-ID: <1560582389.26.0.280871705794.issue37290@roundup.psfhosted.org> Change by Martin Panter : ---------- nosy: +cocoatomo title: Mistranslation -> Mistranslation (Japanese) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 03:17:54 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 07:17:54 +0000 Subject: [issue37289] regression in cython due to peephole optomization In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560583074.68.0.89448395533.issue37289@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thanks for the report. I will investigate, but given that the fix just optimizes bytecode as it was done in 3.7, and this is a picke failure, it seems that is likely that some data may need to be regenerated in Cython? Stephan probably can confirm this meanwhile we investigate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 03:37:01 2019 From: report at bugs.python.org (Caleb Hattingh) Date: Sat, 15 Jun 2019 07:37:01 +0000 Subject: [issue34831] Asyncio Tutorial In-Reply-To: <1538134577.09.0.545547206417.issue34831@psf.upfronthosting.co.za> Message-ID: <1560584221.36.0.567513934382.issue34831@roundup.psfhosted.org> Caleb Hattingh added the comment: That was an long two months, apologies. I've made some fixes based on review comments and cleaned up some more of the code samples. The primary outstanding pieces are the client component of the chat application case study, and the GUI integration section of the client case study. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 04:23:00 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 15 Jun 2019 08:23:00 +0000 Subject: [issue37290] Mistranslation (Japanese) In-Reply-To: <1560580592.41.0.231348186327.issue37290@roundup.psfhosted.org> Message-ID: <1560586980.2.0.108419855998.issue37290@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks for the report. Japanese translation is tracked in GitHub at https://github.com/python/python-docs-ja . I think this can be closed as third party issue and this can be raised as a GitHub issue there. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 05:22:15 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 09:22:15 +0000 Subject: [issue37289] regression in cython due to peephole optomization In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560590535.49.0.757931986399.issue37289@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I reverted 3498c642f4e83f3d8e2214654c0fa8e0d51cebe5 and tried to build cython and numpy an it fails for me still: > git log commit 17e024a1a999f96fee52e99bd4587da383647993 (HEAD -> master) Author: Pablo Galindo Date: Sat Jun 15 10:16:52 2019 +0100 revert "bpo-37213: Handle negative line deltas correctly in the peephole optimizer (GH-13969)" This reverts commit 3498c642f4e83f3d8e2214654c0fa8e0d51cebe5. commit 7efc526e5cfb929a79c192ac2dcf7eb78d3a4401 (upstream/master, upstream/HEAD) Author: Victor Stinner Date: Sat Jun 15 03:24:41 2019 +0200 bpo-36707: Document "m" removal from sys.abiflags (GH-14090) ? ~/github/cpython/python.exe -m pip install . --user /Users/pgalindo3/.local/lib/python3.9/site-packages/pip/_vendor/html5lib/_trie/_base.py:3: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working from collections import Mapping Looking in indexes: http://localhost:3141/pablogsal/local/+simple/ Processing /Users/pgalindo3/github/cython Installing collected packages: Cython Running setup.py install for Cython ... done Successfully installed Cython-3.0a0 ? ~/github/cpython/python.exe -m pip install . --user Processing numpy/random/dsfmt.pyx Traceback (most recent call last): File "/private/var/folders/sw/ml9tlhsx7hd7sdqpnlzhrxxh0000gr/T/pip-req-build-1nbv5hs2/tools/cythonize.py", line 243, in main() File "/private/var/folders/sw/ml9tlhsx7hd7sdqpnlzhrxxh0000gr/T/pip-req-build-1nbv5hs2/tools/cythonize.py", line 239, in main find_process_files(root_dir) File "/private/var/folders/sw/ml9tlhsx7hd7sdqpnlzhrxxh0000gr/T/pip-req-build-1nbv5hs2/tools/cythonize.py", line 230, in find_process_files process(root_dir, fromfile, tofile, function, hash_db) File "/private/var/folders/sw/ml9tlhsx7hd7sdqpnlzhrxxh0000gr/T/pip-req-build-1nbv5hs2/tools/cythonize.py", line 196, in process processor_function(fromfile, tofile) File "/private/var/folders/sw/ml9tlhsx7hd7sdqpnlzhrxxh0000gr/T/pip-req-build-1nbv5hs2/tools/cythonize.py", line 85, in process_pyx subprocess.check_call( File "/Users/pgalindo3/github/cpython/Lib/subprocess.py", line 348, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/Users/pgalindo3/github/cpython/python.exe', '-m', 'cython', '-3', '--fast-fail', '-o', 'dsfmt.c', 'dsfmt.pyx']' returned non-zero exit status 1. Traceback (most recent call last): File "", line 1, in File "/private/var/folders/sw/ml9tlhsx7hd7sdqpnlzhrxxh0000gr/T/pip-req-build-1nbv5hs2/setup.py", line 443, in setup_package() File "/private/var/folders/sw/ml9tlhsx7hd7sdqpnlzhrxxh0000gr/T/pip-req-build-1nbv5hs2/setup.py", line 426, in setup_package generate_cython() File "/private/var/folders/sw/ml9tlhsx7hd7sdqpnlzhrxxh0000gr/T/pip-req-build-1nbv5hs2/setup.py", line 234, in generate_cython raise RuntimeError("Running cythonize failed!") RuntimeError: Running cythonize failed! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 05:24:25 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 09:24:25 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560590665.7.0.100703449787.issue37289@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- title: regression in cython due to peephole optomization -> regression in Cython when pickling objects _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 05:26:30 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 09:26:30 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560590790.97.0.754996205311.issue37289@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Did you open a bug in the Cython tracker? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 05:28:49 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 09:28:49 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560590929.74.0.679231308471.issue37289@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I tried to compile numpy with python3.8 alpha 4 and Cython master and still fails: ~/github/numpy master ? ? ~/github/cpython/python.exe --version Python 3.8.0a4 ~/github/numpy master ? ? ~/github/cpython/python.exe -m pip freeze /Users/pgalindo3/.local/lib/python3.8/site-packages/pip/_vendor/html5lib/_trie/_base.py:3: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working from collections import Mapping Cython==3.0a0 ~/github/numpy master ? ? ~/github/cpython/python.exe -m pip install . --user generate_cython() File "/private/var/folders/sw/ml9tlhsx7hd7sdqpnlzhrxxh0000gr/T/pip-req-build-vposbe_c/setup.py", line 234, in generate_cython raise RuntimeError("Running cythonize failed!") RuntimeError: Running cythonize failed! ---------------------------------------- Command "/Users/pgalindo3/github/cpython/python.exe -u -c "import setuptools, tokenize;__file__='/private/var/folders/sw/ml9tlhsx7hd7sdqpnlzhrxxh0000gr/T/pip-req-build-vposbe_c/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/sw/ml9tlhsx7hd7sdqpnlzhrxxh0000gr/T/pip-record-9l43u38y/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /private/var/folders/sw/ml9tlhsx7hd7sdqpnlzhrxxh0000gr/T/pip-req-build-vposbe_c/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 05:36:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 15 Jun 2019 09:36:07 +0000 Subject: [issue36707] The "m" ABI flag of SOABI for pymalloc is no longer needed In-Reply-To: <1556065645.57.0.820338293941.issue36707@roundup.psfhosted.org> Message-ID: <1560591367.72.0.862965058853.issue36707@roundup.psfhosted.org> STINNER Victor added the comment: Ned Deily: > My preference remains to not make the flags change at all Well, "m" in ABI flags became useless around Python 3.4. I don't see the point of pretending that the "m" ABI is different and then provide two names for the same thing: python3.8 and python3.8m python3.8-config and python3.8m-config man python3.8 and man python3.8m etc. I'm not sure why, but on Fedora /usr/bin/python3.7 and /usr/bin/python3.7m are two separated files... with the same content (ex: same MD5 sum). Well, it's just 17 KiB each :-) /usr/bin/python3.7-config is a symlink to python3.7m-config. The change itself is painful for distributors like Red Hat (Fedora, RHEL), but things should be simpler once the change is done. My long-term goal is to get a single ABI for everything: CPython, PyPy, RustPython, MicroPython, etc. :-) Maybe it's not possible, but at least I would like to move towards this goal! Overall project: * https://docs.python.org/3.8/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build * https://pythoncapi.readthedocs.io/ ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 05:39:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 15 Jun 2019 09:39:47 +0000 Subject: [issue36707] The "m" ABI flag of SOABI for pymalloc is no longer needed In-Reply-To: <1556065645.57.0.820338293941.issue36707@roundup.psfhosted.org> Message-ID: <1560591587.65.0.301452192969.issue36707@roundup.psfhosted.org> STINNER Victor added the comment: Thanks everybody for your help. It is now documented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 05:46:28 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 09:46:28 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560591988.1.0.777156397823.issue37289@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I have compiled CPython master, install the current Cython on pypi (not Cython master) and tried to compile numpy and it succeeds. This seems that is something on Cython master. ~/github/numpy master ? ~/github/cpython/python.exe --version Python 3.9.0a0 ~/github/numpy master ? ? ~/github/cpython/python.exe -m pip freeze /Users/pgalindo3/.local/lib/python3.9/site-packages/pip/_vendor/html5lib/_trie/_base.py:3: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working from collections import Mapping Cython==0.29.10 ? ~/github/cpython/python.exe -m pip install . --user /Users/pgalindo3/.local/lib/python3.9/site-packages/pip/_vendor/html5lib/_trie/_base.py:3: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working from collections import Mapping Processing /Users/pgalindo3/github/numpy Installing collected packages: numpy Running setup.py install for numpy ... done Successfully installed numpy-1.17.0.dev0+9f8401f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 06:04:16 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 10:04:16 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560593056.79.0.0990845197997.issue37289@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- Removed message: https://bugs.python.org/msg345668 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 06:10:46 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 10:10:46 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560593446.07.0.235558584196.issue37289@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- Removed message: https://bugs.python.org/msg345665 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 06:10:56 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 10:10:56 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560593456.47.0.344208112783.issue37289@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- Removed message: https://bugs.python.org/msg345663 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 06:11:50 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 10:11:50 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560593510.52.0.290304315634.issue37289@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: [I have deleted some comments claiming that I was not able to reproduce the issue because I managed to reproduce the issue correctly at the end] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 06:16:34 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 15 Jun 2019 10:16:34 +0000 Subject: [issue37290] Mistranslation (Japanese) In-Reply-To: <1560580592.41.0.231348186327.issue37290@roundup.psfhosted.org> Message-ID: <1560593794.88.0.00705115398301.issue37290@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 06:37:03 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 10:37:03 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560595023.39.0.0389875600942.issue37289@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I managed to find the original cause, although I don't understand exactly why it happens. The error is caused by the 'if False' handling of https://github.com/python/cpython/pull/13332. There is some failure in that logic, so for now I made a PR reverting that change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 06:37:26 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 10:37:26 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560595046.64.0.186186096639.issue37289@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +13954 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14099 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 07:05:24 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 15 Jun 2019 11:05:24 +0000 Subject: [issue37279] asyncio sendfile sends extra data in the last chunk in fallback mode In-Reply-To: <1560507904.77.0.354970791225.issue37279@roundup.psfhosted.org> Message-ID: <1560596724.74.0.444936021735.issue37279@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset ef2152354f03a165c5e3adb53e2276934fabd50a by Andrew Svetlov in branch 'master': bpo-37279: Fix asyncio sendfile support when extra data are sent in fallback mode. (GH-14075) https://github.com/python/cpython/commit/ef2152354f03a165c5e3adb53e2276934fabd50a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 07:05:35 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 15 Jun 2019 11:05:35 +0000 Subject: [issue37279] asyncio sendfile sends extra data in the last chunk in fallback mode In-Reply-To: <1560507904.77.0.354970791225.issue37279@roundup.psfhosted.org> Message-ID: <1560596735.17.0.256354730128.issue37279@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13955 pull_request: https://github.com/python/cpython/pull/14100 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 07:09:16 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 15 Jun 2019 11:09:16 +0000 Subject: [issue37280] Use threadpool for reading from file for sendfile fallback mode In-Reply-To: <1560508189.12.0.504777268427.issue37280@roundup.psfhosted.org> Message-ID: <1560596956.03.0.507321370583.issue37280@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- pull_requests: +13956 pull_request: https://github.com/python/cpython/pull/14102 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 07:17:45 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 15 Jun 2019 11:17:45 +0000 Subject: [issue37279] asyncio sendfile sends extra data in the last chunk in fallback mode In-Reply-To: <1560507904.77.0.354970791225.issue37279@roundup.psfhosted.org> Message-ID: <1560597465.57.0.970537875411.issue37279@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- pull_requests: +13957 pull_request: https://github.com/python/cpython/pull/14103 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 07:18:46 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 15 Jun 2019 11:18:46 +0000 Subject: [issue37280] Use threadpool for reading from file for sendfile fallback mode In-Reply-To: <1560508189.12.0.504777268427.issue37280@roundup.psfhosted.org> Message-ID: <1560597526.61.0.992026489346.issue37280@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13958 pull_request: https://github.com/python/cpython/pull/14101 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 07:24:19 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 15 Jun 2019 11:24:19 +0000 Subject: [issue37279] asyncio sendfile sends extra data in the last chunk in fallback mode In-Reply-To: <1560507904.77.0.354970791225.issue37279@roundup.psfhosted.org> Message-ID: <1560597859.85.0.915507640173.issue37279@roundup.psfhosted.org> miss-islington added the comment: New changeset bb07321c6a7e1cbe597c3fc5fa275a85d0f50acb by Miss Islington (bot) in branch '3.8': bpo-37279: Fix asyncio sendfile support when extra data are sent in fallback mode. (GH-14075) https://github.com/python/cpython/commit/bb07321c6a7e1cbe597c3fc5fa275a85d0f50acb ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 07:25:57 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 15 Jun 2019 11:25:57 +0000 Subject: [issue37279] asyncio sendfile sends extra data in the last chunk in fallback mode In-Reply-To: <1560507904.77.0.354970791225.issue37279@roundup.psfhosted.org> Message-ID: <1560597957.78.0.97360589305.issue37279@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 07:26:34 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 15 Jun 2019 11:26:34 +0000 Subject: [issue37280] Use threadpool for reading from file for sendfile fallback mode In-Reply-To: <1560508189.12.0.504777268427.issue37280@roundup.psfhosted.org> Message-ID: <1560597994.64.0.188614795709.issue37280@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 07:27:00 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Jun 2019 11:27:00 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560598020.61.0.161717079197.issue37289@roundup.psfhosted.org> Serhiy Storchaka added the comment: Could you please provide an example of the improperly optimized code? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 07:30:49 2019 From: report at bugs.python.org (David Carlier) Date: Sat, 15 Jun 2019 11:30:49 +0000 Subject: [issue37291] AST - code cleanup Message-ID: <1560598249.35.0.0160143221148.issue37291@roundup.psfhosted.org> New submission from David Carlier : Removing little dead code part. ---------- messages: 345674 nosy: David Carlier priority: normal pull_requests: 13959 severity: normal status: open title: AST - code cleanup versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 07:37:34 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 15 Jun 2019 11:37:34 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences In-Reply-To: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> Message-ID: <1560598654.69.0.498091335726.issue32912@roundup.psfhosted.org> Mark Dickinson added the comment: [Raymond] > Also, it gets in the way of the end-user strategy of "backslash anything that looks special" That's not a good strategy in the first place, though: adding an extra backslash for something that doesn't need to be escaped isn't benign - it's usually an error, since it puts that backslash into the resulting string. >>> "abc\`d" == "abc`d" False In other words, it seems to me that getting in the way of this broken end-user strategy is a *good* thing, since it warns of possible mistakes. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 07:43:59 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 11:43:59 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560599039.88.0.0738736274556.issue37289@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I was not able to find it in Cython but PR14099 fixes it so I prefer to revert the optimization for now and then try to add it back once we understand what's failing exactly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 07:44:29 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 11:44:29 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560599069.16.0.461504092662.issue37289@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 07:56:30 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 15 Jun 2019 11:56:30 +0000 Subject: [issue37279] asyncio sendfile sends extra data in the last chunk in fallback mode In-Reply-To: <1560507904.77.0.354970791225.issue37279@roundup.psfhosted.org> Message-ID: <1560599790.34.0.122467039213.issue37279@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset e5d67f1e31381d28b24f6e1c0f8388d9bf0bfc5f by Andrew Svetlov in branch '3.7': [3.7] bpo-37279: Fix asyncio sendfile support when extra data are sent in fallback mode. (GH-14075). (GH-14103) https://github.com/python/cpython/commit/e5d67f1e31381d28b24f6e1c0f8388d9bf0bfc5f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 08:04:02 2019 From: report at bugs.python.org (SilentGhost) Date: Sat, 15 Jun 2019 12:04:02 +0000 Subject: [issue37291] AST - code cleanup In-Reply-To: <1560598249.35.0.0160143221148.issue37291@roundup.psfhosted.org> Message-ID: <1560600242.32.0.484512633963.issue37291@roundup.psfhosted.org> Change by SilentGhost : ---------- components: +Interpreter Core nosy: +benjamin.peterson type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 08:14:27 2019 From: report at bugs.python.org (Shen Han) Date: Sat, 15 Jun 2019 12:14:27 +0000 Subject: [issue37248] support conversion of `func(**{} if a else b)` In-Reply-To: <1560346847.18.0.350952603259.issue37248@roundup.psfhosted.org> Message-ID: <1560600867.74.0.364700214593.issue37248@roundup.psfhosted.org> Shen Han added the comment: Yes, I think so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 08:16:09 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 15 Jun 2019 12:16:09 +0000 Subject: [issue37248] support conversion of `func(**{} if a else b)` In-Reply-To: <1560346847.18.0.350952603259.issue37248@roundup.psfhosted.org> Message-ID: <1560600969.21.0.619109792514.issue37248@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks for the report. Closing. ---------- stage: -> resolved status: open -> closed superseder: -> Make lib2to3 grammar more closely match Python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 08:16:16 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 15 Jun 2019 12:16:16 +0000 Subject: [issue37248] support conversion of `func(**{} if a else b)` In-Reply-To: <1560346847.18.0.350952603259.issue37248@roundup.psfhosted.org> Message-ID: <1560600976.79.0.186862384551.issue37248@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- resolution: -> duplicate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 09:06:31 2019 From: report at bugs.python.org (Crusader Ky) Date: Sat, 15 Jun 2019 13:06:31 +0000 Subject: [issue37292] _xxsubinterpreters: Can't unpickle objects defined in __main__ Message-ID: <1560603991.54.0.788079404137.issue37292@roundup.psfhosted.org> New submission from Crusader Ky : As of CPython 3.8.0b1: If one pickles an object that is defined in the __main__ module, sends it to a subinterpreter as bytes, and then tries unpickling it there, it fails saying that __main__ doesn't define it. import _xxsubinterpreters as interpreters import pickle class C: pass c = C() interp_id = interpreters.create() c_bytes = pickle.dumps(c) interpreters.run_string( interp_id, "import pickle; pickle.loads(c_bytes)", shared={"c_bytes": c_bytes}, ) If the above is executed directly with the python command-line, it fails. If it's imported from another module, it works. One would expected behaviour compatible with sub-processes spawned with the spawn method, where the__main__ of the parent process is visible to the subprocess too. Workarounds: 1 - define everything that must be pickled in an imported module 2 - use CloudPickle ---------- messages: 345680 nosy: Crusader Ky, eric.snow priority: normal severity: normal status: open title: _xxsubinterpreters: Can't unpickle objects defined in __main__ type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 09:06:41 2019 From: report at bugs.python.org (Crusader Ky) Date: Sat, 15 Jun 2019 13:06:41 +0000 Subject: [issue37292] _xxsubinterpreters: Can't unpickle objects defined in __main__ In-Reply-To: <1560603991.54.0.788079404137.issue37292@roundup.psfhosted.org> Message-ID: <1560604001.89.0.572710447406.issue37292@roundup.psfhosted.org> Change by Crusader Ky : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 09:15:17 2019 From: report at bugs.python.org (Crusader Ky) Date: Sat, 15 Jun 2019 13:15:17 +0000 Subject: [issue37293] concurrent.futures.InterpreterPoolExecutor Message-ID: <1560604517.31.0.263744065617.issue37293@roundup.psfhosted.org> New submission from Crusader Ky : As one of the logical consequences to PEP 554, it would be neat to have a concurrent.futures.InterpreterPoolExecutor. I wrote the initial code at https://github.com/crusaderky/subinterpreters_tests - currently missing unit tests and pickle5 buffers support. If everybody is happy with the design, I'll start working on a PR as soon as the GIL becomes per-interpreter (it's kinda pointless before that). ---------- components: Extension Modules messages: 345681 nosy: Crusader Ky, eric.snow priority: normal severity: normal status: open title: concurrent.futures.InterpreterPoolExecutor type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 10:58:03 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 14:58:03 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560610683.39.0.777188414381.issue37289@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 7a68f8c28bb78d957555a5001dac4df6345434a0 by Pablo Galindo in branch 'master': bpo-37289: Remove 'if False' handling in the peephole optimizer (GH-14099) https://github.com/python/cpython/commit/7a68f8c28bb78d957555a5001dac4df6345434a0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 10:58:13 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 15 Jun 2019 14:58:13 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560610693.55.0.949202857849.issue37289@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13960 pull_request: https://github.com/python/cpython/pull/14111 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 10:58:40 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 15 Jun 2019 14:58:40 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560610720.53.0.327974094312.issue37289@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13961 pull_request: https://github.com/python/cpython/pull/14112 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 11:02:45 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 15 Jun 2019 15:02:45 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1560610965.34.0.284018468483.issue35998@roundup.psfhosted.org> Andrew Svetlov added the comment: Ooops. Looks like a real problem, not test-only :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 11:19:58 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Jun 2019 15:19:58 +0000 Subject: [issue1875] "if 0: return" not raising SyntaxError In-Reply-To: <1200768950.55.0.245752373825.issue1875@psf.upfronthosting.co.za> Message-ID: <1560611998.6.0.317921757072.issue1875@roundup.psfhosted.org> Serhiy Storchaka added the comment: The issue is not fixed yet. The compiler now rejects if 0: return but it still accepts if 1: pass else: return while 0: return ---------- resolution: fixed -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 11:20:40 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 15:20:40 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560612040.29.0.311538230651.issue37289@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Serhiy, this is the code that was incorrectly optimized: 3 0 LOAD_GLOBAL 0 (g) 2 LOAD_ATTR 1 (__code__) 4 POP_JUMP_IF_FALSE 8 6 JUMP_FORWARD 4 (to 12) >> 8 LOAD_CONST 0 (None) 10 POP_JUMP_IF_FALSE 20 4 >> 12 LOAD_GLOBAL 2 (print) 14 LOAD_CONST 2 ('Called!') 16 CALL_FUNCTION 1 18 POP_TOP >> 20 LOAD_CONST 0 (None) 22 RETURN_VALUE def g(): if True if g.__code__ else None: print("Called!") g() The problem is that [LOAD_CONST 0 (None)] made the peephole to delete the block because it does not detect that previous conditions in the same conditional could be True. The general case was made by looking back for POP_JUMP_IF_{FALSE,TRUE} but with this construct JUMP_FORWARD appears. I think handling this condition in the peephole optimizer can be very dangerous error prone to get right because all the information is lost, but doing it at the ast level makes us lose syntax errors in optimized blocks, which is also wrong. Any ideas? It happens here in Cython: https://github.com/cython/cython/blob/master/Cython/Compiler/Nodes.py#L5131 That's why the errors manifest as pickling errors ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 11:21:48 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 15:21:48 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560612108.5.0.586576797271.issue37289@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Just to be clear, before PR14099, the code was wrongly optimized to: 3 0 LOAD_GLOBAL 0 (g) 2 LOAD_ATTR 1 (__code__) 4 POP_JUMP_IF_FALSE 8 6 JUMP_FORWARD 0 (to 8) 4 >> 8 LOAD_CONST 0 (None) 10 RETURN_VALUE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 11:22:11 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 15:22:11 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560612131.32.0.705844410185.issue37289@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 284daeade210d3aac049f4278a1fb76d19e6d78a by Pablo Galindo (Miss Islington (bot)) in branch '3.8': bpo-37289: Remove 'if False' handling in the peephole optimizer (GH-14099) (GH-14112) https://github.com/python/cpython/commit/284daeade210d3aac049f4278a1fb76d19e6d78a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 11:22:37 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 15:22:37 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560612157.49.0.223718254429.issue37289@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 81fecf7b7a6e766a213c6e670219c1da52461589 by Pablo Galindo (Miss Islington (bot)) in branch '3.7': bpo-37289: Remove 'if False' handling in the peephole optimizer (GH-14099) (GH-14111) https://github.com/python/cpython/commit/81fecf7b7a6e766a213c6e670219c1da52461589 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 11:23:55 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 15 Jun 2019 15:23:55 +0000 Subject: [issue36785] Implement PEP 574 In-Reply-To: <1556908101.83.0.107763193732.issue36785@roundup.psfhosted.org> Message-ID: <1560612235.14.0.128684960575.issue36785@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13962 pull_request: https://github.com/python/cpython/pull/14113 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 11:29:46 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 15 Jun 2019 15:29:46 +0000 Subject: [issue35121] Cookie domain check returns incorrect results In-Reply-To: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> Message-ID: <1560612586.94.0.195235768027.issue35121@roundup.psfhosted.org> miss-islington added the comment: New changeset 979daae300916adb399ab5b51410b6ebd0888f13 by Miss Islington (bot) (Xtreak) in branch '2.7': [2.7] bpo-35121: prefix dot in domain for proper subdomain validation (GH-10258) (GH-13426) https://github.com/python/cpython/commit/979daae300916adb399ab5b51410b6ebd0888f13 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 11:41:25 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Jun 2019 15:41:25 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560613285.14.0.788973744059.issue37289@roundup.psfhosted.org> Serhiy Storchaka added the comment: Do you mind to add a test? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 11:46:40 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 15 Jun 2019 15:46:40 +0000 Subject: [issue1572968] release GIL while doing I/O operations in the mmap module Message-ID: <1560613600.78.0.554955757059.issue1572968@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +13963 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14114 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 11:48:30 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 15 Jun 2019 15:48:30 +0000 Subject: [issue1572968] release GIL while doing I/O operations in the mmap module Message-ID: <1560613710.7.0.67844363596.issue1572968@roundup.psfhosted.org> Change by Zackery Spytz : ---------- components: +Extension Modules -Library (Lib) nosy: +ZackerySpytz versions: +Python 3.9 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 11:51:01 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 15:51:01 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560613861.26.0.0107280678314.issue37289@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Sure, will do. How you think we should handle this particular optimization? Do you see a more resilient way of doing this on the peephole optimizer? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 11:52:32 2019 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 15 Jun 2019 15:52:32 +0000 Subject: [issue28009] core logic of uuid.getnode() needs refresh In-Reply-To: <1473290315.48.0.840701308825.issue28009@psf.upfronthosting.co.za> Message-ID: <1560613952.09.0.537606815586.issue28009@roundup.psfhosted.org> Nick Coghlan added the comment: New changeset 3a1d50e7e573efb577714146bed5c03b9c95f466 by Nick Coghlan (Michael Felt) in branch 'master': bpo-28009: Fix uuid SkipUnless logic to be based on platform programs capable of introspection (GH-12777) https://github.com/python/cpython/commit/3a1d50e7e573efb577714146bed5c03b9c95f466 ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 11:52:39 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 15 Jun 2019 15:52:39 +0000 Subject: [issue28009] core logic of uuid.getnode() needs refresh In-Reply-To: <1473290315.48.0.840701308825.issue28009@psf.upfronthosting.co.za> Message-ID: <1560613959.47.0.846867414535.issue28009@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13964 pull_request: https://github.com/python/cpython/pull/14115 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 11:54:22 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 15:54:22 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560614062.46.0.49811048647.issue37289@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Would it make sense to put this on the compiler? When we run compile_if we could check if there is one constant in the test and of the constant is true we skip the block. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 12:03:01 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 15 Jun 2019 16:03:01 +0000 Subject: [issue36785] Implement PEP 574 In-Reply-To: <1556908101.83.0.107763193732.issue36785@roundup.psfhosted.org> Message-ID: <1560614581.06.0.956303739043.issue36785@roundup.psfhosted.org> miss-islington added the comment: New changeset 298023633fde5cd60926a2923a01d896550cbf84 by Miss Islington (bot) in branch '3.8': bpo-36785: PEP 574 What's New entry (GH-13931) https://github.com/python/cpython/commit/298023633fde5cd60926a2923a01d896550cbf84 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 12:09:49 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Jun 2019 16:09:49 +0000 Subject: [issue1875] "if 0: return" not raising SyntaxError In-Reply-To: <1200768950.55.0.245752373825.issue1875@psf.upfronthosting.co.za> Message-ID: <1560614989.95.0.336273555566.issue1875@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +13965 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14116 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 12:09:50 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Jun 2019 16:09:50 +0000 Subject: [issue32477] Move jumps optimization from the peepholer to the compiler In-Reply-To: <1514844207.77.0.467229070634.issue32477@psf.upfronthosting.co.za> Message-ID: <1560614990.06.0.68296983022.issue32477@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +13966 pull_request: https://github.com/python/cpython/pull/14116 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 12:10:37 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 15 Jun 2019 16:10:37 +0000 Subject: [issue28009] core logic of uuid.getnode() needs refresh In-Reply-To: <1473290315.48.0.840701308825.issue28009@psf.upfronthosting.co.za> Message-ID: <1560615037.5.0.0612473874408.issue28009@roundup.psfhosted.org> miss-islington added the comment: New changeset f0e5c01182daefa20c624383c8a37c25eacfde43 by Miss Islington (bot) in branch '3.8': bpo-28009: Fix uuid SkipUnless logic to be based on platform programs capable of introspection (GH-12777) https://github.com/python/cpython/commit/f0e5c01182daefa20c624383c8a37c25eacfde43 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 12:22:31 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Jun 2019 16:22:31 +0000 Subject: [issue32477] Move jumps optimization from the peepholer to the compiler In-Reply-To: <1514844207.77.0.467229070634.issue32477@psf.upfronthosting.co.za> Message-ID: <1560615751.21.0.17231600116.issue32477@roundup.psfhosted.org> Serhiy Storchaka added the comment: PR 14116 is based on the part of PR 5077. It serves three functions: * Finally fixes issue1875. * Simplifies the code. Removes special cases for "if 0" and "while 1". 31 insertions, 80 deletions in Python/compile.c + Python/peephole.c. * However such optimization is now applied in more general cases, not just for "if" and "while". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 12:22:38 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Jun 2019 16:22:38 +0000 Subject: [issue32477] Move jumps optimization from the peepholer to the compiler In-Reply-To: <1514844207.77.0.467229070634.issue32477@psf.upfronthosting.co.za> Message-ID: <1560615758.72.0.127585549555.issue32477@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 12:29:32 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Jun 2019 16:29:32 +0000 Subject: [issue35647] Cookie path check returns incorrect results In-Reply-To: <1546502396.67.0.243403156352.issue35647@roundup.psfhosted.org> Message-ID: <1560616172.28.0.518202195244.issue35647@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset ee15aa2b8501718cb77e339381f72409a416f801 by Serhiy Storchaka (Xtreak) in branch '2.7': [2.7] bpo-35647: Fix path check in cookiejar. (GH-11436) (GH-13427) https://github.com/python/cpython/commit/ee15aa2b8501718cb77e339381f72409a416f801 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 12:34:36 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 15 Jun 2019 16:34:36 +0000 Subject: [issue37251] Mocking a MagicMock with a function spec results in an AsyncMock In-Reply-To: <1560348018.57.0.546920052201.issue37251@roundup.psfhosted.org> Message-ID: <1560616476.53.0.15958969102.issue37251@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +13967 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14117 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 12:36:55 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Jun 2019 16:36:55 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560616615.26.0.510544679812.issue37289@roundup.psfhosted.org> Serhiy Storchaka added the comment: Yes, it could be moved to the compiler. See issue32477 which moves at that direction. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 12:37:47 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 15 Jun 2019 16:37:47 +0000 Subject: [issue35647] Cookie path check returns incorrect results In-Reply-To: <1546502396.67.0.243403156352.issue35647@roundup.psfhosted.org> Message-ID: <1560616667.37.0.332173267694.issue35647@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Closing this as resolved since the fix was merged to all branches. Thank you all. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 12:38:00 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 15 Jun 2019 16:38:00 +0000 Subject: [issue35121] Cookie domain check returns incorrect results In-Reply-To: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> Message-ID: <1560616680.52.0.31790679103.issue35121@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Closing this as resolved since the fix was merged to all branches. Thank you all. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 12:41:48 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Jun 2019 16:41:48 +0000 Subject: [issue37271] Make multiple passes of the peephole optimizer until bytecode cannot be optimized further In-Reply-To: <1560477510.59.0.491449903314.issue37271@roundup.psfhosted.org> Message-ID: <1560616908.89.0.635527958101.issue37271@roundup.psfhosted.org> Serhiy Storchaka added the comment: We should handle this with care and prove that the optimization loop is finite. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 12:44:46 2019 From: report at bugs.python.org (Thomas Caswell) Date: Sat, 15 Jun 2019 16:44:46 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560617086.37.0.488750641817.issue37289@roundup.psfhosted.org> Thomas Caswell added the comment: I can confirm that master branches of cpython, cython, and numpy all build together again, thank you for the quick investigation and fix! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 12:52:55 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 15 Jun 2019 16:52:55 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences In-Reply-To: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> Message-ID: <1560617575.19.0.439303063057.issue32912@roundup.psfhosted.org> Mark Dickinson added the comment: [Aaron] > [...] makes it very difficult for library authors to fix this. If you're willing to use 3rd party libraries, then my own experience is that `pycodestyle` or `flake8` make this easy: you just need to run "flake8 --select W605" at the root of your repository tree to get a list of all the code locations that need to be fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 12:53:06 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 15 Jun 2019 16:53:06 +0000 Subject: [issue37251] Mocking a MagicMock with a function spec results in an AsyncMock In-Reply-To: <1560348018.57.0.546920052201.issue37251@roundup.psfhosted.org> Message-ID: <1560617586.74.0.202595979561.issue37251@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I created PR to ensure the __code__ object is checked to be a CodeType and converted the report to a unittest. I also found a similar function _is_async_func [0] which also seems to perform similar check but is used only in create_autospec. creating an autospec function out of MagicMock with a function spec is not possible so though the change could be made it's not testable. Also changing _is_async_func to _is_async_obj in create_autospec shows no test case failure. Can this be removed to use only _is_async_obj? Is there a difference in their usage due to isawaitable check present in _is_async_obj that needs a test? # create_autospec with MagicMock(spec=lambda x: x) $ cpython git:(bpo37251) ./python.exe Python 3.9.0a0 (heads/master:7a68f8c28b, Jun 15 2019, 21:00:05) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from unittest.mock import * >>> create_autospec(MagicMock()) >>> create_autospec(MagicMock(spec=lambda x: x)) Traceback (most recent call last): File "", line 1, in File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", line 2547, in create_autospec mock = Klass(parent=_parent, _new_parent=_parent, _new_name=_new_name, File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", line 2066, in __init__ super().__init__(*args, **kwargs) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", line 1996, in __init__ _safe_super(AsyncMagicMixin, self).__init__(*args, **kw) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", line 1007, in __init__ _safe_super(CallableMixin, self).__init__( File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", line 442, in __init__ self._mock_add_spec(spec, spec_set, _spec_as_instance, _eat_self) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", line 503, in _mock_add_spec res = _get_signature_object(spec, File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", line 99, in _get_signature_object return func, inspect.signature(sig_func) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/inspect.py", line 3093, in signature return Signature.from_callable(obj, follow_wrapped=follow_wrapped) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/inspect.py", line 2842, in from_callable return _signature_from_callable(obj, sigcls=cls, File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/inspect.py", line 2292, in _signature_from_callable return _signature_from_function(sigcls, obj, File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/inspect.py", line 2175, in _signature_from_function parameters.append(Parameter(name, annotation=annotation, File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/inspect.py", line 2495, in __init__ raise TypeError(msg) TypeError: name must be a str, not a MagicMock [0] https://github.com/python/cpython/blob/3a1d50e7e573efb577714146bed5c03b9c95f466/Lib/unittest/mock.py#L55 ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 12:58:59 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 16:58:59 +0000 Subject: [issue37271] Make multiple passes of the peephole optimizer until bytecode cannot be optimized further In-Reply-To: <1560477510.59.0.491449903314.issue37271@roundup.psfhosted.org> Message-ID: <1560617939.53.0.485514677813.issue37271@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: We can add a #define for a maximum numbers of iterations. The pyperformance test suite shows speed ups of 2-3% without PGO/LTO. I will ran more concise experiments including PGO but even with a max cap of iterations (10 in my experiments) we get nice improvements without much more complexity. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 13:01:59 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 17:01:59 +0000 Subject: [issue37271] Make multiple passes of the peephole optimizer until bytecode cannot be optimized further In-Reply-To: <1560477510.59.0.491449903314.issue37271@roundup.psfhosted.org> Message-ID: <1560618119.05.0.589991316692.issue37271@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Probably is not that easy, but a naive thought respecting loops: As the peephole optimizer only produces code that is the same length or smaller and it works by feeling noops and deleting them, the only loop would be code that is of the same length but different, but that cannot happen by adding noops and removing them, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 13:45:31 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 15 Jun 2019 17:45:31 +0000 Subject: [issue37271] Make multiple passes of the peephole optimizer until bytecode cannot be optimized further In-Reply-To: <1560477510.59.0.491449903314.issue37271@roundup.psfhosted.org> Message-ID: <1560620731.75.0.281101150653.issue37271@roundup.psfhosted.org> Raymond Hettinger added the comment: Tim, do you have any thoughts on this? In the past, there was an implicit red-line that we would not cross even if a performance improvement was possible. Given that that was a long time ago and that the newer devs are both more aggressive and more fearless, we ought to re-examine whether the red-line should be made explicit or whether it no longer applies. For this particular patch, a source of discomfort is that the optimization step takes longer (due to multiple passes). So, we sometimes get faster wordcode but that time it takes to get there is longer. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 13:47:34 2019 From: report at bugs.python.org (Big Stone) Date: Sat, 15 Jun 2019 17:47:34 +0000 Subject: [issue35360] Update SQLite to 3.26 in Windows and macOS installer builds In-Reply-To: <1543580070.45.0.788709270274.issue35360@psf.upfronthosting.co.za> Message-ID: <1560620854.13.0.295726905835.issue35360@roundup.psfhosted.org> Big Stone added the comment: any hope for beta2 ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 13:49:58 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Sat, 15 Jun 2019 17:49:58 +0000 Subject: [issue37294] ProcessPoolExecutor fails with super Message-ID: <1560620998.84.0.271411330169.issue37294@roundup.psfhosted.org> New submission from G?ry : The following code hangs forever instead of printing "called" 10 times: from concurrent.futures import ProcessPoolExecutor class A: def f(self): print("called") class B(A): def f(self): executor = ProcessPoolExecutor(max_workers=2) futures = [executor.submit(super(B, self).f) for _ in range(10)] if __name__ == "__main__": B().f() The same code with `super(B, self)` replaced with `super()` raises the following error: > TypeError: super(type, obj): obj must be an instance or subtype of type However, replacing `ProcessPoolExecutor` with `ThreadPoolExecutor` works as expected, but only with `super(B, self)` (with `super()` it still raises the same error). ---------- components: Library (Lib) messages: 345709 nosy: asvetlov, bquinlan, inada.naoki, lukasz.langa, maggyero, ned.deily, pitrou, serhiy.storchaka priority: normal severity: normal status: open title: ProcessPoolExecutor fails with super type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 13:52:48 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 15 Jun 2019 17:52:48 +0000 Subject: [issue37271] Make multiple passes of the peephole optimizer until bytecode cannot be optimized further In-Reply-To: <1560477510.59.0.491449903314.issue37271@roundup.psfhosted.org> Message-ID: <1560621168.7.0.246984085897.issue37271@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: >So, we sometimes get faster wordcode but that time it takes to get there is longer. Is worth noting that the (very small) overhead to obtain the wordcode happens once but the benefits of the resulting opcode will be felt every time you execute it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 13:52:54 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Sat, 15 Jun 2019 17:52:54 +0000 Subject: [issue37294] ProcessPoolExecutor fails with super In-Reply-To: <1560620998.84.0.271411330169.issue37294@roundup.psfhosted.org> Message-ID: <1560621174.32.0.308919011937.issue37294@roundup.psfhosted.org> Change by G?ry : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 14:41:46 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 15 Jun 2019 18:41:46 +0000 Subject: [issue33972] AttributeError in email.message.iter_attachments() In-Reply-To: <1530024211.47.0.56676864532.issue33972@psf.upfronthosting.co.za> Message-ID: <1560624106.07.0.0825617480988.issue33972@roundup.psfhosted.org> Change by Abhilash Raj : ---------- pull_requests: +13968 pull_request: https://github.com/python/cpython/pull/14119 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 15:17:40 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 15 Jun 2019 19:17:40 +0000 Subject: [issue37295] Possible optimizations for math.comb() Message-ID: <1560626260.31.0.393863097125.issue37295@roundup.psfhosted.org> New submission from Raymond Hettinger : The implementation of math.comb() is nice in that it limits the size of intermediate values as much as possible and it avoids unnecessary steps when min(k,n-k) is small with respect to k. There are some ways it can be made better or faster: 1) For small values of n, there is no need to use PyLong objects at every step. Plain C integers would suffice and we would no longer need to make repeated allocations for all the intermediate values. For 32-bit builds, this could be done for n<=30. For 64-bit builds, it applies to n<=62. Adding this fast path would likely give a 10x to 50x speed-up. 2) For slightly larger values of n, the computation could be sped-up by precomputing one or more rows of binomial coefficients (perhaps for n=75, n=150, and n=225). The calculation could then start from that row instead of from higher rows on Pascal's triangle. For example comb(100, 55) is currently computed as: comb(55,1) * 56 // 2 * 57 // 3 ... 100 // 45 <== 45 steps Instead, it could be computed as: comb(75,20) * 76 // 21 * 77 // 22 ... 100 / 45 <== 25 steps ^-- found by table lookup This gives a nice speed-up in exchange for a little memory in an array of constants (for n=75, we would need an array of length 75//2 after exploiting symmetry). Almost all cases would should show some benefit and in favorable cases like comb(76, 20) the speed-up would be nearly 75x. 3) When k is close to n/2, the current algorithm is slower than just computing (n!) / (k! * (n-k)!). However, the factorial method comes at the cost of more memory usage for large n. The factorial method consumes memory proportional to n*log2(n) while the current early-cancellation method uses memory proportional to n+log2(n). Above some threshold for memory pain, the current method should always be preferred. I'm not sure the factorial method should be used at all, but it is embarrassing that factorial calls sometimes beat the current C implementation: $ python3.8 -m timeit -r 11 -s 'from math import comb, factorial as fact' -s 'n=100_000' -s 'k = n//2' 'comb(n, k)' 1 loop, best of 11: 1.52 sec per loop $ python3.8 -m timeit -r 11 -s 'from math import comb, factorial as fact' -s 'n=100_000' -s 'k = n//2' 'fact(n) // (fact(k) * fact(n-k))' 1 loop, best of 11: 518 msec per loop 4) For values such as n=1_000_000 and k=500_000, the running time is very long and the routine doesn't respond to SIGINT. We could add checks for keyboard interrupts for large n. Also consider releasing the GIL. 5) The inner-loop current does a pure python subtraction than could in many cases be done with plain C integers. When n is smaller than maxsize, we could have a code path that replaces "PyNumber_Subtract(factor, _PyLong_One)" with something like "PyLong_FromUnsignedLongLong((unsigned long long)n - i)". ---------- components: Library (Lib) messages: 345711 nosy: mark.dickinson, pablogsal, rhettinger, serhiy.storchaka, tim.peters priority: normal severity: normal status: open title: Possible optimizations for math.comb() type: performance versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 15:27:39 2019 From: report at bugs.python.org (Rick) Date: Sat, 15 Jun 2019 19:27:39 +0000 Subject: [issue37296] pdb next vs __next__ Message-ID: <1560626859.25.0.0533027405715.issue37296@roundup.psfhosted.org> New submission from Rick : Don't know how to get version from pdb, Makefile says 2.7 Code runs but when debugging I get an error that an iterator has no next() function. It has got a __next__() function, and it runs, just not under pdb. If I create a spurious next() function, pdb runs, and calls the __next__() function. ---------- messages: 345712 nosy: tsingi priority: normal severity: normal status: open title: pdb next vs __next__ type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 15:53:38 2019 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 15 Jun 2019 19:53:38 +0000 Subject: [issue37294] ProcessPoolExecutor fails with super In-Reply-To: <1560620998.84.0.271411330169.issue37294@roundup.psfhosted.org> Message-ID: <1560628418.28.0.859551150499.issue37294@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 15:53:55 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 15 Jun 2019 19:53:55 +0000 Subject: [issue37271] Make multiple passes of the peephole optimizer until bytecode cannot be optimized further In-Reply-To: <1560477510.59.0.491449903314.issue37271@roundup.psfhosted.org> Message-ID: <1560628435.66.0.234205510386.issue37271@roundup.psfhosted.org> Raymond Hettinger added the comment: I'm familiar with the trade-offs (I'm the original designer of this code), but it is possible to use that reasoning to talk yourself into thinking that any optimization to code generation is worth it. The speed of the compile does matter as well (think about uses of exec() in dataclasses for example). Also, the level of complexity matters as well. The last time we introduced recursive passes for part of the peepholer (in constant folding), it took years to get it fully debugged and it caused a number of bug reports with respect to total compilation time. FWIW, Guido was never sold on the merits of having a peephole optimizer and the tool spent much of its life on the verge of being ripped-out. To accommodate his wishes and our design instincts, we agreed at the outset to keep this "dirt simple". (Put another way, for over a decade every developer who looked at this resisted going down this obvious line of development). That said, I'll leave it to Tim to decide. He helped talked Guido into letting me add this and he is the one who first proposed setting tight limits on how far we would go. (One last thought, be sure to coordinate with Serhiy who is actively transferring responsibilities upstream to the AST level manipulations so they can be analyzed at a higher level.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 15:58:30 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 15 Jun 2019 19:58:30 +0000 Subject: [issue37294] ProcessPoolExecutor fails with super In-Reply-To: <1560620998.84.0.271411330169.issue37294@roundup.psfhosted.org> Message-ID: <1560628710.01.0.236947958255.issue37294@roundup.psfhosted.org> Andrew Svetlov added the comment: The use case is weird. I don't think we need to do something with the issue. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 15:58:59 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 15 Jun 2019 19:58:59 +0000 Subject: [issue37294] ProcessPoolExecutor fails with super In-Reply-To: <1560620998.84.0.271411330169.issue37294@roundup.psfhosted.org> Message-ID: <1560628739.88.0.606108946739.issue37294@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 16:49:08 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Jun 2019 20:49:08 +0000 Subject: [issue37271] Make multiple passes of the peephole optimizer until bytecode cannot be optimized further In-Reply-To: <1560477510.59.0.491449903314.issue37271@roundup.psfhosted.org> Message-ID: <1560631748.34.0.877129876584.issue37271@roundup.psfhosted.org> Serhiy Storchaka added the comment: I afraid that the time of the peephole optimization is nothing in comparison with the cost of deduplicating constants in compile.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 16:56:13 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Sat, 15 Jun 2019 20:56:13 +0000 Subject: [issue37294] ProcessPoolExecutor fails with super In-Reply-To: <1560620998.84.0.271411330169.issue37294@roundup.psfhosted.org> Message-ID: <1560632173.11.0.60138346228.issue37294@roundup.psfhosted.org> G?ry added the comment: @Andrew Svetlov Well this was just an example for illustrating the issue. In real code I need this to create `ThreadPoolMixin` and `ProcessPoolMixin` classes (similar to the `socketserver.ThreadingMixIn` and `socketserver.ForkingMixIn` classes in the standard library, but using a thread/process pool with a fixed size instead of creating a new thread/process per request) for mixing with my server classes. But because of this `ProcessPoolExecutor` issue, I cannot use my `ProcessPoolMixin` class but only my `ThreadPoolMixin` currently. The fact is one cannot submit a parent method call to a `ProcessPoolExecutor`. This code snippet prints the exception raised by the call: from concurrent.futures import ProcessPoolExecutor class A: def f(self): print("called") class B(A): def f(self): executor = ProcessPoolExecutor(max_workers=2) print(executor.submit(super().f).exception()) if __name__ == "__main__": B().f() It prints this: > [Errno 24] Too many open files > None > None > None > ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 17:11:32 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 15 Jun 2019 21:11:32 +0000 Subject: [issue37271] Make multiple passes of the peephole optimizer until bytecode cannot be optimized further In-Reply-To: <1560477510.59.0.491449903314.issue37271@roundup.psfhosted.org> Message-ID: <1560633092.12.0.104709562114.issue37271@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 18:21:15 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Sat, 15 Jun 2019 22:21:15 +0000 Subject: [issue37294] concurrent.futures.ProcessPoolExecutor and multiprocessing.pool.Pool fail with super In-Reply-To: <1560620998.84.0.271411330169.issue37294@roundup.psfhosted.org> Message-ID: <1560637275.58.0.89059030021.issue37294@roundup.psfhosted.org> G?ry added the comment: And like the `concurrent.futures` module for `concurrent.futures.ProcessPoolExecutor` but not for `concurrent.futures.ThreadPoolExecutor` (see above), the `multiprocessing.pool` module seems also affected by a similar problem for `multiprocessing.pool.Pool` (process pools) but not for `multiprocessing.pool.ThreadPool` (thread pools). Indeed the following code: import multiprocessing.pool class A: def f(self): print("called") class B(A): def f(self): pool = multiprocessing.pool.Pool(2) pool.apply(super().f) if __name__ == "__main__": B().f() raises the following exception: > AssertionError: daemonic processes are not allowed to have children ---------- title: ProcessPoolExecutor fails with super -> concurrent.futures.ProcessPoolExecutor and multiprocessing.pool.Pool fail with super _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 19:22:49 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 15 Jun 2019 23:22:49 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560640969.61.0.222849520777.issue37289@roundup.psfhosted.org> STINNER Victor added the comment: I don't understand if this issue is a recent regression or not. Python 3.7 has been modified, but the reporter only mentions Python 3.8. I concur with Serhiy, a test is needed to prevent future regressions on this fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 20:13:31 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sun, 16 Jun 2019 00:13:31 +0000 Subject: [issue37260] shutil.rmtree() FileNotFoundError race condition In-Reply-To: <1560388241.37.0.285109327745.issue37260@roundup.psfhosted.org> Message-ID: <1560644011.14.0.752282887709.issue37260@roundup.psfhosted.org> Jeffrey Kintscher added the comment: The PR is ready for review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 20:38:45 2019 From: report at bugs.python.org (Tim Peters) Date: Sun, 16 Jun 2019 00:38:45 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: <1560645525.41.0.64275156879.issue32846@roundup.psfhosted.org> Tim Peters added the comment: Thanks, Terry! Based on your latest results, "quadratic time" isn't plausible here anymore, so I'm closing this. Nasty cache effects certainly played a role, but they were just a flea on the dog ;-) ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 21:40:57 2019 From: report at bugs.python.org (George Xie) Date: Sun, 16 Jun 2019 01:40:57 +0000 Subject: [issue37297] function changed when pickle bound method object Message-ID: <1560649257.15.0.526142047149.issue37297@roundup.psfhosted.org> New submission from George Xie : if we create a bound method object `f` with function object `A.f` and instance object `B()`, when pickling this bound method object: import pickle class A(): def f(self): pass class B(): def f(self): pass o = B() f = A.f.__get__(o) pf = pickle.loads(pickle.dumps(f)) print(f) print(pf) we get: > > the underlaying function are lost, changed from `A.f` to `B.f`. as pickle calls `__reduce__` method of `method object`, IMO [its implementation][1] simply ignored the real function, whcih is not right. I have tried a [wordaround][2]: import types import copyreg def my_reduce(obj): return (obj.__func__.__get__, (obj.__self__,)) copyreg.pickle(types.MethodType, my_reduce) [1]: https://github.com/python/cpython/blob/v3.7.3/Objects/classobject.c#L75-L89 [2]: https://stackoverflow.com/a/56614748/4201810 ---------- components: Library (Lib) messages: 345721 nosy: georgexsh priority: normal severity: normal status: open title: function changed when pickle bound method object type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 21:51:12 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Jun 2019 01:51:12 +0000 Subject: [issue37298] IDLE: Revise html to tkinker converter for help.html Message-ID: <1560649872.44.0.457910225797.issue37298@roundup.psfhosted.org> New submission from Terry J. Reedy : Sphinx 2.? generates different html than 1.8 such that the display of Help ==> IDLE Help has extra blank lines. Among possibly other things, the contents of
  • ...
  • is wrapped in

    ...

    and blank lines appear between the bullet and text.
      -
    • coded in 100% pure Python, using the tkinter GUI toolkit
    • -
    • cross-platform: works mostly the same on Windows, Unix, and macOS
    • ... +
    • coded in 100% pure Python, using the tkinter GUI toolkit

    • +
    • cross-platform: works mostly the same on Windows, Unix, and macOS

    • ...
    A similar issue afflicts the menu, with blank lines between the menu item and the explanation. The html original 3x/Doc/build/html/library/idle.html#index-0 looks normal in Firefox. The html parser class in help.py needs to ignore

    within

  • . It should specify which version of Sphinx it is compatible with. Do any of you have any idea what the html change might be about? Is there something wrong with idle.rst? ---------- assignee: terry.reedy components: IDLE messages: 345722 nosy: cheryl.sabella, markroseman, mdk, terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Revise html to tkinker converter for help.html type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 22:22:30 2019 From: report at bugs.python.org (YoSTEALTH) Date: Sun, 16 Jun 2019 02:22:30 +0000 Subject: [issue37299] RuntimeWarning is NOT raised Message-ID: <1560651750.57.0.52730011587.issue37299@roundup.psfhosted.org> New submission from YoSTEALTH : from asyncio import run async def true(): return True async def false(): return False async def error(): a = false() b = true() return await (a or b) # Good Error # "RuntimeWarning: coroutine 'true' was never awaited print(await error())" async def no_error(): return await (false() or true()) # False # Bad Problem # `RuntimeWarning` is not raised for 'true'. # Note # The correct syntax is `return (await false()) or (await true()) as it should return `True` # not `False` async def test(): print(await no_error()) # False print(await error()) # RuntimeWarning(...), False if __name__ == '__main__': run(test()) - Tested in Python 3.8.0b1 - Why does `error()` return `RuntimeWarning` but `no_error()` does not? ---------- components: asyncio messages: 345723 nosy: YoSTEALTH, asvetlov, yselivanov priority: normal severity: normal status: open title: RuntimeWarning is NOT raised type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 22:30:33 2019 From: report at bugs.python.org (hai shi) Date: Sun, 16 Jun 2019 02:30:33 +0000 Subject: [issue37300] a Py_XINCREF in classobject.c are not necessary Message-ID: <1560652233.24.0.743311547248.issue37300@roundup.psfhosted.org> Change by hai shi : ---------- components: Interpreter Core nosy: shihai1991 priority: normal severity: normal status: open title: a Py_XINCREF in classobject.c are not necessary type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 22:34:04 2019 From: report at bugs.python.org (hai shi) Date: Sun, 16 Jun 2019 02:34:04 +0000 Subject: [issue37300] a Py_XINCREF in classobject.c are not necessary Message-ID: <1560652444.61.0.474294719721.issue37300@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +13969 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14120 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 23:38:49 2019 From: report at bugs.python.org (vsbogd) Date: Sun, 16 Jun 2019 03:38:49 +0000 Subject: [issue37301] CGIHTTPServer doesn't handle long POST requests Message-ID: <1560656329.17.0.731326583269.issue37301@roundup.psfhosted.org> New submission from vsbogd : Steps to reproduce: Use POST request with "multipart/form-data" encoding to pass long (more than 64KiB) file to the CGI script. Expected result: Script receives the whole file. Actual result: Script receives only first part which size is about size of the TCP packet. Scripts to test issue are attached. To run test execute: $ python test_cgi_server.py & $ python test_cgi_client.py $ kill %1 ---------- components: Library (Lib) files: test_cgi.zip messages: 345724 nosy: vsbogd priority: normal severity: normal status: open title: CGIHTTPServer doesn't handle long POST requests type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file48423/test_cgi.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 15 23:50:37 2019 From: report at bugs.python.org (vsbogd) Date: Sun, 16 Jun 2019 03:50:37 +0000 Subject: [issue37301] CGIHTTPServer doesn't handle long POST requests In-Reply-To: <1560656329.17.0.731326583269.issue37301@roundup.psfhosted.org> Message-ID: <1560657037.14.0.131884305953.issue37301@roundup.psfhosted.org> vsbogd added the comment: Analysis: self.rfile.read(nbytes) https://github.com/python/cpython/blob/3a1d50e7e573efb577714146bed5c03b9c95f466/Lib/http/server.py#L1207 Doesn't read full content of the file but only first chunk because self.rfile is not BufferedIO instance. In fact it is SocketIO instance. The reason is that CGIHTTPServer sets rbufsize to 0: # Make rfile unbuffered -- we need to read one line and then pass # the rest to a subprocess, so we can't use buffered input. rbufsize = 0 https://github.com/python/cpython/blob/3a1d50e7e573efb577714146bed5c03b9c95f466/Lib/http/server.py#L975-L977 So the minimal fix is to set rbufsize back to -1 again. This fix requires one more change, because code below: # throw away additional data [see bug #427345] while select.select([self.rfile._sock], [], [], 0)[0]: if not self.rfile._sock.recv(1): break https://github.com/python/cpython/blob/3a1d50e7e573efb577714146bed5c03b9c95f466/Lib/http/server.py#L1210-L1213 expects self.rfile instance to be SocketIO. This could be fixed by replacing this code by: So the minimal fix is to set rbufsize back to -1 again. This fix requires one more change, because code below: # throw away additional data [see bug #427345] while select.select([self.rfile], [], [], 0)[0]: if not self.rfile.read(1): break like it is implemented in another branch of the condition check: https://github.com/python/cpython/blob/3a1d50e7e573efb577714146bed5c03b9c95f466/Lib/http/server.py#L1163-L1166 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 00:46:08 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sun, 16 Jun 2019 04:46:08 +0000 Subject: [issue37302] Add an "onerror" callback parameter to the tempfile.TemporaryDirectory member functions Message-ID: <1560660368.0.0.203020777798.issue37302@roundup.psfhosted.org> New submission from Jeffrey Kintscher : Add an "onerror" callback parameter to the tempfile.TemporaryDirectory member functions so that the caller can perform special handling for directory items that it can't automatically delete. The caller created the undeletable directory entries, so it is reasonable to believe the caller may know how to unmake what they made. This enhancement is needed to provide the desired behavior described in issue #29982 and issue #36422. ---------- messages: 345726 nosy: Jeffrey.Kintscher, giampaolo.rodola, gvanrossum, josh.r, max, paul.moore, riccardomurri, serhiy.storchaka, steve.dower, tarek, tim.golden, zach.ware priority: normal severity: normal status: open title: Add an "onerror" callback parameter to the tempfile.TemporaryDirectory member functions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 00:55:09 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 16 Jun 2019 04:55:09 +0000 Subject: [issue37303] Rename parameter name of imghdr what Message-ID: <1560660909.55.0.86099057914.issue37303@roundup.psfhosted.org> New submission from Dong-hee Na : Still https://github.com/python/cpython/blob/3a1d50e7e573efb577714146bed5c03b9c95f466/Lib/imghdr.py#L11 signature is def what(file, h=None). I 'd like to suggest to update it into def what(filename, h=None) Also, the doc of imghdr represents it as the filename. https://docs.python.org/3/library/imghdr.html note that sndhdr is already using this name. https://github.com/python/cpython/blob/3a1d50e7e573efb577714146bed5c03b9c95f466/Lib/sndhdr.py#L52 If this proposal is accepted, I'd like to send a patch for it. ---------- components: Library (Lib) messages: 345727 nosy: corona10 priority: normal severity: normal status: open title: Rename parameter name of imghdr what type: enhancement versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 01:04:24 2019 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 16 Jun 2019 05:04:24 +0000 Subject: [issue37302] Add an "onerror" callback parameter to the tempfile.TemporaryDirectory member functions In-Reply-To: <1560660368.0.0.203020777798.issue37302@roundup.psfhosted.org> Message-ID: <1560661464.32.0.0605699124655.issue37302@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 01:52:18 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 16 Jun 2019 05:52:18 +0000 Subject: [issue37303] Rename parameter name of imghdr what In-Reply-To: <1560660909.55.0.86099057914.issue37303@roundup.psfhosted.org> Message-ID: <1560664338.94.0.633120883469.issue37303@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: file can be a positional or keyword argument. Someone might be using it as a keyword argument and this would require a deprecation period before renaming could be done. ./python.exe Python 3.9.0a0 (heads/master:7a68f8c28b, Jun 15 2019, 21:00:05) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import inspect, imghdr >>> imghdr.what(file="README.rst") >>> imghdr.what("README.rst") >>> inspect.signature(imghdr.what).parameters['file'].kind.description 'positional or keyword' ---------- nosy: +xtreak versions: -Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 02:24:06 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Jun 2019 06:24:06 +0000 Subject: [issue37303] Rename parameter name of imghdr what In-Reply-To: <1560660909.55.0.86099057914.issue37303@roundup.psfhosted.org> Message-ID: <1560666246.97.0.0158538719255.issue37303@roundup.psfhosted.org> Serhiy Storchaka added the comment: Inlike to sndhdr.what(), imghdr.what() accepts not only file names, by file objects theirself. The feature was added at 1997 in 45ac47c0b2798cc3a29cf5111694aba5e9347e08. ---------- nosy: +serhiy.storchaka resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 02:49:02 2019 From: report at bugs.python.org (Tal Einat) Date: Sun, 16 Jun 2019 06:49:02 +0000 Subject: [issue35922] robotparser crawl_delay and request_rate do not work with no matching entry In-Reply-To: <1549485183.59.0.634497522614.issue35922@roundup.psfhosted.org> Message-ID: <1560667742.68.0.364769578251.issue35922@roundup.psfhosted.org> Tal Einat added the comment: New changeset 8047e0e1c620f69cc21f9ca48b24bf2cdd5c3668 by Tal Einat (R?mi Lapeyre) in branch 'master': bpo-35922: Fix RobotFileParser when robots.txt has no relevant crawl delay or request rate (GH-11791) https://github.com/python/cpython/commit/8047e0e1c620f69cc21f9ca48b24bf2cdd5c3668 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 02:49:24 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 16 Jun 2019 06:49:24 +0000 Subject: [issue35922] robotparser crawl_delay and request_rate do not work with no matching entry In-Reply-To: <1549485183.59.0.634497522614.issue35922@roundup.psfhosted.org> Message-ID: <1560667764.77.0.660107391695.issue35922@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13970 pull_request: https://github.com/python/cpython/pull/14121 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 02:49:31 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 16 Jun 2019 06:49:31 +0000 Subject: [issue35922] robotparser crawl_delay and request_rate do not work with no matching entry In-Reply-To: <1549485183.59.0.634497522614.issue35922@roundup.psfhosted.org> Message-ID: <1560667771.69.0.813052994358.issue35922@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13971 pull_request: https://github.com/python/cpython/pull/14122 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 02:59:34 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 16 Jun 2019 06:59:34 +0000 Subject: [issue37295] Possible optimizations for math.comb() In-Reply-To: <1560626260.31.0.393863097125.issue37295@roundup.psfhosted.org> Message-ID: <1560668374.5.0.803230906803.issue37295@roundup.psfhosted.org> Raymond Hettinger added the comment: Optimizations 2 and 3 look something like this: bc75 = [comb(75, r) for r in range(75//2+1)] bc150 = [comb(150, r) for r in range(150//2+1)] bc225 = [comb(225, r) for r in range(225//2+1)] def comb(n, k): if n < 0 or k < 0: raise ValueError if k > n: return 0 k = min(k, n-k) if k > n // 3 and n < 100_000: return factorial(n) // (factorial(r) * factorial(n-r)) if 75 <= n <= 75 + k: c, num, den, times = bc75[75-(n-k)], 75+1, 75-(n-k)+1, n-75 elif 150 <= n <= 150 + k: c, num, den, times = bc150[150-(n-k)], 150+1, 150-(n-k)+1, n-150 elif 225 <= n <= 225 + k: c, num, den, times = bc225[225-(n-k)], 225+1, 225-(n-k)+1, n-225 else: c, num, den, times = 1, n-k+1, 1, k for i in range(times): c = c * num // den num += 1 den += 1 return c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 03:07:58 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 16 Jun 2019 07:07:58 +0000 Subject: [issue35922] robotparser crawl_delay and request_rate do not work with no matching entry In-Reply-To: <1549485183.59.0.634497522614.issue35922@roundup.psfhosted.org> Message-ID: <1560668878.05.0.107317561261.issue35922@roundup.psfhosted.org> miss-islington added the comment: New changeset 58a1a76baefc92d9e2392a5dbf65e39e44fb8f55 by Miss Islington (bot) in branch '3.8': bpo-35922: Fix RobotFileParser when robots.txt has no relevant crawl delay or request rate (GH-11791) https://github.com/python/cpython/commit/58a1a76baefc92d9e2392a5dbf65e39e44fb8f55 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 03:10:09 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 16 Jun 2019 07:10:09 +0000 Subject: [issue35922] robotparser crawl_delay and request_rate do not work with no matching entry In-Reply-To: <1549485183.59.0.634497522614.issue35922@roundup.psfhosted.org> Message-ID: <1560669009.46.0.0482702905622.issue35922@roundup.psfhosted.org> miss-islington added the comment: New changeset 45d6547acfb9ae1639adbe03dd14f38cd0642ca2 by Miss Islington (bot) in branch '3.7': bpo-35922: Fix RobotFileParser when robots.txt has no relevant crawl delay or request rate (GH-11791) https://github.com/python/cpython/commit/45d6547acfb9ae1639adbe03dd14f38cd0642ca2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 03:14:52 2019 From: report at bugs.python.org (Tal Einat) Date: Sun, 16 Jun 2019 07:14:52 +0000 Subject: [issue35922] robotparser crawl_delay and request_rate do not work with no matching entry In-Reply-To: <1549485183.59.0.634497522614.issue35922@roundup.psfhosted.org> Message-ID: <1560669292.66.0.296404479963.issue35922@roundup.psfhosted.org> Tal Einat added the comment: R?mi, thanks for the great work writing the PR and quickly going through several iterations of reviews and revisions! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 03:56:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 16 Jun 2019 07:56:57 +0000 Subject: [issue35647] Cookie path check returns incorrect results In-Reply-To: <1560616667.37.0.332173267694.issue35647@roundup.psfhosted.org> Message-ID: STINNER Victor added the comment: Well done Karthikeyan Singaravelan! I planned to review your 2.7 change, but I didn't manage to find time for that. So thanks Serhiy for merging it! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 03:58:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 16 Jun 2019 07:58:29 +0000 Subject: [issue35121] Cookie domain check returns incorrect results In-Reply-To: <1560616680.52.0.31790679103.issue35121@roundup.psfhosted.org> Message-ID: STINNER Victor added the comment: Again, well done Karthikeyan Singaravelan! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 04:02:30 2019 From: report at bugs.python.org (hai shi) Date: Sun, 16 Jun 2019 08:02:30 +0000 Subject: [issue37300] a Py_XINCREF in classobject.c are not necessary Message-ID: <1560672150.38.0.453600538086.issue37300@roundup.psfhosted.org> New submission from hai shi : a Py_XINCREF in classobject.c are not necessary ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 05:34:30 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Sun, 16 Jun 2019 09:34:30 +0000 Subject: [issue37297] function changed when pickle bound method object In-Reply-To: <1560649257.15.0.526142047149.issue37297@roundup.psfhosted.org> Message-ID: <1560677670.92.0.262743129978.issue37297@roundup.psfhosted.org> Change by G?ry : ---------- nosy: +maggyero _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 05:36:41 2019 From: report at bugs.python.org (Christopher A. Chavez) Date: Sun, 16 Jun 2019 09:36:41 +0000 Subject: [issue34796] Tkinter scrollbar issues on Mac. In-Reply-To: <1537834124.67.0.545547206417.issue34796@psf.upfronthosting.co.za> Message-ID: <1560677801.21.0.07954657142.issue34796@roundup.psfhosted.org> Change by Christopher A. Chavez : ---------- nosy: +chrstphrchvz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 05:46:23 2019 From: report at bugs.python.org (hai shi) Date: Sun, 16 Jun 2019 09:46:23 +0000 Subject: [issue37304] compiler need support in(de)crement operation or all of it should have syntax error. Message-ID: <1560678383.11.0.0486916958299.issue37304@roundup.psfhosted.org> New submission from hai shi : compiler need support unary operation of in(de)crement or all of it should have syntax error.I have found many user have confused about it(such as:https://stackoverflow.com/questions/2632677/python-integer-incrementing-with). Of course, it is a big change of grammar and it need core developer team to make decision. If core developer team support it, i will try my best to do it;) The behavior is: $ ./python Python 3.8.0a4+ (heads/master:e225beb, Jun 4 2019, 00:35:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> i = 1; >>> ++i 1 >>> i++ File "", line 1 i++ ^ SyntaxError: invalid syntax ---------- components: Interpreter Core messages: 345738 nosy: shihai1991 priority: normal severity: normal status: open title: compiler need support in(de)crement operation or all of it should have syntax error. type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 06:14:06 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 16 Jun 2019 10:14:06 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1560680046.32.0.0913465349075.issue35431@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13972 pull_request: https://github.com/python/cpython/pull/14125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 06:20:41 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 16 Jun 2019 10:20:41 +0000 Subject: [issue37304] compiler need support in(de)crement operation or all of it should have syntax error. In-Reply-To: <1560678383.11.0.0486916958299.issue37304@roundup.psfhosted.org> Message-ID: <1560680441.07.0.898864811324.issue37304@roundup.psfhosted.org> Steven D'Aprano added the comment: For the reasons already discussed on the Stackoverflow link you gave, Python does not have pre- and post-increment and -decrement operators, and probably never will. I'm closing this ticket as Won't Fix, but if you wish to discuss it further, you can raise it on Python-Ideas for community feedback. If there is significant interest, you can then write a PEP for it, and if the PEP is approved, then you can re-open this ticket and provide a PR or patch. https://mail.python.org/mailman3/lists/python-ideas.python.org/ https://www.python.org/dev/peps/ ---------- nosy: +steven.daprano resolution: -> wont fix stage: -> resolved status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 06:28:00 2019 From: report at bugs.python.org (shajianrui) Date: Sun, 16 Jun 2019 10:28:00 +0000 Subject: [issue37301] CGIHTTPServer doesn't handle long POST requests In-Reply-To: <1560656329.17.0.731326583269.issue37301@roundup.psfhosted.org> Message-ID: <1560680880.71.0.641198769762.issue37301@roundup.psfhosted.org> shajianrui added the comment: I have the same problem, and use a similar walk-around: 1. I set the rbufsize to -1 2. I use self.connection.recv instead of self.rfile.read(), like this: while select.select([self.connection], [], [], 0)[0]: if not self.connection.recv(1): However, when I go through the code, I find that at line 967 in server.py(I am using python 3.7), there is a comment: # Make rfile unbuffered -- we need to read one line and then pass # the rest to a subprocess, so we can't use buffered input. rbufsize = 0 Seems for some reasons the author set rfile unbuffered, and I know nothing about it. If you know much about it, please give me some hints, thank you. ---------- nosy: +shajianrui _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 06:41:01 2019 From: report at bugs.python.org (=?utf-8?q?Filip_=C5=A0?=) Date: Sun, 16 Jun 2019 10:41:01 +0000 Subject: [issue37305] Add MIME type for Web App Manifest Message-ID: <1560681661.87.0.393263592015.issue37305@roundup.psfhosted.org> New submission from Filip ? : Web App Manifest ( https://w3c.github.io/manifest/ ) is "JSON-based manifest file that provides developers with a centralized place to put metadata associated with a web application". Although it is not required, it is recommended by W3C ( https://w3c.github.io/manifest/#media-type-registration ) that manifest uses `application/manifest+json` media type and `.webmanifest` extension. This should also be used by Python's mimetypes module. I can submit PR for this, but I don't know if it should be added to `types_map` or `common_types`. It is currently not registered with IANA, but it is "for community review and will be submitted to the IESG for review, approval, and registration with IANA". If it is not strictly needed for MIME type that it is registered with IANA, I will add it to `types_map`. If it is, I will add it `common_types` and later move it to `types_map` when it will be registered. What should I choose? ---------- messages: 345741 nosy: filips123 priority: normal severity: normal status: open title: Add MIME type for Web App Manifest type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 06:42:36 2019 From: report at bugs.python.org (SilentGhost) Date: Sun, 16 Jun 2019 10:42:36 +0000 Subject: [issue37301] CGIHTTPServer doesn't handle long POST requests In-Reply-To: <1560656329.17.0.731326583269.issue37301@roundup.psfhosted.org> Message-ID: <1560681756.08.0.135888212204.issue37301@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 06:51:50 2019 From: report at bugs.python.org (Alejandro Gonzalez) Date: Sun, 16 Jun 2019 10:51:50 +0000 Subject: [issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call In-Reply-To: <1480885774.84.0.670239959771.issue28869@psf.upfronthosting.co.za> Message-ID: <1560682310.42.0.376610198049.issue28869@roundup.psfhosted.org> Change by Alejandro Gonzalez : ---------- keywords: +patch pull_requests: +13973 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14126 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 07:08:35 2019 From: report at bugs.python.org (hai shi) Date: Sun, 16 Jun 2019 11:08:35 +0000 Subject: [issue37304] compiler need support in(de)crement operation or all of it should have syntax error. In-Reply-To: <1560678383.11.0.0486916958299.issue37304@roundup.psfhosted.org> Message-ID: <1560683315.52.0.0973466192438.issue37304@roundup.psfhosted.org> hai shi added the comment: Thank for your suggestion,Steven. If python can not support post-increment and -decrement operators now, i think ++i should raise syntax error as i++. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 07:43:42 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 16 Jun 2019 11:43:42 +0000 Subject: [issue37289] regression in Cython when pickling objects In-Reply-To: <1560570212.11.0.192149114574.issue37289@roundup.psfhosted.org> Message-ID: <1560685422.41.0.80785401951.issue37289@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +13974 pull_request: https://github.com/python/cpython/pull/14127 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 07:56:02 2019 From: report at bugs.python.org (flipchan) Date: Sun, 16 Jun 2019 11:56:02 +0000 Subject: [issue37306] "~/" not working with open() function in posix systems Message-ID: <1560686162.92.0.88188278628.issue37306@roundup.psfhosted.org> New submission from flipchan : "~/" being a shortcut to the current home directory on posix systems(bsd/linux). its not working with the build in open() function open: It works to get the path as a string: with open(str(Path.home())+'/.hey', wb') as minfil: minfil.write(nycklen) But not out of the box: with open('~/.hey', 'wb') as minfil: minfil.write(nycklen) However, "~/" is working with os.path modules: os.path.isfile("~/.hey") Tested with Python 3.6.8 ---------- components: Library (Lib) messages: 345743 nosy: flipchan priority: normal severity: normal status: open title: "~/" not working with open() function in posix systems type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 07:59:07 2019 From: report at bugs.python.org (Franklin? Lee) Date: Sun, 16 Jun 2019 11:59:07 +0000 Subject: [issue37307] isinstance/issubclass doc isn't clear on whether it's an AND or an OR. Message-ID: <1560686347.4.0.566273891061.issue37307@roundup.psfhosted.org> New submission from Franklin? Lee : isinstance: > If classinfo is not a class (type object), it may be a tuple of type objects, or may recursively contain other such tuples (other sequence types are not accepted). issubclass: > classinfo may be a tuple of class objects, in which case every entry in classinfo will be checked. It is unclear from the docs whether issubclass(bool, (int, float)) should return True (because bool is a subclass of int), or False (because bool is NOT a subclass of float). (It returns True.) It's likely also false that every entry will be checked, since presumably the function uses short-circuit logic. issubclass's doc also doesn't mention the recursive tuple case that isinstance's doc has. ---------- assignee: docs at python components: Documentation messages: 345744 nosy: docs at python, leewz priority: normal severity: normal status: open title: isinstance/issubclass doc isn't clear on whether it's an AND or an OR. type: enhancement versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 08:09:26 2019 From: report at bugs.python.org (flipchan) Date: Sun, 16 Jun 2019 12:09:26 +0000 Subject: [issue37306] "~/" not working with open() function in posix systems In-Reply-To: <1560686162.92.0.88188278628.issue37306@roundup.psfhosted.org> Message-ID: <1560686966.39.0.31474370569.issue37306@roundup.psfhosted.org> flipchan added the comment: scratch """ However, "~/" is working with os.path modules: os.path.isfile("~/.hey") """ that's not working either ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 08:13:45 2019 From: report at bugs.python.org (SilentGhost) Date: Sun, 16 Jun 2019 12:13:45 +0000 Subject: [issue37306] "~/" not working with open() function in posix systems In-Reply-To: <1560686162.92.0.88188278628.issue37306@roundup.psfhosted.org> Message-ID: <1560687225.64.0.534277289935.issue37306@roundup.psfhosted.org> SilentGhost added the comment: Yes, '~' is not working out of the box and never had. You need to use os.path.expanduser or pathllib.Path.expanduser to get the useable path. ---------- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 08:23:06 2019 From: report at bugs.python.org (SilentGhost) Date: Sun, 16 Jun 2019 12:23:06 +0000 Subject: [issue37307] isinstance/issubclass doc isn't clear on whether it's an AND or an OR. In-Reply-To: <1560686347.4.0.566273891061.issue37307@roundup.psfhosted.org> Message-ID: <1560687786.85.0.072213613968.issue37307@roundup.psfhosted.org> SilentGhost added the comment: Where are you seeing the text you've quoted for isinstance? You've marked as all versions affected, but for the master docs the text for isinstance is different and is unambiguous re treatment of tuple classinfo. I agree with all your points about issubclass ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 08:24:53 2019 From: report at bugs.python.org (SilentGhost) Date: Sun, 16 Jun 2019 12:24:53 +0000 Subject: [issue37307] isinstance/issubclass doc isn't clear on whether it's an AND or an OR. In-Reply-To: <1560686347.4.0.566273891061.issue37307@roundup.psfhosted.org> Message-ID: <1560687893.56.0.44192817913.issue37307@roundup.psfhosted.org> SilentGhost added the comment: > It's likely also false that every entry will be checked, since presumably the function uses short-circuit logic. This, however, would be good to verify first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 08:29:23 2019 From: report at bugs.python.org (Franklin? Lee) Date: Sun, 16 Jun 2019 12:29:23 +0000 Subject: [issue37307] isinstance/issubclass doc isn't clear on whether it's an AND or an OR. In-Reply-To: <1560686347.4.0.566273891061.issue37307@roundup.psfhosted.org> Message-ID: <1560688163.72.0.10840203127.issue37307@roundup.psfhosted.org> Franklin? Lee added the comment: My mistake. I selected all versions after checking issubclass for 2.7 and several 3.x, but added the isinstance notes later without paying attention to versions. I copied the isinstance text from 3.2 docs. As you said, it's not the current text. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 08:32:03 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 16 Jun 2019 12:32:03 +0000 Subject: [issue37307] isinstance/issubclass doc isn't clear on whether it's an AND or an OR. In-Reply-To: <1560686347.4.0.566273891061.issue37307@roundup.psfhosted.org> Message-ID: <1560688323.49.0.318193890227.issue37307@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: docstring for issubclass is a bit clear on the behavior issubclass(cls, class_or_tuple, /) Return whether 'cls' is a derived from another class or is the same class. A tuple, as in ``issubclass(x, (A, B, ...))``, may be given as the target to check against. This is equivalent to ``issubclass(x, A) or issubclass(x, B) or ...`` etc. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 08:34:32 2019 From: report at bugs.python.org (Franklin? Lee) Date: Sun, 16 Jun 2019 12:34:32 +0000 Subject: [issue37307] isinstance/issubclass doc isn't clear on whether it's an AND or an OR. In-Reply-To: <1560686347.4.0.566273891061.issue37307@roundup.psfhosted.org> Message-ID: <1560688472.35.0.804002903903.issue37307@roundup.psfhosted.org> Franklin? Lee added the comment: > > It's likely also false that every entry will be checked, since presumably the function uses short-circuit logic. > This, however, would be good to verify first. Verified. https://github.com/python/cpython/blob/36dcaab7fde5d2e54cdeff5b705b5adcb27726dd/Objects/abstract.c#L2517 It loops through the tuple until it finds success or error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 08:37:45 2019 From: report at bugs.python.org (SilentGhost) Date: Sun, 16 Jun 2019 12:37:45 +0000 Subject: [issue37307] isinstance/issubclass doc isn't clear on whether it's an AND or an OR. In-Reply-To: <1560686347.4.0.566273891061.issue37307@roundup.psfhosted.org> Message-ID: <1560688665.82.0.3931981019.issue37307@roundup.psfhosted.org> SilentGhost added the comment: It's the same behaviour as for isinstance, could be enough to add "classinfo is treated as in isinstance call" to avoid duplication. This would also solve short-cutting imprecision. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 08:40:50 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 16 Jun 2019 12:40:50 +0000 Subject: [issue37306] "~/" not working with open() function in posix systems In-Reply-To: <1560686162.92.0.88188278628.issue37306@roundup.psfhosted.org> Message-ID: <1560688850.09.0.938387754006.issue37306@roundup.psfhosted.org> Steven D'Aprano added the comment: Support for "~" isn't strictly part of the POSIX file system standard, it is a *shell* shortcut. As far as the file system is concerned, "~" is just a regular character like any other. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 09:07:18 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 16 Jun 2019 13:07:18 +0000 Subject: [issue37304] compiler need support in(de)crement operation or all of it should have syntax error. In-Reply-To: <1560678383.11.0.0486916958299.issue37304@roundup.psfhosted.org> Message-ID: <1560690438.78.0.350331832721.issue37304@roundup.psfhosted.org> Eric V. Smith added the comment: Since ++i already has a meaning, it won't become a syntax error without an extremely good reason, and I don't think this case meets that standard. But as Steven says, if you want to pursue it, you should start with a discussion on python-ideas. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 09:47:43 2019 From: report at bugs.python.org (Caleb Hattingh) Date: Sun, 16 Jun 2019 13:47:43 +0000 Subject: [issue34831] Asyncio Tutorial In-Reply-To: <1538134577.09.0.545547206417.issue34831@psf.upfronthosting.co.za> Message-ID: <1560692863.59.0.800401052014.issue34831@roundup.psfhosted.org> Caleb Hattingh added the comment: FYI I'm going to be using the 3rd-party prompt-toolkit for the chat client. (The server depends only on asyncio only). I put several hours research into finding a way for the CLI chat client to be not terrible, but it gets very complicated trying to manage stdin and stdout with asyncio. OTOH prompt-toolkit just gives us exactly what we need, and the code looks short, neat and easy to understand. I hope that's ok (that I'll be mentioning a 3rd party lib in the tutorial). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 10:15:29 2019 From: report at bugs.python.org (Marco Sulla) Date: Sun, 16 Jun 2019 14:15:29 +0000 Subject: [issue36964] `python3 -m venv NAME`: virtualenv is not portable In-Reply-To: <1558267639.25.0.0700835222258.issue36964@roundup.psfhosted.org> Message-ID: <1560694529.45.0.112006196876.issue36964@roundup.psfhosted.org> Marco Sulla added the comment: > I don't like the idea of changing what VIRTUAL_ENV gets set to when I > believe you should recreate the virtual environment as necessary and > risk surprising people who expect VIRTUAL_ENV to function as it does > today and has for years. (Talking to the wind) Well, didn't you have software tests? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 10:55:17 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Jun 2019 14:55:17 +0000 Subject: [issue34796] Tkinter scrollbar issues on Mac. In-Reply-To: <1537834124.67.0.545547206417.issue34796@psf.upfronthosting.co.za> Message-ID: <1560696917.34.0.233431340931.issue34796@roundup.psfhosted.org> Terry J. Reedy added the comment: Ned, is the version of tcl/tk on Mac the same in 3.8.0b1 and upcoming 3.7.4 as it was last September? (8.6.8 in 3.7.3, not sure in Sept.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 11:10:51 2019 From: report at bugs.python.org (Tal Einat) Date: Sun, 16 Jun 2019 15:10:51 +0000 Subject: [issue36429] Fix starting IDLE with pyshell In-Reply-To: <1553569758.24.0.333404497739.issue36429@roundup.psfhosted.org> Message-ID: <1560697851.69.0.235840340084.issue36429@roundup.psfhosted.org> Tal Einat added the comment: Terry, it looks like you merged a fix for this. Should this be closed? ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 11:15:35 2019 From: report at bugs.python.org (hai shi) Date: Sun, 16 Jun 2019 15:15:35 +0000 Subject: [issue37304] compiler need support in(de)crement operation or all of it should have syntax error. In-Reply-To: <1560678383.11.0.0486916958299.issue37304@roundup.psfhosted.org> Message-ID: <1560698135.43.0.94746671628.issue37304@roundup.psfhosted.org> hai shi added the comment: got it, Eric ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 11:50:30 2019 From: report at bugs.python.org (Ned Deily) Date: Sun, 16 Jun 2019 15:50:30 +0000 Subject: [issue34831] Asyncio Tutorial In-Reply-To: <1538134577.09.0.545547206417.issue34831@psf.upfronthosting.co.za> Message-ID: <1560700230.64.0.833965405637.issue34831@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: -ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 12:30:48 2019 From: report at bugs.python.org (Aymeric Augustin) Date: Sun, 16 Jun 2019 16:30:48 +0000 Subject: [issue34506] Traceback logged when SSL handshake fails In-Reply-To: <1535269470.94.0.56676864532.issue34506@psf.upfronthosting.co.za> Message-ID: <1560702648.82.0.973020324304.issue34506@roundup.psfhosted.org> Aymeric Augustin added the comment: The same issue was reported in the bug tracker for websockets: https://github.com/aaugustin/websockets/issues/614 ---------- nosy: +aymeric.augustin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 12:44:20 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 16 Jun 2019 16:44:20 +0000 Subject: [issue37295] Possible optimizations for math.comb() In-Reply-To: <1560626260.31.0.393863097125.issue37295@roundup.psfhosted.org> Message-ID: <1560703460.75.0.718470697393.issue37295@roundup.psfhosted.org> Mark Dickinson added the comment: (1), (4) and (5) sound good to me. For (1), it might make sense to ignore the 32-bit vs. 64-bit distinction and use `uint64_t` for the internal computations. Then we can do up to n = 62 regardless of platform. (2) feels like too much extra complication to me, but that would become clearer with an implementation. For (3), I somewhat agree that the factorial method should be avoided. For (4), I don't see how/when the GIL could be released: doesn't the algorithm involve lots of memory allocations/deallocations and reference count adjustments? Can the suggested performance improvements go into 3.8, or should they wait for 3.9? It's not clear to me whether a performance improvement after feature freeze is okay or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 13:03:26 2019 From: report at bugs.python.org (Inada Naoki) Date: Sun, 16 Jun 2019 17:03:26 +0000 Subject: [issue28805] Add documentation for METH_FASTCALL and _PyObject_FastCall*() In-Reply-To: <1480158534.61.0.510309261592.issue28805@psf.upfronthosting.co.za> Message-ID: <1560704606.76.0.859004453554.issue28805@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 5600b5e1b24a3491e83f1b3038a7ea047a34c0bf by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-28805: document METH_FASTCALL (GH-14079) https://github.com/python/cpython/commit/5600b5e1b24a3491e83f1b3038a7ea047a34c0bf ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 13:23:58 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 16 Jun 2019 17:23:58 +0000 Subject: [issue37308] Possible mojibake in mmap.mmap() when using the tagname parameter on Windows Message-ID: <1560705838.82.0.210132642555.issue37308@roundup.psfhosted.org> New submission from Zackery Spytz : mmap.mmap() passes a char * encoded as UTF-8 to CreateFileMappingA() when the tagname parameter is used. This was reported by Eryk Sun on PR 14114. ---------- components: Extension Modules, Windows messages: 345763 nosy: ZackerySpytz, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Possible mojibake in mmap.mmap() when using the tagname parameter on Windows type: behavior versions: Python 2.7, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 13:30:55 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 16 Jun 2019 17:30:55 +0000 Subject: [issue37308] Possible mojibake in mmap.mmap() when using the tagname parameter on Windows In-Reply-To: <1560705838.82.0.210132642555.issue37308@roundup.psfhosted.org> Message-ID: <1560706255.23.0.0769209632232.issue37308@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +13975 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14133 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 14:42:03 2019 From: report at bugs.python.org (Ned Deily) Date: Sun, 16 Jun 2019 18:42:03 +0000 Subject: [issue34796] Tkinter scrollbar issues on Mac. In-Reply-To: <1537834124.67.0.545547206417.issue34796@psf.upfronthosting.co.za> Message-ID: <1560710523.15.0.771568262918.issue34796@roundup.psfhosted.org> Ned Deily added the comment: As far as I recall, we have only ever shipped 8.6.8 in final releases since we started providing a built-in Tcl/Tk in the python.org macOS installers as of 3.7.0, 3.6.8, and 2.7.16 (https://www.python.org/download/mac/tcltk/). There was the disastrous attempt to update to 8.6.9+ during the 3.7.2rc phase which we ultimately reverted prior to 3.7.2 final, as documented in Issue35485. Since then, there do not seem to have been any official releases of 8.6.9 so we remain with 8.6.8. It would probably be a good thing for someone to work with the Tk folks on seeing whether the problems seen are being resolved but it's not something I expect to have time for in the foreseeable future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 14:46:14 2019 From: report at bugs.python.org (Ned Deily) Date: Sun, 16 Jun 2019 18:46:14 +0000 Subject: [issue34796] Tkinter scrollbar issues on Mac. In-Reply-To: <1537834124.67.0.545547206417.issue34796@psf.upfronthosting.co.za> Message-ID: <1560710774.77.0.864757417772.issue34796@roundup.psfhosted.org> Ned Deily added the comment: > Since then, there do not seem to have been any official releases of 8.6.9 so we remain with 8.6.8 That is: there have been no official releases of Tk past 8.6.9.1 which was tried, along with the then current HEAD of the 8.6 maintenance branch, back in December. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 14:53:08 2019 From: report at bugs.python.org (Ned Deily) Date: Sun, 16 Jun 2019 18:53:08 +0000 Subject: [issue34506] Traceback logged when SSL handshake fails In-Reply-To: <1535269470.94.0.56676864532.issue34506@psf.upfronthosting.co.za> Message-ID: <1560711188.54.0.131185221748.issue34506@roundup.psfhosted.org> Change by Ned Deily : ---------- components: +asyncio nosy: +asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 15:07:44 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Jun 2019 19:07:44 +0000 Subject: [issue36429] Fix starting IDLE with pyshell In-Reply-To: <1553569758.24.0.333404497739.issue36429@roundup.psfhosted.org> Message-ID: <1560712064.91.0.717530742329.issue36429@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 15:09:00 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Jun 2019 19:09:00 +0000 Subject: [issue36429] Fix starting IDLE with pyshell In-Reply-To: <1553569758.24.0.333404497739.issue36429@roundup.psfhosted.org> Message-ID: <1560712140.26.0.800809820239.issue36429@roundup.psfhosted.org> Terry J. Reedy added the comment: Yep. I changes the headers but must have neglected to hit [Submit Changes]. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 15:14:44 2019 From: report at bugs.python.org (Christopher A. Chavez) Date: Sun, 16 Jun 2019 19:14:44 +0000 Subject: [issue34796] Tkinter scrollbar issues on Mac. In-Reply-To: <1537834124.67.0.545547206417.issue34796@psf.upfronthosting.co.za> Message-ID: <1560712484.94.0.959535473289.issue34796@roundup.psfhosted.org> Christopher A. Chavez added the comment: I have not successfully reproduced the issue here with tkinter 3.7.3 using 8.6.9.1 or recent core-8-6-branch on macOS Mojave. I understand the reporter of this issue believed this was not an upstream Tk issue. However there's a recently opened upstream ticket relating to scrollbars on Aqua which may be of interest: https://core.tcl-lang.org/tk/info/8476b757811b3694 At the moment, one of the Tk Aqua developers appears to advise against using the normal (non-Ttk) scrollbar at all on macOS because it has never worked properly and likely will not be fixed, and instead suggests using the new Ttk scrollbar implementation, which should be available in 8.6.10. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 15:20:38 2019 From: report at bugs.python.org (Ned Deily) Date: Sun, 16 Jun 2019 19:20:38 +0000 Subject: [issue34796] Tkinter scrollbar issues on Mac. In-Reply-To: <1537834124.67.0.545547206417.issue34796@psf.upfronthosting.co.za> Message-ID: <1560712838.57.0.238318980843.issue34796@roundup.psfhosted.org> Ned Deily added the comment: As far as I recall, the scrollbar issue did seem to be fixed in 8.6.9.1 so that was one plus for updating. But, as described in Issue35485, updating introduced other, far more serious new problems so we decided to revert to 8.6.8 and wait for a new official release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 15:21:51 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Jun 2019 19:21:51 +0000 Subject: [issue34796] Tkinter scrollbar issues on Mac. In-Reply-To: <1537834124.67.0.545547206417.issue34796@psf.upfronthosting.co.za> Message-ID: <1560712911.04.0.867343489779.issue34796@roundup.psfhosted.org> Terry J. Reedy added the comment: This should probably be closed as 3rd party, but someone needs to verify that the bug is in tk. In the meanwhile, let it sit. Vlad's test works perfectly on Windows with 8.6.9. In multiple tries, mouse at (x, Y <= 16) is top arrow, (x, y >= 17) is slider. ---------- nosy: -ronaldoussoren stage: needs patch -> test needed versions: +Python 3.9 -Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 15:33:41 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Jun 2019 19:33:41 +0000 Subject: [issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call In-Reply-To: <1480885774.84.0.670239959771.issue28869@psf.upfronthosting.co.za> Message-ID: <1560713621.86.0.63063182753.issue28869@roundup.psfhosted.org> Serhiy Storchaka added the comment: Getting the module name from the caller's frame is an expensive operation. It is safe to set __module__ to None. In such case the pickle module is able to find the proper module containing the definition of the class. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 15:34:17 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Jun 2019 19:34:17 +0000 Subject: [issue34796] Tkinter scrollbar issues on Mac. In-Reply-To: <1537834124.67.0.545547206417.issue34796@psf.upfronthosting.co.za> Message-ID: <1560713657.1.0.831771138176.issue34796@roundup.psfhosted.org> Terry J. Reedy added the comment: Christopher, I submitted before seeing your message. Thank you for the additional info, which verifies that this is an upstream issue. Apparently, the current ttk.Scrollbar on the 8.6.8 we currently deliver should sort of work. ---------- resolution: -> third party stage: test needed -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 15:37:09 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Jun 2019 19:37:09 +0000 Subject: [issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call In-Reply-To: <1480885774.84.0.670239959771.issue28869@psf.upfronthosting.co.za> Message-ID: <1560713829.5.0.677405601178.issue28869@roundup.psfhosted.org> Serhiy Storchaka added the comment: >>> from abc import * >>> A = ABCMeta('A', (), {}) >>> A.__module__ 'abc' >>> import pickle, pickletools >>> pickletools.dis(pickletools.optimize(pickle.dumps(A))) Traceback (most recent call last): File "", line 1, in _pickle.PicklingError: Can't pickle : attribute lookup A on abc failed >>> A.__module__ = None >>> pickletools.dis(pickletools.optimize(pickle.dumps(A))) 0: \x80 PROTO 4 2: \x95 FRAME 15 11: \x8c SHORT_BINUNICODE '__main__' 21: \x8c SHORT_BINUNICODE 'A' 24: \x93 STACK_GLOBAL 25: . STOP highest protocol among opcodes = 4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 15:45:42 2019 From: report at bugs.python.org (Christopher A. Chavez) Date: Sun, 16 Jun 2019 19:45:42 +0000 Subject: [issue34796] Tkinter scrollbar issues on Mac. In-Reply-To: <1537834124.67.0.545547206417.issue34796@psf.upfronthosting.co.za> Message-ID: <1560714342.73.0.810506531099.issue34796@roundup.psfhosted.org> Christopher A. Chavez added the comment: > Apparently, the current ttk.Scrollbar on the 8.6.8 we currently deliver should sort of work. I'm not sure if that is the case, though I have not tested with 8.6.8 (I do not currently have access to High Sierra or earlier). Based on a comment by the developer (Marc Culler) in https://core.tcl-lang.org/tk/tktview?name=0d63621b6c it sounds like the Ttk scrollbar is a completely new implementation for 8.6.10, whereas before (8.6.9.1? 8.6.8?) any code requesting a Ttk scrollbar on Aqua normally got a non-Ttk scrollbar instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 16:05:39 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Sun, 16 Jun 2019 20:05:39 +0000 Subject: [issue37297] function changed when pickle bound method object In-Reply-To: <1560649257.15.0.526142047149.issue37297@roundup.psfhosted.org> Message-ID: <1560715539.84.0.468461100921.issue37297@roundup.psfhosted.org> Change by G?ry : ---------- nosy: +brett.cannon, pitrou, rhettinger, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 16:14:13 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Jun 2019 20:14:13 +0000 Subject: [issue34796] Tkinter scrollbar issues on Mac. In-Reply-To: <1537834124.67.0.545547206417.issue34796@psf.upfronthosting.co.za> Message-ID: <1560716053.89.0.836140344806.issue34796@roundup.psfhosted.org> Terry J. Reedy added the comment: IDLE currently uses whatever 'ttk.Scrollbar' is. Unlike Windows, there are no top and bottom arrows, but this is also true with Safari, so I presume normal. "Clicking trough near slider has no effect". True for large file and small slider, not for medium file with large slider. "Clicking top of slider treated as clicking on trough above slider. True for about top 2 mm of the slider, when click and hold does not grab the slider. If the slider is not at the top, it moves up. So ttk slider becomes less useful as the file gets large, and only half usable at about 3000 lines and up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 16:19:33 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 16 Jun 2019 20:19:33 +0000 Subject: [issue37300] a Py_XINCREF in classobject.c are not necessary In-Reply-To: <1560672150.38.0.453600538086.issue37300@roundup.psfhosted.org> Message-ID: <1560716373.54.0.403214361555.issue37300@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset c83356cae2e375324ff4a3fb5d574ebde5c827a9 by Benjamin Peterson (Hai Shi) in branch 'master': closes bpo-37300: Remove unnecessary Py_XINCREF in classobject.c. (GH-14120) https://github.com/python/cpython/commit/c83356cae2e375324ff4a3fb5d574ebde5c827a9 ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 16:20:16 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Sun, 16 Jun 2019 20:20:16 +0000 Subject: [issue37297] function changed when pickle bound method object In-Reply-To: <1560649257.15.0.526142047149.issue37297@roundup.psfhosted.org> Message-ID: <1560716416.43.0.229386793536.issue37297@roundup.psfhosted.org> G?ry added the comment: As you stated on Stackoverflow, the fact that the function `A.f` becomes the function `B.f` after a pickling-unpickling sequence creates an infinite recursive call of `B.f` in worker processes started with `multiprocessing.pool.Pool().apply(super().f)` or `concurrent.futures.ProcessPoolExecutor().submit(super().f)` in `B.f` where B is a subclass of A. This infinite recursion has crashed my laptop several times today, so it looks like it is a rather critical issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 16:31:45 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Sun, 16 Jun 2019 20:31:45 +0000 Subject: [issue37294] concurrent.futures.ProcessPoolExecutor and multiprocessing.pool.Pool fail with super In-Reply-To: <1560620998.84.0.271411330169.issue37294@roundup.psfhosted.org> Message-ID: <1560717105.86.0.176621951864.issue37294@roundup.psfhosted.org> G?ry added the comment: George Xie found the root cause of this issue (a bug in the function method_reduce in cpython/Objects/classobject.c): https://stackoverflow.com/questions/56609847/why-do-concurrent-futures-processpoolexecutor-and-multiprocessing-pool-pool-fail/56614748#56614748 and he filed the specific bug here: https://bugs.python.org/issue37297 The issue looks serious as it creates an infinite recursion that crashed my laptop several times today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 16:34:13 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 16 Jun 2019 20:34:13 +0000 Subject: [issue37220] test_idle crash on Windows 2.7 when run with -R: In-Reply-To: <1560206989.94.0.836960275888.issue37220@roundup.psfhosted.org> Message-ID: <1560717253.05.0.99058032389.issue37220@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch pull_requests: +13976 pull_request: https://github.com/python/cpython/pull/14134 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 16:34:16 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Jun 2019 20:34:16 +0000 Subject: [issue37220] test_idle crash on Windows 2.7 when run with -R: In-Reply-To: <1560206989.94.0.836960275888.issue37220@roundup.psfhosted.org> Message-ID: <1560717256.73.0.618956088815.issue37220@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 66d47da86aff15be34adbec02596bb3188684c0d by Terry Jan Reedy in branch 'master': bpo-37220: Fix 2.7 test -R crash on Windows. (GH-13957) https://github.com/python/cpython/commit/66d47da86aff15be34adbec02596bb3188684c0d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 16:40:18 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 16 Jun 2019 20:40:18 +0000 Subject: [issue37220] test_idle crash on Windows 2.7 when run with -R: In-Reply-To: <1560206989.94.0.836960275888.issue37220@roundup.psfhosted.org> Message-ID: <1560717618.55.0.641722760631.issue37220@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13977 pull_request: https://github.com/python/cpython/pull/14135 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 16:52:35 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 16 Jun 2019 20:52:35 +0000 Subject: [issue37220] test_idle crash on Windows 2.7 when run with -R: In-Reply-To: <1560206989.94.0.836960275888.issue37220@roundup.psfhosted.org> Message-ID: <1560718355.03.0.678977890715.issue37220@roundup.psfhosted.org> miss-islington added the comment: New changeset 0c45aee8036a27fb76d6d8d4bac61c3715aec22d by Miss Islington (bot) in branch '3.7': bpo-37220: Fix 2.7 test -R crash on Windows. (GH-13957) https://github.com/python/cpython/commit/0c45aee8036a27fb76d6d8d4bac61c3715aec22d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 17:10:52 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 16 Jun 2019 21:10:52 +0000 Subject: [issue37220] test_idle crash on Windows 2.7 when run with -R: In-Reply-To: <1560206989.94.0.836960275888.issue37220@roundup.psfhosted.org> Message-ID: <1560719452.62.0.924203826008.issue37220@roundup.psfhosted.org> miss-islington added the comment: New changeset 2acaf496b71224ff6d170ea12b0876d65195be7b by Miss Islington (bot) in branch '3.8': bpo-37220: Fix 2.7 test -R crash on Windows. (GH-13957) https://github.com/python/cpython/commit/2acaf496b71224ff6d170ea12b0876d65195be7b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 17:23:22 2019 From: report at bugs.python.org (Gil Forcada Codinachs) Date: Sun, 16 Jun 2019 21:23:22 +0000 Subject: [issue9267] Update pickle opcode documentation in pickletools for 3.x In-Reply-To: <1279217581.88.0.294098163632.issue9267@psf.upfronthosting.co.za> Message-ID: <1560720202.5.0.382551649293.issue9267@roundup.psfhosted.org> Gil Forcada Codinachs added the comment: pickletools documentation is here: https://docs.python.org/3/library/pickletools.html#module-pickletools Sources are here: https://github.com/python/cpython/blob/master/Doc/library/pickletools.rst ---------- nosy: +gforcada _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 17:31:17 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Jun 2019 21:31:17 +0000 Subject: [issue37220] test_idle crash on Windows 2.7 when run with -R: In-Reply-To: <1560206989.94.0.836960275888.issue37220@roundup.psfhosted.org> Message-ID: <1560720677.5.0.408907445417.issue37220@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: -patch resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 17:36:36 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Jun 2019 21:36:36 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1560720996.99.0.220580683071.issue37039@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 17:42:05 2019 From: report at bugs.python.org (=?utf-8?q?J=C3=B6rn_Heissler?=) Date: Sun, 16 Jun 2019 21:42:05 +0000 Subject: [issue35224] PEP 572: Assignment Expressions In-Reply-To: <1542070337.94.0.788709270274.issue35224@psf.upfronthosting.co.za> Message-ID: <1560721325.84.0.0820308695402.issue35224@roundup.psfhosted.org> J?rn Heissler added the comment: Hello, https://www.python.org/dev/peps/pep-0572/#change-to-evaluation-order mentions a change of evaluation order for dict comprehensions. It looks like this is not implemented yet (as of commit 66d47da8). Will this be implemented in this issue, or should I create a new one? Thanks ---------- nosy: +joernheissler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 17:54:05 2019 From: report at bugs.python.org (Gil Forcada Codinachs) Date: Sun, 16 Jun 2019 21:54:05 +0000 Subject: [issue19696] Merge all (non-syntactic) import-related tests into test_importlib In-Reply-To: <1385136285.91.0.72176568785.issue19696@psf.upfronthosting.co.za> Message-ID: <1560722045.84.0.557877168257.issue19696@roundup.psfhosted.org> Gil Forcada Codinachs added the comment: At least test_namespace_pkgs is already moved, see https://bugs.python.org/issue21097 Should then this issue be closed? I see that there are a few other tests that have import on its name and are outside either test_import or test_importlib: - test_pkgimport.py - test_threaded_import.py - test_zipimport.py - test_zipimport_support.py - threaded_import_hangers.py Should those be actually moved to test_importlib? ---------- nosy: +gforcada _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 18:09:34 2019 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Sun, 16 Jun 2019 22:09:34 +0000 Subject: [issue37295] Possible optimizations for math.comb() In-Reply-To: <1560626260.31.0.393863097125.issue37295@roundup.psfhosted.org> Message-ID: <1560722974.1.0.6636725429.issue37295@roundup.psfhosted.org> Bo?tjan Mejak added the comment: Performance improvements is what a beta build exists for in the first place. ---------- nosy: +PedanticHacker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 18:22:01 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Jun 2019 22:22:01 +0000 Subject: [issue37309] idlelib/NEWS.txt for 3.9.0 and backports Message-ID: <1560723721.58.0.865881864361.issue37309@roundup.psfhosted.org> New submission from Terry J. Reedy : Master is 3.9.0a0 as of 2019 June 4. ---------- assignee: terry.reedy components: IDLE messages: 345785 nosy: terry.reedy priority: normal severity: normal stage: commit review status: open title: idlelib/NEWS.txt for 3.9.0 and backports type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 18:24:02 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Jun 2019 22:24:02 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1560723842.9.0.00492714470953.issue34162@roundup.psfhosted.org> Terry J. Reedy added the comment: Master became 3.9.0a0 as of 2019 June 4. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed superseder: -> idlelib/NEWS.txt for 3.9.0 and backports _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 18:46:11 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Jun 2019 22:46:11 +0000 Subject: [issue37309] idlelib/NEWS.txt for 3.9.0 and backports In-Reply-To: <1560723721.58.0.865881864361.issue37309@roundup.psfhosted.org> Message-ID: <1560725171.56.0.204775445575.issue37309@roundup.psfhosted.org> Terry J. Reedy added the comment: However, this starts with first merge that does not go in 3.8.0, which will be after 3.8.0c1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 18:53:19 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Jun 2019 22:53:19 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1560725599.72.0.593038773301.issue34162@roundup.psfhosted.org> Terry J. Reedy added the comment: Closed prematurely. This continues until last IDLE addition to 3.8.0 ---------- resolution: fixed -> stage: resolved -> commit review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 19:18:39 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 16 Jun 2019 23:18:39 +0000 Subject: [issue28805] Add documentation for METH_FASTCALL and _PyObject_FastCall*() In-Reply-To: <1480158534.61.0.510309261592.issue28805@psf.upfronthosting.co.za> Message-ID: <1560727119.03.0.658924407045.issue28805@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13978 pull_request: https://github.com/python/cpython/pull/14136 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 19:18:57 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 16 Jun 2019 23:18:57 +0000 Subject: [issue28805] Add documentation for METH_FASTCALL and _PyObject_FastCall*() In-Reply-To: <1480158534.61.0.510309261592.issue28805@psf.upfronthosting.co.za> Message-ID: <1560727137.38.0.962835389678.issue28805@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13979 pull_request: https://github.com/python/cpython/pull/14137 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 19:24:10 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 16 Jun 2019 23:24:10 +0000 Subject: [issue28805] Add documentation for METH_FASTCALL and _PyObject_FastCall*() In-Reply-To: <1480158534.61.0.510309261592.issue28805@psf.upfronthosting.co.za> Message-ID: <1560727450.69.0.722865012859.issue28805@roundup.psfhosted.org> miss-islington added the comment: New changeset b101fa7783615051a89500e488708b955eac94c5 by Miss Islington (bot) in branch '3.7': bpo-28805: document METH_FASTCALL (GH-14079) https://github.com/python/cpython/commit/b101fa7783615051a89500e488708b955eac94c5 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 19:25:40 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 16 Jun 2019 23:25:40 +0000 Subject: [issue28805] Add documentation for METH_FASTCALL and _PyObject_FastCall*() In-Reply-To: <1480158534.61.0.510309261592.issue28805@psf.upfronthosting.co.za> Message-ID: <1560727540.73.0.0257602726188.issue28805@roundup.psfhosted.org> miss-islington added the comment: New changeset e784f9f1c3fdd2102aae3fc0fe226408ff3a6029 by Miss Islington (bot) in branch '3.8': bpo-28805: document METH_FASTCALL (GH-14079) https://github.com/python/cpython/commit/e784f9f1c3fdd2102aae3fc0fe226408ff3a6029 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 19:26:20 2019 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 16 Jun 2019 23:26:20 +0000 Subject: [issue35224] PEP 572: Assignment Expressions In-Reply-To: <1560721325.84.0.0820308695402.issue35224@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: Do you want to give it a try yourself? On Sun, Jun 16, 2019 at 14:42 J?rn Heissler wrote: > > J?rn Heissler added the comment: > > Hello, > > https://www.python.org/dev/peps/pep-0572/#change-to-evaluation-order > mentions a change of evaluation order for dict comprehensions. It looks > like this is not implemented yet (as of commit 66d47da8). > > Will this be implemented in this issue, or should I create a new one? > > Thanks > > ---------- > nosy: +joernheissler > > _______________________________________ > Python tracker > > _______________________________________ > -- --Guido (mobile) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 19:55:01 2019 From: report at bugs.python.org (Hunter Turcin) Date: Sun, 16 Jun 2019 23:55:01 +0000 Subject: [issue36956] Calling "functions" used to implement generators/comps easily cause crash In-Reply-To: <1558187601.17.0.878025070628.issue36956@roundup.psfhosted.org> Message-ID: <1560729301.2.0.101563670277.issue36956@roundup.psfhosted.org> Change by Hunter Turcin : ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 20:01:49 2019 From: report at bugs.python.org (PyScripter) Date: Mon, 17 Jun 2019 00:01:49 +0000 Subject: [issue37189] PyRun_String not exported in python38.dll In-Reply-To: <1559894123.98.0.3282613922.issue37189@roundup.psfhosted.org> Message-ID: <1560729709.6.0.780898496248.issue37189@roundup.psfhosted.org> PyScripter added the comment: This does break PyScripter Python for Delphi as well. The question whether this change was intentional in which case it would need to be explained and documented, or accidental and will be reversed begs an answer. ---------- nosy: +pyscripter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 20:43:39 2019 From: report at bugs.python.org (Gordon Marler) Date: Mon, 17 Jun 2019 00:43:39 +0000 Subject: [issue37310] Solaris 11.3 w/ Studio 12.6 test_ctypes fail Message-ID: <1560732219.57.0.838922158225.issue37310@roundup.psfhosted.org> New submission from Gordon Marler : Building a 64-bit Python 3.7.3 on Solaris 11.3 with Studio 12.6, and these test_ctypes tests fail: python -m test -v test_ctypes ... ====================================================================== FAIL: test_ints (ctypes.test.test_bitfields.C_Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "/perfwork/gitwork/python/solaris/components/python/python373/Python-3.7.3/Lib/ctypes/test/test_bitfields.py", line 40, in test_ints self.assertEqual(getattr(b, name), func(byref(b), name.encode('ascii'))) AssertionError: -1 != 1 ====================================================================== FAIL: test_shorts (ctypes.test.test_bitfields.C_Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "/perfwork/gitwork/python/solaris/components/python/python373/Python-3.7.3/Lib/ctypes/test/test_bitfields.py", line 47, in test_shorts self.assertEqual(getattr(b, name), func(byref(b), name.encode('ascii'))) AssertionError: -1 != 1 ====================================================================== FAIL: test_pass_by_value (ctypes.test.test_structures.StructureTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/perfwork/gitwork/python/solaris/components/python/python373/Python-3.7.3/Lib/ctypes/test/test_structures.py", line 416, in test_pass_by_value self.assertEqual(s.first, 0xdeadbeef) AssertionError: 195948557 != 3735928559 ---------------------------------------------------------------------- Ran 472 tests in 3.545s FAILED (failures=3, skipped=94) test test_ctypes failed test_ctypes failed ---------- components: Tests, ctypes messages: 345793 nosy: gmarler priority: normal severity: normal status: open title: Solaris 11.3 w/ Studio 12.6 test_ctypes fail type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 20:57:11 2019 From: report at bugs.python.org (Gordon Marler) Date: Mon, 17 Jun 2019 00:57:11 +0000 Subject: [issue37311] Solaris 11.3 w/ Studio 12.6 test_support fail Message-ID: <1560733031.84.0.520294809269.issue37311@roundup.psfhosted.org> New submission from Gordon Marler : This failure confuses me, as it seems to occur in a test_rmtree subtest, and there's a warning that test_support is modifying something towards the end: $ python -m test -W test_support ... ====================================================================== ERROR: test_rmtree (test.test_support.TestSupport) ---------------------------------------------------------------------- Traceback (most recent call last): File "/perfwork/gitwork/python/solaris/components/python/python373/Python-3.7.3/Lib/test/support/__init__.py", line 309, in _force_run return func(*args) PermissionError: [Errno 13] Permission denied: '@test_11251_tmpd/subdir' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/perfwork/gitwork/python/solaris/components/python/python373/Python-3.7.3/Lib/test/test_support.py", line 73, in test_rmtree support.rmtree(dirpath) File "/perfwork/gitwork/python/solaris/components/python/python373/Python-3.7.3/Lib/test/support/__init__.py", line 431, in rmtree _rmtree(path) File "/perfwork/gitwork/python/solaris/components/python/python373/Python-3.7.3/Lib/test/support/__init__.py", line 411, in _rmtree _rmtree_inner(path) File "/perfwork/gitwork/python/solaris/components/python/python373/Python-3.7.3/Lib/test/support/__init__.py", line 410, in _rmtree_inner _force_run(path, os.unlink, fullname) File "/perfwork/gitwork/python/solaris/components/python/python373/Python-3.7.3/Lib/test/support/__init__.py", line 315, in _force_run return func(*args) PermissionError: [Errno 1] Not owner: '@test_11251_tmpd/subdir' ---------------------------------------------------------------------- Ran 42 tests in 34.112s FAILED (errors=1, skipped=1) Warning -- files was modified by test_support Before: [] After: ['@test_11251_tmpd/'] test test_support failed test_support failed in 34 sec 255 ms == Tests result: FAILURE == 1 test failed: test_support Total duration: 34 sec 322 ms Tests result: FAILURE ---------- components: Tests messages: 345794 nosy: gmarler priority: normal severity: normal status: open title: Solaris 11.3 w/ Studio 12.6 test_support fail type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 21:28:15 2019 From: report at bugs.python.org (Martin Panter) Date: Mon, 17 Jun 2019 01:28:15 +0000 Subject: [issue31233] socketserver.ThreadingMixIn leaks running threads after server_close() In-Reply-To: <1503073499.39.0.93886151367.issue31233@psf.upfronthosting.co.za> Message-ID: <1560734895.82.0.130887340833.issue31233@roundup.psfhosted.org> Martin Panter added the comment: FYI the change here to remember all the thread objects ever created looks to be the cause of the memory leak reported in Issue 37193 ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 21:46:26 2019 From: report at bugs.python.org (George Xie) Date: Mon, 17 Jun 2019 01:46:26 +0000 Subject: [issue37297] function changed when pickle bound method object In-Reply-To: <1560649257.15.0.526142047149.issue37297@roundup.psfhosted.org> Message-ID: <1560735986.56.0.869901023851.issue37297@roundup.psfhosted.org> Change by George Xie : ---------- keywords: +patch Added file: https://bugs.python.org/file48424/0001-fix-bound-method-__reduce__-bug.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 21:47:45 2019 From: report at bugs.python.org (Martin Panter) Date: Mon, 17 Jun 2019 01:47:45 +0000 Subject: [issue37193] Memory leak while running TCP/UDPServer with socketserver.ThreadingMixIn In-Reply-To: <1559908419.41.0.390422965351.issue37193@roundup.psfhosted.org> Message-ID: <1560736065.96.0.0771991843935.issue37193@roundup.psfhosted.org> Martin Panter added the comment: Looking at the code, this would be caused by Issue 31233. I expect 3.7+ is affected. 3.6 has similar code, but the leaking looks to be disabled by default. 2.7 doesn't collect a "_threads" list at all. Looks like Victor was aware of the leak when he changed the code: , but maybe he pushed the code and then forgot about the problem. A possible problem with Norihiro's solution is modifying the "_threads" list from multiple threads without any synchronization. (Not sure if that is a problem, or is it guaranteed to be okay due to GIL etc?) Also, since the thread is removing itself from the list, it will still run a short while after the removal, so there is a window when the "server_close" method will not wait for that thread. Might also defeat the "dangling thread" accounting that I believe was Victor's motivation for his change. Wei's proposal is to check for cleaning up when a new request is handled. That relies on a new request coming in to free up memory. Perhaps we could use similar strategy to the Forking mixin, which I believe cleans up expired children periodically, without relying on a new request. ---------- keywords: +3.7regression nosy: +martin.panter, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 22:46:07 2019 From: report at bugs.python.org (Alejandro Gonzalez) Date: Mon, 17 Jun 2019 02:46:07 +0000 Subject: [issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call In-Reply-To: <1480885774.84.0.670239959771.issue28869@psf.upfronthosting.co.za> Message-ID: <1560739567.27.0.730213589207.issue28869@roundup.psfhosted.org> Alejandro Gonzalez added the comment: >Getting the module name from the caller's frame is an expensive operation. It is safe to set __module__ to None. In such case the pickle module is able to find the proper module containing the definition of the class. Wow, indeed it works. I also tried it from another module other than `__main__` and it works. Checking the source, I see the "magic" happens in pickle's `whichmodule` function when looping over `sys.modules` if `__module__` is not found. If that case, why check for `__module__` in the first place? wouldn't it be simpler to always loop over sys.modules? Is it to avoid looping over `sys.modules` whenever possible? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 23:39:07 2019 From: report at bugs.python.org (=?utf-8?q?J=C3=B6rn_Heissler?=) Date: Mon, 17 Jun 2019 03:39:07 +0000 Subject: [issue35224] PEP 572: Assignment Expressions In-Reply-To: <1542070337.94.0.788709270274.issue35224@psf.upfronthosting.co.za> Message-ID: <1560742747.16.0.725483461457.issue35224@roundup.psfhosted.org> Change by J?rn Heissler : ---------- pull_requests: +13980 pull_request: https://github.com/python/cpython/pull/14139 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 16 23:43:49 2019 From: report at bugs.python.org (=?utf-8?q?J=C3=B6rn_Heissler?=) Date: Mon, 17 Jun 2019 03:43:49 +0000 Subject: [issue35224] PEP 572: Assignment Expressions In-Reply-To: <1542070337.94.0.788709270274.issue35224@psf.upfronthosting.co.za> Message-ID: <1560743029.5.0.982885766011.issue35224@roundup.psfhosted.org> J?rn Heissler added the comment: I tried and it appears to work: https://github.com/python/cpython/pull/14139 As I'm not familiar with cpython code, chances are that I missed something important. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 03:17:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 07:17:19 +0000 Subject: [issue37267] os.dup() creates an inheritable fd when handling a character file on Windows In-Reply-To: <1560420750.69.0.156424123047.issue37267@roundup.psfhosted.org> Message-ID: <1560755839.01.0.685425293504.issue37267@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 28fca0c422b425a6be43be31add0a5328c16b0b8 by Victor Stinner (Zackery Spytz) in branch 'master': bpo-37267: Do not check for FILE_TYPE_CHAR in os.dup() on Windows (GH-14051) https://github.com/python/cpython/commit/28fca0c422b425a6be43be31add0a5328c16b0b8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 03:17:38 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 07:17:38 +0000 Subject: [issue37267] os.dup() creates an inheritable fd when handling a character file on Windows In-Reply-To: <1560420750.69.0.156424123047.issue37267@roundup.psfhosted.org> Message-ID: <1560755858.26.0.595844466787.issue37267@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13981 pull_request: https://github.com/python/cpython/pull/14140 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 03:17:44 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 07:17:44 +0000 Subject: [issue37267] os.dup() creates an inheritable fd when handling a character file on Windows In-Reply-To: <1560420750.69.0.156424123047.issue37267@roundup.psfhosted.org> Message-ID: <1560755864.31.0.723767233823.issue37267@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13982 pull_request: https://github.com/python/cpython/pull/14141 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 03:21:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 07:21:01 +0000 Subject: [issue37267] os.dup() creates an inheritable fd when handling a character file on Windows In-Reply-To: <1560420750.69.0.156424123047.issue37267@roundup.psfhosted.org> Message-ID: <1560756061.05.0.150766288359.issue37267@roundup.psfhosted.org> STINNER Victor added the comment: According to the discussion in PR 14051: if os.dup() fails to make the new file descriptor new inheritable for a character device, the error must not be ignored. Instead, the caller is supposed to use os.dup(fd, inheritable=False). Before *this bugfix*, os.dup() didn't respect its contract: fd2 was inheritable sometimes. Now the caller is aware of such special case and so can handle it properly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 03:22:45 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 17 Jun 2019 07:22:45 +0000 Subject: [issue35021] Assertion failures in datetimemodule.c. In-Reply-To: <1539884234.35.0.788709270274.issue35021@psf.upfronthosting.co.za> Message-ID: <1560756165.22.0.318312642261.issue35021@roundup.psfhosted.org> Ned Deily added the comment: Can we close this or is there anything further needed for this issue? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 03:24:21 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 17 Jun 2019 07:24:21 +0000 Subject: [issue36225] Lingering subinterpreters should be implicitly cleared on shutdown In-Reply-To: <1551964663.69.0.686712846789.issue36225@roundup.psfhosted.org> Message-ID: <1560756261.47.0.159481304033.issue36225@roundup.psfhosted.org> Ned Deily added the comment: Ping. It was marked as a 3.7regression but perhaps it should now be just targeted for 3.8. ---------- nosy: +ned.deily versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 03:31:25 2019 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 17 Jun 2019 07:31:25 +0000 Subject: [issue37299] RuntimeWarning is NOT raised In-Reply-To: <1560651750.57.0.52730011587.issue37299@roundup.psfhosted.org> Message-ID: <1560756685.73.0.875434082119.issue37299@roundup.psfhosted.org> Paul Ganssle added the comment: I think the reason for the difference here is in the `no_error` function you never actually create the coroutine `true()`, so there's nothing to warn about. One thing that's confusing things about this example is that the `false()` evaluates to True, because it returns a coroutine object (rather than the value `False`): >>> async def false(): ...: return False ...: >>> bool(false()) True If you expand your `false() or true()` statement, it's equivalent to: x = false() if not x: x = true() return await x Since `false()` is truthy, you don't expect true() to ever be called, hence no warning. @YoSTEALTH Does this make sense? Does it solve the issue? ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 03:31:41 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 17 Jun 2019 07:31:41 +0000 Subject: [issue36688] _dummy_thread lacks an RLock implementaiton In-Reply-To: <1555827608.59.0.767546227499.issue36688@roundup.psfhosted.org> Message-ID: <1560756701.72.0.920059289752.issue36688@roundup.psfhosted.org> Ned Deily added the comment: Ping. This was marked as a 3.7regression and there is a PR waiting for review. Do we have plans to remove _dummy_thread in 3.8 or 3.9? ---------- nosy: +ned.deily versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 03:34:15 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 17 Jun 2019 07:34:15 +0000 Subject: [issue36403] AsyncIterator on 3.7: __aiter__ no longer honors finally blocks In-Reply-To: <1553300107.21.0.160175909039.issue36403@roundup.psfhosted.org> Message-ID: <1560756855.52.0.00273704712069.issue36403@roundup.psfhosted.org> Ned Deily added the comment: Ping. This was marked as a 3.7regression. Is a change needed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 03:37:32 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 17 Jun 2019 07:37:32 +0000 Subject: [issue34806] distutils tests fail with recent 3.7 branch In-Reply-To: <1537949180.44.0.545547206417.issue34806@psf.upfronthosting.co.za> Message-ID: <1560757052.24.0.705545052421.issue34806@roundup.psfhosted.org> Ned Deily added the comment: Since there has been no followup on this, I assume it is no longer a problem for anyone and am closing. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 03:42:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 07:42:37 +0000 Subject: [issue37189] PyRun_String not exported in python38.dll In-Reply-To: <1559894123.98.0.3282613922.issue37189@roundup.psfhosted.org> Message-ID: <1560757357.16.0.936426385357.issue37189@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13983 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14142 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 03:45:16 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 17 Jun 2019 07:45:16 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1560757516.09.0.368464152829.issue35998@roundup.psfhosted.org> Ned Deily added the comment: What to do here? This was originally filed as a "release blocker" and I allowed 3.7.3 to go out without a resolution for it since we had agreed to @christian.heimes proposal to defer full support of OpenSSL 1.1.1 until 3.7.4. Now we are approaching code cutoff for 3.7.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 03:47:23 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 17 Jun 2019 07:47:23 +0000 Subject: [issue36403] AsyncIterator on 3.7: __aiter__ no longer honors finally blocks In-Reply-To: <1553300107.21.0.160175909039.issue36403@roundup.psfhosted.org> Message-ID: <1560757643.69.0.730570108912.issue36403@roundup.psfhosted.org> Andrew Svetlov added the comment: >From my understanding yield inside __aiter__ is a forbidden construction. Even if parser allows it the statement doesn't make any sense. I'm very interested to hear Yuri opinion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 03:48:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 07:48:56 +0000 Subject: [issue37189] PyRun_String not exported in python38.dll In-Reply-To: <1559894123.98.0.3282613922.issue37189@roundup.psfhosted.org> Message-ID: <1560757736.95.0.172860236688.issue37189@roundup.psfhosted.org> STINNER Victor added the comment: Attached PR 14142 fix bpo-34646 regression. > It shouldn't break existing code because PyRun_String has a macro expansion to PyRun_StringFlags. ABI compatibility between major releases is not provided. Many applications don't use Python header files, but access directly libpython. For example, py2app uses dlsym(): https://bitbucket.org/ronaldoussoren/py2app/src/default/py2app/apptemplate/src/main.c PyInstaller uses GetProcAddress() on Windows or dlsym() on other platforms: * https://github.com/pyinstaller/pyinstaller/blob/1844d69f5aa1d64d3feca912ed1698664a3faf3e/bootloader/src/pyi_python.h * https://github.com/pyinstaller/pyinstaller/blob/1844d69f5aa1d64d3feca912ed1698664a3faf3e/bootloader/src/pyi_pythonlib.c That's why PyRun_String() is defined as an alias using a macro *and* as a function in pythonrun.c: #undef PyRun_String PyObject * PyRun_String(const char *str, int s, PyObject *g, PyObject *l) { return PyRun_StringFlags(str, s, g, l, NULL); } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:02:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 08:02:35 +0000 Subject: [issue37312] Remove deprecated _dummy_thread and dummy_threading modules Message-ID: <1560758555.75.0.0564764505885.issue37312@roundup.psfhosted.org> New submission from STINNER Victor : The _dummy_thread and dummy_threading modules are deprecated since Python 3.7 which now requires threading support. Attached PR removes these modules. ---------- components: Library (Lib) messages: 345810 nosy: vstinner priority: normal severity: normal status: open title: Remove deprecated _dummy_thread and dummy_threading modules versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:05:48 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 08:05:48 +0000 Subject: [issue37312] Remove deprecated _dummy_thread and dummy_threading modules In-Reply-To: <1560758555.75.0.0564764505885.issue37312@roundup.psfhosted.org> Message-ID: <1560758748.92.0.705780092213.issue37312@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13984 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14143 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:07:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 08:07:53 +0000 Subject: [issue37312] Remove deprecated _dummy_thread and dummy_threading modules In-Reply-To: <1560758555.75.0.0564764505885.issue37312@roundup.psfhosted.org> Message-ID: <1560758873.53.0.40389885539.issue37312@roundup.psfhosted.org> STINNER Victor added the comment: Python 3.7 has been modified to always require threading support: * https://bugs.python.org/issue31370 * https://mail.python.org/pipermail/python-dev/2017-September/149156.html commit a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344 Author: Antoine Pitrou Date: Thu Sep 7 18:56:24 2017 +0200 bpo-31370: Remove support for threads-less builds (#3385) * Remove Setup.config * Always define WITH_THREAD for compatibility. -- In Python 3.8, the dummy_threading module is documented as: "This module provides a duplicate interface to the threading module. It was meant to be imported when the _thread module was not provided on a platform. Be careful to not use this module where deadlock might occur from a thread being created that blocks waiting for another thread to be created. This often occurs with blocking I/O." https://docs.python.org/dev/library/dummy_threading.html And the doc starts with: "Deprecated since version 3.7: Python now always has threading enabled. Please use threading instead." IMHO it's now time to remove this module. -- I proposed to remove these modules today after I saw a bug on _dummy_thread: bpo-36688. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:08:15 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 08:08:15 +0000 Subject: [issue36688] _dummy_thread lacks an RLock implementaiton In-Reply-To: <1555827608.59.0.767546227499.issue36688@roundup.psfhosted.org> Message-ID: <1560758895.96.0.0826901710013.issue36688@roundup.psfhosted.org> STINNER Victor added the comment: I created bpo-37312: "Remove deprecated _dummy_thread and dummy_threading modules" (in Python 3.9). ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:10:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 08:10:22 +0000 Subject: [issue36688] _dummy_thread lacks an RLock implementaiton In-Reply-To: <1555827608.59.0.767546227499.issue36688@roundup.psfhosted.org> Message-ID: <1560759022.32.0.310036585977.issue36688@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c5905f39bcf4ef895d42eede41bb5a2f071a501d by Victor Stinner (Joost Lek) in branch 'master': bpo-36688: Adding an implementation of RLock in _dummy_thread (GH-12943) https://github.com/python/cpython/commit/c5905f39bcf4ef895d42eede41bb5a2f071a501d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:10:52 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 08:10:52 +0000 Subject: [issue36688] _dummy_thread lacks an RLock implementaiton In-Reply-To: <1555827608.59.0.767546227499.issue36688@roundup.psfhosted.org> Message-ID: <1560759052.49.0.193382734458.issue36688@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13985 pull_request: https://github.com/python/cpython/pull/14144 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:10:58 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 08:10:58 +0000 Subject: [issue36688] _dummy_thread lacks an RLock implementaiton In-Reply-To: <1555827608.59.0.767546227499.issue36688@roundup.psfhosted.org> Message-ID: <1560759058.8.0.165041686494.issue36688@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13986 pull_request: https://github.com/python/cpython/pull/14145 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:12:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 08:12:47 +0000 Subject: [issue36688] _dummy_thread lacks an RLock implementaiton In-Reply-To: <1555827608.59.0.767546227499.issue36688@roundup.psfhosted.org> Message-ID: <1560759167.22.0.240898589696.issue36688@roundup.psfhosted.org> STINNER Victor added the comment: > Ping. This was marked as a 3.7regression and there is a PR waiting for review. PR 12943 seems reasonable to me. I merged it. > Do we have plans to remove _dummy_thread in 3.8 or 3.9? I created bpo-37312 for Python 3.9. IMHO it's too late for 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:16:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 08:16:18 +0000 Subject: [issue37193] Memory leak while running TCP/UDPServer with socketserver.ThreadingMixIn In-Reply-To: <1559908419.41.0.390422965351.issue37193@roundup.psfhosted.org> Message-ID: <1560759378.89.0.521669927984.issue37193@roundup.psfhosted.org> STINNER Victor added the comment: PR 13893 with an additional lock sounds like a reasonable solution. The code should be skipped if the thread is a daemon thread. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:18:46 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Mon, 17 Jun 2019 08:18:46 +0000 Subject: [issue24255] Replace debuglevel-related logic with logging In-Reply-To: <1432189554.94.0.727112934658.issue24255@psf.upfronthosting.co.za> Message-ID: <1560759526.0.0.923350252668.issue24255@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: PR waiting review, Stage should be 'patch review' ---------- nosy: +aldwinaldwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:19:21 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Jun 2019 08:19:21 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1560759561.11.0.371793440558.issue35431@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +13987 pull_request: https://github.com/python/cpython/pull/14146 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:20:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 08:20:03 +0000 Subject: [issue37193] Memory leak while running TCP/UDPServer with socketserver.ThreadingMixIn In-Reply-To: <1559908419.41.0.390422965351.issue37193@roundup.psfhosted.org> Message-ID: <1560759603.25.0.0800181439868.issue37193@roundup.psfhosted.org> STINNER Victor added the comment: Martin Panter: In addition to PR 13893 change, what do you think of also using a weakref? It might make the code even more reliable if something goes wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:26:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 08:26:00 +0000 Subject: [issue37313] test_concurrent_futures stopped after 25 hours on AMD64 Windows7 SP1 3.7 Message-ID: <1560759960.52.0.187936052525.issue37313@roundup.psfhosted.org> New submission from STINNER Victor : AMD64 Windows7 SP1 3.7: https://buildbot.python.org/all/#/builders/130/builds/935 0:23:27 load avg: 7.92 [412/416] test_plistlib passed -- running: test_venv (1 min 26 sec), test_concurrent_futures (23 min 26 sec) 0:23:32 load avg: 7.29 [413/416] test_argparse passed -- running: test_venv (1 min 31 sec), test_concurrent_futures (23 min 31 sec) 0:23:34 load avg: 7.29 [414/416] test_venv passed (1 min 32 sec) -- running: test_concurrent_futures (23 min 32 sec) 0:23:37 load avg: 6.71 [415/416] test_largefile passed -- running: test_concurrent_futures (23 min 35 sec) running: test_concurrent_futures (24 min 6 sec) running: test_concurrent_futures (24 min 36 sec) ... running: test_concurrent_futures (25 hour 25 min) running: test_concurrent_futures (25 hour 26 min) running: test_concurrent_futures (25 hour 26 min) running: test_concurrent_futures (25 hour 27 min) running: test_concurrent_futures (25 hour 27 min) running: test_concurrent_futures (25 hour 28 min) program finished with exit code 1 elapsedTime=91968.468000 ---------- components: Tests messages: 345818 nosy: vstinner priority: normal severity: normal status: open title: test_concurrent_futures stopped after 25 hours on AMD64 Windows7 SP1 3.7 versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:28:49 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 08:28:49 +0000 Subject: [issue36688] _dummy_thread lacks an RLock implementaiton In-Reply-To: <1555827608.59.0.767546227499.issue36688@roundup.psfhosted.org> Message-ID: <1560760129.63.0.506724981517.issue36688@roundup.psfhosted.org> miss-islington added the comment: New changeset 351b0e793e35510e8cbbcbb455a1b9544e808cdd by Miss Islington (bot) in branch '3.7': bpo-36688: Adding an implementation of RLock in _dummy_thread (GH-12943) https://github.com/python/cpython/commit/351b0e793e35510e8cbbcbb455a1b9544e808cdd ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:34:30 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 08:34:30 +0000 Subject: [issue36688] _dummy_thread lacks an RLock implementaiton In-Reply-To: <1555827608.59.0.767546227499.issue36688@roundup.psfhosted.org> Message-ID: <1560760470.66.0.0163931288882.issue36688@roundup.psfhosted.org> miss-islington added the comment: New changeset ad505918a1829e6fa2a48a7665234d60a9377e98 by Miss Islington (bot) in branch '3.8': bpo-36688: Adding an implementation of RLock in _dummy_thread (GH-12943) https://github.com/python/cpython/commit/ad505918a1829e6fa2a48a7665234d60a9377e98 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:41:11 2019 From: report at bugs.python.org (YoSTEALTH) Date: Mon, 17 Jun 2019 08:41:11 +0000 Subject: [issue37299] RuntimeWarning is NOT raised In-Reply-To: <1560651750.57.0.52730011587.issue37299@roundup.psfhosted.org> Message-ID: <1560760871.82.0.385194875128.issue37299@roundup.psfhosted.org> YoSTEALTH added the comment: Yes, this was the previous conclusion. In a large code base, its hard to find such solution easily! There are many cases where `await` is not called and `RuntimeWarning` is not raised. Hard to narrow down the exact problem. Maybe there needs to be a better way to evaluate coroutine vs waiting for the garbage collection to happen to riase `RuntimeWarning` Paul, thanks for taking time to answer :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:42:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 08:42:38 +0000 Subject: [issue37314] Compilation failed on AMD64 Debian root 3.8: undefined reference to _PyTraceMalloc_NewReference Message-ID: <1560760958.7.0.704551196442.issue37314@roundup.psfhosted.org> New submission from STINNER Victor : AMD64 Debian root 3.8: https://buildbot.python.org/all/#builders/211/builds/47 libpython3.8d.a(bytesobject.o): In function `_Py_NewReference': /root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: undefined reference to `_PyTraceMalloc_NewReference' /root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: undefined reference to `_PyTraceMalloc_NewReference' /root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: undefined reference to `_PyTraceMalloc_NewReference' /root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: undefined reference to `_PyTraceMalloc_NewReference' ---------- components: Tests messages: 345822 nosy: vstinner priority: normal severity: normal status: open title: Compilation failed on AMD64 Debian root 3.8: undefined reference to _PyTraceMalloc_NewReference versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:44:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 08:44:28 +0000 Subject: [issue36688] _dummy_thread lacks an RLock implementaiton In-Reply-To: <1555827608.59.0.767546227499.issue36688@roundup.psfhosted.org> Message-ID: <1560761068.43.0.338534897678.issue36688@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Joost Lek for the fix and Karthikeyan Singaravelan for the bug report. It's now fixed in 3.7, 3.8 and master branches. I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:45:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 08:45:07 +0000 Subject: [issue37267] os.dup() creates an inheritable fd when handling a character file on Windows In-Reply-To: <1560420750.69.0.156424123047.issue37267@roundup.psfhosted.org> Message-ID: <1560761107.25.0.204240536196.issue37267@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 71589491ad0da27f57789b97354f6094a91e2eb3 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-37267: Do not check for FILE_TYPE_CHAR in os.dup() on Windows (GH-14051) (GH-14141) https://github.com/python/cpython/commit/71589491ad0da27f57789b97354f6094a91e2eb3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:45:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 08:45:29 +0000 Subject: [issue37267] os.dup() creates an inheritable fd when handling a character file on Windows In-Reply-To: <1560420750.69.0.156424123047.issue37267@roundup.psfhosted.org> Message-ID: <1560761129.69.0.426334591702.issue37267@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 693945d45dfe50c843970cab3e3aa1fa3a3eddbe by Victor Stinner (Miss Islington (bot)) in branch '3.8': bpo-37267: Do not check for FILE_TYPE_CHAR in os.dup() on Windows (GH-14051) (GH-14140) https://github.com/python/cpython/commit/693945d45dfe50c843970cab3e3aa1fa3a3eddbe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:45:59 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 17 Jun 2019 08:45:59 +0000 Subject: [issue34631] Upgrade to OpenSSL 1.1.1c, 1.1.0k, and/or 1.0.2s In-Reply-To: <1536686026.27.0.0269046726804.issue34631@psf.upfronthosting.co.za> Message-ID: <1560761159.31.0.392974594579.issue34631@roundup.psfhosted.org> Ned Deily added the comment: It looks we missed the window for 3.7.4 here. (I assume the Windows installer build is not using 1.1.1. Steve?) Talking with Christian about this in IRC, we agreed, the CI pipelines (Azure and travis) are now using 1.1.1c and I've put a request to the buildbot owners to upgrade to 1.1.1c if possible. So let's retarget 1.1.1c for 3.7.5 then which will be right around the time 1.1.0 support ends. In the meantime, we should update other installers to 1.1.0k and 1.0.2s. ---------- title: Upgrade to OpenSSL 1.1.1b -> Upgrade to OpenSSL 1.1.1c, 1.1.0k, and/or 1.0.2s versions: +Python 2.7, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:49:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 08:49:27 +0000 Subject: [issue37267] os.dup() creates an inheritable fd when handling a character file on Windows In-Reply-To: <1560420750.69.0.156424123047.issue37267@roundup.psfhosted.org> Message-ID: <1560761367.89.0.0122706639361.issue37267@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Zackery Spytz as usual! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:49:55 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Jun 2019 08:49:55 +0000 Subject: [issue37315] Deprecate using math.factorial() with floats Message-ID: <1560761395.48.0.0855458048325.issue37315@roundup.psfhosted.org> New submission from Serhiy Storchaka : Currently math.factorial() accepts integer-like objects (including objects with defined __index__) as well as float instances with integral value (but not arbitrary float-like objects with defined __float__). I suppose this was happen because factorial() was the first integer functions in the math module, and all other functions accepted floats at that time. See also issue7550. But now we have more pure integer functions in the math module: gcd, isqrt, comb, perm. Seems accepting floats in factorial was a mistake. Now we can fix it, and deprecate using factorial() with floats. Initial version of factorial() accepted also non-integral numbers (except float) with defined __int__. It was fixed in issue33083. ---------- components: Extension Modules messages: 345828 nosy: mark.dickinson, pablogsal, rhettinger, serhiy.storchaka, stutzbach priority: normal severity: normal status: open title: Deprecate using math.factorial() with floats type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:54:51 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 17 Jun 2019 08:54:51 +0000 Subject: [issue37299] RuntimeWarning is NOT raised In-Reply-To: <1560651750.57.0.52730011587.issue37299@roundup.psfhosted.org> Message-ID: <1560761691.57.0.00913659880287.issue37299@roundup.psfhosted.org> Andrew Svetlov added the comment: The solution is called static analyzers and "type hints". Mypy detects the absence of "await" pretty well. In turn, CPython does the best in runtime mode for detecting not-awaited awaitables when possible. I think we should close the issue, it doesn't show a bug but requests for nice-to-have thing which is solved by another tool. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 04:58:12 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 17 Jun 2019 08:58:12 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1560761892.36.0.790816171449.issue35998@roundup.psfhosted.org> Andrew Svetlov added the comment: No idea what to do. SSL support is obviously broken. Current code is too complex to maintain. Yuri has a full reimplementation of ssl_proto.py in uvloop. It *seem* to work and can be backported. I'm sick now, can be ready to work back in a day or two. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 05:01:16 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Jun 2019 09:01:16 +0000 Subject: [issue37315] Deprecate using math.factorial() with floats In-Reply-To: <1560761395.48.0.0855458048325.issue37315@roundup.psfhosted.org> Message-ID: <1560762076.97.0.947993874482.issue37315@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +13988 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14147 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 05:06:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 09:06:30 +0000 Subject: [issue35031] test_asyncio test_start_tls_server_1 fails in AMD64 FreeBSD CURRENT buildbots In-Reply-To: <1540044407.71.0.788709270274.issue35031@psf.upfronthosting.co.za> Message-ID: <1560762390.49.0.870760081226.issue35031@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13989 pull_request: https://github.com/python/cpython/pull/14148 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 05:09:20 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Mon, 17 Jun 2019 09:09:20 +0000 Subject: [issue37297] function changed when pickle bound method object In-Reply-To: <1560649257.15.0.526142047149.issue37297@roundup.psfhosted.org> Message-ID: <1560762560.77.0.236387257897.issue37297@roundup.psfhosted.org> Change by G?ry : ---------- nosy: +asvetlov, christian.heimes, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 05:12:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 09:12:06 +0000 Subject: [issue35031] test_asyncio test_start_tls_server_1 fails in AMD64 FreeBSD CURRENT buildbots In-Reply-To: <1540044407.71.0.788709270274.issue35031@psf.upfronthosting.co.za> Message-ID: <1560762726.56.0.814999654671.issue35031@roundup.psfhosted.org> STINNER Victor added the comment: Commit f6a47f3e316cede2a07a1f74a509f6d80ab8fef0 introduced a workaround on Windows and FreeBSD. It was removed by commit f0749da9a535375f05a2015e8960e8ae54877349 in bpo-35998... but then Windows restarted to fail: https://bugs.python.org/issue35998#msg345644 So I wrote PR 14148 to reintroduce the workaround until someone finds time to have a look. Note: this issue is open since October 2018. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 05:32:26 2019 From: report at bugs.python.org (Mike Gleen) Date: Mon, 17 Jun 2019 09:32:26 +0000 Subject: [issue34903] strptime %d handling of single digit day of month In-Reply-To: <1538724686.61.0.545547206417.issue34903@psf.upfronthosting.co.za> Message-ID: <1560763946.59.0.305783374784.issue34903@roundup.psfhosted.org> Change by Mike Gleen : ---------- pull_requests: +13990 pull_request: https://github.com/python/cpython/pull/14149 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 05:47:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 09:47:55 +0000 Subject: [issue35031] test_asyncio test_start_tls_server_1 fails in AMD64 FreeBSD CURRENT buildbots In-Reply-To: <1540044407.71.0.788709270274.issue35031@psf.upfronthosting.co.za> Message-ID: <1560764875.24.0.771502248222.issue35031@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c034b7824f5a7c50f2946ab3931633200e31d903 by Victor Stinner in branch 'master': bpo-35031, test_asycio: disable TLS 1.3 in test_start_tls_server_1() (GH-14148) https://github.com/python/cpython/commit/c034b7824f5a7c50f2946ab3931633200e31d903 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 05:47:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 09:47:55 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1560764875.41.0.775382763371.issue35998@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c034b7824f5a7c50f2946ab3931633200e31d903 by Victor Stinner in branch 'master': bpo-35031, test_asycio: disable TLS 1.3 in test_start_tls_server_1() (GH-14148) https://github.com/python/cpython/commit/c034b7824f5a7c50f2946ab3931633200e31d903 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 05:48:16 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 09:48:16 +0000 Subject: [issue35031] test_asyncio test_start_tls_server_1 fails in AMD64 FreeBSD CURRENT buildbots In-Reply-To: <1540044407.71.0.788709270274.issue35031@psf.upfronthosting.co.za> Message-ID: <1560764896.52.0.439357169267.issue35031@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13991 pull_request: https://github.com/python/cpython/pull/14150 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 05:48:16 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 09:48:16 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1560764896.63.0.960664305463.issue35998@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13992 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/14150 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 05:48:24 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 09:48:24 +0000 Subject: [issue35031] test_asyncio test_start_tls_server_1 fails in AMD64 FreeBSD CURRENT buildbots In-Reply-To: <1540044407.71.0.788709270274.issue35031@psf.upfronthosting.co.za> Message-ID: <1560764904.12.0.913701352851.issue35031@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13993 pull_request: https://github.com/python/cpython/pull/14151 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 05:48:24 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 09:48:24 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1560764904.21.0.199745796767.issue35998@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13994 pull_request: https://github.com/python/cpython/pull/14151 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 05:51:19 2019 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 17 Jun 2019 09:51:19 +0000 Subject: [issue37316] mmap.mmap() passes the wrong variable to PySys_Audit() Message-ID: <1560765079.9.0.997846608931.issue37316@roundup.psfhosted.org> New submission from Zackery Spytz : new_mmap_object() should pass the fd variable to PySys_Audit(), not fileno. Also, there's a missing call to va_end() in PySys_Audit() itself. ---------- components: Extension Modules messages: 345834 nosy: ZackerySpytz priority: normal severity: normal status: open title: mmap.mmap() passes the wrong variable to PySys_Audit() type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 05:52:41 2019 From: report at bugs.python.org (vsbogd) Date: Mon, 17 Jun 2019 09:52:41 +0000 Subject: [issue37301] CGIHTTPServer doesn't handle long POST requests In-Reply-To: <1560656329.17.0.731326583269.issue37301@roundup.psfhosted.org> Message-ID: <1560765161.67.0.617712255458.issue37301@roundup.psfhosted.org> vsbogd added the comment: Yeah, I have seen this comment as well. As I see this code for the first time I am not very familiar with it. It seems that this explanation is related to the case when non-Python CGI script is executed: os.dup2(self.rfile.fileno(), 0) os.dup2(self.wfile.fileno(), 1) os.execve(scriptfile, args, env) https://github.com/python/cpython/blob/3a1d50e7e573efb577714146bed5c03b9c95f466/Lib/http/server.py#L1176-L1178 On one hand the comment seems reasonable: as fileno is duped one cannot just read from it ahead of time. On the other hand few lines earlier one can see: # throw away additional data [see bug #427345] while select.select([self.rfile], [], [], 0)[0]: if not self.rfile.read(1): break https://github.com/python/cpython/blob/3a1d50e7e573efb577714146bed5c03b9c95f466/Lib/http/server.py#L1163-L1166 which also seems like reading ahead of time. My opinion this case should be tested after fix and if it works then fix can be applied without hesitation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 05:54:48 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 17 Jun 2019 09:54:48 +0000 Subject: [issue37231] Optimize calling special methods In-Reply-To: <1560258460.83.0.570346812053.issue37231@roundup.psfhosted.org> Message-ID: <1560765288.08.0.0476043144341.issue37231@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +13996 pull_request: https://github.com/python/cpython/pull/14153 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 05:54:46 2019 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 17 Jun 2019 09:54:46 +0000 Subject: [issue37316] mmap.mmap() passes the wrong variable to PySys_Audit() In-Reply-To: <1560765079.9.0.997846608931.issue37316@roundup.psfhosted.org> Message-ID: <1560765286.19.0.474377805353.issue37316@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +13995 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14152 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 05:55:12 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 17 Jun 2019 09:55:12 +0000 Subject: [issue34631] Upgrade to OpenSSL 1.1.1c, 1.1.0k, and/or 1.0.2s In-Reply-To: <1536686026.27.0.0269046726804.issue34631@psf.upfronthosting.co.za> Message-ID: <1560765312.78.0.293373879525.issue34631@roundup.psfhosted.org> Ned Deily added the comment: > (I assume the Windows installer build is not using 1.1.1. Steve?) After doing a little more homework and better understanding PCbuild/get_externals.bat, https://github.com/python/cpython-source-deps, and https://github.com/python/cpython-bin-deps and their twisting branches, it appears we *are* using 1.1.1, in particular, 1.1.1b for 3.7 and 3.8 Windows builds. So: 1. Can/should be try to update to 1.1.1c for 3.7.4 on Windows, and 2. Should I try to update the macOS installer to 1.1.1c for 3.7.4? For the latter, I'll give it a try and see how smoothly it goes before making a final decision. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 06:06:56 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 10:06:56 +0000 Subject: [issue35031] test_asyncio test_start_tls_server_1 fails in AMD64 FreeBSD CURRENT buildbots In-Reply-To: <1540044407.71.0.788709270274.issue35031@psf.upfronthosting.co.za> Message-ID: <1560766016.8.0.56618629577.issue35031@roundup.psfhosted.org> miss-islington added the comment: New changeset a5ddbfbf50715e3d4b90ad367ed6827c6cbcc52f by Miss Islington (bot) in branch '3.8': bpo-35031, test_asycio: disable TLS 1.3 in test_start_tls_server_1() (GH-14148) https://github.com/python/cpython/commit/a5ddbfbf50715e3d4b90ad367ed6827c6cbcc52f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 06:06:56 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 10:06:56 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1560766016.92.0.454955642893.issue35998@roundup.psfhosted.org> miss-islington added the comment: New changeset a5ddbfbf50715e3d4b90ad367ed6827c6cbcc52f by Miss Islington (bot) in branch '3.8': bpo-35031, test_asycio: disable TLS 1.3 in test_start_tls_server_1() (GH-14148) https://github.com/python/cpython/commit/a5ddbfbf50715e3d4b90ad367ed6827c6cbcc52f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 06:10:52 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 10:10:52 +0000 Subject: [issue35031] test_asyncio test_start_tls_server_1 fails in AMD64 FreeBSD CURRENT buildbots In-Reply-To: <1540044407.71.0.788709270274.issue35031@psf.upfronthosting.co.za> Message-ID: <1560766252.58.0.241413996389.issue35031@roundup.psfhosted.org> miss-islington added the comment: New changeset 0040903bbae043225499babae23649d896ea2eec by Miss Islington (bot) in branch '3.7': bpo-35031, test_asycio: disable TLS 1.3 in test_start_tls_server_1() (GH-14148) https://github.com/python/cpython/commit/0040903bbae043225499babae23649d896ea2eec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 06:10:52 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 10:10:52 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1560766252.69.0.582360587418.issue35998@roundup.psfhosted.org> miss-islington added the comment: New changeset 0040903bbae043225499babae23649d896ea2eec by Miss Islington (bot) in branch '3.7': bpo-35031, test_asycio: disable TLS 1.3 in test_start_tls_server_1() (GH-14148) https://github.com/python/cpython/commit/0040903bbae043225499babae23649d896ea2eec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 06:19:06 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 17 Jun 2019 10:19:06 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1560766746.38.0.346099100645.issue33725@roundup.psfhosted.org> Ned Deily added the comment: As far as I can tell, the only thing left to do for this issue is to add a documentation warning to the 3.7 documents similar to what was added to 3.8 but without the change in default. A PR would be nice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 06:48:32 2019 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 17 Jun 2019 10:48:32 +0000 Subject: [issue37315] Deprecate using math.factorial() with floats In-Reply-To: <1560761395.48.0.0855458048325.issue37315@roundup.psfhosted.org> Message-ID: <1560768512.63.0.089569272375.issue37315@roundup.psfhosted.org> Mark Dickinson added the comment: +1 from me; let's make `factorial` consistent with the other integer-based math module functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 06:56:17 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 17 Jun 2019 10:56:17 +0000 Subject: [issue34506] Traceback logged when SSL handshake fails In-Reply-To: <1535269470.94.0.56676864532.issue34506@psf.upfronthosting.co.za> Message-ID: <1560768977.55.0.0357319501528.issue34506@roundup.psfhosted.org> Andrew Svetlov added the comment: I believe the issue is a duplicate for #37035 at least regarding traceback logging. It can be closed, OSError exceptions are not logged anymore. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 06:58:17 2019 From: report at bugs.python.org (Aymeric Augustin) Date: Mon, 17 Jun 2019 10:58:17 +0000 Subject: [issue34506] Traceback logged when SSL handshake fails In-Reply-To: <1535269470.94.0.56676864532.issue34506@psf.upfronthosting.co.za> Message-ID: <1560769097.54.0.562688735238.issue34506@roundup.psfhosted.org> Aymeric Augustin added the comment: Yes, that seems reasonable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 07:05:17 2019 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 17 Jun 2019 11:05:17 +0000 Subject: [issue37313] test_concurrent_futures stopped after 25 hours on AMD64 Windows7 SP1 3.7 In-Reply-To: <1560759960.52.0.187936052525.issue37313@roundup.psfhosted.org> Message-ID: <1560769517.4.0.94910113993.issue37313@roundup.psfhosted.org> Jeremy Kloth added the comment: The test run was stopped by me terminating the stuck processes on the buildbot worker itself. This happens approximately once a month or so. As of late, its been stuck in test_concurrent_futures, but it can get stuck in any test that uses multiprocessing (the spawned pool never terminates). ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 07:40:46 2019 From: report at bugs.python.org (Mark Summerfield) Date: Mon, 17 Jun 2019 11:40:46 +0000 Subject: [issue4198] os.path.normcase gets fooled on windows with mapped linux network drive In-Reply-To: <1224885833.7.0.0397055051655.issue4198@psf.upfronthosting.co.za> Message-ID: <1560771646.06.0.476241810373.issue4198@roundup.psfhosted.org> Mark Summerfield added the comment: When running a VirtualBox Windows 7 guest on Linux I have found that os.path.samefile() returns False when the filenames are the same, e.g., f = r'V:\pdfs\boson1.pdf' same = os.path.samefile(f, f) print(same) # expected True; got False I mention it here because it may be part of the same problem. I'm using Python 3.7.2. ---------- nosy: +mark versions: +Python 3.7 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 07:40:59 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 17 Jun 2019 11:40:59 +0000 Subject: [issue34506] Traceback logged when SSL handshake fails In-Reply-To: <1535269470.94.0.56676864532.issue34506@psf.upfronthosting.co.za> Message-ID: <1560771659.47.0.870854870916.issue34506@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Don't log OSError exceptions in asyncio transports _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 07:41:48 2019 From: report at bugs.python.org (Inada Naoki) Date: Mon, 17 Jun 2019 11:41:48 +0000 Subject: [issue37231] Optimize calling special methods In-Reply-To: <1560258460.83.0.570346812053.issue37231@roundup.psfhosted.org> Message-ID: <1560771708.59.0.223970094063.issue37231@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 0456df4a55ec9a4e8f4425df92bbe63a290f3f2f by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-37231: remove _PyObject_FastCall_Prepend (GH-14153) https://github.com/python/cpython/commit/0456df4a55ec9a4e8f4425df92bbe63a290f3f2f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 07:53:26 2019 From: report at bugs.python.org (Inada Naoki) Date: Mon, 17 Jun 2019 11:53:26 +0000 Subject: [issue36922] Implement Py_TPFLAGS_METHOD_DESCRIPTOR In-Reply-To: <1557909585.08.0.913937443168.issue36922@roundup.psfhosted.org> Message-ID: <1560772406.54.0.958849516721.issue36922@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 2e9954d3472a23919b96323fcd5bb6c1d6927155 by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-36922: use Py_TPFLAGS_METHOD_DESCRIPTOR in lookup_maybe_method() (GH-13865) https://github.com/python/cpython/commit/2e9954d3472a23919b96323fcd5bb6c1d6927155 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 07:53:53 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 11:53:53 +0000 Subject: [issue36922] Implement Py_TPFLAGS_METHOD_DESCRIPTOR In-Reply-To: <1557909585.08.0.913937443168.issue36922@roundup.psfhosted.org> Message-ID: <1560772433.39.0.988679300368.issue36922@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13997 pull_request: https://github.com/python/cpython/pull/14155 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 08:12:55 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 12:12:55 +0000 Subject: [issue36922] Implement Py_TPFLAGS_METHOD_DESCRIPTOR In-Reply-To: <1557909585.08.0.913937443168.issue36922@roundup.psfhosted.org> Message-ID: <1560773575.31.0.63510877139.issue36922@roundup.psfhosted.org> miss-islington added the comment: New changeset 988fff5d0e7fccecbf776c08ec56695820b3b4a8 by Miss Islington (bot) in branch '3.8': bpo-36922: use Py_TPFLAGS_METHOD_DESCRIPTOR in lookup_maybe_method() (GH-13865) https://github.com/python/cpython/commit/988fff5d0e7fccecbf776c08ec56695820b3b4a8 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 08:18:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 12:18:47 +0000 Subject: [issue37312] Remove deprecated _dummy_thread and dummy_threading modules In-Reply-To: <1560758555.75.0.0564764505885.issue37312@roundup.psfhosted.org> Message-ID: <1560773927.03.0.160552367804.issue37312@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8bf08ee45b7c2341f0d0175b91892843a37c23da by Victor Stinner in branch 'master': bpo-37312: Remove _dummy_thread and dummy_threading modules (GH-14143) https://github.com/python/cpython/commit/8bf08ee45b7c2341f0d0175b91892843a37c23da ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 08:20:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 12:20:26 +0000 Subject: [issue37312] Remove deprecated _dummy_thread and dummy_threading modules In-Reply-To: <1560758555.75.0.0564764505885.issue37312@roundup.psfhosted.org> Message-ID: <1560774026.31.0.915932909196.issue37312@roundup.psfhosted.org> STINNER Victor added the comment: Bye bye dummy_threading. As explained in PR 14143, I kept a reference to dummy_threading in 2to3 on purpose. Keep it there is fine, it helps to port legacy Python 2 code to Python 3. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 08:27:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 12:27:32 +0000 Subject: [issue37194] Move new vector private declarations to the internal C API In-Reply-To: <1559908440.37.0.746705371355.issue37194@roundup.psfhosted.org> Message-ID: <1560774452.45.0.814089175277.issue37194@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 2ff58a24e8a1c7e290d025d69ebaea0bbead3b8c by Victor Stinner in branch 'master': bpo-37194: Add a new public PyObject_CallNoArgs() function (GH-13890) https://github.com/python/cpython/commit/2ff58a24e8a1c7e290d025d69ebaea0bbead3b8c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 08:38:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 12:38:39 +0000 Subject: [issue37194] Move new vector private declarations to the internal C API In-Reply-To: <1559908440.37.0.746705371355.issue37194@roundup.psfhosted.org> Message-ID: <1560775119.91.0.353355326052.issue37194@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13998 pull_request: https://github.com/python/cpython/pull/14156 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 08:52:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 12:52:40 +0000 Subject: [issue36732] test_asyncio: test_huge_content_recvinto() fails randomly In-Reply-To: <1556264661.54.0.31283754406.issue36732@roundup.psfhosted.org> Message-ID: <1560775960.9.0.664576288127.issue36732@roundup.psfhosted.org> STINNER Victor added the comment: New failure on AMD64 Windows7 SP1 3.8: https://buildbot.python.org/all/#/builders/208/builds/75 ====================================================================== ERROR: test_huge_content_recvinto (test.test_asyncio.test_sock_lowlevel.SelectEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_asyncio\test_sock_lowlevel.py", line 225, in test_huge_content_recvinto self.loop.run_until_complete( File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\base_events.py", line 608, in run_until_complete return future.result() File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_asyncio\test_sock_lowlevel.py", line 211, in _basetest_huge_content_recvinto nbytes = await self.loop.sock_recv_into(sock, buf) File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\selector_events.py", line 400, in sock_recv_into return await fut File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\selector_events.py", line 409, in _sock_recv_into nbytes = sock.recv_into(buf) ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host (... test_asyncio re-run in verbose mode ...) ====================================================================== ERROR: test_huge_content (test.test_asyncio.test_sock_lowlevel.ProactorEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\windows_events.py", line 453, in finish_recv return ov.getresult() OSError: [WinError 64] The specified network name is no longer available During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_asyncio\test_sock_lowlevel.py", line 170, in test_huge_content self.loop.run_until_complete( File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\base_events.py", line 608, in run_until_complete return future.result() File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\test_asyncio\test_sock_lowlevel.py", line 157, in _basetest_huge_content data = await self.loop.sock_recv(sock, DATA_SIZE) File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\proactor_events.py", line 690, in sock_recv return await self._proactor.recv(sock, n) File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\windows_events.py", line 808, in _poll value = callback(transferred, key, ov) File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\asyncio\windows_events.py", line 457, in finish_recv raise ConnectionResetError(*exc.args) ConnectionResetError: [WinError 64] The specified network name is no longer available ---------- resolution: out of date -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 08:58:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 12:58:21 +0000 Subject: [issue37194] Move new vector private declarations to the internal C API In-Reply-To: <1559908440.37.0.746705371355.issue37194@roundup.psfhosted.org> Message-ID: <1560776301.47.0.884645626683.issue37194@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 1ce2656f13e726b3b99d4c968926908cff1f460a by Victor Stinner in branch 'master': bpo-37194: Complete PyObject_CallXXX() docs (GH-14156) https://github.com/python/cpython/commit/1ce2656f13e726b3b99d4c968926908cff1f460a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 09:02:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 13:02:04 +0000 Subject: [issue37194] Move new vector private declarations to the internal C API In-Reply-To: <1559908440.37.0.746705371355.issue37194@roundup.psfhosted.org> Message-ID: <1560776524.12.0.283916881652.issue37194@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13999 pull_request: https://github.com/python/cpython/pull/14157 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 09:07:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 13:07:47 +0000 Subject: [issue37194] Move new vector private declarations to the internal C API In-Reply-To: <1559908440.37.0.746705371355.issue37194@roundup.psfhosted.org> Message-ID: <1560776867.47.0.631222572997.issue37194@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +14000 pull_request: https://github.com/python/cpython/pull/14158 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 09:09:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 13:09:16 +0000 Subject: [issue37194] Move new vector private declarations to the internal C API In-Reply-To: <1559908440.37.0.746705371355.issue37194@roundup.psfhosted.org> Message-ID: <1560776956.43.0.0377275058581.issue37194@roundup.psfhosted.org> STINNER Victor added the comment: > bpo-37191: the new vector APIs declare "static inline" functions which are no C89 compatible and so cause compilation issues on pygobject3, python-dbus, xen (for example). bpo-37191 have been fixed, so this issue can now be closed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 09:20:41 2019 From: report at bugs.python.org (prince parker) Date: Mon, 17 Jun 2019 13:20:41 +0000 Subject: [issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package. In-Reply-To: <1515875653.34.0.467229070634.issue32545@psf.upfronthosting.co.za> Message-ID: <1560777641.36.0.942490855037.issue32545@roundup.psfhosted.org> prince parker added the comment: >From the log record, everything I can advise is that it neglected to open the document containing data about progressing introduces. At a supposition, another introduce was running (possibly fizzled?) and didn't tidy up appropriately. https://antimalwareserviceexecutables.com/ Rebooting ought to by and large determination that. In the event that it doesn't, you're either taking a gander at genuine OS defilement (worth testing if some other MSI installers work - Anaconda does not utilize MSI) or plate debasement. ---------- hgrepos: +383 nosy: +prince_parker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 09:23:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 13:23:57 +0000 Subject: [issue37194] Move new vector private declarations to the internal C API In-Reply-To: <1559908440.37.0.746705371355.issue37194@roundup.psfhosted.org> Message-ID: <1560777837.8.0.048766398492.issue37194@roundup.psfhosted.org> STINNER Victor added the comment: New changeset ac4202ee4d53d6c0a07109e03795b70d91edbbb3 by Victor Stinner in branch '3.7': bpo-37194: Complete PyObject_CallXXX() docs (GH-14156) (GH-14158) https://github.com/python/cpython/commit/ac4202ee4d53d6c0a07109e03795b70d91edbbb3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 09:24:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 13:24:02 +0000 Subject: [issue37194] Move new vector private declarations to the internal C API In-Reply-To: <1559908440.37.0.746705371355.issue37194@roundup.psfhosted.org> Message-ID: <1560777842.54.0.220291720016.issue37194@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 71031cf4ed5ac9e330c8890b92379d9df383925b by Victor Stinner in branch '3.8': bpo-37194: Complete PyObject_CallXXX() docs (GH-14156) (GH-14157) https://github.com/python/cpython/commit/71031cf4ed5ac9e330c8890b92379d9df383925b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 09:28:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 13:28:21 +0000 Subject: [issue37194] Move new vector private declarations to the internal C API In-Reply-To: <1559908440.37.0.746705371355.issue37194@roundup.psfhosted.org> Message-ID: <1560778101.6.0.0050069334137.issue37194@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +14001 pull_request: https://github.com/python/cpython/pull/14159 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 09:57:58 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Jun 2019 13:57:58 +0000 Subject: [issue37315] Deprecate using math.factorial() with floats In-Reply-To: <1560761395.48.0.0855458048325.issue37315@roundup.psfhosted.org> Message-ID: <1560779878.37.0.850064375819.issue37315@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 231aad38493c871dd32930a21d256cbacd2ae20c by Serhiy Storchaka in branch 'master': bpo-37315: Deprecate accepting floats in math.factorial(). (GH-14147) https://github.com/python/cpython/commit/231aad38493c871dd32930a21d256cbacd2ae20c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 09:58:42 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Jun 2019 13:58:42 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1560779922.4.0.850247301781.issue35431@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 1b8a46d59734a77cd1f5ffcf3bdfcaafd58a87e7 by Serhiy Storchaka in branch 'master': bpo-35431: Test math.comb() and math.perm() for OverflowError only on CPython. (GH-14146) https://github.com/python/cpython/commit/1b8a46d59734a77cd1f5ffcf3bdfcaafd58a87e7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 10:02:26 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Jun 2019 14:02:26 +0000 Subject: [issue37315] Deprecate using math.factorial() with floats In-Reply-To: <1560761395.48.0.0855458048325.issue37315@roundup.psfhosted.org> Message-ID: <1560780146.2.0.308084241478.issue37315@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 10:10:41 2019 From: report at bugs.python.org (Carlos Mermingas) Date: Mon, 17 Jun 2019 14:10:41 +0000 Subject: [issue37317] asyncio gather doesn't handle custom exceptions that inherit from BaseException Message-ID: <1560780641.84.0.00364750397427.issue37317@roundup.psfhosted.org> New submission from Carlos Mermingas : asyncio.gather doesn't handle custom exception exceptions that inherit from BaseException in the same manner that it handles those that inherit from Exception, regardless of whether return_exceptions is set to True or False. In the example below, I am using return_exceptions=True. If the custom exception inherits from Exception, a list printed, as expected. Conversely, if the custom exception inherits from BaseException, it is propagated: import asyncio class CustomException(BaseException): # It works if base class changed to Exception pass async def do_this(x): if x == 5: raise CustomException() await asyncio.sleep(1) print(f'THIS DONE: {x}') async def main(): print('BEGIN') tasks = [do_this(x) for x in range(1, 11)] result = await asyncio.gather(*tasks, return_exceptions=True) print(f'Result: {result}') print('END') asyncio.run(main()) ---------- components: Library (Lib) messages: 345861 nosy: cmermingas priority: normal severity: normal status: open title: asyncio gather doesn't handle custom exceptions that inherit from BaseException type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 10:40:21 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 17 Jun 2019 14:40:21 +0000 Subject: [issue37317] asyncio gather doesn't handle custom exceptions that inherit from BaseException In-Reply-To: <1560780641.84.0.00364750397427.issue37317@roundup.psfhosted.org> Message-ID: <1560782421.01.0.492264164736.issue37317@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- components: +asyncio nosy: +asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 11:15:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 15:15:59 +0000 Subject: [issue37194] Move new vector private declarations to the internal C API In-Reply-To: <1559908440.37.0.746705371355.issue37194@roundup.psfhosted.org> Message-ID: <1560784559.63.0.214835313047.issue37194@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 5352cc41fa4eb5f0dc847709392e88473b8593b0 by Victor Stinner in branch 'master': bpo-37194: Add PyObject_CallNoArgs() rationale (GH-14159) https://github.com/python/cpython/commit/5352cc41fa4eb5f0dc847709392e88473b8593b0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 11:17:02 2019 From: report at bugs.python.org (ChrisRands) Date: Mon, 17 Jun 2019 15:17:02 +0000 Subject: [issue37318] builtins.True exists but can't be accessed Message-ID: <1560784622.94.0.240402132833.issue37318@roundup.psfhosted.org> New submission from ChrisRands : On Python 3: >>> import builtins >>> 'True' in dir(builtins) True >>> builtins.True File "", line 1 builtins.True ^ SyntaxError: invalid syntax >>> So "True" is a keyword, I guess this explains the behaviour, but still seems odd to me? Relevant SO question: https://stackoverflow.com/questions/56633402/why-are-true-and-false-being-set-in-globals-by-this-code ---------- messages: 345863 nosy: ChrisRands priority: normal severity: normal status: open title: builtins.True exists but can't be accessed type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 11:21:35 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jun 2019 15:21:35 +0000 Subject: [issue37288] Fix Windows build when --no-tkinter is specified In-Reply-To: <1560555377.03.0.131397449861.issue37288@roundup.psfhosted.org> Message-ID: <1560784895.57.0.90302911002.issue37288@roundup.psfhosted.org> Steve Dower added the comment: New changeset 00f6493084c385033fe5574314223217d9a26672 by Steve Dower (Paul Monson) in branch 'master': bpo-37288: Fix Windows build when --no-tkinter is specified (GH-14096) https://github.com/python/cpython/commit/00f6493084c385033fe5574314223217d9a26672 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 11:22:20 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 15:22:20 +0000 Subject: [issue37288] Fix Windows build when --no-tkinter is specified In-Reply-To: <1560555377.03.0.131397449861.issue37288@roundup.psfhosted.org> Message-ID: <1560784940.87.0.20625859694.issue37288@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14002 pull_request: https://github.com/python/cpython/pull/14160 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 11:23:21 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jun 2019 15:23:21 +0000 Subject: [issue35360] Update SQLite to 3.26 in Windows and macOS installer builds In-Reply-To: <1543580070.45.0.788709270274.issue35360@psf.upfronthosting.co.za> Message-ID: <1560785001.42.0.901029931129.issue35360@roundup.psfhosted.org> Steve Dower added the comment: Has anyone tried building with the newer SQLite and confirmed that the tests and any scenarios they use still work? We don't currently have a SQLite expert to do these kinds of things. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 11:24:03 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jun 2019 15:24:03 +0000 Subject: [issue37288] Fix Windows build when --no-tkinter is specified In-Reply-To: <1560555377.03.0.131397449861.issue37288@roundup.psfhosted.org> Message-ID: <1560785043.21.0.904810094267.issue37288@roundup.psfhosted.org> Steve Dower added the comment: Thanks, Paul! ---------- assignee: -> steve.dower resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 11:24:52 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Mon, 17 Jun 2019 15:24:52 +0000 Subject: [issue37297] function changed when pickle bound method object In-Reply-To: <1560649257.15.0.526142047149.issue37297@roundup.psfhosted.org> Message-ID: <1560785092.9.0.219611107476.issue37297@roundup.psfhosted.org> G?ry added the comment: @George Xie There is an issue with the Python workaround `multiprocessing.reduction.register(types.MethodType, my_reduce)` that you proposed. If you then instantiate a `multiprocessing.Manager()` you get this exception: > python Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import multiprocessing >>> import types >>> def my_reduce(obj): ... return (obj.__func__.__get__, (obj.__self__,)) ... >>> multiprocessing.reduction.register(types.MethodType, my_reduce) >>> multiprocessing.Manager() Traceback (most recent call last): File "", line 1, in File "C:\Program Files\Python37\lib\multiprocessing\context.py", line 56, in Manager m.start() File "C:\Program Files\Python37\lib\multiprocessing\managers.py", line 543, in start self._process.start() File "C:\Program Files\Python37\lib\multiprocessing\process.py", line 112, in start self._popen = self._Popen(self) File "C:\Program Files\Python37\lib\multiprocessing\context.py", line 322, in _Popen return Popen(process_obj) File "C:\Program Files\Python37\lib\multiprocessing\popen_spawn_win32.py", line 89, in __init__ reduction.dump(process_obj, to_child) File "C:\Program Files\Python37\lib\multiprocessing\reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) _pickle.PicklingError: Can't pickle : it's not the same object as multiprocessing.managers.BaseManager._run_server >>> Traceback (most recent call last): File "", line 1, in File "C:\Program Files\Python37\lib\multiprocessing\spawn.py", line 105, in spawn_main exitcode = _main(fd) File "C:\Program Files\Python37\lib\multiprocessing\spawn.py", line 115, in _main self = reduction.pickle.load(from_parent) EOFError: Ran out of input ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 11:32:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 15:32:35 +0000 Subject: [issue37297] function changed when pickle bound method object In-Reply-To: <1560649257.15.0.526142047149.issue37297@roundup.psfhosted.org> Message-ID: <1560785555.09.0.421958852206.issue37297@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 11:33:23 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jun 2019 15:33:23 +0000 Subject: [issue34631] Upgrade to OpenSSL 1.1.1c, 1.1.0k, and/or 1.0.2s In-Reply-To: <1536686026.27.0.0269046726804.issue34631@psf.upfronthosting.co.za> Message-ID: <1560785603.96.0.0704598046926.issue34631@roundup.psfhosted.org> Steve Dower added the comment: The canonical source of versions used on Windows is in PCbuild/python.props I'll pull the 1.1.1c sources into cpython-source-deps and run a build. If all goes smoothly, we can consider it, but I don't have a huge amount of time for CPython this week I'm afraid. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 11:45:21 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jun 2019 15:45:21 +0000 Subject: [issue34631] Upgrade to OpenSSL 1.1.1c, 1.1.0k, and/or 1.0.2s In-Reply-To: <1536686026.27.0.0269046726804.issue34631@psf.upfronthosting.co.za> Message-ID: <1560786321.37.0.130085466377.issue34631@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +14003 pull_request: https://github.com/python/cpython/pull/14161 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 11:48:02 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 15:48:02 +0000 Subject: [issue37288] Fix Windows build when --no-tkinter is specified In-Reply-To: <1560555377.03.0.131397449861.issue37288@roundup.psfhosted.org> Message-ID: <1560786482.98.0.219695050256.issue37288@roundup.psfhosted.org> miss-islington added the comment: New changeset 79d8204c4f02d02b3c6570de94c85863c27ddecb by Miss Islington (bot) in branch '3.8': bpo-37288: Fix Windows build when --no-tkinter is specified (GH-14096) https://github.com/python/cpython/commit/79d8204c4f02d02b3c6570de94c85863c27ddecb ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 11:49:05 2019 From: report at bugs.python.org (Matthew Cowles) Date: Mon, 17 Jun 2019 15:49:05 +0000 Subject: [issue37299] RuntimeWarning is NOT raised In-Reply-To: <1560651750.57.0.52730011587.issue37299@roundup.psfhosted.org> Message-ID: <1560786545.98.0.434321875145.issue37299@roundup.psfhosted.org> Matthew Cowles added the comment: I disagree with the decision not to fix this bug. If a RuntimeWarning is warranted when a temporary variable is used, it's warranted when the value is used directly, without a temporary variable. ---------- nosy: +mdcowles _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 11:52:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 15:52:09 +0000 Subject: [issue37189] PyRun_String not exported in python38.dll In-Reply-To: <1559894123.98.0.3282613922.issue37189@roundup.psfhosted.org> Message-ID: <1560786729.64.0.112878526419.issue37189@roundup.psfhosted.org> STINNER Victor added the comment: > A look through `git log -p` looks like bpo-34646 is likely to be related. New changeset e5024517811ee990b770fca0ba7058742d00e032 by Benjamin Peterson in branch 'master': closes bpo-34646: Remove PyAPI_* macros from declarations. (GH-9218) https://github.com/python/cpython/commit/e5024517811ee990b770fca0ba7058742d00e032 Extract of this change: #undef PyRun_String -PyAPI_FUNC(PyObject *) +PyObject * PyRun_String(const char *str, int s, PyObject *g, PyObject *l) { return PyRun_StringFlags(str, s, g, l, NULL); } On Windows, this change removed dllexport from PyRun_String(). My PR 14142 adds it back, to pythonrun.h. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 11:53:53 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Mon, 17 Jun 2019 15:53:53 +0000 Subject: [issue37297] function changed when pickle bound method object In-Reply-To: <1560649257.15.0.526142047149.issue37297@roundup.psfhosted.org> Message-ID: <1560786833.95.0.779768685606.issue37297@roundup.psfhosted.org> G?ry added the comment: The previous `_pickle.PicklingError` seems to only affect Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 12:15:00 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jun 2019 16:15:00 +0000 Subject: [issue37189] PyRun_String not exported in python38.dll In-Reply-To: <1559894123.98.0.3282613922.issue37189@roundup.psfhosted.org> Message-ID: <1560788100.56.0.471042974026.issue37189@roundup.psfhosted.org> Steve Dower added the comment: I haven't fully tested this, but a suitable test using ctypes might look like: py = ctypes.PyDLL("", handle=sys.dllhandle) missing = {name for name in EXPECTED_NAMES if not hasattr(py, name)} # assert 'missing' is empty ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 12:15:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 16:15:07 +0000 Subject: [issue33529] [security] Infinite loop on folding email (_fold_as_ew()) if an header has no spaces In-Reply-To: <1526429548.63.0.682650639539.issue33529@psf.upfronthosting.co.za> Message-ID: <1560788107.06.0.325490187294.issue33529@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +14004 pull_request: https://github.com/python/cpython/pull/14162 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 12:22:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 16:22:02 +0000 Subject: [issue33529] [security] Infinite loop on folding email (_fold_as_ew()) if an header has no spaces In-Reply-To: <1526429548.63.0.682650639539.issue33529@psf.upfronthosting.co.za> Message-ID: <1560788522.22.0.206882053688.issue33529@roundup.psfhosted.org> STINNER Victor added the comment: It's unclear to me if Python 3.5 is affected or not. The fix changes the function _fold_as_ew(), Python 3.5 doesn't have this function *but* there is a call a _fold_as_ew() method!? Lib/email/_header_value_parser.py:427: in _fold() method ... if is_ew or last_ew: # It's too big to fit on the line, but since we've # got encoded words we can use encoded word folding. part._fold_as_ew(folded) continue ... If I backport the 2 tests, they fail *but* they don't hang forever (they complete in less than 1 second). ====================================================================== FAIL: test_fold_overlong_words_using_RFC2047 (test.test_email.test_headerregistry.TestFolding) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/vstinner/prog/python/3.5/Lib/test/test_email/test_headerregistry.py", line 1601, in test_fold_overlong_words_using_RFC2047 'X-Report-Abuse: =?utf-8?q?=3Chttps=3A//www=2Emailitapp=2E' AssertionError: 'X-Report-Abuse: \n' != 'X-Report-Abuse: =?utf-8?q?=3Chttps=3A//www=2Emailitapp=2E[114 chars]?=\n' - X-Report-Abuse: + X-Report-Abuse: =?utf-8?q?=3Chttps=3A//www=2Emailitapp=2Ecom/report=5Fabuse?= + =?utf-8?q?=2Ephp=3Fmid=3Dxxx-xxx-xxxxxxxxxxxxxxxxxxxxxxxx=3D=3D-xxx-xx-xx?= + =?utf-8?q?=3E?= ====================================================================== FAIL: test_non_ascii_chars_do_not_cause_inf_loop (test.test_email.test_policy.PolicyAPITests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/vstinner/prog/python/3.5/Lib/test/test_email/test_policy.py", line 241, in test_non_ascii_chars_do_not_cause_inf_loop 12 * ' =?utf-8?q?=C4=85?=\n') AssertionError: 'Subject: =?utf-8?b?xIXEhcSFxIXEhcSFxIXEhcSFxIXEhcSF?=\n' != 'Subject: \n =?utf-8?q?=C4=85?=\n =?utf-8?q?=C4=85?[209 chars]?=\n' - Subject: =?utf-8?b?xIXEhcSFxIXEhcSFxIXEhcSFxIXEhcSF?= + Subject: + =?utf-8?q?=C4=85?= + =?utf-8?q?=C4=85?= + =?utf-8?q?=C4=85?= + =?utf-8?q?=C4=85?= + =?utf-8?q?=C4=85?= + =?utf-8?q?=C4=85?= + =?utf-8?q?=C4=85?= + =?utf-8?q?=C4=85?= + =?utf-8?q?=C4=85?= + =?utf-8?q?=C4=85?= + =?utf-8?q?=C4=85?= + =?utf-8?q?=C4=85?= ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 12:33:29 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jun 2019 16:33:29 +0000 Subject: [issue34631] Upgrade to OpenSSL 1.1.1c, 1.1.0k, and/or 1.0.2s In-Reply-To: <1536686026.27.0.0269046726804.issue34631@psf.upfronthosting.co.za> Message-ID: <1560789209.84.0.381020118635.issue34631@roundup.psfhosted.org> Steve Dower added the comment: New changeset d8e3a8af775d683c606f3618d04f2be4e97ac3c0 by Steve Dower in branch '2.7': bpo-34631: Updated OpenSSL to 1.0.2s in Windows installer (GH-14161) https://github.com/python/cpython/commit/d8e3a8af775d683c606f3618d04f2be4e97ac3c0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 12:36:05 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jun 2019 16:36:05 +0000 Subject: [issue34631] Upgrade to OpenSSL 1.1.1c, 1.1.0k, and/or 1.0.2s In-Reply-To: <1536686026.27.0.0269046726804.issue34631@psf.upfronthosting.co.za> Message-ID: <1560789365.03.0.874063925645.issue34631@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +14005 pull_request: https://github.com/python/cpython/pull/14163 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 12:40:12 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 17 Jun 2019 16:40:12 +0000 Subject: [issue37295] Possible optimizations for math.comb() In-Reply-To: <1560626260.31.0.393863097125.issue37295@roundup.psfhosted.org> Message-ID: <1560789612.81.0.0599003218145.issue37295@roundup.psfhosted.org> Raymond Hettinger added the comment: FWIW, here's a rough implementation of (3). It is limited to a specific range to avoid excess memory usage. For comb(50_000, 25_000), it gives a three-fold speedup: if (k_long > 20 && k_long > n_long / 3 && n_long <= 100000) { PyObject *den = math_factorial(module, k); /* den = k! */ temp = PyNumber_Subtract(n, k); Py_SETREF(temp, math_factorial(module, temp)); Py_SETREF(den, PyNumber_Multiply(den, temp)); /* den *= (n - k)! */ Py_DECREF(temp); Py_SETREF(result, math_factorial(module, n)); /* result = n! */ Py_SETREF(result, PyNumber_FloorDivide(result, den)); /* result //= (n-k)! */ Py_DECREF(den); return result; } > Can the suggested performance improvements go into 3.8, or should they wait for 3.9? > It's not clear to me whether a performance improvement after feature freeze is okay or not. Historically, we've used the beta phase for optimizations, tweaking APIs, and improving docs. However, I'm in no rush and this can easily wait for 3.9. My only concern is that the other math functions, except for factorial(), have bounded running times and memory usage, so performance is more of a concern for this function which could end-up being an unexpected bottleneck or being a vector for a DOS attack. That said, we haven't had any negative reports regarding factorial(), so this may be a low priority. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 12:40:56 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 17 Jun 2019 16:40:56 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1560789656.16.0.777042418328.issue37111@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset ca7b504a4d4c3a5fde1ee4607b9501c2bab6e743 by Vinay Sajip in branch 'master': bpo-37111: Add 'encoding' and 'errors' parameters to logging.basicCon? (GH-14008) https://github.com/python/cpython/commit/ca7b504a4d4c3a5fde1ee4607b9501c2bab6e743 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 12:43:59 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 17 Jun 2019 16:43:59 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1560789839.8.0.970784732674.issue37111@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 12:46:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 16:46:31 +0000 Subject: [issue33529] [security] Infinite loop on folding email (_fold_as_ew()) if an header has no spaces In-Reply-To: <1526429548.63.0.682650639539.issue33529@psf.upfronthosting.co.za> Message-ID: <1560789991.67.0.254788269876.issue33529@roundup.psfhosted.org> STINNER Victor added the comment: Python 3.5 is not vulnerable, it doesn't hang on the following code: import email.policy policy = email.policy.default.clone(max_line_length=20) actual = policy.fold('Subject', '\u0105' * 12) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 12:50:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 16:50:46 +0000 Subject: [issue33529] [security] Infinite loop on folding email (_fold_as_ew()) if an header has no spaces In-Reply-To: <1526429548.63.0.682650639539.issue33529@psf.upfronthosting.co.za> Message-ID: <1560790246.63.0.88379697841.issue33529@roundup.psfhosted.org> STINNER Victor added the comment: Python 2.7 doesn't have email.policy module. For Python 2.7, I wrote this code: --- import email.header import email.message msg = email.message.Message() msg.set_charset("UTF-8") msg['Subject'] = email.header.Header(u'\u0105' * 12, maxlinelen=20, charset="UTF-8") print(msg.as_string()) --- I get this output: --- MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Subject: =?utf-8?b?xIU=?= =?utf-8?b?xIU=?= =?utf-8?b?xIU=?= =?utf-8?b?xIU=?= =?utf-8?b?xIU=?= =?utf-8?b?xIU=?= =?utf-8?b?xIU=?= =?utf-8?b?xIU=?= =?utf-8?b?xIU=?= =?utf-8?b?xIU=?= =?utf-8?b?xIU=?= =?utf-8?b?xIU=?= --- I have no idea if this example says that Python 2.7 is vulnerable or not. I get a different output on the master branch: --- MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Subject: =?utf-8?b?xIXEhcSFxIXEhcSFxIXEhcSFxIXEhcSF?= --- But I don't know if I use the email API properly. "Subject: =?utf-8?b?xIXEhcSFxIXEhcSFxIXEhcSFxIXEhcSF?=" is longer than 20 characters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 12:56:10 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 17 Jun 2019 16:56:10 +0000 Subject: [issue33529] [security] Infinite loop on folding email (_fold_as_ew()) if an header has no spaces In-Reply-To: <1526429548.63.0.682650639539.issue33529@psf.upfronthosting.co.za> Message-ID: <1560790570.24.0.404444206859.issue33529@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 13:02:13 2019 From: report at bugs.python.org (YoSTEALTH) Date: Mon, 17 Jun 2019 17:02:13 +0000 Subject: [issue37299] RuntimeWarning is NOT raised In-Reply-To: <1560651750.57.0.52730011587.issue37299@roundup.psfhosted.org> Message-ID: <1560790933.37.0.0804351421166.issue37299@roundup.psfhosted.org> YoSTEALTH added the comment: As far as i can tell "static analyzers" like flake8 and "type hints" like mypy does not detect this problem ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 13:23:43 2019 From: report at bugs.python.org (wim glenn) Date: Mon, 17 Jun 2019 17:23:43 +0000 Subject: [issue30052] URL Quoting page links to function Bytes instead of defintion In-Reply-To: <1492001374.68.0.411275444037.issue30052@psf.upfronthosting.co.za> Message-ID: <1560792223.62.0.845141239898.issue30052@roundup.psfhosted.org> wim glenn added the comment: https://docs.python.org/3/library/functions.html Usually the little paragraph icon appears when you hover over a function name, giving an anchor link. It's not doing it for bytes or bytearray. Was that an unintended consequence of disambiguation from the stdtypes html? ---------- nosy: +wim.glenn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 13:25:28 2019 From: report at bugs.python.org (wim glenn) Date: Mon, 17 Jun 2019 17:25:28 +0000 Subject: [issue30052] URL Quoting page links to function Bytes instead of defintion In-Reply-To: <1492001374.68.0.411275444037.issue30052@psf.upfronthosting.co.za> Message-ID: <1560792328.89.0.635037340147.issue30052@roundup.psfhosted.org> wim glenn added the comment: This anchor works, by the way: https://docs.python.org/3/library/functions.html#func-bytes Hopefully someone more fluent in the docs syntax can figure out a way to fix the anchor-link hovers ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 13:49:23 2019 From: report at bugs.python.org (Myles Borins) Date: Mon, 17 Jun 2019 17:49:23 +0000 Subject: [issue34875] Change .js mime to "text/javascript" In-Reply-To: <1538519319.52.0.545547206417.issue34875@psf.upfronthosting.co.za> Message-ID: <1560793763.75.0.861347656983.issue34875@roundup.psfhosted.org> Myles Borins added the comment: Hey All, I'd like to reopen this. We are almost done with the IETF standardization of .mjs, and part of this process is making obsolete application/javascript in favor of text/javascript. --> https://datatracker.ietf.org/doc/draft-ietf-dispatch-javascript-mjs/ ---------- resolution: rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 14:18:26 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 17 Jun 2019 18:18:26 +0000 Subject: [issue37299] RuntimeWarning is NOT raised In-Reply-To: <1560651750.57.0.52730011587.issue37299@roundup.psfhosted.org> Message-ID: <1560795506.41.0.285059498223.issue37299@roundup.psfhosted.org> Andrew Svetlov added the comment: > If a RuntimeWarning is warranted when a temporary variable is used, it's warranted when the value is used directly, without a temporary variable. No, it's not. If "1/0" is present in never executed code block Python don't raise an exception too. Warnings are not exceptional. open() raises ResoucesWarning for an unclosed file only if the code is actually running. If the code branch is not executed the Python runtime doesn't throw errors/warnings about its usage. I'm sorry, mypy doesn't detect this. Potentially could maybe, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 14:18:28 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 17 Jun 2019 18:18:28 +0000 Subject: [issue34556] Add --upgrade to venv module In-Reply-To: <1535729151.14.0.56676864532.issue34556@psf.upfronthosting.co.za> Message-ID: <1560795508.27.0.287933614703.issue34556@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 4acdbf11b1fae1af24c47413a6caa593010d1b6f by ?ukasz Langa (Cooper Lees) in branch 'master': bpo-34556: Add --upgrade-deps to venv module (#13100) https://github.com/python/cpython/commit/4acdbf11b1fae1af24c47413a6caa593010d1b6f ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 14:35:57 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jun 2019 18:35:57 +0000 Subject: [issue34631] Upgrade to OpenSSL 1.1.1c, 1.1.0k, and/or 1.0.2s In-Reply-To: <1536686026.27.0.0269046726804.issue34631@psf.upfronthosting.co.za> Message-ID: <1560796557.15.0.600112463768.issue34631@roundup.psfhosted.org> Steve Dower added the comment: The tests seem to pass fine for 1.1.1c against master, so I'll merge that and see if the backport is also okay. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 14:36:13 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jun 2019 18:36:13 +0000 Subject: [issue34631] Upgrade to OpenSSL 1.1.1c, 1.1.0k, and/or 1.0.2s In-Reply-To: <1536686026.27.0.0269046726804.issue34631@psf.upfronthosting.co.za> Message-ID: <1560796573.48.0.04823960971.issue34631@roundup.psfhosted.org> Steve Dower added the comment: New changeset a268edd6a411480281222b1fdb0f78053434d17f by Steve Dower in branch 'master': bpo-34631: Updated OpenSSL to 1.1.1c in Windows installer (GH-14163) https://github.com/python/cpython/commit/a268edd6a411480281222b1fdb0f78053434d17f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 14:36:45 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 18:36:45 +0000 Subject: [issue34631] Upgrade to OpenSSL 1.1.1c, 1.1.0k, and/or 1.0.2s In-Reply-To: <1536686026.27.0.0269046726804.issue34631@psf.upfronthosting.co.za> Message-ID: <1560796605.68.0.942382928225.issue34631@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14006 pull_request: https://github.com/python/cpython/pull/14164 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 14:58:04 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 17 Jun 2019 18:58:04 +0000 Subject: [issue37133] Erro "ffi.h: No such file" when build python 3.8 (branch master) on windows 10 In-Reply-To: <1559485272.43.0.308074768888.issue37133@roundup.psfhosted.org> Message-ID: <1560797884.47.0.540250919951.issue37133@roundup.psfhosted.org> Zachary Ware added the comment: I'm unable to reproduce the problem. If you're still having issues, please reopen the issue with more details about what exactly you did and the error(s) you saw (preferably copied and pasted into a message). ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 15:02:13 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Jun 2019 19:02:13 +0000 Subject: [issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call In-Reply-To: <1480885774.84.0.670239959771.issue28869@psf.upfronthosting.co.za> Message-ID: <1560798133.19.0.103113944828.issue28869@roundup.psfhosted.org> Serhiy Storchaka added the comment: The problem is that __module__ is deduced from the caller's frame in type.__new__(). In case if type.__new__() is called directly, __module__ is set to the name of the module where type.__new__() is called. So virtually every type subclass which defines the __new__ method and calls type.__new__() inside it starves from the same issue. It can be fixed in general if deduce __module__ in type.__call__() instead of type.__new__(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 15:10:31 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jun 2019 19:10:31 +0000 Subject: [issue34631] Upgrade to OpenSSL 1.1.1c, 1.1.0k, and/or 1.0.2s In-Reply-To: <1536686026.27.0.0269046726804.issue34631@psf.upfronthosting.co.za> Message-ID: <1560798631.48.0.284928663758.issue34631@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +14007 pull_request: https://github.com/python/cpython/pull/14165 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 15:10:42 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Jun 2019 19:10:42 +0000 Subject: [issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call In-Reply-To: <1480885774.84.0.670239959771.issue28869@psf.upfronthosting.co.za> Message-ID: <1560798642.98.0.696610959875.issue28869@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +14008 pull_request: https://github.com/python/cpython/pull/14166 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 15:25:21 2019 From: report at bugs.python.org (Big Stone) Date: Mon, 17 Jun 2019 19:25:21 +0000 Subject: [issue35360] Update SQLite to 3.26 in Windows and macOS installer builds In-Reply-To: <1543580070.45.0.788709270274.issue35360@psf.upfronthosting.co.za> Message-ID: <1560799521.37.0.295740882118.issue35360@roundup.psfhosted.org> Big Stone added the comment: on my test cases, sqlite_bro and baresql, db.py , it works without problems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 15:41:21 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 17 Jun 2019 19:41:21 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1560800481.11.0.891414702498.issue37039@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 5bff3c86ab77e9d831b3cd19b45654c7eef22931 by Terry Jan Reedy (Tal Einat) in branch 'master': bpo-37039: Make IDLE's Zoom Height adjust to users' screens (GH-13678) https://github.com/python/cpython/commit/5bff3c86ab77e9d831b3cd19b45654c7eef22931 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 15:49:04 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 19:49:04 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1560800944.72.0.867400184581.issue37039@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14009 pull_request: https://github.com/python/cpython/pull/14167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 15:52:07 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 19:52:07 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1560801127.71.0.344066062958.issue37039@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14010 pull_request: https://github.com/python/cpython/pull/14168 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 15:52:35 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Jun 2019 19:52:35 +0000 Subject: [issue37319] Deprecate using random.randrange() with non-integers Message-ID: <1560801155.55.0.20318571261.issue37319@roundup.psfhosted.org> New submission from Serhiy Storchaka : Unlike other range()-like functions random.randrange() accepts not only integers and integer-like objects (implementing __index__), but any numbers with integral values, like 3.0 or Decimal(3). In 3.8 using __int__ for implicit converting to C integers were deprecated, and likely will be forbidden in 3.9. __index__ is now preferable. I propose to deprecate accepting non-integer arguments in random.randrange() and use __index__ instead of __int__ for converting values. At end it will lead to simpler and faster code. Instead of istart = _int(start) if istart != start: raise ValueError("non-integer arg 1 for randrange()") we could use just start = _index(start) It will help also in converting the randrange() implementation to C. See also issue37315. ---------- components: Library (Lib) messages: 345892 nosy: mark.dickinson, rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: Deprecate using random.randrange() with non-integers type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 15:54:28 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jun 2019 19:54:28 +0000 Subject: [issue34631] Upgrade to OpenSSL 1.1.1c, 1.1.0k, and/or 1.0.2s In-Reply-To: <1536686026.27.0.0269046726804.issue34631@psf.upfronthosting.co.za> Message-ID: <1560801268.84.0.186844081072.issue34631@roundup.psfhosted.org> Steve Dower added the comment: New changeset c28c1358245b9fe42e9559c34eae01befce73a1f by Steve Dower (Miss Islington (bot)) in branch '3.8': bpo-34631: Updated OpenSSL to 1.1.1c in Windows installer (GH-14163) https://github.com/python/cpython/commit/c28c1358245b9fe42e9559c34eae01befce73a1f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 15:54:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 19:54:46 +0000 Subject: [issue37320] aifc, sunau, wave: remove deprecated openfp() function Message-ID: <1560801286.41.0.0905607754393.issue37320@roundup.psfhosted.org> New submission from STINNER Victor : The openfp() function of aifc, sunau, wave is an alias to the open() function of each module and is deprecated since Python 3.7. Attached PR removes it. ---------- components: Library (Lib) messages: 345894 nosy: vstinner priority: normal severity: normal status: open title: aifc, sunau, wave: remove deprecated openfp() function versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 16:06:43 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 20:06:43 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1560802003.94.0.352116773716.issue37039@roundup.psfhosted.org> miss-islington added the comment: New changeset 0f31a2d3e85d3644de30626a00439ab3c7424105 by Miss Islington (bot) in branch '3.7': bpo-37039: Make IDLE's Zoom Height adjust to users' screens (GH-13678) https://github.com/python/cpython/commit/0f31a2d3e85d3644de30626a00439ab3c7424105 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 16:11:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 20:11:27 +0000 Subject: [issue37320] aifc, sunau, wave: remove deprecated openfp() function In-Reply-To: <1560801286.41.0.0905607754393.issue37320@roundup.psfhosted.org> Message-ID: <1560802287.0.0.756023263537.issue37320@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +14011 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14169 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 16:12:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 20:12:59 +0000 Subject: [issue31985] Deprecate openfp() in aifc, sunau and wave In-Reply-To: <1510178196.39.0.213398074469.issue31985@psf.upfronthosting.co.za> Message-ID: <1560802379.76.0.147323442195.issue31985@roundup.psfhosted.org> STINNER Victor added the comment: I created bpo-37320: "aifc, sunau, wave: remove deprecated openfp() function". ---------- nosy: +vstinner resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 16:13:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 20:13:34 +0000 Subject: [issue37320] aifc, sunau, wave: remove deprecated openfp() function In-Reply-To: <1560801286.41.0.0905607754393.issue37320@roundup.psfhosted.org> Message-ID: <1560802414.57.0.223138807009.issue37320@roundup.psfhosted.org> STINNER Victor added the comment: openfp() functions were deprecated by bpo-31985. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 16:14:20 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 17 Jun 2019 20:14:20 +0000 Subject: [issue37321] IDLE: Make Subprocess Connection Errors consistent. Message-ID: <1560802460.36.0.0153945253902.issue37321@roundup.psfhosted.org> New submission from Terry J. Reedy : A Subprocess Connection Error (new consistent name) can be displayed by either the user or IDLE process (run and pyshell modules). The latter is much more common. Only the former was updated to refer to the newish doc section. Update the latter also. Otherwise, make more consistent. (May someday combine into one function.) ---------- assignee: terry.reedy components: IDLE messages: 345898 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Make Subprocess Connection Errors consistent. versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 16:15:57 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 17 Jun 2019 20:15:57 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1560802557.05.0.554328727063.issue37039@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 4b68a8eb0df7317d6c57b021d40cc0b31e3f1cd3 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.8': bpo-37039: Make IDLE's Zoom Height adjust to users' screens (GH-13678) (GH-14168) https://github.com/python/cpython/commit/4b68a8eb0df7317d6c57b021d40cc0b31e3f1cd3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 16:17:35 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 17 Jun 2019 20:17:35 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1560802655.12.0.782271263622.issue37039@roundup.psfhosted.org> Terry J. Reedy added the comment: Thank you Andre for the reports and followup and Tal for the research. I can start using this now. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 16:30:57 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jun 2019 20:30:57 +0000 Subject: [issue35360] Update SQLite to 3.26 in Windows and macOS installer builds In-Reply-To: <1543580070.45.0.788709270274.issue35360@psf.upfronthosting.co.za> Message-ID: <1560803457.75.0.681218687542.issue35360@roundup.psfhosted.org> Steve Dower added the comment: I just pushed sources with tag sqlite-3.28.0.0, so now anybody should be able to submit a CPython PR for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 16:32:18 2019 From: report at bugs.python.org (Tal Einat) Date: Mon, 17 Jun 2019 20:32:18 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1560803538.34.0.344627400586.issue37039@roundup.psfhosted.org> Tal Einat added the comment: Hey, I did the implementation too! :) I'm really happy to see this fixed in time for 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 16:35:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 20:35:34 +0000 Subject: [issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning Message-ID: <1560803734.85.0.206698450732.issue37322@roundup.psfhosted.org> New submission from STINNER Victor : vstinner at apu$ ./python -X tracemalloc=10 -m test --fail-env-changed -v test_ssl -m test_pha_required_nocert == CPython 3.9.0a0 (heads/master-dirty:00f6493084, Jun 17 2019, 21:50:32) [GCC 9.1.1 20190503 (Red Hat 9.1.1-1)] == Linux-5.1.6-300.fc30.x86_64-x86_64-with-glibc2.29 little-endian == cwd: /home/vstinner/prog/python/master/build/test_python_23407 == CPU count: 8 == encodings: locale=UTF-8, FS=utf-8 Run tests sequentially 0:00:00 load avg: 0.58 [1/1] test_ssl test_ssl: testing with 'OpenSSL 1.1.1c FIPS 28 May 2019' (1, 1, 1, 3, 15) under 'Linux-5.1.6-300.fc30.x86_64-x86_64-with-glibc2.29' HAS_SNI = True OP_ALL = 0x80000054 OP_NO_TLSv1_1 = 0x10000000 test_pha_required_nocert (test.test_ssl.TestPostHandshakeAuth) ... Exception in thread Thread-2: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/test/test_ssl.py", line 2287, in run msg = self.read() File "/home/vstinner/prog/python/master/Lib/test/test_ssl.py", line 2264, in read return self.sslconn.read() File "/home/vstinner/prog/python/master/Lib/ssl.py", line 1090, in read return self._sslobj.read(len) ssl.SSLError: [SSL: PEER_DID_NOT_RETURN_A_CERTIFICATE] peer did not return a certificate (_ssl.c:2540) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/threading.py", line 938, in _bootstrap_inner self.run() File "/home/vstinner/prog/python/master/Lib/test/test_ssl.py", line 2373, in run raise ssl.SSLError('tlsv13 alert certificate required') ssl.SSLError: ('tlsv13 alert certificate required',) /home/vstinner/prog/python/master/Lib/threading.py:938: ResourceWarning: unclosed self.run() Object allocated at (most recent call last): File "/home/vstinner/prog/python/master/Lib/threading.py", lineno 896 self._bootstrap_inner() File "/home/vstinner/prog/python/master/Lib/threading.py", lineno 938 self.run(). File "/home/vstinner/prog/python/master/Lib/test/test_ssl.py", lineno 2283 if not self.wrap_conn(): File "/home/vstinner/prog/python/master/Lib/test/test_ssl.py", lineno 2207 self.sslconn = self.server.context.wrap_socket( File "/home/vstinner/prog/python/master/Lib/ssl.py", lineno 489 return self.sslsocket_class._create( File "/home/vstinner/prog/python/master/Lib/ssl.py", lineno 992 self = cls.__new__(cls, **kwargs) ok ---------------------------------------------------------------------- Ran 1 test in 0.100s OK == Tests result: SUCCESS == 1 test OK. Total duration: 1 sec 430 ms Tests result: SUCCESS The test fails using -Werror. ---------- components: Tests messages: 345903 nosy: vstinner priority: normal severity: normal status: open title: test_ssl: test_pha_required_nocert() emits a ResourceWarning versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 16:37:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 20:37:03 +0000 Subject: [issue37323] test_asyncio: test_debug_mode_interop() fails using -Werror Message-ID: <1560803823.97.0.920531372035.issue37323@roundup.psfhosted.org> New submission from STINNER Victor : vstinner at apu$ PYTHONWARNINGS=error ./python -Werror -m test -v test_asyncio -m test_debug_mode_interop == CPython 3.9.0a0 (heads/master-dirty:00f6493084, Jun 17 2019, 21:50:32) [GCC 9.1.1 20190503 (Red Hat 9.1.1-1)] == Linux-5.1.6-300.fc30.x86_64-x86_64-with-glibc2.29 little-endian == cwd: /home/vstinner/prog/python/master/build/test_python_23510 == CPU count: 8 == encodings: locale=UTF-8, FS=utf-8 Run tests sequentially 0:00:00 load avg: 0.73 [1/1] test_asyncio test_debug_mode_interop (test.test_asyncio.test_tasks.CompatibilityTests) ... FAIL ====================================================================== FAIL: test_debug_mode_interop (test.test_asyncio.test_tasks.CompatibilityTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py", line 3355, in test_debug_mode_interop assert_python_ok("-c", code, PYTHONASYNCIODEBUG="1") File "/home/vstinner/prog/python/master/Lib/test/support/script_helper.py", line 157, in assert_python_ok return _assert_python(True, *args, **env_vars) File "/home/vstinner/prog/python/master/Lib/test/support/script_helper.py", line 143, in _assert_python res.fail(cmd_line) File "/home/vstinner/prog/python/master/Lib/test/support/script_helper.py", line 70, in fail raise AssertionError("Process return code is %d\n" AssertionError: Process return code is 1 command line: ['/home/vstinner/prog/python/master/python', '-X', 'faulthandler', '-c', '\nimport asyncio\n\nasync def native_coro():\n pass\n\n at asyncio.coroutine\ndef old_style_coro():\n yield from native_coro()\n\nasyncio.run(old_style_coro())\n'] stdout: --- --- stderr: --- Traceback (most recent call last): File "", line 8, in File "/home/vstinner/prog/python/master/Lib/asyncio/coroutines.py", line 111, in coroutine warnings.warn('"@coroutine" decorator is deprecated since Python 3.8, use "async def" instead', DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead --- ---------------------------------------------------------------------- Ran 1 test in 0.210s FAILED (failures=1) test test_asyncio failed test_asyncio failed == Tests result: FAILURE == 1 test failed: test_asyncio Total duration: 598 ms Tests result: FAILURE ---------- components: Tests messages: 345904 nosy: vstinner priority: normal severity: normal status: open title: test_asyncio: test_debug_mode_interop() fails using -Werror versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 16:38:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 20:38:32 +0000 Subject: [issue37324] collections: remove deprecated aliases to ABC classes Message-ID: <1560803912.16.0.0813723259969.issue37324@roundup.psfhosted.org> New submission from STINNER Victor : Extract of collections documentation: https://docs.python.org/dev/library/collections.html "Deprecated since version 3.3, will be removed in version 3.9: Moved Collections Abstract Base Classes to the collections.abc module. For backwards compatibility, they continue to be visible in this module through Python 3.8." Attached PR removes these aliases. ---------- components: Library (Lib) messages: 345905 nosy: vstinner priority: normal severity: normal status: open title: collections: remove deprecated aliases to ABC classes versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 16:42:24 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 17 Jun 2019 20:42:24 +0000 Subject: [issue37321] IDLE: Make Subprocess Connection Errors consistent. In-Reply-To: <1560802460.36.0.0153945253902.issue37321@roundup.psfhosted.org> Message-ID: <1560804144.37.0.0228895207958.issue37321@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +14012 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14170 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 16:44:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 20:44:53 +0000 Subject: [issue37324] collections: remove deprecated aliases to ABC classes In-Reply-To: <1560803912.16.0.0813723259969.issue37324@roundup.psfhosted.org> Message-ID: <1560804293.81.0.39696229765.issue37324@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +14013 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14171 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 16:47:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 20:47:06 +0000 Subject: [issue37324] collections: remove deprecated aliases to ABC classes In-Reply-To: <1560803912.16.0.0813723259969.issue37324@roundup.psfhosted.org> Message-ID: <1560804426.85.0.0358435124123.issue37324@roundup.psfhosted.org> STINNER Victor added the comment: pip is broken by this change, causing test_venv to fail: html5lib still uses collections to get ABC. FAIL: test_with_pip (test.test_venv.EnsurePipTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/test/test_venv.py", line 407, in do_test_with_pip self.run_with_capture(venv.create, self.env_dir, File "/home/vstinner/prog/python/master/Lib/test/test_venv.py", line 69, in run_with_capture func(*args, **kwargs) subprocess.CalledProcessError: Command '['/tmp/tmpkxga42lx/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/test/test_venv.py", line 466, in test_with_pip self.do_test_with_pip(False) File "/home/vstinner/prog/python/master/Lib/test/test_venv.py", line 415, in do_test_with_pip self.fail(msg.format(exc, details)) AssertionError: Command '['/tmp/tmpkxga42lx/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1. **Subprocess Output** /tmp/tmpwhk_ss_e/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/pyparsing.py:3068: SyntaxWarning: invalid escape sequence \w /tmp/tmpwhk_ss_e/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/pyparsing.py:3068: SyntaxWarning: invalid escape sequence \w Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/runpy.py", line 192, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/vstinner/prog/python/master/Lib/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/vstinner/prog/python/master/Lib/ensurepip/__main__.py", line 5, in sys.exit(ensurepip._main()) File "/home/vstinner/prog/python/master/Lib/ensurepip/__init__.py", line 198, in _main return _bootstrap( File "/home/vstinner/prog/python/master/Lib/ensurepip/__init__.py", line 117, in _bootstrap return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths) File "/home/vstinner/prog/python/master/Lib/ensurepip/__init__.py", line 27, in _run_pip import pip._internal File "", line 259, in load_module File "/tmp/tmpwhk_ss_e/pip-19.0.3-py2.py3-none-any.whl/pip/_internal/__init__.py", line 40, in File "", line 259, in load_module File "/tmp/tmpwhk_ss_e/pip-19.0.3-py2.py3-none-any.whl/pip/_internal/cli/autocompletion.py", line 8, in File "", line 259, in load_module File "/tmp/tmpwhk_ss_e/pip-19.0.3-py2.py3-none-any.whl/pip/_internal/cli/main_parser.py", line 12, in File "", line 259, in load_module File "/tmp/tmpwhk_ss_e/pip-19.0.3-py2.py3-none-any.whl/pip/_internal/commands/__init__.py", line 6, in File "", line 259, in load_module File "/tmp/tmpwhk_ss_e/pip-19.0.3-py2.py3-none-any.whl/pip/_internal/commands/completion.py", line 6, in File "", line 259, in load_module File "/tmp/tmpwhk_ss_e/pip-19.0.3-py2.py3-none-any.whl/pip/_internal/cli/base_command.py", line 25, in File "", line 259, in load_module File "/tmp/tmpwhk_ss_e/pip-19.0.3-py2.py3-none-any.whl/pip/_internal/index.py", line 14, in File "", line 259, in load_module File "/tmp/tmpwhk_ss_e/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/html5lib/__init__.py", line 25, in File "", line 259, in load_module File "/tmp/tmpwhk_ss_e/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/html5lib/html5parser.py", line 8, in File "", line 259, in load_module File "/tmp/tmpwhk_ss_e/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/html5lib/_tokenizer.py", line 16, in File "", line 259, in load_module File "/tmp/tmpwhk_ss_e/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/html5lib/_trie/__init__.py", line 3, in File "", line 259, in load_module File "/tmp/tmpwhk_ss_e/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/html5lib/_trie/py.py", line 6, in File "", line 259, in load_module File "/tmp/tmpwhk_ss_e/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/html5lib/_trie/_base.py", line 3, in ImportError: cannot import name 'Mapping' from 'collections' (/home/vstinner/prog/python/master/Lib/collections/__init__.py) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 16:50:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 20:50:02 +0000 Subject: [issue37323] test_asyncio: test_debug_mode_interop() fails using -Werror In-Reply-To: <1560803823.97.0.920531372035.issue37323@roundup.psfhosted.org> Message-ID: <1560804602.3.0.641265473536.issue37323@roundup.psfhosted.org> STINNER Victor added the comment: def test_debug_mode_interop(self): # https://bugs.python.org/issue32636 code = textwrap.dedent(""" import asyncio async def native_coro(): pass @asyncio.coroutine def old_style_coro(): yield from native_coro() asyncio.run(old_style_coro()) """) assert_python_ok("-c", code, PYTHONASYNCIODEBUG="1") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 16:54:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 20:54:20 +0000 Subject: [issue37324] collections: remove deprecated aliases to ABC classes In-Reply-To: <1560803912.16.0.0813723259969.issue37324@roundup.psfhosted.org> Message-ID: <1560804860.88.0.0046498750457.issue37324@roundup.psfhosted.org> STINNER Victor added the comment: html5lib has already been fixed: https://github.com/vstinner/html5lib-python/commit/4f9235752cea29c5a31721440578b430823a1e69 But latest html5lib release was version 1.0.1 at... Dec 7, 2017 :-( Paul Ganssle requested a new html5lib release... to fix the collections warning :-) https://github.com/html5lib/html5lib-python/issues/419 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 17:00:10 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 17 Jun 2019 21:00:10 +0000 Subject: [issue35360] Update SQLite to 3.26 in Windows and macOS installer builds In-Reply-To: <1543580070.45.0.788709270274.issue35360@psf.upfronthosting.co.za> Message-ID: <1560805210.22.0.5068392306.issue35360@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 17:01:20 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 17 Jun 2019 21:01:20 +0000 Subject: [issue37297] function changed when pickle bound method object In-Reply-To: <1560649257.15.0.526142047149.issue37297@roundup.psfhosted.org> Message-ID: <1560805280.92.0.530008333613.issue37297@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 17:07:03 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 17 Jun 2019 21:07:03 +0000 Subject: [issue37287] picke cannot dump Exception subclasses with different super() args In-Reply-To: <1560555045.5.0.822054090592.issue37287@roundup.psfhosted.org> Message-ID: <1560805623.74.0.338943439312.issue37287@roundup.psfhosted.org> Gregory P. Smith added the comment: possibly related to https://bugs.python.org/issue32696 and https://bugs.python.org/issue1692335. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 17:17:27 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 17 Jun 2019 21:17:27 +0000 Subject: [issue19696] Merge all (non-syntactic) import-related tests into test_importlib In-Reply-To: <1385136285.91.0.72176568785.issue19696@psf.upfronthosting.co.za> Message-ID: <1560806247.42.0.0719017297857.issue19696@roundup.psfhosted.org> Brett Cannon added the comment: Anything zipimport-related should stay separate as zipimport is not a part of importlib. The other three will have to be looked at to see what exactly they are testing to know whether they relate to importlib and the implementation of import or not (my guess is yes). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 17:21:07 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jun 2019 21:21:07 +0000 Subject: [issue34631] Upgrade to OpenSSL 1.1.1c, 1.1.0k, and/or 1.0.2s In-Reply-To: <1536686026.27.0.0269046726804.issue34631@psf.upfronthosting.co.za> Message-ID: <1560806467.55.0.778637154388.issue34631@roundup.psfhosted.org> Steve Dower added the comment: Ned - the 3.7 backport seems to be okay (PR 14165). Do we want it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 17:23:38 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 17 Jun 2019 21:23:38 +0000 Subject: [issue37321] IDLE: Make Subprocess Connection Errors consistent. In-Reply-To: <1560802460.36.0.0153945253902.issue37321@roundup.psfhosted.org> Message-ID: <1560806618.52.0.583357954676.issue37321@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 8fac1221097aaf6ac37ed9ea727ee7892085e183 by Terry Jan Reedy in branch 'master': bpo-37321: Edit IDLE subprocess connection error messages. (#14170) https://github.com/python/cpython/commit/8fac1221097aaf6ac37ed9ea727ee7892085e183 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 17:24:05 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 21:24:05 +0000 Subject: [issue37321] IDLE: Make Subprocess Connection Errors consistent. In-Reply-To: <1560802460.36.0.0153945253902.issue37321@roundup.psfhosted.org> Message-ID: <1560806645.22.0.842358357432.issue37321@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14014 pull_request: https://github.com/python/cpython/pull/14173 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 17:24:14 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 21:24:14 +0000 Subject: [issue37321] IDLE: Make Subprocess Connection Errors consistent. In-Reply-To: <1560802460.36.0.0153945253902.issue37321@roundup.psfhosted.org> Message-ID: <1560806654.04.0.211673312129.issue37321@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14015 pull_request: https://github.com/python/cpython/pull/14174 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 17:24:52 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 17 Jun 2019 21:24:52 +0000 Subject: [issue37323] test_asyncio: test_debug_mode_interop() fails using -Werror In-Reply-To: <1560803823.97.0.920531372035.issue37323@roundup.psfhosted.org> Message-ID: <1560806692.09.0.426590251381.issue37323@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: It affects 3.8 as well since https://github.com/python/cpython/pull/13346 was merged and I guess the fix would be to wrap it with assertWarns(DeprecationWarning) context manager like other tests. Interesting, does PYTHONWARNINGS=error affects the interpreter spawn by assert_python_ok to change warnings level which -Werror doesn't do by itself? ---------- components: +asyncio nosy: +asvetlov, xtreak, yselivanov versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 17:29:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 21:29:28 +0000 Subject: [issue37120] Provide knobs to disable session ticket generation on TLS 1.3 In-Reply-To: <1559365529.23.0.311490427939.issue37120@roundup.psfhosted.org> Message-ID: <1560806968.91.0.381503682557.issue37120@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 78c7d527799dacca91b9ed67057cb996efe526b0 by Christian Heimes in branch 'master': bpo-37120: Add SSLContext.num_tickets (GH-13719) https://github.com/python/cpython/commit/78c7d527799dacca91b9ed67057cb996efe526b0 This change introduced this warning on Windows: c:\vstinner\python\master\modules\_ssl.c(3624): warning C4267: 'function': conv ersion from 'size_t' to 'long', possible loss of data [C:\vstinner\python\maste r\PCbuild\_ssl.vcxproj] SSL_CTX_get_num_tickets() return type is size_t. I suggest this change: diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 2331c58ad7..3ffb6380d3 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -3621,7 +3621,7 @@ set_maximum_version(PySSLContext *self, PyObject *arg, void *c) static PyObject * get_num_tickets(PySSLContext *self, void *c) { - return PyLong_FromLong(SSL_CTX_get_num_tickets(self->ctx)); + return PyLong_FromSize_t(SSL_CTX_get_num_tickets(self->ctx)); } static int ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 17:29:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 21:29:53 +0000 Subject: [issue37189] PyRun_String not exported in python38.dll In-Reply-To: <1559894123.98.0.3282613922.issue37189@roundup.psfhosted.org> Message-ID: <1560806993.35.0.710998456313.issue37189@roundup.psfhosted.org> STINNER Victor added the comment: I tested the following code: --- import ctypes, sys names = """ PyRun_String PyRun_AnyFile PyRun_AnyFileEx PyRun_AnyFileFlags PyRun_SimpleString PyRun_SimpleFile PyRun_SimpleFileEx PyRun_InteractiveOne PyRun_InteractiveLoop PyRun_File PyRun_FileEx PyRun_FileFlags """ api = ctypes.pythonapi api2 = ctypes.PyDLL("", handle=sys.dllhandle) for name in names.split(): if not hasattr(api, name) or not hasattr(api2, name): print("MISSING NAME", name) --- Current output: Missing names ['PyRun_AnyFile', 'PyRun_AnyFileEx', 'PyRun_File', 'PyRun_FileEx', 'PyRun_FileFlags', 'PyRun_InteractiveLoop', 'PyRun_InteractiveOne', 'PyRun_Simp leFile', 'PyRun_SimpleFileEx', 'PyRun_SimpleString', 'PyRun_String'] With my PR 14142: Missing names [] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 17:31:09 2019 From: report at bugs.python.org (Michael Blahay) Date: Mon, 17 Jun 2019 21:31:09 +0000 Subject: [issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument In-Reply-To: <1544803180.32.0.788709270274.issue35495@psf.upfronthosting.co.za> Message-ID: <1560807069.54.0.537398021095.issue35495@roundup.psfhosted.org> Michael Blahay added the comment: Need some help searching github to determine the blast radius of the proposed changes. How does one look for instances of argparse.REMAINDER that are used with a default value? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 17:50:52 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 21:50:52 +0000 Subject: [issue37321] IDLE: Make Subprocess Connection Errors consistent. In-Reply-To: <1560802460.36.0.0153945253902.issue37321@roundup.psfhosted.org> Message-ID: <1560808252.33.0.284404047616.issue37321@roundup.psfhosted.org> miss-islington added the comment: New changeset 336cf399546f3362033f9d2b475feae050373ef8 by Miss Islington (bot) in branch '3.7': bpo-37321: Edit IDLE subprocess connection error messages. (GH-14170) https://github.com/python/cpython/commit/336cf399546f3362033f9d2b475feae050373ef8 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 17:51:12 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 21:51:12 +0000 Subject: [issue37321] IDLE: Make Subprocess Connection Errors consistent. In-Reply-To: <1560802460.36.0.0153945253902.issue37321@roundup.psfhosted.org> Message-ID: <1560808272.0.0.473382199626.issue37321@roundup.psfhosted.org> miss-islington added the comment: New changeset 02f7f741e83c018015eb8fcb95bd592c1787fe5f by Miss Islington (bot) in branch '3.8': bpo-37321: Edit IDLE subprocess connection error messages. (GH-14170) https://github.com/python/cpython/commit/02f7f741e83c018015eb8fcb95bd592c1787fe5f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 17:51:30 2019 From: report at bugs.python.org (Eryk Sun) Date: Mon, 17 Jun 2019 21:51:30 +0000 Subject: [issue37189] PyRun_String not exported in python38.dll In-Reply-To: <1559894123.98.0.3282613922.issue37189@roundup.psfhosted.org> Message-ID: <1560808290.38.0.501633872532.issue37189@roundup.psfhosted.org> Eryk Sun added the comment: > api = ctypes.pythonapi > api2 = ctypes.PyDLL("", handle=sys.dllhandle) Those should be the same. In Windows, pythonapi is defined as PyDLL("python dll", None, sys.dllhandle). Wouldn't it be better to add a function to _testcapi that checks GetProcAddress(PyWin_DLLhModule, name)? ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 17:53:04 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 17 Jun 2019 21:53:04 +0000 Subject: [issue37321] IDLE: Make Subprocess Connection Errors consistent. In-Reply-To: <1560802460.36.0.0153945253902.issue37321@roundup.psfhosted.org> Message-ID: <1560808384.3.0.224291772455.issue37321@roundup.psfhosted.org> Terry J. Reedy added the comment: New code tested by copying into a temporary test fixture. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 17:53:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 21:53:39 +0000 Subject: [issue37166] inspect.findsource doesn't handle shortened files gracefully In-Reply-To: <1559763986.42.0.903204336475.issue37166@roundup.psfhosted.org> Message-ID: <1560808419.07.0.514458584791.issue37166@roundup.psfhosted.org> STINNER Victor added the comment: inspect.getsource() starts with linecache.checkcache(file) which if the file modification time changed or if the file size changed. Using regular files on disk, I don't see how this bug is possible: $ cat x.py import inspect import os import linecache def foo(): pass filename = __file__ linecache.getlines(filename) if 1: stat = os.stat(filename) atime = stat.st_atime mtime = stat.st_mtime with open(filename, "w+") as fp: lines = [line for line in fp if line.strip()] fp.seek(0) fp.writelines(lines) os.utime(filename, (atime, mtime)) print(inspect.getsource(foo)) vstinner at apu$ /bin/cp x.py y.py; ./python y.py Traceback (most recent call last): File "y.py", line 25, in File "/home/vstinner/prog/python/master/Lib/inspect.py", line 985, in getsource lines, lnum = getsourcelines(object) File "/home/vstinner/prog/python/master/Lib/inspect.py", line 967, in getsourcelines lines, lnum = findsource(object) File "/home/vstinner/prog/python/master/Lib/inspect.py", line 798, in findsource raise OSError('could not get source code') OSError: could not get source code Does this bug only affect Facebook who use "compile the application into an executable package (.par)"? https://github.com/python/cpython/pull/13850#pullrequestreview-249815779 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 17:55:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 21:55:26 +0000 Subject: [issue37166] inspect.findsource doesn't handle shortened files gracefully In-Reply-To: <1559763986.42.0.903204336475.issue37166@roundup.psfhosted.org> Message-ID: <1560808526.32.0.689179371321.issue37166@roundup.psfhosted.org> STINNER Victor added the comment: If the file content changed, I'm not sure that the folloing heuristic will always find the expected function: lnum = object.co_firstlineno - 1 pat = re.compile(r'^(\s*def\s)|(\s*async\s+def\s)|(.*(? 0: if pat.match(lines[lnum]): break lnum = lnum - 1 return lines, lnum The regex doesn't search for the function name. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 17:58:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 21:58:35 +0000 Subject: [issue37324] collections: remove deprecated aliases to ABC classes In-Reply-To: <1560803912.16.0.0813723259969.issue37324@roundup.psfhosted.org> Message-ID: <1560808715.16.0.969414128454.issue37324@roundup.psfhosted.org> STINNER Victor added the comment: Oh. I wasn't aware of the previous attempt: https://github.com/python/cpython/pull/10596 there is a long discussion there. The blocker issue was also html5lib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 18:00:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 22:00:29 +0000 Subject: [issue37320] aifc, sunau, wave: remove deprecated openfp() function In-Reply-To: <1560801286.41.0.0905607754393.issue37320@roundup.psfhosted.org> Message-ID: <1560808829.61.0.499062362193.issue37320@roundup.psfhosted.org> STINNER Victor added the comment: New changeset ac7b1a3f32cc81520e8962352294006d65744028 by Victor Stinner in branch 'master': bpo-37320: Remove openfp() of aifc, sunau and wave (GH-14169) https://github.com/python/cpython/commit/ac7b1a3f32cc81520e8962352294006d65744028 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 18:01:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 22:01:18 +0000 Subject: [issue37320] aifc, sunau, wave: remove deprecated openfp() function In-Reply-To: <1560801286.41.0.0905607754393.issue37320@roundup.psfhosted.org> Message-ID: <1560808878.74.0.407956759593.issue37320@roundup.psfhosted.org> STINNER Victor added the comment: If your code uses openfp(): just use open() instead ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 18:02:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 22:02:26 +0000 Subject: [issue37189] PyRun_String not exported in python38.dll In-Reply-To: <1559894123.98.0.3282613922.issue37189@roundup.psfhosted.org> Message-ID: <1560808946.71.0.72196626254.issue37189@roundup.psfhosted.org> STINNER Victor added the comment: "Those should be the same." Well, I wasn't 100% sure so I tested both. At least, I can now confirm that missing symbols are now exposed in both :-D ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 18:07:56 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 17 Jun 2019 22:07:56 +0000 Subject: [issue37318] builtins.True exists but can't be accessed In-Reply-To: <1560784622.94.0.240402132833.issue37318@roundup.psfhosted.org> Message-ID: <1560809276.92.0.542204311391.issue37318@roundup.psfhosted.org> Raymond Hettinger added the comment: Depending on your mental model of the language, this may not seem odd at all. >>> # We can set any key/value pair in any dictionary >>> d = {'x': 10, 'True': 20, 'for': 30} >>> # We can do regular string lookups at any time >>> d['x'] 10 >>> d['True'] 20 >>> d['for'] 30 >>> # globals() isn't special in this regard >>> globals().update(d) >>> globals()['x'] 10 >>> globals()['True'] 20 >>> globals()['for'] 30 >>> # Globals is special though in that it provides >>> # a fast way to do lookups for keys that are >>> # valid identifiers and are not keywords >>> x # Fast lookup equivalent to globals['x'] 10 >>> True # This is a keyword, so there is no lookup True >>> for # This is a keyword, so there is no lookup SyntaxError: invalid syntax At any rate, this isn't a bug. It is just the way the language works. Thank you for the report. ---------- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 18:10:24 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jun 2019 22:10:24 +0000 Subject: [issue37189] PyRun_String not exported in python38.dll In-Reply-To: <1559894123.98.0.3282613922.issue37189@roundup.psfhosted.org> Message-ID: <1560809424.17.0.0529256904058.issue37189@roundup.psfhosted.org> Steve Dower added the comment: Ah, that's what ctypes.pythonapi is :) I looked at PyDLL first and figured it out from there. Should we add a regression test to avoid this happening in the future? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 18:15:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 22:15:16 +0000 Subject: [issue37189] PyRun_String not exported in python38.dll In-Reply-To: <1559894123.98.0.3282613922.issue37189@roundup.psfhosted.org> Message-ID: <1560809716.55.0.469639145958.issue37189@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 343ed0ffe0d5ddd4f17c31e14a656a04ac7dfc19 by Victor Stinner in branch 'master': bpo-37189: Export old PyRun_XXX() functions (#14142) https://github.com/python/cpython/commit/343ed0ffe0d5ddd4f17c31e14a656a04ac7dfc19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 18:15:24 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 22:15:24 +0000 Subject: [issue37189] PyRun_String not exported in python38.dll In-Reply-To: <1559894123.98.0.3282613922.issue37189@roundup.psfhosted.org> Message-ID: <1560809724.74.0.0297299864593.issue37189@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14016 pull_request: https://github.com/python/cpython/pull/14177 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 18:18:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 22:18:19 +0000 Subject: [issue37189] PyRun_String not exported in python38.dll In-Reply-To: <1559894123.98.0.3282613922.issue37189@roundup.psfhosted.org> Message-ID: <1560809899.24.0.483438456559.issue37189@roundup.psfhosted.org> STINNER Victor added the comment: > Should we add a regression test to avoid this happening in the future? I'm not sure where to add such test, nor which kind of test is needed. I mean, should we only test that the symbol is present? Or should we also test the ABI? Or even write a functional test? Since I didn't know, I just merged my fix, to make sure that it lands before 3.8beta2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 18:19:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jun 2019 22:19:00 +0000 Subject: [issue37189] PyRun_String not exported in python38.dll In-Reply-To: <1559894123.98.0.3282613922.issue37189@roundup.psfhosted.org> Message-ID: <1560809940.87.0.721776265515.issue37189@roundup.psfhosted.org> STINNER Victor added the comment: My notes on checking an ABI: https://pythoncapi.readthedocs.io/stable_abi.html#check-for-abi-changes I didn't check if https://abi-laboratory.pro/tracker/timeline/python/ supports Windows or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 18:22:05 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 17 Jun 2019 22:22:05 +0000 Subject: [issue34631] Upgrade to OpenSSL 1.1.1c, 1.1.0k, and/or 1.0.2s In-Reply-To: <1536686026.27.0.0269046726804.issue34631@psf.upfronthosting.co.za> Message-ID: <1560810125.23.0.835841097784.issue34631@roundup.psfhosted.org> Ned Deily added the comment: Might as well, thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 18:26:46 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jun 2019 22:26:46 +0000 Subject: [issue34631] Upgrade to OpenSSL 1.1.1c, 1.1.0k, and/or 1.0.2s In-Reply-To: <1536686026.27.0.0269046726804.issue34631@psf.upfronthosting.co.za> Message-ID: <1560810406.37.0.956581223655.issue34631@roundup.psfhosted.org> Steve Dower added the comment: New changeset 14bac0088271d0a5c428e3468ef94fe7c73e93f7 by Steve Dower in branch '3.7': bpo-34631: Updated OpenSSL to 1.1.1c in Windows installer (GH-14163) https://github.com/python/cpython/commit/14bac0088271d0a5c428e3468ef94fe7c73e93f7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 18:42:33 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 17 Jun 2019 22:42:33 +0000 Subject: [issue37189] PyRun_String not exported in python38.dll In-Reply-To: <1559894123.98.0.3282613922.issue37189@roundup.psfhosted.org> Message-ID: <1560811353.31.0.677533757082.issue37189@roundup.psfhosted.org> miss-islington added the comment: New changeset 8cb8d5de4bcc587b35d1b2f4166dad98c202805c by Miss Islington (bot) in branch '3.8': bpo-37189: Export old PyRun_XXX() functions (GH-14142) https://github.com/python/cpython/commit/8cb8d5de4bcc587b35d1b2f4166dad98c202805c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 18:50:46 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 17 Jun 2019 22:50:46 +0000 Subject: [issue37319] Deprecate using random.randrange() with non-integers In-Reply-To: <1560801155.55.0.20318571261.issue37319@roundup.psfhosted.org> Message-ID: <1560811846.91.0.649239678128.issue37319@roundup.psfhosted.org> Raymond Hettinger added the comment: While there isn't anything intrinsically wrong with using index(), the premise of this issue is essentially a claim that most Python code that uses int() is wrong. That seems rather bold and flies in the face of common practices. I don't really like the trend of constantly rearranging code in awkward ways to solve problems that no one actually has. Also, I disagree with the notion that the downstream functions in the random module should be written in C. That makes them more bug prone and opaque (like when Victor broken seeding for 3.6.0). The trend for rewriting in C should be restricted to core building blocks like the underlying Mersenne Twister. Otherwise, we have to do dual maintenance for years and essentially advertise to people that we don't think our own language is good enough to use. Over time, I am less and less able to show people standard library code as it has become complexified with coding strategies well beyond the norms of day to day Python programmers. ISTM that most proposals to rewrite something in C come from folks who like rewriting things in C rather than from users or from people who do long term maintenance of the modules. Sidenote: we're now getting new core devs who don't read or write C, so each transformation like them excludes their ability to participate). ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 19:00:25 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 17 Jun 2019 23:00:25 +0000 Subject: [issue37245] Azure Pipeline 3.8 CI: multiple tests hung and timed out on macOS 10.13 In-Reply-To: <1560340622.3.0.842050597369.issue37245@roundup.psfhosted.org> Message-ID: <1560812425.03.0.475731507024.issue37245@roundup.psfhosted.org> Steve Dower added the comment: I'm still seeing this, maybe 1 in 20 builds, so it's semi-random. A new deadlock, maybe? ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 19:06:33 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 17 Jun 2019 23:06:33 +0000 Subject: [issue37319] Deprecate using random.randrange() with non-integers In-Reply-To: <1560801155.55.0.20318571261.issue37319@roundup.psfhosted.org> Message-ID: <1560812793.07.0.358321509665.issue37319@roundup.psfhosted.org> Raymond Hettinger added the comment: We probably should not do this until we're willing to give PEP 8 guidance recommending operator.index() as preferable to int() for all cases needing integer offsets. Maybe we do want to go down that path or maybe we just stick with "practicality beats purity" and not create any new learning issues. The int() function is popular and understandable, but it is rare to find a user who knows and cares about index(). ISTM that randrange(3.0) isn't a problem in real life. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 20:14:04 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 18 Jun 2019 00:14:04 +0000 Subject: [issue33529] [security] Infinite loop on folding email (_fold_as_ew()) if an header has no spaces In-Reply-To: <1526429548.63.0.682650639539.issue33529@psf.upfronthosting.co.za> Message-ID: <1560816844.77.0.471671015224.issue33529@roundup.psfhosted.org> Ned Deily added the comment: New changeset 516a6a254814d2bc6a90290dfc44d77fdfb4050b by Ned Deily (Victor Stinner) in branch '3.6': bpo-33529, email: Fix infinite loop in email header encoding (GH-12020) (GH-14162) https://github.com/python/cpython/commit/516a6a254814d2bc6a90290dfc44d77fdfb4050b ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 20:52:21 2019 From: report at bugs.python.org (Ma Lin) Date: Tue, 18 Jun 2019 00:52:21 +0000 Subject: [issue35360] Update SQLite to 3.26 in Windows and macOS installer builds In-Reply-To: <1543580070.45.0.788709270274.issue35360@psf.upfronthosting.co.za> Message-ID: <1560819141.89.0.575749784012.issue35360@roundup.psfhosted.org> Change by Ma Lin : ---------- keywords: +patch pull_requests: +14017 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14179 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 21:01:15 2019 From: report at bugs.python.org (Ma Lin) Date: Tue, 18 Jun 2019 01:01:15 +0000 Subject: [issue35360] Update SQLite to 3.26 in Windows and macOS installer builds In-Reply-To: <1543580070.45.0.788709270274.issue35360@psf.upfronthosting.co.za> Message-ID: <1560819675.15.0.283980354231.issue35360@roundup.psfhosted.org> Change by Ma Lin : ---------- pull_requests: +14018 pull_request: https://github.com/python/cpython/pull/14180 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 21:29:18 2019 From: report at bugs.python.org (Ma Lin) Date: Tue, 18 Jun 2019 01:29:18 +0000 Subject: [issue35360] Update SQLite to 3.28 in Windows and macOS installer builds In-Reply-To: <1543580070.45.0.788709270274.issue35360@psf.upfronthosting.co.za> Message-ID: <1560821358.22.0.229529240205.issue35360@roundup.psfhosted.org> Ma Lin added the comment: PR 14179 is for Windows build PR 14180 is for Mac OS X build Both update to Sqlite 3.28.0 ---------- title: Update SQLite to 3.26 in Windows and macOS installer builds -> Update SQLite to 3.28 in Windows and macOS installer builds _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 21:56:26 2019 From: report at bugs.python.org (Ma Lin) Date: Tue, 18 Jun 2019 01:56:26 +0000 Subject: [issue35360] Update SQLite to 3.28 in Windows and macOS installer builds In-Reply-To: <1543580070.45.0.788709270274.issue35360@psf.upfronthosting.co.za> Message-ID: <1560822986.01.0.938980794027.issue35360@roundup.psfhosted.org> Change by Ma Lin : ---------- pull_requests: +14019 pull_request: https://github.com/python/cpython/pull/14182 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 22:04:59 2019 From: report at bugs.python.org (Ma Lin) Date: Tue, 18 Jun 2019 02:04:59 +0000 Subject: [issue35360] Update SQLite to 3.28 in Windows and macOS installer builds In-Reply-To: <1543580070.45.0.788709270274.issue35360@psf.upfronthosting.co.za> Message-ID: <1560823499.57.0.442057471869.issue35360@roundup.psfhosted.org> Change by Ma Lin : ---------- pull_requests: +14020 pull_request: https://github.com/python/cpython/pull/14183 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 22:07:12 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 18 Jun 2019 02:07:12 +0000 Subject: [issue37325] IDLE: fix Query subclass tab focus traversal order Message-ID: <1560823632.0.0.312919780261.issue37325@roundup.psfhosted.org> New submission from Terry J. Reedy : query.Query creates a popup with entry and ok/cancel buttons, in that order. Tabbing moves from the entry in that order. Currently, subclasses that add widgets add them after the 3 above, so they follow Cancel in the tab order. They do this by overriding create_widgets and initially calling super.create_widgets. Added widgets should follow the entry box and precede the exit buttons. To do this, they should be created in between. Proposed solution: create_widgets calls 'extra_widgets' (pass for Query) after creating the Entry. Subclasses override to add widgets. ---------- assignee: terry.reedy components: IDLE messages: 345940 nosy: terry.reedy priority: normal severity: normal stage: test needed status: open title: IDLE: fix Query subclass tab focus traversal order type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 22:07:16 2019 From: report at bugs.python.org (Ma Lin) Date: Tue, 18 Jun 2019 02:07:16 +0000 Subject: [issue35360] Update SQLite to 3.28 in Windows and macOS installer builds In-Reply-To: <1543580070.45.0.788709270274.issue35360@psf.upfronthosting.co.za> Message-ID: <1560823636.05.0.0321046357115.issue35360@roundup.psfhosted.org> Ma Lin added the comment: 2.7 branch: PR 14182 is for Windows build PR 14183 is for Mac OS X build ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 22:24:27 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 18 Jun 2019 02:24:27 +0000 Subject: [issue5680] Simulate command-line arguments for program run in IDLE In-Reply-To: <1238798556.38.0.28468201552.issue5680@psf.upfronthosting.co.za> Message-ID: <1560824667.65.0.226073907348.issue5680@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 201bc2d18b60adb05810d2a6ab396047bc527088 by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-5680: IDLE: Customize running a module (GH-13763) https://github.com/python/cpython/commit/201bc2d18b60adb05810d2a6ab396047bc527088 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 22:24:56 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 18 Jun 2019 02:24:56 +0000 Subject: [issue5680] Simulate command-line arguments for program run in IDLE In-Reply-To: <1238798556.38.0.28468201552.issue5680@psf.upfronthosting.co.za> Message-ID: <1560824696.31.0.870986756754.issue5680@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14021 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14184 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 22:25:22 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 18 Jun 2019 02:25:22 +0000 Subject: [issue5680] Simulate command-line arguments for program run in IDLE In-Reply-To: <1238798556.38.0.28468201552.issue5680@psf.upfronthosting.co.za> Message-ID: <1560824722.24.0.794286893879.issue5680@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14022 pull_request: https://github.com/python/cpython/pull/14185 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 22:33:43 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 18 Jun 2019 02:33:43 +0000 Subject: [issue5680] Simulate command-line arguments for program run in IDLE In-Reply-To: <1238798556.38.0.28468201552.issue5680@psf.upfronthosting.co.za> Message-ID: <1560825223.96.0.0509626162698.issue5680@roundup.psfhosted.org> Terry J. Reedy added the comment: A more than minimal patch has been merged. Further work will be on new issues. Remaining problems not previously discussed: 1. Tab focus traversal is wrong. This is generic to Query subclasses that add widgets. See #37325. 2. When the customize box is cancelled, focus goes to the Shell, even when I add 'event.widget.focus_set/force()'. When the parent of the box was the editor, 'self.shell.text.focus_set' did not work to shift it to the Shell text. Does anyone else have any idea how to put the focus back on the editor after cancel? ---------- nosy: +taleinat resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 22:36:56 2019 From: report at bugs.python.org (Gregory Szorc) Date: Tue, 18 Jun 2019 02:36:56 +0000 Subject: [issue37326] Python distributions do not contain libffi license Message-ID: <1560825416.41.0.74258395972.issue37326@roundup.psfhosted.org> New submission from Gregory Szorc : The Modules/_ctypes/libffi_msvc/ffi.h and Modules/_ctypes/libffi_osx/include/ffi.h files in the CPython repository contain copies of libffi. On at least the official Windows distributions, the LICENSE.txt does not contain libffi's license text from these files. This is seemingly in violation of libffi's license agreement, which clearly says "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software." ---------- components: Build messages: 345944 nosy: indygreg priority: normal severity: normal status: open title: Python distributions do not contain libffi license type: enhancement versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 22:41:46 2019 From: report at bugs.python.org (Alejandro Gonzalez) Date: Tue, 18 Jun 2019 02:41:46 +0000 Subject: [issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call In-Reply-To: <1480885774.84.0.670239959771.issue28869@psf.upfronthosting.co.za> Message-ID: <1560825706.4.0.31233420813.issue28869@roundup.psfhosted.org> Alejandro Gonzalez added the comment: >It can be fixed in general if deduce __module__ in type.__call__() instead of type.__new__(). But wouldn't we have the same problem if a metaclass overrides type.__call__ instead? Also, wouldn't that reset the __module__ value anytime the class is called and an object is instantiated? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 22:47:58 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 18 Jun 2019 02:47:58 +0000 Subject: [issue5680] Simulate command-line arguments for program run in IDLE In-Reply-To: <1238798556.38.0.28468201552.issue5680@psf.upfronthosting.co.za> Message-ID: <1560826078.34.0.132371102349.issue5680@roundup.psfhosted.org> miss-islington added the comment: New changeset 81f7899f517f18a45ab111598f9dd6d7210956a8 by Miss Islington (bot) in branch '3.7': bpo-5680: IDLE: Customize running a module (GH-13763) https://github.com/python/cpython/commit/81f7899f517f18a45ab111598f9dd6d7210956a8 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 22:47:58 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 18 Jun 2019 02:47:58 +0000 Subject: [issue5680] Simulate command-line arguments for program run in IDLE In-Reply-To: <1238798556.38.0.28468201552.issue5680@psf.upfronthosting.co.za> Message-ID: <1560826078.83.0.60479469565.issue5680@roundup.psfhosted.org> miss-islington added the comment: New changeset ae526ee320d3feabba0aa4dffa9d52e39f8941dc by Miss Islington (bot) in branch '3.8': bpo-5680: IDLE: Customize running a module (GH-13763) https://github.com/python/cpython/commit/ae526ee320d3feabba0aa4dffa9d52e39f8941dc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 22:56:16 2019 From: report at bugs.python.org (Ammar Askar) Date: Tue, 18 Jun 2019 02:56:16 +0000 Subject: [issue37326] Python distributions do not contain libffi license In-Reply-To: <1560825416.41.0.74258395972.issue37326@roundup.psfhosted.org> Message-ID: <1560826576.58.0.968612847101.issue37326@roundup.psfhosted.org> Ammar Askar added the comment: LICENSE.txt only contains Python's licensing information. You can find all the external licenses in https://docs.python.org/3/license.html?highlight=libffi#libffi On Windows, this is also distributed as part of Doc/pythonXXX.chm If you don't think this is sufficient, feel free to re-open. ---------- nosy: +ammar2 resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 23:09:12 2019 From: report at bugs.python.org (Gregory Szorc) Date: Tue, 18 Jun 2019 03:09:12 +0000 Subject: [issue37326] Python distributions do not contain libffi license In-Reply-To: <1560825416.41.0.74258395972.issue37326@roundup.psfhosted.org> Message-ID: <1560827352.7.0.762404255145.issue37326@roundup.psfhosted.org> Gregory Szorc added the comment: FWIW LICENSE.txt on Windows contains licenses for additional projects starting on line 258 (at least in CPython 3.7.3), which contains the section header "Additional Conditions for this Windows binary build". But, the Doc/pythonXXX.chm does indeed contain libffi's license text. So we're all good here. I'm not sure why LICENSE.txt on Windows is incomplete. *shrugs* ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 23:22:08 2019 From: report at bugs.python.org (Ammar Askar) Date: Tue, 18 Jun 2019 03:22:08 +0000 Subject: [issue37326] Windows LICENSE.txt do not contain libffi license In-Reply-To: <1560825416.41.0.74258395972.issue37326@roundup.psfhosted.org> Message-ID: <1560828128.55.0.84521875437.issue37326@roundup.psfhosted.org> Ammar Askar added the comment: Oh whoops, I was looking at my py2 folder. Let's reopen in that case. ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware resolution: not a bug -> stage: resolved -> status: closed -> open title: Python distributions do not contain libffi license -> Windows LICENSE.txt do not contain libffi license versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 17 23:53:36 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 18 Jun 2019 03:53:36 +0000 Subject: [issue37317] asyncio gather doesn't handle custom exceptions that inherit from BaseException In-Reply-To: <1560780641.84.0.00364750397427.issue37317@roundup.psfhosted.org> Message-ID: <1560830016.16.0.133056402942.issue37317@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: On master this returns the below output. Maybe this change in master was due to 431b540bf79f0982559b1b0e420b1b085f667bb7 (issue32528) that is available with 3.8+ ? ./python.exe ../backups/bpo37317.py BEGIN THIS DONE: 1 THIS DONE: 2 THIS DONE: 3 THIS DONE: 4 THIS DONE: 6 THIS DONE: 7 THIS DONE: 8 THIS DONE: 9 THIS DONE: 10 Result: [None, None, None, None, CustomException(), None, None, None, None, None] END ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 18 01:24:59 2019 From: report at bugs.python.org (Tim Peters) Date: Tue, 18 Jun 2019 05:24:59 +0000 Subject: [issue37295] Possible optimizations for math.comb() In-Reply-To: <1560626260.31.0.393863097125.issue37295@roundup.psfhosted.org> Message-ID: <1560835499.79.0.778532632837.issue37295@roundup.psfhosted.org> Tim Peters added the comment: In real life, I expect 99.999%+ of calls will be made with small arguments, so (1) is worth it. I like Mark's suggestion to use uint64_t so the acceptable range doesn't depend on platform. At least in the world I live in, 32-bit boxes are all but extinct anyway. I honestly wouldn't bother with more than that. It's fun to optimize giant-integer algorithms with an ever-ballooning number of different clever approaches, but Python is an odd place for that. People looking for blazing fast giant-int facilities generally want lots & lots of them, so are better steered toward, e.g., gmp. That's its reason for existing. For example, their implementation of binomial coefficients uses special division algorithms exploiting that the quotient is exact (no remainder): https://gmplib.org/manual/Exact-Division.html#Exact-Division There's just no end to potential speedups. But in Python, I expect a vast majority of users will be happy if they get the right answer for the number of possible poker hands ;-) Oh ya - some smart kid will file a bug report about the inability to interrupt the calculation of a billion-bit result, so (4) is inevitable. Me, I'd wait for them to complain, and encourage _them_ to learn something useful by writing a patch to fix it :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 18 02:17:11 2019 From: report at bugs.python.org (aixian le) Date: Tue, 18 Jun 2019 06:17:11 +0000 Subject: [issue37327] python re bug Message-ID: <1560838631.6.0.225714277918.issue37327@roundup.psfhosted.org> New submission from aixian le : the code is: banner = "HTTP/1.0 404 Not Found\r\nDate: Mon, 17 Jun 2019 13:15:44 GMT\r\nServer: \r\nConnection: close\r\nContent-Type: text/html\r\n\r\n404 Not Found\r\n

    404 Not Found

    \r\nThe requested URL /PSIA/index was not found on this server.\r\n\r\n" regex = "^HTTP/1\\.0 404 Not Found\\r\\n(?:[^<]+|<(?!/head>))*?